The eNodeB device implementation. More...
#include "lte-enb-net-device.h"
Public Member Functions | |
LteEnbNetDevice () | |
~LteEnbNetDevice () override | |
void | DoDispose () override |
Destructor implementation. | |
std::map< uint8_t, Ptr< ComponentCarrierBaseStation > > | GetCcMap () const |
uint16_t | GetCellId () const |
std::vector< uint16_t > | GetCellIds () const |
Ptr< LteEnbComponentCarrierManager > | GetComponentCarrierManager () const |
uint32_t | GetCsgId () const |
Returns the CSG ID of the eNodeB. | |
bool | GetCsgIndication () const |
Returns the CSG indication flag of the eNodeB. | |
uint16_t | GetDlBandwidth () const |
uint32_t | GetDlEarfcn () const |
Ptr< LteEnbMac > | GetMac () const |
Ptr< LteEnbMac > | GetMac (uint8_t index) const |
Ptr< LteEnbPhy > | GetPhy () const |
Ptr< LteEnbPhy > | GetPhy (uint8_t index) const |
Ptr< LteEnbRrc > | GetRrc () const |
uint16_t | GetUlBandwidth () const |
uint32_t | GetUlEarfcn () const |
bool | HasCellId (uint16_t cellId) const |
bool | Send (Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber) override |
void | SetCcMap (std::map< uint8_t, Ptr< ComponentCarrierBaseStation > > ccm) |
Set the ComponentCarrier Map of the Enb. | |
void | SetCsgId (uint32_t csgId) |
Associate the eNodeB device with a particular CSG. | |
void | SetCsgIndication (bool csgIndication) |
Enable or disable the CSG indication flag. | |
void | SetDlBandwidth (uint16_t bw) |
void | SetDlEarfcn (uint32_t earfcn) |
void | SetUlBandwidth (uint16_t bw) |
void | SetUlEarfcn (uint32_t earfcn) |
![]() | |
LteNetDevice () | |
LteNetDevice (const LteNetDevice &)=delete | |
~LteNetDevice () override | |
void | AddLinkChangeCallback (Callback< void > callback) override |
void | DoDispose () override |
Destructor implementation. | |
Address | GetAddress () const override |
Address | GetBroadcast () const override |
Ptr< Channel > | GetChannel () const override |
uint32_t | GetIfIndex () const override |
uint16_t | GetMtu () const override |
Address | GetMulticast (Ipv4Address addr) const override |
Make and return a MAC multicast address using the provided multicast group. | |
Address | GetMulticast (Ipv6Address addr) const override |
Get the MAC multicast address corresponding to the IPv6 address provided. | |
Ptr< Node > | GetNode () const override |
bool | IsBridge () const override |
Return true if the net device is acting as a bridge. | |
bool | IsBroadcast () const override |
bool | IsLinkUp () const override |
bool | IsMulticast () const override |
bool | IsPointToPoint () const override |
Return true if the net device is on a point-to-point link. | |
bool | NeedsArp () const override |
LteNetDevice & | operator= (const LteNetDevice &)=delete |
void | Receive (Ptr< Packet > p) |
receive a packet from the lower layers in order to forward it to the upper layers | |
bool | SendFrom (Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber) override |
void | SetAddress (Address address) override |
Set the address of this interface. | |
void | SetIfIndex (const uint32_t index) override |
bool | SetMtu (const uint16_t mtu) override |
void | SetNode (Ptr< Node > node) override |
void | SetPromiscReceiveCallback (PromiscReceiveCallback cb) override |
void | SetReceiveCallback (NetDevice::ReceiveCallback cb) override |
bool | SupportsSendFrom () const override |
![]() | |
~NetDevice () override | |
virtual void | AddLinkChangeCallback (Callback< void > callback)=0 |
virtual Address | GetAddress () const =0 |
virtual Address | GetBroadcast () const =0 |
virtual Ptr< Channel > | GetChannel () const =0 |
virtual uint32_t | GetIfIndex () const =0 |
virtual uint16_t | GetMtu () const =0 |
virtual Address | GetMulticast (Ipv4Address multicastGroup) const =0 |
Make and return a MAC multicast address using the provided multicast group. | |
virtual Address | GetMulticast (Ipv6Address addr) const =0 |
Get the MAC multicast address corresponding to the IPv6 address provided. | |
virtual Ptr< Node > | GetNode () const =0 |
virtual bool | IsBridge () const =0 |
Return true if the net device is acting as a bridge. | |
virtual bool | IsBroadcast () const =0 |
virtual bool | IsLinkUp () const =0 |
virtual bool | IsMulticast () const =0 |
virtual bool | IsPointToPoint () const =0 |
Return true if the net device is on a point-to-point link. | |
virtual bool | NeedsArp () const =0 |
virtual bool | Send (Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)=0 |
virtual bool | SendFrom (Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber)=0 |
virtual void | SetAddress (Address address)=0 |
Set the address of this interface. | |
virtual void | SetIfIndex (const uint32_t index)=0 |
virtual bool | SetMtu (const uint16_t mtu)=0 |
virtual void | SetNode (Ptr< Node > node)=0 |
virtual void | SetPromiscReceiveCallback (PromiscReceiveCallback cb)=0 |
virtual void | SetReceiveCallback (ReceiveCallback cb)=0 |
virtual bool | SupportsSendFrom () const =0 |
![]() | |
Object () | |
Constructor. | |
~Object () override | |
Destructor. | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. | |
void | Dispose () |
Dispose of this Object. | |
AggregateIterator | GetAggregateIterator () const |
Get an iterator to the Objects aggregated to this one. | |
TypeId | GetInstanceTypeId () const override |
Get the most derived TypeId for this Object. | |
template<typename T > | |
Ptr< T > | GetObject () const |
Get a pointer to the requested aggregated Object. | |
template<> | |
Ptr< Object > | GetObject () const |
Specialization of () for objects of type ns3::Object. | |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
Get a pointer to the requested aggregated Object by TypeId. | |
template<> | |
Ptr< Object > | GetObject (TypeId tid) const |
Specialization of (TypeId tid) for objects of type ns3::Object. | |
void | Initialize () |
Invoke DoInitialize on all Objects aggregated to this one. | |
bool | IsInitialized () const |
Check if the object has been initialized. | |
![]() | |
SimpleRefCount () | |
Default constructor. | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment operator. | |
void | Ref () const |
Increment the reference count. | |
void | Unref () const |
Decrement the reference count. | |
![]() | |
virtual | ~ObjectBase () |
Virtual destructor. | |
void | GetAttribute (std::string name, AttributeValue &value) const |
Get the value of an attribute, raising fatal errors if unsuccessful. | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising errors. | |
virtual TypeId | GetInstanceTypeId () const =0 |
Get the most derived TypeId for this Object. | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Get the type ID. | |
![]() | |
static TypeId | GetTypeId () |
Get the type ID. | |
![]() | |
static TypeId | GetTypeId () |
Get the type ID. | |
![]() | |
static TypeId | GetTypeId () |
Register this type. | |
![]() | |
static TypeId | GetTypeId () |
Get the type ID. | |
Protected Member Functions | |
void | DoInitialize () override |
Initialize() implementation. | |
![]() | |
Object (const Object &o) | |
Copy an Object. | |
virtual void | DoDispose () |
Destructor implementation. | |
virtual void | DoInitialize () |
Initialize() implementation. | |
virtual void | NotifyNewAggregate () |
Notify all Objects aggregated to this one of a new Object being aggregated. | |
![]() | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. | |
virtual void | NotifyConstructionCompleted () |
Notifier called once the ObjectBase is fully constructed. | |
Private Member Functions | |
void | UpdateConfig () |
Propagate attributes and configuration to sub-modules. | |
Private Attributes | |
Ptr< LteAnr > | m_anr |
ANR. | |
std::map< uint8_t, Ptr< ComponentCarrierBaseStation > > | m_ccMap |
ComponentCarrier map. | |
uint16_t | m_cellId |
Cell Identifier. | |
Ptr< LteEnbComponentCarrierManager > | m_componentCarrierManager |
the component carrier manager of this eNb | |
uint16_t | m_csgId |
CSG ID. | |
bool | m_csgIndication |
CSG indication. | |
uint16_t | m_dlBandwidth |
DEPRECATE - It is maintained for backward compatibility after adding CA feature- downlink bandwidth in RBs. | |
uint32_t | m_dlEarfcn |
DEPRECATE - It is maintained for backward compatibility after adding CA feature- downlink carrier frequency. | |
Ptr< LteFfrAlgorithm > | m_ffrAlgorithm |
DEPRECATED - It is maintained for backward compatibility after adding CA feature. | |
Ptr< LteHandoverAlgorithm > | m_handoverAlgorithm |
the handover algorithm | |
bool | m_isConfigured |
is configured? | |
bool | m_isConstructed |
is constructed? | |
Ptr< LteEnbRrc > | m_rrc |
the RRC | |
uint16_t | m_ulBandwidth |
DEPRECATE - It is maintained for backward compatibility after adding CA feature- uplink bandwidth in RBs. | |
uint32_t | m_ulEarfcn |
DEPRECATE - It is maintained for backward compatibility after adding CA feature- uplink carrier frequency. | |
Additional Inherited Members | |
![]() | |
typedef void(* | LinkChangeTracedCallback) () |
TracedCallback signature for link changed event. | |
enum | PacketType { PACKET_HOST = 1 , NS3_PACKET_HOST = PACKET_HOST , PACKET_BROADCAST , NS3_PACKET_BROADCAST = PACKET_BROADCAST , PACKET_MULTICAST , NS3_PACKET_MULTICAST = PACKET_MULTICAST , PACKET_OTHERHOST , NS3_PACKET_OTHERHOST = PACKET_OTHERHOST } |
Packet types are used as they are in Linux. More... | |
typedef Callback< bool, Ptr< NetDevice >, Ptr< const Packet >, uint16_t, const Address &, const Address &, PacketType > | PromiscReceiveCallback |
typedef Callback< bool, Ptr< NetDevice >, Ptr< const Packet >, uint16_t, const Address & > | ReceiveCallback |
![]() | |
NetDevice::ReceiveCallback | m_rxCallback |
receive callback | |
![]() | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. | |
The eNodeB device implementation.
ns3::LteEnbNetDevice is accessible through the following paths with Config::Set and Config::Connect:
No TraceSources are defined for this type.
Size of this type is 200 bytes (on a 64-bit architecture).
Definition at line 58 of file lte-enb-net-device.h.
ns3::LteEnbNetDevice::LteEnbNetDevice | ( | ) |
Definition at line 147 of file lte-enb-net-device.cc.
References NS_LOG_FUNCTION.
|
override |
Definition at line 156 of file lte-enb-net-device.cc.
References NS_LOG_FUNCTION.
|
overridevirtual |
Destructor implementation.
This method is called by Dispose() or by the Object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overridden version of this method and chain up to their parent's implementation once they are done. i.e, for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose() method.
It is safe to call GetObject() from within this method.
Reimplemented from ns3::Object.
Definition at line 162 of file lte-enb-net-device.cc.
References ns3::LteNetDevice::DoDispose(), m_anr, m_ccMap, m_componentCarrierManager, m_handoverAlgorithm, m_rrc, and NS_LOG_FUNCTION.
|
overrideprotectedvirtual |
Initialize() implementation.
This method is called only once by Initialize(). If the user calls Initialize() multiple times, DoInitialize() is called only the first time.
Subclasses are expected to override this method and chain up to their parent's implementation once they are done. It is safe to call GetObject() and AggregateObject() from within this method.
Reimplemented from ns3::Object.
Definition at line 373 of file lte-enb-net-device.cc.
References m_anr, m_ccMap, m_componentCarrierManager, m_ffrAlgorithm, m_handoverAlgorithm, m_isConstructed, m_rrc, NS_LOG_FUNCTION, and UpdateConfig().
std::map< uint8_t, Ptr< ComponentCarrierBaseStation > > ns3::LteEnbNetDevice::GetCcMap | ( | ) | const |
Definition at line 360 of file lte-enb-net-device.cc.
References m_ccMap.
uint16_t ns3::LteEnbNetDevice::GetCellId | ( | ) | const |
Definition at line 227 of file lte-enb-net-device.cc.
References m_cellId.
Referenced by LteHandoverTargetTestCase::CellShutdownCallback(), LteSecondaryCellHandoverTestCase::DoRun(), LteHandoverTargetTestCase::DoRun(), and ns3::LteStatsCalculator::FindCellIdFromEnbRlcPath().
std::vector< uint16_t > ns3::LteEnbNetDevice::GetCellIds | ( | ) | const |
Definition at line 233 of file lte-enb-net-device.cc.
References m_ccMap.
Referenced by ns3::EmuEpcHelper::AddX2Interface().
Ptr< LteEnbComponentCarrierManager > ns3::LteEnbNetDevice::GetComponentCarrierManager | ( | ) | const |
Definition at line 221 of file lte-enb-net-device.cc.
References m_componentCarrierManager.
uint32_t ns3::LteEnbNetDevice::GetCsgId | ( | ) | const |
Returns the CSG ID of the eNodeB.
Definition at line 332 of file lte-enb-net-device.cc.
References m_csgId.
Referenced by GetTypeId().
bool ns3::LteEnbNetDevice::GetCsgIndication | ( | ) | const |
Returns the CSG indication flag of the eNodeB.
Definition at line 346 of file lte-enb-net-device.cc.
References m_csgIndication.
Referenced by GetTypeId().
uint16_t ns3::LteEnbNetDevice::GetDlBandwidth | ( | ) | const |
Definition at line 279 of file lte-enb-net-device.cc.
References m_dlBandwidth.
Referenced by GetTypeId().
uint32_t ns3::LteEnbNetDevice::GetDlEarfcn | ( | ) | const |
Definition at line 306 of file lte-enb-net-device.cc.
References m_dlEarfcn.
Definition at line 191 of file lte-enb-net-device.cc.
References GetMac().
Referenced by GetMac().
index | CC index |
Definition at line 203 of file lte-enb-net-device.cc.
References m_ccMap.
Definition at line 197 of file lte-enb-net-device.cc.
References GetPhy().
Referenced by LteHandoverTargetTestCase::CellShutdownCallback(), GetPhy(), and LteSecondaryCellHandoverTestCase::ShutdownCell().
index | SCC index |
Definition at line 209 of file lte-enb-net-device.cc.
References m_ccMap.
Definition at line 215 of file lte-enb-net-device.cc.
References m_rrc.
|
static |
Get the type ID.
Definition at line 61 of file lte-enb-net-device.cc.
References GetCsgId(), GetCsgIndication(), GetDlBandwidth(), GetUlBandwidth(), m_anr, m_ccMap, m_cellId, m_componentCarrierManager, m_dlEarfcn, m_ffrAlgorithm, m_handoverAlgorithm, m_rrc, m_ulEarfcn, ns3::MakeBooleanAccessor(), ns3::MakeBooleanChecker(), ns3::MakeObjectMapAccessor(), ns3::MakePointerAccessor(), ns3::MakeUintegerAccessor(), SetCsgId(), SetCsgIndication(), SetDlBandwidth(), ns3::TypeId::SetParent(), and SetUlBandwidth().
Referenced by ns3::LteHelper::LteHelper().
uint16_t ns3::LteEnbNetDevice::GetUlBandwidth | ( | ) | const |
Definition at line 252 of file lte-enb-net-device.cc.
References m_ulBandwidth.
Referenced by GetTypeId().
uint32_t ns3::LteEnbNetDevice::GetUlEarfcn | ( | ) | const |
Definition at line 319 of file lte-enb-net-device.cc.
References m_ulEarfcn.
bool ns3::LteEnbNetDevice::HasCellId | ( | uint16_t | cellId | ) | const |
cellId | cell ID |
Definition at line 246 of file lte-enb-net-device.cc.
References m_rrc.
|
overridevirtual |
packet | packet sent from above down to Network Device |
dest | mac address of the destination (already resolved) |
protocolNumber | identifies the type of payload contained in this packet. Used to call the right L3Protocol when the packet is received. |
Called from higher layer to send packet into Network Device to the specified destination Address
Implements ns3::NetDevice.
Definition at line 395 of file lte-enb-net-device.cc.
References m_rrc, NS_ABORT_MSG_IF, NS_LOG_FUNCTION, ns3::Ipv4L3Protocol::PROT_NUMBER, and ns3::Ipv6L3Protocol::PROT_NUMBER.
void ns3::LteEnbNetDevice::SetCcMap | ( | std::map< uint8_t, Ptr< ComponentCarrierBaseStation > > | ccm | ) |
Set the ComponentCarrier Map of the Enb.
ccm | the map of ComponentCarrierEnb |
Definition at line 366 of file lte-enb-net-device.cc.
References m_ccMap, m_isConfigured, and NS_ASSERT_MSG.
void ns3::LteEnbNetDevice::SetCsgId | ( | uint32_t | csgId | ) |
Associate the eNodeB device with a particular CSG.
csgId | the intended Closed Subscriber Group identity |
CSG identity is a number identifying a Closed Subscriber Group which the cell belongs to. eNodeB is associated with a single CSG identity.
The same CSG identity can also be associated to several UEs, which is equivalent as enlisting these UEs as the members of this particular CSG.
Definition at line 338 of file lte-enb-net-device.cc.
References m_csgId, NS_LOG_FUNCTION, and UpdateConfig().
Referenced by GetTypeId().
void ns3::LteEnbNetDevice::SetCsgIndication | ( | bool | csgIndication | ) |
Enable or disable the CSG indication flag.
csgIndication | if TRUE, only CSG members are allowed to access this cell |
When the CSG indication field is set to TRUE, only UEs which are members of the CSG (i.e. same CSG ID) can gain access to the eNodeB, therefore enforcing closed access mode. Otherwise, the eNodeB operates as a non-CSG cell and implements open access mode.
Definition at line 352 of file lte-enb-net-device.cc.
References m_csgIndication, NS_LOG_FUNCTION, and UpdateConfig().
Referenced by GetTypeId().
void ns3::LteEnbNetDevice::SetDlBandwidth | ( | uint16_t | bw | ) |
bw | the downlink bandwidth in RBs |
Definition at line 285 of file lte-enb-net-device.cc.
References m_dlBandwidth, NS_FATAL_ERROR, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::LteEnbNetDevice::SetDlEarfcn | ( | uint32_t | earfcn | ) |
earfcn | the downlink carrier frequency (EARFCN) |
Definition at line 312 of file lte-enb-net-device.cc.
References m_dlEarfcn, and NS_LOG_FUNCTION.
void ns3::LteEnbNetDevice::SetUlBandwidth | ( | uint16_t | bw | ) |
bw | the uplink bandwidth in RBs |
Definition at line 258 of file lte-enb-net-device.cc.
References m_ulBandwidth, NS_FATAL_ERROR, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::LteEnbNetDevice::SetUlEarfcn | ( | uint32_t | earfcn | ) |
earfcn | the uplink carrier frequency (EARFCN) |
Definition at line 325 of file lte-enb-net-device.cc.
References m_ulEarfcn, and NS_LOG_FUNCTION.
|
private |
Propagate attributes and configuration to sub-modules.
Several attributes (e.g., the bandwidth) are exported as the attributes of the LteEnbNetDevice from a user perspective, but are actually used also in other sub-modules (the RRC, the PHY, the scheduler, etc.). This method takes care of updating the configuration of all these sub-modules so that their copy of attribute values are in sync with the one in the LteEnbNetDevice.
Definition at line 406 of file lte-enb-net-device.cc.
References m_ccMap, m_cellId, m_csgId, m_csgIndication, m_isConfigured, m_isConstructed, m_rrc, NS_ASSERT, NS_LOG_FUNCTION, and NS_LOG_LOGIC.
Referenced by DoInitialize(), SetCsgId(), and SetCsgIndication().
ANR.
Definition at line 247 of file lte-enb-net-device.h.
Referenced by DoDispose(), DoInitialize(), and GetTypeId().
|
private |
ComponentCarrier map.
Definition at line 267 of file lte-enb-net-device.h.
Referenced by DoDispose(), DoInitialize(), GetCcMap(), GetCellIds(), GetMac(), GetPhy(), GetTypeId(), SetCcMap(), and UpdateConfig().
|
private |
Cell Identifier.
Part of the CGI, see TS 29.274, section 8.21.1
Definition at line 252 of file lte-enb-net-device.h.
Referenced by GetCellId(), GetTypeId(), and UpdateConfig().
|
private |
the component carrier manager of this eNb
Definition at line 270 of file lte-enb-net-device.h.
Referenced by DoDispose(), DoInitialize(), GetComponentCarrierManager(), and GetTypeId().
|
private |
CSG ID.
Definition at line 264 of file lte-enb-net-device.h.
Referenced by GetCsgId(), SetCsgId(), and UpdateConfig().
|
private |
CSG indication.
Definition at line 265 of file lte-enb-net-device.h.
Referenced by GetCsgIndication(), SetCsgIndication(), and UpdateConfig().
|
private |
DEPRECATE - It is maintained for backward compatibility after adding CA feature- downlink bandwidth in RBs.
Definition at line 254 of file lte-enb-net-device.h.
Referenced by GetDlBandwidth(), and SetDlBandwidth().
|
private |
DEPRECATE - It is maintained for backward compatibility after adding CA feature- downlink carrier frequency.
Definition at line 259 of file lte-enb-net-device.h.
Referenced by GetDlEarfcn(), GetTypeId(), and SetDlEarfcn().
|
private |
DEPRECATED - It is maintained for backward compatibility after adding CA feature.
Definition at line 249 of file lte-enb-net-device.h.
Referenced by DoInitialize(), and GetTypeId().
|
private |
the handover algorithm
Definition at line 245 of file lte-enb-net-device.h.
Referenced by DoDispose(), DoInitialize(), and GetTypeId().
|
private |
is configured?
Definition at line 229 of file lte-enb-net-device.h.
Referenced by SetCcMap(), and UpdateConfig().
|
private |
is constructed?
Definition at line 228 of file lte-enb-net-device.h.
Referenced by DoInitialize(), and UpdateConfig().
the RRC
Definition at line 243 of file lte-enb-net-device.h.
Referenced by DoDispose(), DoInitialize(), GetRrc(), GetTypeId(), HasCellId(), Send(), and UpdateConfig().
|
private |
DEPRECATE - It is maintained for backward compatibility after adding CA feature- uplink bandwidth in RBs.
Definition at line 256 of file lte-enb-net-device.h.
Referenced by GetUlBandwidth(), and SetUlBandwidth().
|
private |
DEPRECATE - It is maintained for backward compatibility after adding CA feature- uplink carrier frequency.
Definition at line 261 of file lte-enb-net-device.h.
Referenced by GetTypeId(), GetUlEarfcn(), and SetUlEarfcn().