5G-LENA nr-v3.1-69-g2dd513a7
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

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

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

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

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

Constructor & Destructor Documentation

◆ NrNetDevice()

ns3::NrNetDevice::NrNetDevice ( )

NrNetDevice.

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

◆ ~NrNetDevice()

ns3::NrNetDevice::~NrNetDevice ( )
override

~NrNetDevice

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

Member Function Documentation

◆ AddLinkChangeCallback()

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

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

◆ DoDispose()

void ns3::NrNetDevice::DoDispose ( )
overrideprotected

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

◆ GetAddress()

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

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

◆ GetBroadcast()

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

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

◆ GetChannel()

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

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

◆ GetIfIndex()

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

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

◆ GetMtu()

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

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

◆ GetMulticast() [1/2]

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

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

◆ GetMulticast() [2/2]

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

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

◆ GetNode()

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

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

◆ GetTypeId()

TypeId ns3::NrNetDevice::GetTypeId ( )
static

GetTypeId.

Returns
the object type id

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

References m_rxTrace, and m_txTrace.

◆ IsBridge()

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

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

◆ IsBroadcast()

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

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

◆ IsLinkUp()

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

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

◆ IsMulticast()

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

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

◆ IsPointToPoint()

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

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

◆ NeedsArp()

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

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

◆ Receive()

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

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

◆ Send()

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

Definition at line 237 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 155 of file nr-net-device.cc.

◆ SetAddress()

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

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

◆ SetIfIndex()

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

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

◆ SetMtu()

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

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

◆ SetNode()

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

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

◆ SetPromiscReceiveCallback()

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

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

◆ SetReceiveCallback()

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

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

◆ SupportsSendFrom()

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

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

Member Data Documentation

◆ m_rxCallback

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

Definition at line 80 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 79 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 78 of file nr-net-device.h.

Referenced by GetTypeId().


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