ns3::SatReturnLinkEncapsulator Class Reference

SatReturnLinkEncapsulator class is used in the RTN link for RLE encapsulation and fragmentation of higher layer packets. More...

#include "satellite-return-link-encapsulator.h"

+ Inheritance diagram for ns3::SatReturnLinkEncapsulator:
+ Collaboration diagram for ns3::SatReturnLinkEncapsulator:

Public Member Functions

 SatReturnLinkEncapsulator ()
 Default constructor, not used. More...
 
 SatReturnLinkEncapsulator (Mac48Address encapAddress, Mac48Address decapAddress, Mac48Address sourceE2EAddress, Mac48Address destE2EAddress, uint8_t rcIndex, uint32_t additionalHeaderSize=0)
 Constructor. More...
 
virtual ~SatReturnLinkEncapsulator ()
 Destructor for SatReturnLinkEncapsulator. More...
 
virtual void DoDispose ()
 Dispose of this class instance. More...
 
virtual void EnquePdu (Ptr< Packet > p, Mac48Address dest)
 Enqueue a Higher Layer packet to txBuffer. More...
 
virtual uint32_t GetMinTxOpportunityInBytes () const
 Get minimum Tx opportunity in bytes, which takes the assumed header sizes into account. More...
 
virtual Ptr< Packet > NotifyTxOpportunity (uint32_t bytes, uint32_t &bytesLeft, uint32_t &nextMinTxO)
 Notify a Tx opportunity to this encapsulator. More...
 
virtual void ReceiveAck (Ptr< SatArqAckMessage > ack)
 Receive a control msg (ARQ ACK) More...
 
virtual void ReceivePdu (Ptr< Packet > p)
 Receive a packet, thus decapsulate and defragment/deconcatenate if needed. More...
 
- Public Member Functions inherited from ns3::SatBaseEncapsulator
 SatBaseEncapsulator ()
 Default constructor not used. More...
 
 SatBaseEncapsulator (Mac48Address encapAddress, Mac48Address decapAddress, Mac48Address sourceE2EAddress, Mac48Address destE2EAddress, uint8_t flowId, uint32_t additionalHeaderSize=0)
 Constructor. More...
 
virtual ~SatBaseEncapsulator ()
 Destructor for SatBaseEncapsulator. More...
 
virtual Time GetHolDelay () const
 Get Head-of-Line packet buffering delay. More...
 
Ptr< SatQueueGetQueue ()
 Get the queue instance. More...
 
virtual uint32_t GetTxBufferSizeInBytes () const
 Get the buffered packets for this encapsulator. More...
 
void SetCtrlMsgCallback (SatBaseEncapsulator::SendCtrlCallback cb)
 
void SetQueue (Ptr< SatQueue > queue)
 Set the used queue from outside. More...
 
void SetReceiveCallback (ReceiveCallback cb)
 Method to set receive callback. More...
 

Static Public Member Functions

static TypeId GetTypeId (void)
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::SatBaseEncapsulator
static TypeId GetTypeId (void)
 Get the type ID. More...
 

Protected Member Functions

Ptr< Packet > GetNewRlePdu (uint32_t txOpportunityBytes, uint32_t maxRlePduSize, uint32_t additionalHeaderSize=0)
 Get new packet performs the RLE fragmentation and encapsulation for a one single packet. More...
 
void IncreaseFragmentId ()
 Method increases the fragment id by one. More...
 
virtual void ProcessPdu (Ptr< Packet > p)
 Process the reception of individual RLE PDUs. More...
 
void Reset ()
 Reset defragmentation variables. More...
 

Protected Attributes

uint32_t m_currRxFragmentId
 Current fragment id in the reassembly process. More...
 
Ptr< Packet > m_currRxPacketFragment
 Current packet in the reassembly process. More...
 
uint32_t m_currRxPacketFragmentBytes
 Currently received bytes of the fragmented packet. More...
 
uint32_t m_currRxPacketSize
 The total size of the ALPDU size reassembly process. More...
 
uint32_t m_minTxOpportunity
 Minimum Tx opportunity. More...
 
uint32_t m_txFragmentId
 Fragment id used in the packet transmissions. More...
 
const uint32_t MAX_FRAGMENT_ID
 The fragment is described with 3 bits, thus the maximum fragment id is 8. More...
 
const uint32_t MAX_HL_PDU_PACKET_SIZE
 The maximum packet size is described with 12 bits, thus, the maximum HL packet size is 4096 bytes. More...
 
const uint32_t MAX_PPDU_PACKET_SIZE
 The maximum PPDU fragment size is described with 11 bits, thus, the maximum fragment size is 2048 bytes. More...
 
- Protected Attributes inherited from ns3::SatBaseEncapsulator
uint32_t m_additionalHeaderSize
 Additional value in to take into account when pulling packets to represent E2E tags. More...
 
SendCtrlCallback m_ctrlCallback
 Callback to send control messages. More...
 
Mac48Address m_decapAddress
 
Mac48Address m_destE2EAddress
 
Mac48Address m_encapAddress
 Source and destination mac addresses. More...
 
uint8_t m_flowId
 Flow identifier. More...
 
ReceiveCallback m_rxCallback
 Receive callback. More...
 
Mac48Address m_sourceE2EAddress
 
Ptr< SatQueuem_txQueue
 Used queue in satellite encapsulator. More...
 

Additional Inherited Members

- Public Types inherited from ns3::SatBaseEncapsulator
typedef Callback< void, Ptr< Packet >, Mac48Address, Mac48Address > ReceiveCallback
 Callback to send packet to lower layer. More...
 
typedef Callback< bool, Ptr< SatControlMessage >, const Address & > SendCtrlCallback
 Control msg sending callback. More...
 

Detailed Description

SatReturnLinkEncapsulator class is used in the RTN link for RLE encapsulation and fragmentation of higher layer packets.

SatReturnLinkEncapsulator object is flow (UT address - flow id) specific and its entities are located at both UT (encapsulation, fragmentation) and GW (decapsulation, defragmentation). Return link encapsulators/decapsulators are created dynamically when first needed (when a packet is received for this flow).

See also
ETSI TS 103 179 V1.1.1 Satellite Earth Stations and Systems (SES); Return Link Encapsulation (RLE) protocol

Definition at line 48 of file satellite-return-link-encapsulator.h.

Constructor & Destructor Documentation

◆ SatReturnLinkEncapsulator() [1/2]

ns3::SatReturnLinkEncapsulator::SatReturnLinkEncapsulator ( )

Default constructor, not used.

Default constuctor is not meant to be used!

Definition at line 41 of file satellite-return-link-encapsulator.cc.

◆ SatReturnLinkEncapsulator() [2/2]

ns3::SatReturnLinkEncapsulator::SatReturnLinkEncapsulator ( Mac48Address  encapAddress,
Mac48Address  decapAddress,
Mac48Address  sourceE2EAddress,
Mac48Address  destE2EAddress,
uint8_t  rcIndex,
uint32_t  additionalHeaderSize = 0 
)

Constructor.

Parameters
encapAddressMAC addressd of encapsulator
decapAddressMAC addressd of decapsulator
sourceE2EAddressE2E source MAC addressd of packets (used to set SatAddressE2ETag)
destE2EAddressE2E destination MAC addressd of packets (used to set SatAddressE2ETag)
rcIndexRC index
additionalHeaderSizeAdditional value in to take into account when pulling packets to represent E2E tags

Definition at line 59 of file satellite-return-link-encapsulator.cc.

References ns3::SatPPduHeader::GetMaxHeaderSizeInBytes(), and m_minTxOpportunity.

+ Here is the call graph for this function:

◆ ~SatReturnLinkEncapsulator()

ns3::SatReturnLinkEncapsulator::~SatReturnLinkEncapsulator ( )
virtual

Destructor for SatReturnLinkEncapsulator.

Definition at line 86 of file satellite-return-link-encapsulator.cc.

Member Function Documentation

◆ DoDispose()

void ns3::SatReturnLinkEncapsulator::DoDispose ( void  )
virtual

Dispose of this class instance.

Reimplemented from ns3::SatBaseEncapsulator.

Reimplemented in ns3::SatReturnLinkEncapsulatorArq.

Definition at line 101 of file satellite-return-link-encapsulator.cc.

References ns3::SatBaseEncapsulator::DoDispose().

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

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

◆ EnquePdu()

void ns3::SatReturnLinkEncapsulator::EnquePdu ( Ptr< Packet >  p,
Mac48Address  dest 
)
virtual

Enqueue a Higher Layer packet to txBuffer.

Parameters
pTo be buffered packet
destTarget MAC address

TODO: This is the place to encapsulate the higher layer packet with Addressed Link (AL) header, if needed.

Reimplemented from ns3::SatBaseEncapsulator.

Definition at line 109 of file satellite-return-link-encapsulator.cc.

References ns3::SatEncapPduStatusTag::FULL_PDU, ns3::SatBaseEncapsulator::m_decapAddress, ns3::SatBaseEncapsulator::m_encapAddress, ns3::SatBaseEncapsulator::m_txQueue, MAX_HL_PDU_PACKET_SIZE, ns3::SatMacTag::SetDestAddress(), ns3::SatMacTag::SetSourceAddress(), and ns3::SatEncapPduStatusTag::SetStatus().

+ Here is the call graph for this function:

◆ GetMinTxOpportunityInBytes()

uint32_t ns3::SatReturnLinkEncapsulator::GetMinTxOpportunityInBytes ( ) const
virtual

Get minimum Tx opportunity in bytes, which takes the assumed header sizes into account.

Returns
Minimum Tx opportunity

Reimplemented from ns3::SatBaseEncapsulator.

Definition at line 533 of file satellite-return-link-encapsulator.cc.

References m_minTxOpportunity.

Referenced by ns3::SatReturnLinkEncapsulatorArq::NotifyTxOpportunity(), and NotifyTxOpportunity().

+ Here is the caller graph for this function:

◆ GetNewRlePdu()

Ptr< Packet > ns3::SatReturnLinkEncapsulator::GetNewRlePdu ( uint32_t  txOpportunityBytes,
uint32_t  maxRlePduSize,
uint32_t  additionalHeaderSize = 0 
)
protected

◆ GetTypeId()

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

Get the type ID.

Returns
the object TypeId

Definition at line 92 of file satellite-return-link-encapsulator.cc.

◆ IncreaseFragmentId()

void ns3::SatReturnLinkEncapsulator::IncreaseFragmentId ( )
protected

Method increases the fragment id by one.

If the maximum fragment id is reached, it is reset to zero.

Definition at line 510 of file satellite-return-link-encapsulator.cc.

References m_txFragmentId, and MAX_FRAGMENT_ID.

Referenced by GetNewRlePdu().

+ Here is the caller graph for this function:

◆ NotifyTxOpportunity()

Ptr< Packet > ns3::SatReturnLinkEncapsulator::NotifyTxOpportunity ( uint32_t  bytes,
uint32_t &  bytesLeft,
uint32_t &  nextMinTxO 
)
virtual

◆ ProcessPdu()

void ns3::SatReturnLinkEncapsulator::ProcessPdu ( Ptr< Packet >  p)
protectedvirtual

◆ ReceiveAck()

void ns3::SatReturnLinkEncapsulator::ReceiveAck ( Ptr< SatArqAckMessage ack)
virtual

Receive a control msg (ARQ ACK)

Parameters
ackACK control message pointer received from lower layer

The base encapsulator should not be used at receiving control packets at all! This functionality is implemented in the inherited classes.

Reimplemented from ns3::SatBaseEncapsulator.

Reimplemented in ns3::SatReturnLinkEncapsulatorArq.

Definition at line 498 of file satellite-return-link-encapsulator.cc.

◆ ReceivePdu()

void ns3::SatReturnLinkEncapsulator::ReceivePdu ( Ptr< Packet >  p)
virtual

Receive a packet, thus decapsulate and defragment/deconcatenate if needed.

The decapsulated/defragmented HL PDU is forwarded back to LLC and to upper layer.

Parameters
ppacket pointer received from lower layer

Reimplemented from ns3::SatBaseEncapsulator.

Reimplemented in ns3::SatReturnLinkEncapsulatorArq.

Definition at line 385 of file satellite-return-link-encapsulator.cc.

References ns3::SatMacTag::GetDestAddress(), ns3::SatBaseEncapsulator::m_decapAddress, and ProcessPdu().

+ Here is the call graph for this function:

◆ Reset()

void ns3::SatReturnLinkEncapsulator::Reset ( void  )
protected

Reset defragmentation variables.

Definition at line 522 of file satellite-return-link-encapsulator.cc.

References m_currRxFragmentId, m_currRxPacketFragment, m_currRxPacketFragmentBytes, and m_currRxPacketSize.

Referenced by ProcessPdu().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_currRxFragmentId

uint32_t ns3::SatReturnLinkEncapsulator::m_currRxFragmentId
protected

Current fragment id in the reassembly process.

Definition at line 163 of file satellite-return-link-encapsulator.h.

Referenced by ProcessPdu(), and Reset().

◆ m_currRxPacketFragment

Ptr<Packet> ns3::SatReturnLinkEncapsulator::m_currRxPacketFragment
protected

Current packet in the reassembly process.

Definition at line 168 of file satellite-return-link-encapsulator.h.

Referenced by ProcessPdu(), and Reset().

◆ m_currRxPacketFragmentBytes

uint32_t ns3::SatReturnLinkEncapsulator::m_currRxPacketFragmentBytes
protected

Currently received bytes of the fragmented packet.

Definition at line 178 of file satellite-return-link-encapsulator.h.

Referenced by ProcessPdu(), and Reset().

◆ m_currRxPacketSize

uint32_t ns3::SatReturnLinkEncapsulator::m_currRxPacketSize
protected

The total size of the ALPDU size reassembly process.

Definition at line 173 of file satellite-return-link-encapsulator.h.

Referenced by ProcessPdu(), and Reset().

◆ m_minTxOpportunity

uint32_t ns3::SatReturnLinkEncapsulator::m_minTxOpportunity
protected

Minimum Tx opportunity.

Definition at line 183 of file satellite-return-link-encapsulator.h.

Referenced by SatReturnLinkEncapsulator(), and GetMinTxOpportunityInBytes().

◆ m_txFragmentId

uint32_t ns3::SatReturnLinkEncapsulator::m_txFragmentId
protected

Fragment id used in the packet transmissions.

Definition at line 159 of file satellite-return-link-encapsulator.h.

Referenced by GetNewRlePdu(), and IncreaseFragmentId().

◆ MAX_FRAGMENT_ID

const uint32_t ns3::SatReturnLinkEncapsulator::MAX_FRAGMENT_ID
protected

The fragment is described with 3 bits, thus the maximum fragment id is 8.

Definition at line 189 of file satellite-return-link-encapsulator.h.

Referenced by IncreaseFragmentId().

◆ MAX_HL_PDU_PACKET_SIZE

const uint32_t ns3::SatReturnLinkEncapsulator::MAX_HL_PDU_PACKET_SIZE
protected

The maximum packet size is described with 12 bits, thus, the maximum HL packet size is 4096 bytes.

Definition at line 201 of file satellite-return-link-encapsulator.h.

Referenced by EnquePdu().

◆ MAX_PPDU_PACKET_SIZE

const uint32_t ns3::SatReturnLinkEncapsulator::MAX_PPDU_PACKET_SIZE
protected

The maximum PPDU fragment size is described with 11 bits, thus, the maximum fragment size is 2048 bytes.

Definition at line 195 of file satellite-return-link-encapsulator.h.

Referenced by NotifyTxOpportunity().


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