ns3::SatGenericStreamEncapsulator Class Reference

SatGenericStreamEncapsulator class is used in the FWD link for GSE encapsulation and fragmentation of higher layer packets. More...

#include "satellite-generic-stream-encapsulator.h"

+ Inheritance diagram for ns3::SatGenericStreamEncapsulator:
+ Collaboration diagram for ns3::SatGenericStreamEncapsulator:

Public Member Functions

 SatGenericStreamEncapsulator ()
 Default constructor, not used. More...
 
 SatGenericStreamEncapsulator (Mac48Address encapAddress, Mac48Address decapAddress, Mac48Address sourceE2EAddress, Mac48Address destE2EAddress, uint8_t flowId, uint32_t additionalHeaderSize=0)
 Constructor. More...
 
virtual ~SatGenericStreamEncapsulator ()
 Destructor for SatGenericStreamEncapsulator. 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 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...
 
virtual void ReceiveAck (Ptr< SatArqAckMessage > ack)
 Receive a control message (ARQ ACK) 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 > GetNewGsePdu (uint32_t txOpportunityBytes, uint32_t maxGsePduSize, uint32_t additionalHeaderSize=0)
 Get new packet performs the GSE 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 GSE 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_maxGsePduSize
 Maximum GSE PDU size. More...
 
uint32_t m_minGseTxOpportunity
 If the GSE opportunity is smaller than this, a NULL packet is returned. More...
 
uint32_t m_txFragmentId
 Fragment id used in the packet transmissions. 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...
 

Static Protected Attributes

static const uint32_t MAX_FRAGMENT_ID = 256
 The fragment is described with 8 bits, thus the maximum fragment id is 256. More...
 
static const uint32_t MAX_HL_PACKET_SIZE = 65536
 The maximum packet size is described with 16 bits, thus, the maximum HL packet size is 65536 bytes. 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

SatGenericStreamEncapsulator class is used in the FWD link for GSE encapsulation and fragmentation of higher layer packets.

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

See also
ETSI TS 102 606 V1.1.1 Digital Video Broadcasting (DVB); Generic Stream Encapsulation (GSE) Protocol

Definition at line 47 of file satellite-generic-stream-encapsulator.h.

Constructor & Destructor Documentation

◆ SatGenericStreamEncapsulator() [1/2]

ns3::SatGenericStreamEncapsulator::SatGenericStreamEncapsulator ( )

Default constructor, not used.

Definition at line 40 of file satellite-generic-stream-encapsulator.cc.

◆ SatGenericStreamEncapsulator() [2/2]

ns3::SatGenericStreamEncapsulator::SatGenericStreamEncapsulator ( Mac48Address  encapAddress,
Mac48Address  decapAddress,
Mac48Address  sourceE2EAddress,
Mac48Address  destE2EAddress,
uint8_t  flowId,
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)
flowIdFlow identifier
additionalHeaderSizeAdditional value in to take into account when pulling packets to represent E2E tags

Definition at line 53 of file satellite-generic-stream-encapsulator.cc.

References ns3::SatGseHeader::GetMaxGseHeaderSizeInBytes(), and m_minGseTxOpportunity.

+ Here is the call graph for this function:

◆ ~SatGenericStreamEncapsulator()

ns3::SatGenericStreamEncapsulator::~SatGenericStreamEncapsulator ( )
virtual

Destructor for SatGenericStreamEncapsulator.

Definition at line 78 of file satellite-generic-stream-encapsulator.cc.

Member Function Documentation

◆ DoDispose()

void ns3::SatGenericStreamEncapsulator::DoDispose ( void  )
virtual

Dispose of this class instance.

Reimplemented from ns3::SatBaseEncapsulator.

Reimplemented in ns3::SatGenericStreamEncapsulatorArq.

Definition at line 99 of file satellite-generic-stream-encapsulator.cc.

References ns3::SatBaseEncapsulator::DoDispose().

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

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

◆ EnquePdu()

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

Enqueue a Higher Layer packet to txBuffer.

Parameters
pTo be buffered packet
destTarget MAC address

Reimplemented from ns3::SatBaseEncapsulator.

Definition at line 107 of file satellite-generic-stream-encapsulator.cc.

References ns3::SatEncapPduStatusTag::FULL_PDU, ns3::SatBaseEncapsulator::m_txQueue, MAX_HL_PACKET_SIZE, and ns3::SatEncapPduStatusTag::SetStatus().

+ Here is the call graph for this function:

◆ GetMinTxOpportunityInBytes()

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

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

Returns
uint32_t minimum tx opportunity

Reimplemented from ns3::SatBaseEncapsulator.

Definition at line 495 of file satellite-generic-stream-encapsulator.cc.

References m_minGseTxOpportunity.

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

+ Here is the caller graph for this function:

◆ GetNewGsePdu()

Ptr< Packet > ns3::SatGenericStreamEncapsulator::GetNewGsePdu ( uint32_t  txOpportunityBytes,
uint32_t  maxGsePduSize,
uint32_t  additionalHeaderSize = 0 
)
protected

◆ GetTypeId()

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

Get the type ID.

Returns
the object TypeId

Definition at line 84 of file satellite-generic-stream-encapsulator.cc.

References m_maxGsePduSize.

◆ IncreaseFragmentId()

void ns3::SatGenericStreamEncapsulator::IncreaseFragmentId ( )
protected

Method increases the fragment id by one.

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

Definition at line 360 of file satellite-generic-stream-encapsulator.cc.

References m_txFragmentId, and MAX_FRAGMENT_ID.

Referenced by GetNewGsePdu().

+ Here is the caller graph for this function:

◆ NotifyTxOpportunity()

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

◆ ProcessPdu()

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

◆ ReceivePdu()

void ns3::SatGenericStreamEncapsulator::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::SatGenericStreamEncapsulatorArq.

Definition at line 372 of file satellite-generic-stream-encapsulator.cc.

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

+ Here is the call graph for this function:

◆ Reset()

void ns3::SatGenericStreamEncapsulator::Reset ( )
protected

Reset defragmentation variables.

Definition at line 484 of file satellite-generic-stream-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::SatGenericStreamEncapsulator::m_currRxFragmentId
protected

Current fragment id in the reassembly process.

Definition at line 161 of file satellite-generic-stream-encapsulator.h.

Referenced by ProcessPdu(), and Reset().

◆ m_currRxPacketFragment

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

Current packet in the reassembly process.

Definition at line 166 of file satellite-generic-stream-encapsulator.h.

Referenced by ProcessPdu(), and Reset().

◆ m_currRxPacketFragmentBytes

uint32_t ns3::SatGenericStreamEncapsulator::m_currRxPacketFragmentBytes
protected

Currently received bytes of the fragmented packet.

Definition at line 176 of file satellite-generic-stream-encapsulator.h.

Referenced by ProcessPdu(), and Reset().

◆ m_currRxPacketSize

uint32_t ns3::SatGenericStreamEncapsulator::m_currRxPacketSize
protected

The total size of the ALPDU size reassembly process.

Definition at line 171 of file satellite-generic-stream-encapsulator.h.

Referenced by ProcessPdu(), and Reset().

◆ m_maxGsePduSize

uint32_t ns3::SatGenericStreamEncapsulator::m_maxGsePduSize
protected

Maximum GSE PDU size.

Definition at line 152 of file satellite-generic-stream-encapsulator.h.

Referenced by GetTypeId(), and NotifyTxOpportunity().

◆ m_minGseTxOpportunity

uint32_t ns3::SatGenericStreamEncapsulator::m_minGseTxOpportunity
protected

If the GSE opportunity is smaller than this, a NULL packet is returned.

Definition at line 182 of file satellite-generic-stream-encapsulator.h.

Referenced by SatGenericStreamEncapsulator(), and GetMinTxOpportunityInBytes().

◆ m_txFragmentId

uint32_t ns3::SatGenericStreamEncapsulator::m_txFragmentId
protected

Fragment id used in the packet transmissions.

Definition at line 157 of file satellite-generic-stream-encapsulator.h.

Referenced by GetNewGsePdu(), and IncreaseFragmentId().

◆ MAX_FRAGMENT_ID

const uint32_t ns3::SatGenericStreamEncapsulator::MAX_FRAGMENT_ID = 256
staticprotected

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

Definition at line 188 of file satellite-generic-stream-encapsulator.h.

Referenced by IncreaseFragmentId().

◆ MAX_HL_PACKET_SIZE

const uint32_t ns3::SatGenericStreamEncapsulator::MAX_HL_PACKET_SIZE = 65536
staticprotected

The maximum packet size is described with 16 bits, thus, the maximum HL packet size is 65536 bytes.

Definition at line 194 of file satellite-generic-stream-encapsulator.h.

Referenced by EnquePdu().


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