manager

package
v0.6.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package manager is is the main coordinator for the ONOS RAN subsystem.

Index

Constants

View Source
const (
	// DefaultTxPower - all cells start with this power level
	DefaultTxPower = 10

	// PowerFactor - relate power to distance in decimal degrees
	PowerFactor = 0.001

	// PowerBase - baseline for power to distance in decimal degrees
	PowerBase = 0.013

	// MaxNeighbours to find - useful limit for hex layouts
	MaxNeighbours = 6
)
View Source
const InvalidCrnti = "0000"

InvalidCrnti ...

View Source
const MaxCrnti = 65523

MaxCrnti - Maximum value of CRNTI

Variables

This section is empty.

Functions

func CellCreator added in v0.6.5

func CellCreator(device *topodevice.Device) error

CellCreator - wrap the NewCell function

func CellDeleter added in v0.6.5

func CellDeleter(device *topodevice.Device) error

CellDeleter - wrap the cell deletion function

func NewCell added in v0.6.5

func NewCell(device *topodevice.Device) (*types.Cell, error)

NewCell - create a new cell from a topodevice

func NewLocations

func NewLocations(cells map[types.ECGI]*types.Cell, maxUEs int, locationsScale float32) (*types.Point, map[LocationID]*Location)

NewLocations - create a new set of locations

func PowerToDist added in v0.6.1

func PowerToDist(power float64) float64

PowerToDist - convert power in dB to distance in decimal degrees Like centroid this is now used only for calculating centroid, which is only for the GUI and the neighbours

func UeDeepCopy

func UeDeepCopy(original *types.Ue) *types.Ue

UeDeepCopy ...

Types

type CellIf added in v0.6.1

type CellIf interface {
	GetPosition() types.Point
}

CellIf :

type Location

type Location struct {
	Name     LocationID
	Position types.Point
}

Location :

type LocationID added in v0.6.5

type LocationID string

LocationID type - an alias for string

type Manager

type Manager struct {
	MapLayout             types.MapLayout
	Cells                 map[types.ECGI]*types.Cell
	CellConfigs           map[types.ECGI]*e2node_1_0_0.Device
	CellsLock             *sync.RWMutex
	Locations             map[LocationID]*Location
	Routes                map[types.Imsi]*types.Route
	UserEquipments        map[types.Imsi]*types.Ue
	UserEquipmentsLock    *sync.RWMutex
	UserEquipmentsMapLock *sync.RWMutex
	Dispatcher            *dispatcher.Dispatcher
	UeChannel             chan dispatcher.Event
	RouteChannel          chan dispatcher.Event
	CellsChannel          chan dispatcher.Event

	LatencyChannel      chan metrics.HOEvent
	ResetMetricsChannel chan bool
	TopoClient          device.DeviceServiceClient
	AspectRatio         float64
	// contains filtered or unexported fields
}

Manager single point of entry for the trafficsim system.

func GetManager

func GetManager() *Manager

GetManager returns the initialized and running instance of manager. Should be called only after NewManager and Run are done.

func NewManager

func NewManager() (*Manager, error)

NewManager initializes the RAN subsystem.

func (*Manager) Close

func (m *Manager) Close()

Close kills the channels and manager related objects

func (*Manager) CrntiToName

func (m *Manager) CrntiToName(crnti types.Crnti, ecid types.ECGI) (types.Imsi, error)

CrntiToName ...

func (*Manager) DelCrnti

func (m *Manager) DelCrnti(servingTower *types.ECGI, crnti types.Crnti) error

DelCrnti deletes a crnti

func (*Manager) GetCell added in v0.6.1

func (m *Manager) GetCell(name types.ECGI) *types.Cell

GetCell returns tower based on its name

func (*Manager) GetUe

func (m *Manager) GetUe(imsi types.Imsi) (*types.Ue, error)

GetUe returns Ue based on its name

func (*Manager) NewCrnti

func (m *Manager) NewCrnti(servingTower *types.ECGI, imsi types.Imsi) (types.Crnti, error)

NewCrnti allocs a new crnti

func (*Manager) NewRoutes

func (m *Manager) NewRoutes(mapLayoutParams types.MapLayout, params RoutesParams) (map[types.Imsi]*types.Route, error)

NewRoutes Create new routes, by taking two random locations and asking Google for directions to get from one to the other

func (*Manager) NewUserEquipments

func (m *Manager) NewUserEquipments(mapLayoutParams types.MapLayout, params RoutesParams) (map[types.Imsi]*types.Ue, error)

NewUserEquipments - create a new set of UEs (phone, car etc)

func (*Manager) Run

func (m *Manager) Run(mapLayoutParams types.MapLayout, routesParams RoutesParams,
	topoEndpoint string, serverParams utils.ServerParams,
	metricsParams MetricsParams, newServerHandler NewServerHandler)

Run starts a synchronizer based on the devices and the northbound services.

func (*Manager) SetNumberUes

func (m *Manager) SetNumberUes(numUes int) error

SetNumberUes - change the number of active UEs

func (*Manager) UeAdmitted

func (m *Manager) UeAdmitted(ue *types.Ue)

UeAdmitted - called when the Admission Request for the UE is processed This causes the first RadioMeasurementReport to be sent

func (*Manager) UeHandover

func (m *Manager) UeHandover(imsi types.Imsi, newTowerID *types.ECGI) error

UeHandover perform the handover on simulated UE

func (*Manager) UpdateCell added in v0.6.1

func (m *Manager) UpdateCell(cell types.ECGI, powerAdjust float32) error

UpdateCell Update a cell's properties - usually power level

type MetricsParams

type MetricsParams struct {
	Port              uint
	ExportAllHOEvents bool
}

MetricsParams for the Prometheus exporter

type NewServerHandler added in v0.6.5

type NewServerHandler func(ecgi types.ECGI, port uint16, serverParams utils.ServerParams) error

NewServerHandler a call back function to avoid import cycle

type RoutesParams

type RoutesParams struct {
	APIKey    string
	StepDelay time.Duration
}

RoutesParams :

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL