manager

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const DefaultTxPower = 10

DefaultTxPower - all base-stations start with this power level

View Source
const InvalidCrnti = "0000"

InvalidCrnti ...

View Source
const MaxCrnti = 65523

MaxCrnti - Maximum value of CRNTI

Variables

This section is empty.

Functions

func NewLocations

func NewLocations(towersParams types.TowersParams, mapLayout types.MapLayout) map[string]*Location

NewLocations - create a new set of locations

func NewTowers

func NewTowers(params types.TowersParams, mapLayout types.MapLayout) map[types.ECGI]*types.Tower

NewTowers - create a set of new towers

func UeDeepCopy

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

UeDeepCopy ...

Types

type Location

type Location struct {
	Name     string
	Position types.Point
}

Location :

type Manager

type Manager struct {
	MapLayout             types.MapLayout
	Towers                map[types.ECGI]*types.Tower
	TowersLock            *sync.RWMutex
	Locations             map[string]*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
	TowerChannel          chan dispatcher.Event

	LatencyChannel      chan metrics.HOEvent
	ResetMetricsChannel chan bool
	TopoClient          device.DeviceServiceClient
	// 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) GetTower

func (m *Manager) GetTower(name types.ECGI) *types.Tower

GetTower 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

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

func (*Manager) Run

func (m *Manager) Run(mapLayoutParams types.MapLayout, towerparams types.TowersParams,
	routesParams RoutesParams, topoEndpoint string, metricsPort int, serverParams utils.ServerParams,
	metricsParams MetricsParams)

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) UpdateTower

func (m *Manager) UpdateTower(tower types.ECGI, powerAdjust float32) error

UpdateTower Update a tower's properties - usually power level

type MetricsParams

type MetricsParams struct {
	Port              int
	ExportAllHOEvents bool
}

MetricsParams for the Prometheus exporter

type RoutesParams

type RoutesParams struct {
	APIKey    string
	StepDelay time.Duration
}

RoutesParams :

type TowerIf

type TowerIf interface {
	GetPosition() types.Point
}

TowerIf :

Jump to

Keyboard shortcuts

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