Documentation ¶
Overview ¶
Package utils implements various gNMI path manipulation facilities.
Index ¶
- Constants
- func AspectRatio(point *types.Point) float64
- func AzimuthToRads(azimuth float64) float64
- func DegreesToRads(degrees float64) float64
- func GetRotationDegrees(pointA *types.Point, pointB *types.Point) float64
- func ImsiGenerator(ueIdx int) types.Imsi
- func ParseGNMIElements(elms []string) (*pb.Path, error)
- func RandomColor() string
- func RandomLatLng(mapCenterLat float64, mapCenterLng float64, radius float64, ...) types.Point
- func SplitPath(path string) []string
- func SplitPaths(paths []string) [][]string
- func StrPath(path *pb.Path) string
- func StrPathElem(pathElem []*pb.PathElem) string
- func StrVal(val *pb.TypedValue) string
- type ServerParams
Constants ¶
const GrpcBasePort = 5150
GrpcBasePort - the base port for trafficsim - other e2 ports are stepped from this
const ImsiBaseCbrs = types.Imsi(315010999900000)
ImsiBaseCbrs - from https://imsiadmin.com/cbrs-assignments
const ServiceName = "ran-simulator"
ServiceName is the default name of this Kubernetes service
const TestPlmnID = "315010"
TestPlmnID - https://en.wikipedia.org/wiki/Mobile_country_code#Test_networks
Variables ¶
This section is empty.
Functions ¶
func AspectRatio ¶ added in v0.6.1
AspectRatio - Compensate for the narrowing of meridians at higher latitudes
func AzimuthToRads ¶ added in v0.6.1
AzimuthToRads - angle measured in degrees clockwise from north, expressed in rads from 3 o'clock anticlockwise
func DegreesToRads ¶ added in v0.6.1
DegreesToRads - general conversion of degrees to rads, both starting at 3 o'clock going anticlockwise
func GetRotationDegrees ¶
GetRotationDegrees - get the rotation of the car
func ImsiGenerator ¶
ImsiGenerator -- generate an Imsi from an index
func ParseGNMIElements ¶ added in v0.6.5
ParseGNMIElements builds up a gnmi path, from user-supplied text
func RandomLatLng ¶
func RandomLatLng(mapCenterLat float64, mapCenterLng float64, radius float64, aspectRatio float64) types.Point
RandomLatLng - Generates a random latlng value in 1000 meter radius of loc
func SplitPath ¶ added in v0.6.5
SplitPath splits a gnmi path according to the spec. See https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-path-conventions.md No validation is done. Behavior is undefined if path is an invalid gnmi path. TODO: Do validation?
func SplitPaths ¶ added in v0.6.5
SplitPaths splits multiple gnmi paths
func StrPath ¶ added in v0.6.5
StrPath builds a human-readable form of a gnmi path. e.g. /a/b/c[e=f]
func StrPathElem ¶ added in v0.6.5
StrPathElem builds a human-readable form of a list of path elements. e.g. /a/b/c[e=f]
func StrVal ¶ added in v0.6.5
func StrVal(val *pb.TypedValue) string
StrVal will return a string representing the supplied value