21 #ifndef SATELLITE_RETURN_LINK_ENCAPSULATOR
22 #define SATELLITE_RETURN_LINK_ENCAPSULATOR
27 #include <ns3/event-id.h>
28 #include <ns3/mac48-address.h>
68 Mac48Address decapAddress,
69 Mac48Address sourceE2EAddress,
70 Mac48Address destE2EAddress,
72 uint32_t additionalHeaderSize = 0);
95 virtual void EnquePdu(Ptr<Packet> p, Mac48Address dest);
106 uint32_t& nextMinTxO);
120 virtual void ReceiveAck(Ptr<SatArqAckMessage> ack);
137 uint32_t maxRlePduSize,
138 uint32_t additionalHeaderSize = 0);
A base encapsulator implementation which does not support encapsulation, fragmentation or packing.
SatReturnLinkEncapsulator class is used in the RTN link for RLE encapsulation and fragmentation of hi...
static TypeId GetTypeId(void)
Get the type ID.
uint32_t m_minTxOpportunity
Minimum Tx opportunity.
Ptr< Packet > m_currRxPacketFragment
Current packet in the reassembly process.
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.
virtual void DoDispose()
Dispose of this class instance.
uint32_t m_currRxPacketFragmentBytes
Currently received bytes of the fragmented packet.
uint32_t m_currRxPacketSize
The total size of the ALPDU size reassembly process.
const uint32_t MAX_FRAGMENT_ID
The fragment is described with 3 bits, thus the maximum fragment id is 8.
void Reset()
Reset defragmentation variables.
virtual uint32_t GetMinTxOpportunityInBytes() const
Get minimum Tx opportunity in bytes, which takes the assumed header sizes into account.
virtual void ReceiveAck(Ptr< SatArqAckMessage > ack)
Receive a control msg (ARQ ACK)
uint32_t m_txFragmentId
Fragment id used in the packet transmissions.
virtual ~SatReturnLinkEncapsulator()
Destructor for SatReturnLinkEncapsulator.
virtual void ProcessPdu(Ptr< Packet > p)
Process the reception of individual RLE PDUs.
uint32_t m_currRxFragmentId
Current fragment id in the reassembly process.
virtual void ReceivePdu(Ptr< Packet > p)
Receive a packet, thus decapsulate and defragment/deconcatenate if needed.
virtual Ptr< Packet > NotifyTxOpportunity(uint32_t bytes, uint32_t &bytesLeft, uint32_t &nextMinTxO)
Notify a Tx opportunity to this encapsulator.
virtual void EnquePdu(Ptr< Packet > p, Mac48Address dest)
Enqueue a Higher Layer packet to txBuffer.
const uint32_t MAX_PPDU_PACKET_SIZE
The maximum PPDU fragment size is described with 11 bits, thus, the maximum fragment size is 2048 byt...
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.
SatReturnLinkEncapsulator()
Default constructor, not used.
void IncreaseFragmentId()
Method increases the fragment id by one.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.