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

The User Equipment NetDevice. More...

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

+ Inheritance diagram for ns3::NrUeNetDevice:
+ Collaboration diagram for ns3::NrUeNetDevice:

Public Member Functions

 NrUeNetDevice ()
 NrUeNetDevice.
 
 ~NrUeNetDevice () override
 ~NrUeNetDevice
 
void EnqueueDlHarqFeedback (const DlHarqInfo &m) const
 Spectrum has calculated the HarqFeedback for one DL transmission, and give it to the NetDevice of the UE.
 
Ptr< BwpManagerUeGetBwpManager () const
 Get the bandwidth part manager.
 
std::map< uint8_t, Ptr< BandwidthPartUe > > GetCcMap ()
 Get the NrComponentCarrier Map for the UE.
 
uint32_t GetCcMapSize () const
 Get the size of the component carriers map.
 
uint16_t GetCellId () const
 Get the CellId.
 
uint32_t GetCsgId () const
 GetCsgId ?
 
uint64_t GetImsi () const
 Get the Imsi.
 
Ptr< NrUeMacGetMac (uint8_t index) const
 Obtain a pointer to the MAC at the index specified.
 
Ptr< NrEpcUeNasGetNas () const
 Get a pointer to the Nas.
 
Ptr< NrUePhyGetPhy (uint8_t index) const
 Obtain a pointer to the PHY at the index specified.
 
Ptr< NrUeRrcGetRrc () const
 Get a Rrc pointer.
 
Ptr< const NrGnbNetDeviceGetTargetGnb () const
 Obtain a pointer to the target gnb.
 
void RouteIngoingCtrlMsgs (const std::list< Ptr< NrControlMessage > > &msgList, uint8_t sourceBwpId)
 The UE 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 (std::map< uint8_t, Ptr< BandwidthPartUe > > ccm)
 Set the NrComponentCarrier Map for the UE.
 
void SetCsgId (uint32_t csgId)
 SetCsgId ?
 
void SetImsi (uint64_t imsi)
 Set the IMSI.
 
void SetInitAssoc (Ptr< NrInitialAssociation > initAssoc)
 Set the Nr Initial Association.
 
void SetTargetGnb (Ptr< NrGnbNetDevice > gnb)
 Set the GNB to which this UE is attached to.
 
void UpdateConfig ()
 Update the RRC config. Must be called only once.
 
- 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 ()
 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 User Equipment NetDevice.

This class represent the netdevice of the UE. This class is the contact point between the TCP/IP part (from internet and network modules) and the NR part.

Config Paths

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

Attributes

  • NrEpcUeNas: The NAS associated to this UeNetDevice
    • Set with class: ns3::PointerValue
    • Underlying type: ns3::Ptr< ns3::NrEpcUeNas>
    • Initial value: 0
    • Flags: construct write read
  • nrUeRrc: The RRC associated to this UeNetDevice
    • Set with class: ns3::PointerValue
    • Underlying type: ns3::Ptr< ns3::NrUeRrc>
    • Initial value: 0
    • Flags: construct write read
  • Imsi: International Mobile Subscriber Identity assigned to this UE
    • Set with class: ns3::UintegerValue
    • Underlying type: uint64_t 0:18446744073709551615
    • Initial value: 0
    • Flags: construct write read
  • PrimaryDlIndex: The index of DL PHY/MAC that will be used as the primary DL PHY/MAC.This is needed because UE RRC needs to know which DL PHY/MAC pair is primary.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:65535
    • Initial value: 0
    • Flags: construct write read
  • PrimaryUlIndex: The index of UL PHY/MAC that will be used as the primary UL PHY/MAC.This is needed because UE RRC needs to know which UL PHY/MAC pair is primary.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:65535
    • Initial value: 0
    • Flags: construct write read
  • NrUeRrc: The RRC layer associated with the gNB
    • Set with class: ns3::PointerValue
    • Underlying type: ns3::Ptr< ns3::NrUeRrc>
    • Initial value: 0
    • Flags: construct write read
  • NrUeComponentCarrierManager: The ComponentCarrierManager associated to this UeNetDevice
  • ComponentCarrierMapUe: List of all component Carrier.
    • Set with class: ns3::ObjectPtrContainerValue
    • Underlying type: ns3::Ptr< ns3::BandwidthPartUe>
    • Flags: read
  • InitAssoc: Pointer to nr Initial Accos
    • Set with class: ns3::PointerValue
    • Underlying type: ns3::Ptr< ns3::NrInitialAssociation>
    • 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 272 bytes (on a 64-bit architecture).

Definition at line 36 of file nr-ue-net-device.h.

Constructor & Destructor Documentation

◆ NrUeNetDevice()

ns3::NrUeNetDevice::NrUeNetDevice ( )

NrUeNetDevice.

Definition at line 88 of file nr-ue-net-device.cc.

◆ ~NrUeNetDevice()

ns3::NrUeNetDevice::~NrUeNetDevice ( )
override

~NrUeNetDevice

Definition at line 93 of file nr-ue-net-device.cc.

Member Function Documentation

◆ DoDispose()

void ns3::NrUeNetDevice::DoDispose ( )
overrideprotected

Definition at line 110 of file nr-ue-net-device.cc.

◆ DoInitialize()

void ns3::NrUeNetDevice::DoInitialize ( )
overrideprotected

Definition at line 98 of file nr-ue-net-device.cc.

◆ DoSend()

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

Implements ns3::NrNetDevice.

Definition at line 230 of file nr-ue-net-device.cc.

◆ EnqueueDlHarqFeedback()

void ns3::NrUeNetDevice::EnqueueDlHarqFeedback ( const DlHarqInfo m) const

Spectrum has calculated the HarqFeedback for one DL transmission, and give it to the NetDevice of the UE.

The NetDevice find the best BWP to forward the Harq Feedback, and then forward it to the PHY of the selected BWP.

Parameters
mfeedback

Definition at line 145 of file nr-ue-net-device.cc.

◆ GetBwpManager()

Ptr< BwpManagerUe > ns3::NrUeNetDevice::GetBwpManager ( ) const

Get the bandwidth part manager.

Returns
a pointer to the BWP manager

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

◆ GetCcMap()

std::map< uint8_t, Ptr< BandwidthPartUe > > ns3::NrUeNetDevice::GetCcMap ( )

Get the NrComponentCarrier Map for the UE.

Returns
the map of ComponentCarrierUe

Definition at line 131 of file nr-ue-net-device.cc.

◆ GetCcMapSize()

uint32_t ns3::NrUeNetDevice::GetCcMapSize ( ) const

Get the size of the component carriers map.

Returns
the number of cc that we have

Definition at line 138 of file nr-ue-net-device.cc.

◆ GetCellId()

uint16_t ns3::NrUeNetDevice::GetCellId ( ) const

Get the CellId.

Returns
cell ID

Definition at line 291 of file nr-ue-net-device.cc.

References GetTargetGnb().

+ Here is the call graph for this function:

◆ GetCsgId()

uint32_t ns3::NrUeNetDevice::GetCsgId ( ) const

GetCsgId ?

Returns
?

Definition at line 199 of file nr-ue-net-device.cc.

◆ GetImsi()

uint64_t ns3::NrUeNetDevice::GetImsi ( ) const

Get the Imsi.

Returns
UE imsi

Definition at line 284 of file nr-ue-net-device.cc.

Referenced by ns3::NrStatsCalculator::FindImsiFromNrUeNetDevice(), and GetTypeId().

+ Here is the caller graph for this function:

◆ GetMac()

Ptr< NrUeMac > ns3::NrUeNetDevice::GetMac ( uint8_t  index) const

Obtain a pointer to the MAC at the index specified.

Parameters
indexbandwidth part index
Returns
the pointer to the MAC selected

Definition at line 217 of file nr-ue-net-device.cc.

◆ GetNas()

Ptr< NrEpcUeNas > ns3::NrUeNetDevice::GetNas ( ) const

Get a pointer to the Nas.

Returns
the NAS pointer

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

◆ GetPhy()

Ptr< NrUePhy > ns3::NrUeNetDevice::GetPhy ( uint8_t  index) const

Obtain a pointer to the PHY at the index specified.

Parameters
indexbandwidth part index
Returns
the pointer to the PHY selected

Definition at line 241 of file nr-ue-net-device.cc.

Referenced by ns3::NrRadioEnvironmentMapHelper::CreateRem(), ns3::NrInitialAssociation::GetUeActivePanel(), and ns3::NrInitialAssociation::SetUeActivePanel().

+ Here is the caller graph for this function:

◆ GetRrc()

Ptr< NrUeRrc > ns3::NrUeNetDevice::GetRrc ( ) const

Get a Rrc pointer.

Returns
RRC pointer

Definition at line 262 of file nr-ue-net-device.cc.

◆ GetTargetGnb()

Ptr< const NrGnbNetDevice > ns3::NrUeNetDevice::GetTargetGnb ( ) const

Obtain a pointer to the target gnb.

Returns
a pointer to the target gnb

Definition at line 319 of file nr-ue-net-device.cc.

Referenced by GetCellId().

+ Here is the caller graph for this function:

◆ GetTypeId()

TypeId ns3::NrUeNetDevice::GetTypeId ( )
static

GetTypeId.

Returns

Definition at line 30 of file nr-ue-net-device.cc.

References GetImsi(), and SetImsi().

Referenced by ns3::NrHelper::NrHelper().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RouteIngoingCtrlMsgs()

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

The UE received a CTRL message list.

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

Parameters
msgListMessage list
sourceBwpIdBWP Id from which the list originated

Definition at line 156 of file nr-ue-net-device.cc.

◆ RouteOutgoingCtrlMsgs()

void ns3::NrUeNetDevice::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 170 of file nr-ue-net-device.cc.

◆ SetCcMap()

void ns3::NrUeNetDevice::SetCcMap ( std::map< uint8_t, Ptr< BandwidthPartUe > >  ccm)

Set the NrComponentCarrier Map for the UE.

Parameters
ccmthe map of ComponentCarrierUe

Definition at line 191 of file nr-ue-net-device.cc.

◆ SetCsgId()

void ns3::NrUeNetDevice::SetCsgId ( uint32_t  csgId)

SetCsgId ?

Parameters
csgId?

Definition at line 206 of file nr-ue-net-device.cc.

◆ SetImsi()

void ns3::NrUeNetDevice::SetImsi ( uint64_t  imsi)

Set the IMSI.

This propagates to the device's RRC and EpcUeNas, if present. This is also called at device Initialization time.

Parameters
imsiThe device's IMSI

Definition at line 269 of file nr-ue-net-device.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetInitAssoc()

void ns3::NrUeNetDevice::SetInitAssoc ( Ptr< NrInitialAssociation initAssoc)

Set the Nr Initial Association.

Parameters
initAssocinitial assoc to attach

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

◆ SetTargetGnb()

void ns3::NrUeNetDevice::SetTargetGnb ( Ptr< NrGnbNetDevice gnb)

Set the GNB to which this UE is attached to.

Parameters
gnbGNB to attach to

This method may change once we implement handover.

Definition at line 312 of file nr-ue-net-device.cc.

◆ UpdateConfig()

void ns3::NrUeNetDevice::UpdateConfig ( )

Update the RRC config. Must be called only once.

This method is deprecated and no longer needed and will be removed from future versions of this model.

Definition at line 224 of file nr-ue-net-device.cc.


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