5G-LENA nr-v3.3-159-ga6832aa7
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
ns3::NrGnbNetDevice Class Reference

The NrGnbNetDevice class. More...

#include "nr-gnb-net-device.h"

+ Inheritance diagram for ns3::NrGnbNetDevice:
+ Collaboration diagram for ns3::NrGnbNetDevice:

Public Member Functions

void ConfigureCell ()
 Update the RRC configuration after installation.
 
uint16_t GetBwpId (uint8_t index) const
 
Ptr< BwpManagerGnbGetBwpManager () const
 
uint32_t GetCcMapSize () const
 Get the size of the component carriers map.
 
uint16_t GetCellId () const
 
uint16_t GetCellIdDlBandwidth (uint16_t cellId) const
 Get downlink bandwidth for a given physical cell Id.
 
uint32_t GetCellIdDlEarfcn (uint16_t cellId) const
 Get uplink earfcn for a given physical cell Id.
 
std::vector< uint16_t > GetCellIds () const
 
uint16_t GetCellIdUlBandwidth (uint16_t cellId) const
 Get uplink bandwidth for a given physical cell Id.
 
uint32_t GetCellIdUlEarfcn (uint16_t cellId) const
 Get uplink earfcn for a given physical cell Id.
 
uint16_t GetEarfcn (uint8_t index) const
 
Ptr< NrGnbMacGetMac (uint8_t index) const
 
Ptr< NrFhControlGetNrFhControl ()
 Get the NrFhControl for this cell.
 
Ptr< NrGnbPhyGetPhy (uint8_t index) const
 
Ptr< NrGnbRrcGetRrc ()
 
Ptr< NrMacSchedulerGetScheduler (uint8_t index) const
 
bool IsCellConfigured () const
 Return true if ConfigureCell() has been called.
 
void RouteIngoingCtrlMsgs (const std::list< Ptr< NrControlMessage > > &msgList, uint8_t sourceBwpId)
 The gNB received a CTRL message list.
 
void RouteOutgoingCtrlMsgs (const std::list< Ptr< NrControlMessage > > &msgList, uint8_t sourceBwpId)
 Route the outgoing messages to the right BWP.
 
void SetCcMap (const std::map< uint8_t, Ptr< BandwidthPartGnb > > &ccm)
 
void SetCellId (uint16_t cellId)
 Set this gnb cell id.
 
void SetNrFhControl (Ptr< NrFhControl > nrFh)
 Set the NrFhControl for this cell.
 
void SetRrc (Ptr< NrGnbRrc > rrc)
 
void UpdateConfig ()
 Update the RRC configuration after installation.
 
- Public Member Functions inherited from ns3::NrNetDevice
 NrNetDevice ()
 NrNetDevice.
 
 ~NrNetDevice () override
 ~NrNetDevice
 
void AddLinkChangeCallback (Callback< void > callback) override
 
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 multicastGroup) const override
 
Address GetMulticast (Ipv6Address addr) const override
 
Ptr< Node > GetNode () const override
 
bool IsBridge () const override
 
bool IsBroadcast () const override
 
bool IsLinkUp () const override
 
bool IsMulticast () const override
 
bool IsPointToPoint () const override
 
bool NeedsArp () const override
 
void Receive (Ptr< Packet > p)
 
bool Send (Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber) override
 
bool SendFrom (Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber) override
 
void SetAddress (Address address) override
 
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 (ReceiveCallback cb) override
 
bool SupportsSendFrom () const override
 

Static Public Member Functions

static TypeId GetTypeId ()
 
- Static Public Member Functions inherited from ns3::NrNetDevice
static TypeId GetTypeId ()
 GetTypeId.
 

Protected Member Functions

void DoDispose () override
 
void DoInitialize () override
 
bool DoSend (Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber) override
 
- Protected Member Functions inherited from ns3::NrNetDevice
void DoDispose () override
 

Additional Inherited Members

- Protected Attributes inherited from ns3::NrNetDevice
TracedCallback< Ptr< const Packet > > m_dropTrace
 Traced Callback for dropped packets.
 
NetDevice::ReceiveCallback m_rxCallback
 
TracedCallback< Ptr< const Packet > > m_rxTrace
 Traced Callback for received packets.
 
TracedCallback< Ptr< const Packet >, const Address & > m_txTrace
 Traced Callback for transmitted packets.
 

Detailed Description

The NrGnbNetDevice class.

This class represent the GNB NetDevice.

Config Paths

ns3::NrGnbNetDevice is accessible through the following paths with Config::Set and Config::Connect:

Attributes

  • NrGnbComponentCarrierManager: The component carrier manager associated to this GnbNetDevice
  • BandwidthPartMap: List of Bandwidth Part container.
    • Set with class: ns3::ObjectPtrContainerValue
    • Underlying type: ns3::Ptr< ns3::BandwidthPartGnb>
    • Flags: read
  • NrGnbRrc: The RRC layer associated with the gNB
    • Set with class: ns3::PointerValue
    • Underlying type: ns3::Ptr< ns3::NrGnbRrc>
    • Initial value: 0
    • Flags: construct write read

Attributes defined in parent class ns3::NrNetDevice

  • Mtu: The MAC-level Maximum Transmission Unit
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:65535
    • Initial value: 30000
    • Flags: construct write read
  • ReceiveErrorModel: An optional packet error model to simulate packet loss
    • Set with class: ns3::PointerValue
    • Underlying type: ns3::Ptr< ns3::ErrorModel>
    • Initial value: 0
    • Flags: construct write read

No TraceSources are defined for this type.

TraceSources defined in parent class ns3::NrNetDevice

  • Tx: A packet has been transmitted with the Address as the recipient
    Callback signature: ns3::Packet::AddressTracedCallback
  • Rx: A packet has been received
    Callback signature: ns3::Packet::TracedCallback
  • Drop: A packet has been dropped by the receive error model
    Callback signature: ns3::Packet::TracedCallback

Size of this type is 256 bytes (on a 64-bit architecture).

Definition at line 34 of file nr-gnb-net-device.h.

Constructor & Destructor Documentation

◆ NrGnbNetDevice()

ns3::NrGnbNetDevice::NrGnbNetDevice ( )

Definition at line 53 of file nr-gnb-net-device.cc.

◆ ~NrGnbNetDevice()

ns3::NrGnbNetDevice::~NrGnbNetDevice ( )
override

Definition at line 59 of file nr-gnb-net-device.cc.

Member Function Documentation

◆ ConfigureCell()

void ns3::NrGnbNetDevice::ConfigureCell ( )

Update the RRC configuration after installation.

This method calls ConfigureCell() on the RRC using the component carrier map that has already been installed on this net device.

This method finishes cell configuration in the RRC once PHY configuration is finished. It must be called exactly once for each NrGnbNetDevice.

After NrHelper::Install() is called on gNB nodes, either this method or the NrHelper::AttachToGnb() method (or AttachToClosestGnb() method), which, in turn, calls this method, must be called exactly once, after any post-install PHY configuration is done (if any).

If AttachToGnb() is not called by initialization time, this method will be called by DoInitialize().

This method will assert if called twice on the same device. Users may check whether it has been called already by calling the IsCellConfigured() method.

Definition at line 255 of file nr-gnb-net-device.cc.

◆ DoDispose()

void ns3::NrGnbNetDevice::DoDispose ( )
overrideprotected

Definition at line 144 of file nr-gnb-net-device.cc.

◆ DoInitialize()

void ns3::NrGnbNetDevice::DoInitialize ( )
overrideprotected

Definition at line 134 of file nr-gnb-net-device.cc.

◆ DoSend()

bool ns3::NrGnbNetDevice::DoSend ( Ptr< Packet >  packet,
const Address &  dest,
uint16_t  protocolNumber 
)
overrideprotectedvirtual

Implements ns3::NrNetDevice.

Definition at line 233 of file nr-gnb-net-device.cc.

◆ GetBwpId()

uint16_t ns3::NrGnbNetDevice::GetBwpId ( uint8_t  index) const

Definition at line 207 of file nr-gnb-net-device.cc.

◆ GetBwpManager()

Ptr< BwpManagerGnb > ns3::NrGnbNetDevice::GetBwpManager ( ) const

Definition at line 174 of file nr-gnb-net-device.cc.

◆ GetCcMapSize()

uint32_t ns3::NrGnbNetDevice::GetCcMapSize ( ) const

Get the size of the component carriers map.

Returns
the number of cc that we have

Definition at line 79 of file nr-gnb-net-device.cc.

◆ GetCellId()

uint16_t ns3::NrGnbNetDevice::GetCellId ( ) const
Returns
the cell id

Definition at line 180 of file nr-gnb-net-device.cc.

Referenced by ns3::NrStatsCalculator::FindCellIdFromGnbRlcPath().

+ Here is the caller graph for this function:

◆ GetCellIdDlBandwidth()

uint16_t ns3::NrGnbNetDevice::GetCellIdDlBandwidth ( uint16_t  cellId) const

Get downlink bandwidth for a given physical cell Id.

Parameters
cellIdPhysical cell Id
Returns
number of RBs

Definition at line 271 of file nr-gnb-net-device.cc.

◆ GetCellIdDlEarfcn()

uint32_t ns3::NrGnbNetDevice::GetCellIdDlEarfcn ( uint16_t  cellId) const

Get uplink earfcn for a given physical cell Id.

Parameters
cellIdPhysical cell Id
Returns
downlink earfcn

Definition at line 305 of file nr-gnb-net-device.cc.

◆ GetCellIds()

std::vector< uint16_t > ns3::NrGnbNetDevice::GetCellIds ( ) const
Returns
the cell ids belonging to this gNB

Definition at line 187 of file nr-gnb-net-device.cc.

◆ GetCellIdUlBandwidth()

uint16_t ns3::NrGnbNetDevice::GetCellIdUlBandwidth ( uint16_t  cellId) const

Get uplink bandwidth for a given physical cell Id.

Parameters
cellIdPhysical cell Id
Returns
number of RBs

Definition at line 288 of file nr-gnb-net-device.cc.

◆ GetCellIdUlEarfcn()

uint32_t ns3::NrGnbNetDevice::GetCellIdUlEarfcn ( uint16_t  cellId) const

Get uplink earfcn for a given physical cell Id.

Parameters
cellIdPhysical cell Id
Returns
uplink earfcn

Definition at line 322 of file nr-gnb-net-device.cc.

◆ GetEarfcn()

uint16_t ns3::NrGnbNetDevice::GetEarfcn ( uint8_t  index) const

Definition at line 214 of file nr-gnb-net-device.cc.

◆ GetMac()

Ptr< NrGnbMac > ns3::NrGnbNetDevice::GetMac ( uint8_t  index) const

Definition at line 161 of file nr-gnb-net-device.cc.

◆ GetNrFhControl()

Ptr< NrFhControl > ns3::NrGnbNetDevice::GetNrFhControl ( )

Get the NrFhControl for this cell.

Returns
the ptr to NrFhControl

Definition at line 92 of file nr-gnb-net-device.cc.

◆ GetPhy()

Ptr< NrGnbPhy > ns3::NrGnbNetDevice::GetPhy ( uint8_t  index) const

Definition at line 167 of file nr-gnb-net-device.cc.

◆ GetRrc()

Ptr< NrGnbRrc > ns3::NrGnbNetDevice::GetRrc ( )

Definition at line 227 of file nr-gnb-net-device.cc.

◆ GetScheduler()

Ptr< NrMacScheduler > ns3::NrGnbNetDevice::GetScheduler ( uint8_t  index) const

Definition at line 65 of file nr-gnb-net-device.cc.

◆ GetTypeId()

TypeId ns3::NrGnbNetDevice::GetTypeId ( )
static

Definition at line 29 of file nr-gnb-net-device.cc.

◆ IsCellConfigured()

bool ns3::NrGnbNetDevice::IsCellConfigured ( ) const

Return true if ConfigureCell() has been called.

Returns
whether ConfigureCell() has been called

Definition at line 265 of file nr-gnb-net-device.cc.

◆ RouteIngoingCtrlMsgs()

void ns3::NrGnbNetDevice::RouteIngoingCtrlMsgs ( const std::list< Ptr< NrControlMessage > > &  msgList,
uint8_t  sourceBwpId 
)

The gNB received a CTRL message list.

The gNB should divide the messages to the BWP they pertain to.

Parameters
msgListMessage list
sourceBwpIdBWP Id from which the list originated

Definition at line 99 of file nr-gnb-net-device.cc.

◆ RouteOutgoingCtrlMsgs()

void ns3::NrGnbNetDevice::RouteOutgoingCtrlMsgs ( const std::list< Ptr< NrControlMessage > > &  msgList,
uint8_t  sourceBwpId 
)

Route the outgoing messages to the right BWP.

Parameters
msgListthe list of messages
sourceBwpIdthe source bwp of the messages

Definition at line 113 of file nr-gnb-net-device.cc.

◆ SetCcMap()

void ns3::NrGnbNetDevice::SetCcMap ( const std::map< uint8_t, Ptr< BandwidthPartGnb > > &  ccm)

Definition at line 72 of file nr-gnb-net-device.cc.

◆ SetCellId()

void ns3::NrGnbNetDevice::SetCellId ( uint16_t  cellId)

Set this gnb cell id.

Parameters
cellIdthe cell id

Definition at line 200 of file nr-gnb-net-device.cc.

◆ SetNrFhControl()

void ns3::NrGnbNetDevice::SetNrFhControl ( Ptr< NrFhControl nrFh)

Set the NrFhControl for this cell.

Parameters
nrFhThe ptr to the NrFhControl

Definition at line 85 of file nr-gnb-net-device.cc.

◆ SetRrc()

void ns3::NrGnbNetDevice::SetRrc ( Ptr< NrGnbRrc rrc)

Definition at line 221 of file nr-gnb-net-device.cc.

◆ UpdateConfig()

void ns3::NrGnbNetDevice::UpdateConfig ( )

Update the RRC configuration after installation.

This method finishes cell configuration in the RRC once PHY configuration is finished. It must be called exactly once for each NrGnbNetDevice.

After NrHelper::Install() is called on gNB nodes, either this method or the NrHelper::UpdateDeviceConfigs() method (which, in turn, calls this method) must be called exactly once, after any post-install PHY configuration is done (if any), and before any call is made (if any) to attach UEs to gNBs, such as AttachToGnb() and AttachToClosestGnb().

This method will assert if called twice on the same device.

This method is deprecated and no longer needed and will be removed from future versions of this model. It is replaced by ConfigureCell().

Definition at line 248 of file nr-gnb-net-device.cc.


The documentation for this class was generated from the following files: