Binder Class Reference

Simu5G: Binder Class Reference
Simu5G

#include <Binder.h>

Public Member Functions

virtual void registerCarrier (GHz carrierFrequency, unsigned int carrierNumBands, unsigned int numerologyIndex, bool useTdd=false, unsigned int tddNumSymbolsDl=0, unsigned int tddNumSymbolsUl=0)
virtual void registerCarrierUe (GHz carrierFrequency, unsigned int numerologyIndex, MacNodeId ueId)
virtual const UeSet & getCarrierUeSet (GHz carrierFrequency)
virtual NumerologyIndex getUeMaxNumerologyIndex (MacNodeId ueId)
virtual const std::set< NumerologyIndex > * getUeNumerologyIndex (MacNodeId ueId)
virtual NumerologyIndex getNumerologyIndexFromCarrierFreq (GHz carrierFreq)
virtual double getSlotDurationFromNumerologyIndex (NumerologyIndex numerologyIndex)
virtual SlotFormat computeSlotFormat (bool useTdd, unsigned int tddNumSymbolsDl, unsigned int tddNumSymbolsUl)
virtual SlotFormat getSlotFormat (GHz carrierFrequency)
virtual void registerNode (MacNodeId nodeId, cModule *nodeModule, RanNodeType type, bool isNr=false)
virtual void unregisterNode (MacNodeId id)
virtual void registerUserPlaneNode (UserPlaneNodeControl *module, CoreNodeType type, const std::string &gateway)
virtual void registerServingNode (MacNodeId enbId, MacNodeId ueId)
virtual void unregisterServingNode (MacNodeId enbId, MacNodeId ueId)
virtual MacNodeId getServingNode (MacNodeId ueId)
virtual void registerMasterNode (MacNodeId masterId, MacNodeId slaveId)
virtual bool nodeExists (MacNodeId nodeId)
virtual cModule * getNodeModule (MacNodeId nodeId)
virtual MacNodeId getServingNodeOrSelf (MacNodeId nodeId)
virtual MacNodeId getMasterNodeOrSelf (MacNodeId secondaryEnbId)
virtual MacNodeId getSecondaryNode (MacNodeId masterEnbId)
virtual MacNodeId getMacNodeId (const inet::L3Address &address)
virtual MacNodeId getNrMacNodeId (const inet::L3Address &address)
virtual MacNodeId getUeNodeId (MacNodeId ue, bool isNr)
virtual bool isNrNodeB (MacNodeId nodeB)
virtual inet::Ipv4Address getIPv4Address (MacNodeId nodeId)
virtual std::vector< inet::L3Address > getAddresses (MacNodeId nodeId)
virtual X2NodeId getX2NodeId (const inet::L3Address &address)
virtual void setMacNodeId (const inet::L3Address &address, MacNodeId nodeId)
virtual void unsetMacNodeId (const inet::L3Address &address, MacNodeId nodeId)
virtual void setX2NodeId (const inet::L3Address &address, X2NodeId nodeId)
virtual void registerMecHost (const inet::L3Address &mecHostAddress)
virtual void registerMecHostUpfAddress (const inet::L3Address &mecHostAddress, const inet::L3Address &gtpAddress)
virtual bool isMecHost (const inet::L3Address &mecHostAddress)
virtual const inet::L3Address & getUpfFromMecHost (const inet::L3Address &mecHostAddress)
virtual cModule * getModuleByMacNodeId (MacNodeId nodeId)

Static Public Attributes

static simsignal_t nodeUnregisteredSignal_

Detailed Description

The Binder module has one instance per cellular network (a simulation may hold several such networks, each with its own Binder; see the NED file). It stores global mapping tables with OMNeT++ module IDs, IP addresses, etc.

Member Function Documentation

◆ registerCarrier()

virtual void registerCarrier ( GHz carrierFrequency,
unsigned int carrierNumBands,
unsigned int numerologyIndex,
bool useTdd = false,
unsigned int tddNumSymbolsDl = 0,
unsigned int tddNumSymbolsUl = 0 )
virtual

Registers a carrier to the global Binder module

◆ registerCarrierUe()

virtual void registerCarrierUe ( GHz carrierFrequency,
unsigned int numerologyIndex,
MacNodeId ueId )
virtual

Registers a UE to a given carrier

◆ getCarrierUeSet()

virtual const UeSet & getCarrierUeSet ( GHz carrierFrequency)
virtual

Returns the set of UEs enabled on the given carrier

◆ getUeMaxNumerologyIndex()

virtual NumerologyIndex getUeMaxNumerologyIndex ( MacNodeId ueId)
virtual

Returns the max numerology index used by the given UE

◆ getUeNumerologyIndex()

virtual const std::set< NumerologyIndex > * getUeNumerologyIndex ( MacNodeId ueId)
virtual

Returns the numerology indices used by the given UE

◆ getNumerologyIndexFromCarrierFreq()

virtual NumerologyIndex getNumerologyIndexFromCarrierFreq ( GHz carrierFreq)
inlinevirtual

Returns the numerology associated to a carrier frequency

◆ getSlotDurationFromNumerologyIndex()

virtual double getSlotDurationFromNumerologyIndex ( NumerologyIndex numerologyIndex)
inlinevirtual

Returns the slot duration associated to the numerology (in seconds)

◆ computeSlotFormat()

virtual SlotFormat computeSlotFormat ( bool useTdd,
unsigned int tddNumSymbolsDl,
unsigned int tddNumSymbolsUl )
virtual

Compute slot format object given the number of DL and UL symbols

◆ getSlotFormat()

virtual SlotFormat getSlotFormat ( GHz carrierFrequency)
virtual

Returns the slot format for the given carrier

◆ registerNode()

virtual void registerNode ( MacNodeId nodeId,
cModule * nodeModule,
RanNodeType type,
bool isNr = false )
virtual

Registers a node to the global Binder module. If the nodeId is already occupied, an error will be thrown. isNR specifies whether an LTE or 5G NR nodeId of a UE is to be assigned.

◆ unregisterNode()

virtual void unregisterNode ( MacNodeId id)
virtual

Un-registers a node from the global Binder module.

◆ registerUserPlaneNode()

virtual void registerUserPlaneNode ( UserPlaneNodeControl * module,
CoreNodeType type,
const std::string & gateway )
virtual

The user plane nodes' control-plane entry points (UserPlaneNodeControl) register here during initialization, at INITSTAGE_LOCAL. The CoreControl takes the user plane nodes it programs from here. (The base stations' control-plane entry points, ConnectionControlEnb, are found through the node directory.) gateway is that of a MEC host's UPF, and empty otherwise.

◆ registerServingNode()

virtual void registerServingNode ( MacNodeId enbId,
MacNodeId ueId )
virtual

Binds an UE with its serving eNodeB/gNodeB. Invoked at the start of the simulation and on handovers.

◆ unregisterServingNode()

virtual void unregisterServingNode ( MacNodeId enbId,
MacNodeId ueId )
virtual

Unregisters the UE from its current eNodeB/gNodeB. Invoked e.g. on handovers.

◆ getServingNode()

virtual MacNodeId getServingNode ( MacNodeId ueId)
virtual

Returns the serving eNodeB/gNodeB of an UE, or NODEID_NONE if there is none.

◆ registerMasterNode()

virtual void registerMasterNode ( MacNodeId masterId,
MacNodeId slaveId )
virtual

registerMasterNode()

It registers the secondary node to its master node (used for dual connectivity)

Parameters
masterIdMacNodeId of the Master
slaveIdMacNodeId of the Slave

◆ nodeExists()

virtual bool nodeExists ( MacNodeId nodeId)
inlinevirtual

Returns true if the node exists.

◆ getNodeModule()

virtual cModule * getNodeModule ( MacNodeId nodeId)
virtual

Returns nullptr if not found.

◆ getServingNodeOrSelf()

virtual MacNodeId getServingNodeOrSelf ( MacNodeId nodeId)
virtual

For a UE, returns the serving eNodeB/gNodeB; for an eNodeB/gNodeB or NODEID_NONE, returns the nodeId itself.

Referenced by getMacNodeId().

◆ getMasterNodeOrSelf()

virtual MacNodeId getMasterNodeOrSelf ( MacNodeId secondaryEnbId)
virtual

In a Dual Connectivity / Split Bearer setup, returns the Master Node (MeNB, MN) for the given Secondary Node (SeNB, SN).

◆ getSecondaryNode()

virtual MacNodeId getSecondaryNode ( MacNodeId masterEnbId)
virtual

TODO add "forUeId" argument, to getMasterNode() too

◆ getMacNodeId()

virtual MacNodeId getMacNodeId ( const inet::L3Address & address)
inlinevirtual

Returns the MacNodeId for the given IP address

Parameters
addressIP address
Returns
MacNodeId corresponding to the IP address

References getNrMacNodeId(), getServingNodeOrSelf(), and simu5g::NODEID_NONE.

Referenced by getX2NodeId().

◆ getNrMacNodeId()

virtual MacNodeId getNrMacNodeId ( const inet::L3Address & address)
inlinevirtual

Returns the MacNodeId for the given IP address

Parameters
addressIP address
Returns
MacNodeId corresponding to the IP address

References simu5g::NODEID_NONE.

Referenced by getMacNodeId().

◆ getUeNodeId()

virtual MacNodeId getUeNodeId ( MacNodeId ue,
bool isNr )
virtual

Returns the selected nodeId (LTE/NR) for the given UE.

Parameters
ueThe UE's current MacNodeId (can be either LTE or NR)
isNrIf true, returns the NR nodeId; if false, returns the LTE nodeId
Returns
The requested nodeId, or NODEID_NONE if not found/available

◆ isNrNodeB()

virtual bool isNrNodeB ( MacNodeId nodeB)
virtual

Whether the given base station is an NR node (gNB). Unlike UEs, whose technology is encoded in the node id range, base stations of both technologies share one id range, so this reads what the node stated at registration.

◆ getIPv4Address()

virtual inet::Ipv4Address getIPv4Address ( MacNodeId nodeId)
inlinevirtual

author Alessandro Noferi

Returns the IPv4 address for the given MacNodeId, or the unspecified address if the node has none (e.g. an IPv6-only UE). The MEC service APIs report UEs by IPv4 address.

Parameters
MacNodeIdof the node
Returns
IPv4 address corresponding to the MacNodeId

◆ getAddresses()

virtual std::vector< inet::L3Address > getAddresses ( MacNodeId nodeId)
inlinevirtual

Returns the addresses the given node is known by (see setMacNodeId()), of either family, in address order

◆ getX2NodeId()

virtual X2NodeId getX2NodeId ( const inet::L3Address & address)
inlinevirtual

Returns the X2NodeId for the given IP address

Parameters
addressIP address
Returns
X2NodeId corresponding to the IP address

References getMacNodeId().

◆ setMacNodeId()

virtual void setMacNodeId ( const inet::L3Address & address,
MacNodeId nodeId )
inlinevirtual

Associates the given IP address with the given MacNodeId.

Parameters
addressIP address

Referenced by setX2NodeId().

◆ unsetMacNodeId()

virtual void unsetMacNodeId ( const inet::L3Address & address,
MacNodeId nodeId )
inlinevirtual

Removes the association of the given IP address with the given MacNodeId, if any.

Parameters
addressIP address

◆ setX2NodeId()

virtual void setX2NodeId ( const inet::L3Address & address,
X2NodeId nodeId )
inlinevirtual

Associates the given IP address with the given X2NodeId.

Parameters
addressIP address

References setMacNodeId().

◆ registerMecHost()

virtual void registerMecHost ( const inet::L3Address & mecHostAddress)
virtual

Register the address of MEC Hosts in the simulation

◆ registerMecHostUpfAddress()

virtual void registerMecHostUpfAddress ( const inet::L3Address & mecHostAddress,
const inet::L3Address & gtpAddress )
virtual

Associates the given MEC Host address to its corresponding UPF

◆ isMecHost()

virtual bool isMecHost ( const inet::L3Address & mecHostAddress)
virtual

Returns true if the given address belongs to a MEC host

◆ getUpfFromMecHost()

virtual const inet::L3Address & getUpfFromMecHost ( const inet::L3Address & mecHostAddress)
virtual

Returns the UPF address corresponding to the given MEC Host address

◆ getModuleByMacNodeId()

virtual cModule * getModuleByMacNodeId ( MacNodeId nodeId)
virtual

Returns the module for the given MAC node ID

Member Data Documentation

◆ nodeUnregisteredSignal_

simsignal_t nodeUnregisteredSignal_
static

Emitted (with the node id as a long) at the end of unregisterNode(), for holders of per-node state that this Binder does not own – notably the optional D2D layer, which the core must not reference directly. Carries no statistic; it exists only as a notification.