ns3::SatGeoLlc Class Reference

SatGeoLlc holds the GEO implementation of LLC layer. More...

#include "satellite-geo-llc.h"

+ Inheritance diagram for ns3::SatGeoLlc:
+ Collaboration diagram for ns3::SatGeoLlc:

Public Types

typedef Callback< void, Ptr< Packet >, const Address & > ReceiveSatelliteCallback
 Receive callback used for sending packet to netdevice layer. More...
 
- Public Types inherited from ns3::SatLlc
typedef std::map< Ptr< EncapKey >, Ptr< SatBaseEncapsulator >, EncapKeyCompareEncapContainer_t
 Key = Ptr<EncapKey> (source, dest, flowId) Value = Ptr<SatBaseEncapsulator> Compare class = EncapKeyCompare. More...
 
typedef Callback< Ptr< SatControlMessage >, uint32_t > ReadCtrlMsgCallback
 Callback to read control messages from container storing control messages. More...
 
typedef Callback< void, Ptr< const Packet > > ReceiveCallback
 Receive callback used for sending packet to netdevice layer. More...
 

Public Member Functions

 SatGeoLlc ()
 Construct a SatGeoLlc, should not be used. More...
 
 SatGeoLlc (SatEnums::RegenerationMode_t forwardLinkRegenerationMode, SatEnums::RegenerationMode_t returnLinkRegenerationMode)
 Construct a SatGeoLlc. More...
 
virtual ~SatGeoLlc ()
 Destroy a SatGeoLlc. More...
 
virtual bool Enque (Ptr< Packet > packet, Address dest, uint8_t flowId)
 Called from higher layer (SatNetDevice) to enque packet to LLC. More...
 
virtual uint32_t GetNBytesInQueue (Mac48Address utAddress) const
 Get the number of (new) bytes at LLC queue for a certain UT. More...
 
virtual uint32_t GetNPacketsInQueue (Mac48Address utAddress) const
 Get the number of (new) packets at LLC queues for a certain UT. More...
 
virtual void GetSchedulingContexts (std::vector< Ptr< SatSchedulingObject >> &output) const
 Create and fill the scheduling objects based on LLC layer information. More...
 
virtual Ptr< Packet > NotifyTxOpportunity (uint32_t bytes, Mac48Address utAddr, uint8_t flowId, uint32_t &bytesLeft, uint32_t &nextMinTxO)
 Called from lower layer (MAC) to inform a Tx opportunity of certain amount of bytes. More...
 
virtual void ReceiveHigherLayerPdu (Ptr< Packet > packet, Mac48Address source, Mac48Address dest)
 Receive HL PDU from encapsulator/decapsulator entity. More...
 
void SetReceiveSatelliteCallback (SatGeoLlc::ReceiveSatelliteCallback cb)
 Set Receive callback to forward packet to upper layer on satellite. More...
 
- Public Member Functions inherited from ns3::SatLlc
 SatLlc ()
 Construct a SatLlc, should not be used. More...
 
 SatLlc (SatEnums::RegenerationMode_t forwardLinkRegenerationMode, SatEnums::RegenerationMode_t returnLinkRegenerationMode)
 Construct a SatLlc. More...
 
virtual ~SatLlc ()
 Destroy a SatLlc. More...
 
void AddDecap (Mac48Address source, Mac48Address dest, uint8_t flowId, Ptr< SatBaseEncapsulator > dec)
 Add an decapsulator entry for the LLC. More...
 
void AddEncap (Mac48Address source, Mac48Address dest, uint8_t flowId, Ptr< SatBaseEncapsulator > enc)
 Add an encapsulator entry for the LLC. More...
 
virtual bool BuffersEmpty () const
 Are buffers empty? More...
 
virtual bool ControlBuffersEmpty () const
 Are buffers empty? More...
 
virtual uint32_t GetNBytesInQueue () const
 Get the total number of (new) bytes in all encapsulators. More...
 
virtual uint32_t GetNPacketsInQueue () const
 Get the total number of (new) packets in all encapsulators. More...
 
virtual void Receive (Ptr< Packet > packet, Mac48Address source, Mac48Address dest)
 Receive user data packet from lower layer. More...
 
void SetAdditionalHeaderSize (uint32_t additionalHeaderSize)
 Set the additional header size. More...
 
void SetCtrlMsgCallback (SatBaseEncapsulator::SendCtrlCallback cb)
 
virtual void SetGwAddress (Mac48Address address)
 Set the GW address. More...
 
virtual void SetNodeInfo (Ptr< SatNodeInfo > nodeInfo)
 Set the node info. More...
 
void SetReadCtrlCallback (SatLlc::ReadCtrlMsgCallback cb)
 Method to set read control message callback. More...
 
void SetReceiveCallback (SatLlc::ReceiveCallback cb)
 Set Receive callback to forward packet to upper layer. More...
 
virtual void SetSatelliteAddress (Mac48Address address)
 Set the SAT address. More...
 

Static Public Member Functions

static TypeId GetTypeId (void)
 Derived from Object. More...
 
- Static Public Member Functions inherited from ns3::SatLlc
static TypeId GetTypeId (void)
 Derived from Object. More...
 

Protected Member Functions

virtual void CreateDecap (Ptr< EncapKey > key)
 Virtual method to create a new decapsulator 'on-a-need-basis' dynamically. More...
 
virtual void CreateEncap (Ptr< EncapKey > key)
 Virtual method to create a new encapsulator 'on-a-need-basis' dynamically. More...
 
virtual void DoDispose ()
 Dispose of this class instance. More...
 
- Protected Member Functions inherited from ns3::SatLlc
virtual SatEnums::SatLinkDir_t GetSatLinkRxDir ()
 Get the link RX direction. More...
 
virtual SatEnums::SatLinkDir_t GetSatLinkTxDir ()
 Get the link TX direction. More...
 
virtual void ReceiveAck (Ptr< SatArqAckMessage > ack, Mac48Address source, Mac48Address dest)
 Receive a control msg (ARQ ACK) from lower layer. More...
 

Protected Attributes

ReceiveSatelliteCallback m_rxSatelliteCallback
 The upper layer package receive callback. More...
 
- Protected Attributes inherited from ns3::SatLlc
uint32_t m_additionalHeaderSize
 Additional header size to add to encapsulation/decapsulation. More...
 
EncapContainer_t m_decaps
 Map of decapsulator base pointers. More...
 
EncapContainer_t m_encaps
 Map of encapsulator base pointers. More...
 
SatEnums::RegenerationMode_t m_forwardLinkRegenerationMode
 Regeneration mode on forward link. More...
 
bool m_fwdLinkArqEnabled
 Is FWD link ARQ enabled. More...
 
Mac48Address m_gwAddress
 GW address. More...
 
Ptr< SatNodeInfom_nodeInfo
 Node info containing node related information, such as node type, node id and MAC address (of the SatNetDevice) More...
 
TracedCallback< Time, SatEnums::SatPacketEvent_t, SatEnums::SatNodeType_t, uint32_t, Mac48Address, SatEnums::SatLogLevel_t, SatEnums::SatLinkDir_t, std::string > m_packetTrace
 Trace callback used for packet tracing: More...
 
SatLlc::ReadCtrlMsgCallback m_readCtrlCallback
 The read control message callback. More...
 
SatEnums::RegenerationMode_t m_returnLinkRegenerationMode
 Regeneration mode on return link. More...
 
bool m_rtnLinkArqEnabled
 Is RTN link ARQ enabled. More...
 
ReceiveCallback m_rxCallback
 The upper layer package receive callback. More...
 
Mac48Address m_satelliteAddress
 SAT address, used in case of network regeneration. More...
 
SatBaseEncapsulator::SendCtrlCallback m_sendCtrlCallback
 Callback to send control messages. More...
 

Detailed Description

SatGeoLlc holds the GEO implementation of LLC layer.

SatGeoLlc is inherited from SatLlc base class and implements the needed changes from the base class related to SAT LLC packet transmissions and receptions.

Definition at line 37 of file satellite-geo-llc.h.

Member Typedef Documentation

◆ ReceiveSatelliteCallback

typedef Callback<void, Ptr<Packet>, const Address&> ns3::SatGeoLlc::ReceiveSatelliteCallback

Receive callback used for sending packet to netdevice layer.

Parameters
packetthe packet received

Definition at line 137 of file satellite-geo-llc.h.

Constructor & Destructor Documentation

◆ SatGeoLlc() [1/2]

ns3::SatGeoLlc::SatGeoLlc ( )

Construct a SatGeoLlc, should not be used.

Definition at line 41 of file satellite-geo-llc.cc.

◆ SatGeoLlc() [2/2]

ns3::SatGeoLlc::SatGeoLlc ( SatEnums::RegenerationMode_t  forwardLinkRegenerationMode,
SatEnums::RegenerationMode_t  returnLinkRegenerationMode 
)

Construct a SatGeoLlc.

Parameters
forwardLinkRegenerationModeForward link regeneration model
returnLinkRegenerationModeReturn link regeneration model

Definition at line 47 of file satellite-geo-llc.cc.

◆ ~SatGeoLlc()

ns3::SatGeoLlc::~SatGeoLlc ( )
virtual

Destroy a SatGeoLlc.

This is the destructor for the SatGeoLlc.

Definition at line 54 of file satellite-geo-llc.cc.

Member Function Documentation

◆ CreateDecap()

void ns3::SatGeoLlc::CreateDecap ( Ptr< EncapKey key)
protectedvirtual

Virtual method to create a new decapsulator 'on-a-need-basis' dynamically.

Method is implemented in the inherited class which knows which type of decapsulator to create. This is a pure virtual method to be implemented to inherited classes.

Parameters
keyEncapsulator key class

Implements ns3::SatLlc.

Reimplemented in ns3::SatGeoUserLlc, and ns3::SatGeoFeederLlc.

Definition at line 225 of file satellite-geo-llc.cc.

References ns3::SatLlc::m_decaps, ns3::SatLlc::m_sendCtrlCallback, and ns3::SatLlc::ReceiveHigherLayerPdu().

+ Here is the call graph for this function:

◆ CreateEncap()

void ns3::SatGeoLlc::CreateEncap ( Ptr< EncapKey key)
protectedvirtual

Virtual method to create a new encapsulator 'on-a-need-basis' dynamically.

Method is implemented in the inherited class which knows which type of encapsulator to create. This is a pure virtual method to be implemented to inherited classes.

Parameters
keyEncapsulator key class

Implements ns3::SatLlc.

Reimplemented in ns3::SatGeoUserLlc, and ns3::SatGeoFeederLlc.

Definition at line 195 of file satellite-geo-llc.cc.

References ns3::SatLlc::m_encaps.

Referenced by Enque().

+ Here is the caller graph for this function:

◆ DoDispose()

void ns3::SatGeoLlc::DoDispose ( void  )
protectedvirtual

Dispose of this class instance.

Reimplemented from ns3::SatLlc.

Reimplemented in ns3::SatGeoUserLlc, and ns3::SatGeoFeederLlc.

Definition at line 60 of file satellite-geo-llc.cc.

◆ Enque()

bool ns3::SatGeoLlc::Enque ( Ptr< Packet >  packet,
Address  dest,
uint8_t  flowId 
)
virtual

Called from higher layer (SatNetDevice) to enque packet to LLC.

Parameters
packetpacket sent from above down to SatMac
destDestination MAC address of the packet
flowIdFlow identifier
Returns
Boolean indicating whether the enque operation succeeded

Encapsulator not found, thus create a new one. This method is implemented in the inherited classes, which knows which type of encapsulator to create.

Reimplemented from ns3::SatLlc.

Definition at line 72 of file satellite-geo-llc.cc.

References CreateEncap(), ns3::SatUtils::GetPacketInfo(), ns3::SatLlc::GetSatLinkTxDir(), ns3::SatEnums::LL_LLC, ns3::SatLlc::m_encaps, ns3::SatLlc::m_nodeInfo, ns3::SatLlc::m_packetTrace, and ns3::SatEnums::PACKET_ENQUE.

+ Here is the call graph for this function:

◆ GetNBytesInQueue()

uint32_t ns3::SatGeoLlc::GetNBytesInQueue ( Mac48Address  utAddress) const
virtual

Get the number of (new) bytes at LLC queue for a certain UT.

Method checks only the SatQueue for packets, thus it does not count possible packets buffered at the encapsulator (e.g. in case of ARQ). This is a pure virtual method to be implemented to inherited classes.

Parameters
utAddressthe MAC address that identifies a particular UT node.
Returns
Number of bytes currently queued in the encapsulator(s) associated with the UT.

Implements ns3::SatLlc.

Definition at line 282 of file satellite-geo-llc.cc.

References ns3::SatLlc::m_encaps.

◆ GetNPacketsInQueue()

uint32_t ns3::SatGeoLlc::GetNPacketsInQueue ( Mac48Address  utAddress) const
virtual

Get the number of (new) packets at LLC queues for a certain UT.

Method checks only the SatQueue for packets, thus it does not count possible packets buffered at the encapsulator (e.g. in case of ARQ). This is a pure virtual method to be implemented to inherited classes.

Parameters
utAddressthe MAC address that identifies a particular UT node.
Returns
Number of packets currently queued in the encapsulator(s) associated with the UT.

Implements ns3::SatLlc.

Definition at line 303 of file satellite-geo-llc.cc.

References ns3::SatLlc::m_encaps.

◆ GetSchedulingContexts()

void ns3::SatGeoLlc::GetSchedulingContexts ( std::vector< Ptr< SatSchedulingObject >> &  output) const
virtual

Create and fill the scheduling objects based on LLC layer information.

Scheduling objects may be used at the MAC layer to assist in scheduling.

Parameters
outputreference to an output vector that will be filled with pointer to scheduling objects

Implements ns3::SatLlc.

Definition at line 255 of file satellite-geo-llc.cc.

References ns3::SatLlc::m_encaps.

◆ GetTypeId()

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

Derived from Object.

Definition at line 35 of file satellite-geo-llc.cc.

◆ NotifyTxOpportunity()

Ptr< Packet > ns3::SatGeoLlc::NotifyTxOpportunity ( uint32_t  bytes,
Mac48Address  utAddr,
uint8_t  flowId,
uint32_t &  bytesLeft,
uint32_t &  nextMinTxO 
)
virtual

Called from lower layer (MAC) to inform a Tx opportunity of certain amount of bytes.

Note, that this method is not to be used in this class, but the real implementation is located in inherited classes.

Parameters
bytesSize of the Tx opportunity
utAddrMAC address of the UT with the Tx opportunity
flowIdFlow identifier
&bytesLeftBytes left after TxOpportunity
&nextMinTxOMinimum TxO after this TxO
Returns
Pointer to packet to be transmitted

Implements ns3::SatLlc.

Definition at line 116 of file satellite-geo-llc.cc.

References ns3::SatUtils::GetPacketInfo(), ns3::SatEnums::LD_FORWARD, ns3::SatEnums::LL_LLC, ns3::SatLlc::m_encaps, ns3::SatLlc::m_nodeInfo, ns3::SatLlc::m_packetTrace, and ns3::SatEnums::PACKET_SENT.

Referenced by ns3::SatGeoHelper::AttachChannelsFeeder(), and ns3::SatGeoHelper::AttachChannelsUser().

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

◆ ReceiveHigherLayerPdu()

void ns3::SatGeoLlc::ReceiveHigherLayerPdu ( Ptr< Packet >  packet,
Mac48Address  source,
Mac48Address  dest 
)
virtual

Receive HL PDU from encapsulator/decapsulator entity.

Parameters
packetPointer to packet received.
sourceMAC address of the source
destMAC address of the destination

Reimplemented from ns3::SatLlc.

Definition at line 158 of file satellite-geo-llc.cc.

References ns3::SatControlMsgTag::GetMsgId(), ns3::SatControlMsgTag::GetMsgType(), ns3::SatLlc::m_nodeInfo, ns3::SatLlc::m_readCtrlCallback, m_rxSatelliteCallback, ns3::SatLlc::ReceiveAck(), and ns3::SatControlMsgTag::SAT_ARQ_ACK.

+ Here is the call graph for this function:

◆ SetReceiveSatelliteCallback()

void ns3::SatGeoLlc::SetReceiveSatelliteCallback ( SatGeoLlc::ReceiveSatelliteCallback  cb)

Set Receive callback to forward packet to upper layer on satellite.

Parameters
cbcallback to invoke whenever a packet has been received and must be forwarded to the higher layers.

Definition at line 66 of file satellite-geo-llc.cc.

References m_rxSatelliteCallback.

Member Data Documentation

◆ m_rxSatelliteCallback

ReceiveSatelliteCallback ns3::SatGeoLlc::m_rxSatelliteCallback
protected

The upper layer package receive callback.

Definition at line 171 of file satellite-geo-llc.h.

Referenced by ReceiveHigherLayerPdu(), and SetReceiveSatelliteCallback().


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