ns3::SatNetDevice Class Reference

SatNetDevice to be utilized in the UT and GW nodes. More...

#include "satellite-net-device.h"

+ Inheritance diagram for ns3::SatNetDevice:
+ Collaboration diagram for ns3::SatNetDevice:

Public Member Functions

 SatNetDevice ()
 Default constructor. More...
 
virtual void AddLinkChangeCallback (Callback< void > callback)
 
virtual Address GetAddress (void) const
 
virtual Address GetBroadcast (void) const
 
virtual Ptr< Channel > GetChannel (void) const
 
virtual uint32_t GetIfIndex (void) const
 
Ptr< SatLlcGetLlc (void) const
 Get Llc pointer. More...
 
Ptr< SatMacGetMac (void) const
 Get a Mac pointer. More...
 
virtual uint16_t GetMtu (void) const
 
virtual Address GetMulticast (Ipv4Address multicastGroup) const
 
virtual Address GetMulticast (Ipv6Address addr) const
 
virtual Ptr< Node > GetNode (void) const
 
Ptr< SatPacketClassifierGetPacketClassifier () const
 Get a pointer to packet classifier class. More...
 
Ptr< SatPhyGetPhy (void) const
 Get a Phy pointer. More...
 
virtual bool IsBridge (void) const
 
virtual bool IsBroadcast (void) const
 
virtual bool IsLinkUp (void) const
 
virtual bool IsMulticast (void) const
 
virtual bool IsPointToPoint (void) const
 
virtual bool NeedsArp (void) const
 
virtual void Receive (Ptr< const Packet > packet)
 
virtual bool Send (Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)
 
bool SendControlMsg (Ptr< SatControlMessage > msg, const Address &dest)
 
virtual bool SendFrom (Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber)
 
virtual void SetAddress (Address address)
 
virtual void SetIfIndex (const uint32_t index)
 
void SetLlc (Ptr< SatLlc > llc)
 Attach the SatLlc llc layer to this netdevice. More...
 
void SetMac (Ptr< SatMac > mac)
 
virtual bool SetMtu (const uint16_t mtu)
 
virtual void SetNode (Ptr< Node > node)
 
void SetNodeInfo (Ptr< SatNodeInfo > nodeInfo)
 Set the node info. More...
 
void SetPacketClassifier (Ptr< SatPacketClassifier > classifier)
 Set the packet classifier class. More...
 
void SetPhy (Ptr< SatPhy > phy)
 
virtual void SetPromiscReceiveCallback (PromiscReceiveCallback cb)
 
virtual void SetReceiveCallback (NetDevice::ReceiveCallback cb)
 
void SetReceiveErrorModel (Ptr< ErrorModel > em)
 Attach a receive ErrorModel to the SatNetDevice. More...
 
virtual bool SupportsSendFrom (void) const
 
void ToggleState (bool enabled)
 Toggle the state of the device. More...
 

Static Public Member Functions

static TypeId GetTypeId (void)
 Get the type ID. More...
 

Protected Member Functions

virtual void DoDispose (void)
 Dispose of this class instance. More...
 

Protected Attributes

Mac48Address m_address
 
Ptr< SatPacketClassifierm_classifier
 
uint32_t m_ifIndex
 
bool m_isStatisticsTagsEnabled
 EnableStatisticsTags attribute. More...
 
Time m_lastDelay
 Last delay measurement. More...
 
Time m_lastLinkDelay
 Last link delay measurement. More...
 
Ptr< SatLlcm_llc
 
Ptr< SatMacm_mac
 
uint16_t m_mtu
 
Ptr< Node > m_node
 
Ptr< SatNodeInfom_nodeInfo
 
TracedCallback< Time, SatEnums::SatPacketEvent_t, SatEnums::SatNodeType_t, uint32_t, Mac48Address, SatEnums::SatLogLevel_t, SatEnums::SatLinkDir_t, std::string > m_packetTrace
 
Ptr< SatPhym_phy
 
NetDevice::PromiscReceiveCallback m_promiscCallback
 
Ptr< ErrorModel > m_receiveErrorModel
 
NetDevice::ReceiveCallback m_rxCallback
 
TracedCallback< const Time &, const Address & > m_rxDelayTrace
 Traced callback for all received packets, including delay information and the address of the senders. More...
 
TracedCallback< const Time &, const Address & > m_rxJitterTrace
 Traced callback for all received packets, including jitter information and the address of the senders. More...
 
TracedCallback< const Time &, const Address & > m_rxLinkDelayTrace
 Traced callback for all received packets, including link delay information and the address of the senders. More...
 
TracedCallback< const Time &, const Address & > m_rxLinkJitterTrace
 Traced callback for all received packets, including link jitter information and the address of the senders. More...
 
TracedCallback< Ptr< const Packet >, const Address & > m_rxTrace
 Traced callback for all received packets, including the address of the senders. More...
 
TracedCallback< Ptr< const Packet >, const Address & > m_signallingTxTrace
 Traced callback for all signalling (control message) packets sent, including the destination address. More...
 
TracedCallback< Ptr< const Packet > > m_txTrace
 Traced callback for all packets received to be transmitted. More...
 

Detailed Description

SatNetDevice to be utilized in the UT and GW nodes.

Definition at line 51 of file satellite-net-device.h.

Constructor & Destructor Documentation

◆ SatNetDevice()

ns3::SatNetDevice::SatNetDevice ( )

Default constructor.

Definition at line 123 of file satellite-net-device.cc.

Member Function Documentation

◆ AddLinkChangeCallback()

void ns3::SatNetDevice::AddLinkChangeCallback ( Callback< void >  callback)
virtual

Definition at line 355 of file satellite-net-device.cc.

◆ DoDispose()

void ns3::SatNetDevice::DoDispose ( void  )
protectedvirtual

Dispose of this class instance.

Reimplemented in ns3::SatLorawanNetDevice.

Definition at line 565 of file satellite-net-device.cc.

References m_classifier, m_llc, m_mac, m_node, m_phy, m_promiscCallback, m_receiveErrorModel, and m_rxCallback.

Referenced by ns3::SatLorawanNetDevice::DoDispose().

+ Here is the caller graph for this function:

◆ GetAddress()

Address ns3::SatNetDevice::GetAddress ( void  ) const
virtual

Definition at line 323 of file satellite-net-device.cc.

References m_address.

◆ GetBroadcast()

Address ns3::SatNetDevice::GetBroadcast ( void  ) const
virtual

Definition at line 368 of file satellite-net-device.cc.

◆ GetChannel()

Ptr< Channel > ns3::SatNetDevice::GetChannel ( void  ) const
virtual

We cannot do anything here, since the SatNetDevice does not hold directly any channels, but they are attached to Phy layers.

Definition at line 600 of file satellite-net-device.cc.

◆ GetIfIndex()

uint32_t ns3::SatNetDevice::GetIfIndex ( void  ) const
virtual

Definition at line 274 of file satellite-net-device.cc.

References m_ifIndex.

◆ GetLlc()

Ptr< SatLlc > ns3::SatNetDevice::GetLlc ( void  ) const

Get Llc pointer.

Returns
Ptr to the SatLlc object.

Definition at line 295 of file satellite-net-device.cc.

References m_llc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetMac()

Ptr< SatMac > ns3::SatNetDevice::GetMac ( void  ) const

Get a Mac pointer.

Returns
Ptr to the SatMac object.

Definition at line 288 of file satellite-net-device.cc.

References m_mac.

Referenced by ns3::SatHelper::DoCreateScenario(), and GetTypeId().

+ Here is the caller graph for this function:

◆ GetMtu()

uint16_t ns3::SatNetDevice::GetMtu ( void  ) const
virtual

Definition at line 341 of file satellite-net-device.cc.

References m_mtu.

◆ GetMulticast() [1/2]

Address ns3::SatNetDevice::GetMulticast ( Ipv4Address  multicastGroup) const
virtual

Definition at line 382 of file satellite-net-device.cc.

◆ GetMulticast() [2/2]

Address ns3::SatNetDevice::GetMulticast ( Ipv6Address  addr) const
virtual

Definition at line 389 of file satellite-net-device.cc.

◆ GetNode()

Ptr< Node > ns3::SatNetDevice::GetNode ( void  ) const
virtual

Definition at line 537 of file satellite-net-device.cc.

References m_node.

◆ GetPacketClassifier()

Ptr< SatPacketClassifier > ns3::SatNetDevice::GetPacketClassifier ( ) const

Get a pointer to packet classifier class.

Returns
Ptr<SatPacketClassifier Packet classifier

Definition at line 309 of file satellite-net-device.cc.

References m_classifier.

◆ GetPhy()

Ptr< SatPhy > ns3::SatNetDevice::GetPhy ( void  ) const

Get a Phy pointer.

Returns
Ptr to the SatPhy object.

Definition at line 281 of file satellite-net-device.cc.

References m_phy.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetTypeId()

TypeId ns3::SatNetDevice::GetTypeId ( void  )
static

Get the type ID.

Returns
the object TypeId

Definition at line 51 of file satellite-net-device.cc.

References GetLlc(), GetMac(), GetPhy(), m_isStatisticsTagsEnabled, m_mtu, m_packetTrace, m_receiveErrorModel, m_rxDelayTrace, m_rxJitterTrace, m_rxLinkDelayTrace, m_rxLinkJitterTrace, m_rxTrace, m_signallingTxTrace, m_txTrace, SetLlc(), SetMac(), and SetPhy().

+ Here is the call graph for this function:

◆ IsBridge()

bool ns3::SatNetDevice::IsBridge ( void  ) const
virtual

Definition at line 403 of file satellite-net-device.cc.

◆ IsBroadcast()

bool ns3::SatNetDevice::IsBroadcast ( void  ) const
virtual

Definition at line 361 of file satellite-net-device.cc.

◆ IsLinkUp()

bool ns3::SatNetDevice::IsLinkUp ( void  ) const
virtual

Definition at line 348 of file satellite-net-device.cc.

◆ IsMulticast()

bool ns3::SatNetDevice::IsMulticast ( void  ) const
virtual

Definition at line 375 of file satellite-net-device.cc.

◆ IsPointToPoint()

bool ns3::SatNetDevice::IsPointToPoint ( void  ) const
virtual

Definition at line 396 of file satellite-net-device.cc.

◆ NeedsArp()

bool ns3::SatNetDevice::NeedsArp ( void  ) const
virtual

Definition at line 551 of file satellite-net-device.cc.

◆ Receive()

◆ Send()

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

◆ SendControlMsg()

◆ SendFrom()

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

◆ SetAddress()

void ns3::SatNetDevice::SetAddress ( Address  address)
virtual

Definition at line 316 of file satellite-net-device.cc.

References m_address.

◆ SetIfIndex()

void ns3::SatNetDevice::SetIfIndex ( const uint32_t  index)
virtual

Definition at line 267 of file satellite-net-device.cc.

References m_ifIndex.

◆ SetLlc()

void ns3::SatNetDevice::SetLlc ( Ptr< SatLlc llc)

Attach the SatLlc llc layer to this netdevice.

Parameters
llcSatLlc pointer to be added

Definition at line 231 of file satellite-net-device.cc.

References m_llc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetMac()

void ns3::SatNetDevice::SetMac ( Ptr< SatMac mac)

Definition at line 224 of file satellite-net-device.cc.

References m_mac.

Referenced by GetTypeId(), and ns3::SatLorawanNetDevice::SetLorawanMac().

+ Here is the caller graph for this function:

◆ SetMtu()

bool ns3::SatNetDevice::SetMtu ( const uint16_t  mtu)
virtual

Definition at line 333 of file satellite-net-device.cc.

References m_mtu.

◆ SetNode()

void ns3::SatNetDevice::SetNode ( Ptr< Node >  node)
virtual

Definition at line 544 of file satellite-net-device.cc.

References m_node.

◆ SetNodeInfo()

void ns3::SatNetDevice::SetNodeInfo ( Ptr< SatNodeInfo nodeInfo)

Set the node info.

Parameters
nodeInfocontaining node specific information

Definition at line 238 of file satellite-net-device.cc.

References m_nodeInfo.

◆ SetPacketClassifier()

void ns3::SatNetDevice::SetPacketClassifier ( Ptr< SatPacketClassifier classifier)

Set the packet classifier class.

Parameters
classifier

Definition at line 302 of file satellite-net-device.cc.

References m_classifier.

◆ SetPhy()

void ns3::SatNetDevice::SetPhy ( Ptr< SatPhy phy)

Definition at line 217 of file satellite-net-device.cc.

References m_phy.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetPromiscReceiveCallback()

void ns3::SatNetDevice::SetPromiscReceiveCallback ( PromiscReceiveCallback  cb)
virtual

Definition at line 586 of file satellite-net-device.cc.

References m_promiscCallback.

◆ SetReceiveCallback()

void ns3::SatNetDevice::SetReceiveCallback ( NetDevice::ReceiveCallback  cb)
virtual

Definition at line 558 of file satellite-net-device.cc.

References m_rxCallback.

◆ SetReceiveErrorModel()

void ns3::SatNetDevice::SetReceiveErrorModel ( Ptr< ErrorModel >  em)

Attach a receive ErrorModel to the SatNetDevice.

Note, that this method is not used in the satellite module, since the error model is located within the implemented sublayers (PHY).

Parameters
emPtr to the ErrorModel.

Definition at line 260 of file satellite-net-device.cc.

References m_receiveErrorModel.

◆ SupportsSendFrom()

bool ns3::SatNetDevice::SupportsSendFrom ( void  ) const
virtual

Definition at line 593 of file satellite-net-device.cc.

◆ ToggleState()

void ns3::SatNetDevice::ToggleState ( bool  enabled)

Toggle the state of the device.

This is used for beam hopping purposes only, thus by default the netdevice is assumed to be enabled.

Parameters
enabledFlag indicating whether the ND is considered enabled or disabled

Definition at line 245 of file satellite-net-device.cc.

References m_mac.

Referenced by ns3::SatBeamHelper::Install().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_address

Mac48Address ns3::SatNetDevice::m_address
protected

Definition at line 191 of file satellite-net-device.h.

Referenced by GetAddress(), and SetAddress().

◆ m_classifier

Ptr<SatPacketClassifier> ns3::SatNetDevice::m_classifier
protected

◆ m_ifIndex

uint32_t ns3::SatNetDevice::m_ifIndex
protected

Definition at line 190 of file satellite-net-device.h.

Referenced by GetIfIndex(), and SetIfIndex().

◆ m_isStatisticsTagsEnabled

bool ns3::SatNetDevice::m_isStatisticsTagsEnabled
protected

EnableStatisticsTags attribute.

Definition at line 184 of file satellite-net-device.h.

Referenced by GetTypeId(), ns3::SatLorawanNetDevice::Receive(), Receive(), Send(), SendControlMsg(), and SendFrom().

◆ m_lastDelay

Time ns3::SatNetDevice::m_lastDelay
protected

Last delay measurement.

Used to compute jitter.

Definition at line 199 of file satellite-net-device.h.

Referenced by ns3::SatLorawanNetDevice::Receive(), and Receive().

◆ m_lastLinkDelay

Time ns3::SatNetDevice::m_lastLinkDelay
protected

Last link delay measurement.

Used to compute link jitter.

Definition at line 204 of file satellite-net-device.h.

Referenced by Receive().

◆ m_llc

Ptr<SatLlc> ns3::SatNetDevice::m_llc
protected

Definition at line 183 of file satellite-net-device.h.

Referenced by DoDispose(), GetLlc(), Send(), SendControlMsg(), SendFrom(), and SetLlc().

◆ m_mac

Ptr<SatMac> ns3::SatNetDevice::m_mac
protected

Definition at line 182 of file satellite-net-device.h.

Referenced by DoDispose(), GetMac(), SendControlMsg(), SetMac(), and ToggleState().

◆ m_mtu

uint16_t ns3::SatNetDevice::m_mtu
protected

Definition at line 189 of file satellite-net-device.h.

Referenced by GetMtu(), GetTypeId(), and SetMtu().

◆ m_node

Ptr<Node> ns3::SatNetDevice::m_node
protected

Definition at line 188 of file satellite-net-device.h.

Referenced by DoDispose(), GetNode(), and SetNode().

◆ m_nodeInfo

Ptr<SatNodeInfo> ns3::SatNetDevice::m_nodeInfo
protected

◆ m_packetTrace

TracedCallback<Time, SatEnums::SatPacketEvent_t, SatEnums::SatNodeType_t, uint32_t, Mac48Address, SatEnums::SatLogLevel_t, SatEnums::SatLinkDir_t, std::string> ns3::SatNetDevice::m_packetTrace
protected

◆ m_phy

Ptr<SatPhy> ns3::SatNetDevice::m_phy
protected

Definition at line 181 of file satellite-net-device.h.

Referenced by DoDispose(), GetPhy(), and SetPhy().

◆ m_promiscCallback

NetDevice::PromiscReceiveCallback ns3::SatNetDevice::m_promiscCallback
protected

Definition at line 187 of file satellite-net-device.h.

Referenced by DoDispose(), and SetPromiscReceiveCallback().

◆ m_receiveErrorModel

Ptr<ErrorModel> ns3::SatNetDevice::m_receiveErrorModel
protected

Definition at line 192 of file satellite-net-device.h.

Referenced by DoDispose(), GetTypeId(), and SetReceiveErrorModel().

◆ m_rxCallback

NetDevice::ReceiveCallback ns3::SatNetDevice::m_rxCallback
protected

◆ m_rxDelayTrace

TracedCallback<const Time&, const Address&> ns3::SatNetDevice::m_rxDelayTrace
protected

Traced callback for all received packets, including delay information and the address of the senders.

Definition at line 237 of file satellite-net-device.h.

Referenced by GetTypeId(), ns3::SatLorawanNetDevice::Receive(), and Receive().

◆ m_rxJitterTrace

TracedCallback<const Time&, const Address&> ns3::SatNetDevice::m_rxJitterTrace
protected

Traced callback for all received packets, including jitter information and the address of the senders.

Definition at line 243 of file satellite-net-device.h.

Referenced by GetTypeId(), ns3::SatLorawanNetDevice::Receive(), and Receive().

◆ m_rxLinkDelayTrace

TracedCallback<const Time&, const Address&> ns3::SatNetDevice::m_rxLinkDelayTrace
protected

Traced callback for all received packets, including link delay information and the address of the senders.

Definition at line 249 of file satellite-net-device.h.

Referenced by GetTypeId(), and Receive().

◆ m_rxLinkJitterTrace

TracedCallback<const Time&, const Address&> ns3::SatNetDevice::m_rxLinkJitterTrace
protected

Traced callback for all received packets, including link jitter information and the address of the senders.

Definition at line 255 of file satellite-net-device.h.

Referenced by GetTypeId(), and Receive().

◆ m_rxTrace

TracedCallback<Ptr<const Packet>, const Address&> ns3::SatNetDevice::m_rxTrace
protected

Traced callback for all received packets, including the address of the senders.

Definition at line 231 of file satellite-net-device.h.

Referenced by GetTypeId(), ns3::SatLorawanNetDevice::Receive(), and Receive().

◆ m_signallingTxTrace

TracedCallback<Ptr<const Packet>, const Address&> ns3::SatNetDevice::m_signallingTxTrace
protected

Traced callback for all signalling (control message) packets sent, including the destination address.

Definition at line 225 of file satellite-net-device.h.

Referenced by GetTypeId(), and SendControlMsg().

◆ m_txTrace

TracedCallback<Ptr<const Packet> > ns3::SatNetDevice::m_txTrace
protected

Traced callback for all packets received to be transmitted.

Definition at line 219 of file satellite-net-device.h.

Referenced by GetTypeId(), ns3::SatLorawanNetDevice::Send(), Send(), and SendFrom().


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