5G-LENA nr-v3.3-120-gdac69c56
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
ns3::NrNetDevice Class Referenceabstract

The NrNetDevice class. More...

#include "nr-net-device.h"

+ Inheritance diagram for ns3::NrNetDevice:
+ Collaboration diagram for ns3::NrNetDevice:

Public Member Functions

 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.
 

Protected Member Functions

void DoDispose () override
 
virtual bool DoSend (Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)=0
 

Protected Attributes

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 NrNetDevice class.

This is the base class for NrUeNetDevice and NrGnbNetDevice.

Config Paths

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

Attributes

  • 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

TraceSources

  • 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 168 bytes (on a 64-bit architecture).

Definition at line 27 of file nr-net-device.h.

Constructor & Destructor Documentation

◆ NrNetDevice()

ns3::NrNetDevice::NrNetDevice ( )

NrNetDevice.

Definition at line 56 of file nr-net-device.cc.

◆ ~NrNetDevice()

ns3::NrNetDevice::~NrNetDevice ( )
override

~NrNetDevice

Definition at line 61 of file nr-net-device.cc.

Member Function Documentation

◆ AddLinkChangeCallback()

void ns3::NrNetDevice::AddLinkChangeCallback ( Callback< void >  callback)
override

Definition at line 125 of file nr-net-device.cc.

◆ DoDispose()

void ns3::NrNetDevice::DoDispose ( )
overrideprotected

Definition at line 67 of file nr-net-device.cc.

◆ GetAddress()

Address ns3::NrNetDevice::GetAddress ( ) const
override

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

◆ GetBroadcast()

Address ns3::NrNetDevice::GetBroadcast ( ) const
override

Definition at line 136 of file nr-net-device.cc.

◆ GetChannel()

Ptr< Channel > ns3::NrNetDevice::GetChannel ( ) const
override

Definition at line 86 of file nr-net-device.cc.

◆ GetIfIndex()

uint32_t ns3::NrNetDevice::GetIfIndex ( ) const
override

Definition at line 80 of file nr-net-device.cc.

◆ GetMtu()

uint16_t ns3::NrNetDevice::GetMtu ( ) const
override

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

◆ GetMulticast() [1/2]

Address ns3::NrNetDevice::GetMulticast ( Ipv4Address  multicastGroup) const
override

Definition at line 148 of file nr-net-device.cc.

◆ GetMulticast() [2/2]

Address ns3::NrNetDevice::GetMulticast ( Ipv6Address  addr) const
override

Definition at line 194 of file nr-net-device.cc.

◆ GetNode()

Ptr< Node > ns3::NrNetDevice::GetNode ( ) const
override

Definition at line 176 of file nr-net-device.cc.

◆ GetTypeId()

TypeId ns3::NrNetDevice::GetTypeId ( )
static

GetTypeId.

Returns
the object type id

Definition at line 25 of file nr-net-device.cc.

References m_dropTrace, m_rxTrace, and m_txTrace.

◆ IsBridge()

bool ns3::NrNetDevice::IsBridge ( ) const
override

Definition at line 154 of file nr-net-device.cc.

◆ IsBroadcast()

bool ns3::NrNetDevice::IsBroadcast ( ) const
override

Definition at line 130 of file nr-net-device.cc.

◆ IsLinkUp()

bool ns3::NrNetDevice::IsLinkUp ( ) const
override

Definition at line 119 of file nr-net-device.cc.

◆ IsMulticast()

bool ns3::NrNetDevice::IsMulticast ( ) const
override

Definition at line 142 of file nr-net-device.cc.

◆ IsPointToPoint()

bool ns3::NrNetDevice::IsPointToPoint ( ) const
override

Definition at line 160 of file nr-net-device.cc.

◆ NeedsArp()

bool ns3::NrNetDevice::NeedsArp ( ) const
override

Definition at line 188 of file nr-net-device.cc.

◆ Receive()

void ns3::NrNetDevice::Receive ( Ptr< Packet >  p)

Definition at line 218 of file nr-net-device.cc.

◆ Send()

bool ns3::NrNetDevice::Send ( Ptr< Packet >  packet,
const Address &  dest,
uint16_t  protocolNumber 
)
override

Definition at line 254 of file nr-net-device.cc.

◆ SendFrom()

bool ns3::NrNetDevice::SendFrom ( Ptr< Packet >  packet,
const Address &  source,
const Address &  dest,
uint16_t  protocolNumber 
)
override

Definition at line 166 of file nr-net-device.cc.

◆ SetAddress()

void ns3::NrNetDevice::SetAddress ( Address  address)
override

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

◆ SetIfIndex()

void ns3::NrNetDevice::SetIfIndex ( const uint32_t  index)
override

Definition at line 74 of file nr-net-device.cc.

◆ SetMtu()

bool ns3::NrNetDevice::SetMtu ( const uint16_t  mtu)
override

Definition at line 106 of file nr-net-device.cc.

◆ SetNode()

void ns3::NrNetDevice::SetNode ( Ptr< Node >  node)
override

Definition at line 182 of file nr-net-device.cc.

◆ SetPromiscReceiveCallback()

void ns3::NrNetDevice::SetPromiscReceiveCallback ( PromiscReceiveCallback  cb)
override

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

◆ SetReceiveCallback()

void ns3::NrNetDevice::SetReceiveCallback ( ReceiveCallback  cb)
override

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

◆ SupportsSendFrom()

bool ns3::NrNetDevice::SupportsSendFrom ( ) const
override

Definition at line 212 of file nr-net-device.cc.

Member Data Documentation

◆ m_dropTrace

TracedCallback<Ptr<const Packet> > ns3::NrNetDevice::m_dropTrace
protected

Traced Callback for dropped packets.

Definition at line 81 of file nr-net-device.h.

Referenced by GetTypeId().

◆ m_rxCallback

NetDevice::ReceiveCallback ns3::NrNetDevice::m_rxCallback
protected

Definition at line 82 of file nr-net-device.h.

◆ m_rxTrace

TracedCallback<Ptr<const Packet> > ns3::NrNetDevice::m_rxTrace
protected

Traced Callback for received packets.

Definition at line 80 of file nr-net-device.h.

Referenced by GetTypeId().

◆ m_txTrace

TracedCallback<Ptr<const Packet>, const Address&> ns3::NrNetDevice::m_txTrace
protected

Traced Callback for transmitted packets.

Definition at line 79 of file nr-net-device.h.

Referenced by GetTypeId().


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