SatGseHeader implementation. More...
#include "satellite-gse-header.h"
Public Member Functions | |
SatGseHeader () | |
Constructor. More... | |
~SatGseHeader () | |
Destructor for SatGseHeader. More... | |
virtual uint32_t | Deserialize (Buffer::Iterator start) |
Deserializes information from buffer to this instance of SatGseHeader. More... | |
uint8_t | GetEndIndicator () const |
Get end indicator of GSE header. More... | |
uint32_t | GetFragmentId () const |
Get GSE fragment id. More... | |
uint32_t | GetGseHeaderSizeInBytes (uint8_t type) const |
Get the maximum GSE header size. More... | |
uint32_t | GetGsePduLength () const |
Get GSE fragment length in bytes. More... | |
virtual TypeId | GetInstanceTypeId (void) const |
Get the type ID of instance. More... | |
uint32_t | GetMaxGseHeaderSizeInBytes () const |
Get the maximum GSE header size. More... | |
virtual uint32_t | GetSerializedSize (void) const |
Get serialized size of SatGseHeader. More... | |
uint8_t | GetStartIndicator () const |
Get start indicator of GSE header. More... | |
uint32_t | GetTotalLength () const |
Get total length of higher layer PDU. More... | |
virtual void | Print (std::ostream &os) const |
Print time stamp of this instance of SatGseHeader. More... | |
virtual void | Serialize (Buffer::Iterator start) const |
Serializes information to buffer from this instance of SatGseHeader. More... | |
void | SetEndIndicator () |
Set end indicator to GSE header. More... | |
void | SetFragmentId (uint32_t id) |
Set fragment id to GSE header. More... | |
void | SetGsePduLength (uint32_t bytes) |
Set GSE fragment length to PPDU header. More... | |
void | SetStartIndicator () |
Set start indicator to GSE header. More... | |
void | SetTotalLength (uint32_t bytes) |
Set total length of higher layer PDU. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Private Attributes | |
const uint32_t | m_continuationGseHeaderSize |
uint32_t | m_crc |
const uint32_t | m_endGseHeaderSize |
uint8_t | m_endIndicator |
uint8_t | m_fragmentId |
const uint32_t | m_fullGseHeaderSize |
Constant variables for determining the header sizes of different GSE fragments. More... | |
uint16_t | m_gsePduLengthInBytes |
uint8_t | m_labelByte |
uint16_t | m_protocolType |
const uint32_t | m_startGseHeaderSize |
uint8_t | m_startIndicator |
GSE header content. More... | |
uint16_t | m_totalLengthInBytes |
Static Private Attributes | |
static const uint32_t | m_labelFieldLengthInBytes = 3 |
SatGseHeader implementation.
GSE header is added to each of the transmitted GSE packets at the GW in FWD link direction. The header is detached and interpreted at the GSE receiver at the UT. Based on the content the receiver can do the defragmentation of the higher layer packet. The size of the GSE header is determined by the Serialize and GetSerializedSize methods. The GSE header has the proper content and size according to specification.
Definition at line 47 of file satellite-gse-header.h.
ns3::SatGseHeader::SatGseHeader | ( | ) |
Constructor.
Definition at line 39 of file satellite-gse-header.cc.
ns3::SatGseHeader::~SatGseHeader | ( | ) |
Destructor for SatGseHeader.
Definition at line 55 of file satellite-gse-header.cc.
|
virtual |
Deserializes information from buffer to this instance of SatGseHeader.
start | Buffer from which the information is deserialized |
The GSE header includes also other fields, but currently they are not deserialized because they are not used. They are just serialized so that the header size is correct.
Definition at line 144 of file satellite-gse-header.cc.
References GetSerializedSize(), m_endIndicator, m_fragmentId, m_gsePduLengthInBytes, m_startIndicator, and m_totalLengthInBytes.
uint8_t ns3::SatGseHeader::GetEndIndicator | ( | ) | const |
Get end indicator of GSE header.
Definition at line 206 of file satellite-gse-header.cc.
References m_endIndicator.
Referenced by ns3::SatGenericStreamEncapsulator::ProcessPdu().
uint32_t ns3::SatGseHeader::GetFragmentId | ( | ) | const |
Get GSE fragment id.
Definition at line 220 of file satellite-gse-header.cc.
References m_fragmentId.
Referenced by ns3::SatGenericStreamEncapsulator::ProcessPdu().
uint32_t ns3::SatGseHeader::GetGseHeaderSizeInBytes | ( | uint8_t | type | ) | const |
Get the maximum GSE header size.
Definition at line 269 of file satellite-gse-header.cc.
References ns3::SatEncapPduStatusTag::CONTINUATION_PDU, ns3::SatEncapPduStatusTag::END_PDU, ns3::SatEncapPduStatusTag::FULL_PDU, m_continuationGseHeaderSize, m_endGseHeaderSize, m_fullGseHeaderSize, m_labelFieldLengthInBytes, m_startGseHeaderSize, and ns3::SatEncapPduStatusTag::START_PDU.
Referenced by ns3::SatGenericStreamEncapsulator::GetNewGsePdu().
uint32_t ns3::SatGseHeader::GetGsePduLength | ( | ) | const |
Get GSE fragment length in bytes.
Definition at line 213 of file satellite-gse-header.cc.
References m_gsePduLengthInBytes.
Referenced by ns3::SatGenericStreamEncapsulator::ProcessPdu().
|
virtual |
Get the type ID of instance.
Definition at line 193 of file satellite-gse-header.cc.
References GetTypeId().
uint32_t ns3::SatGseHeader::GetMaxGseHeaderSizeInBytes | ( | ) | const |
Get the maximum GSE header size.
Definition at line 301 of file satellite-gse-header.cc.
References m_continuationGseHeaderSize, m_endGseHeaderSize, m_fullGseHeaderSize, m_labelFieldLengthInBytes, and m_startGseHeaderSize.
Referenced by ns3::SatGenericStreamEncapsulator::SatGenericStreamEncapsulator().
|
virtual |
Get serialized size of SatGseHeader.
Definition at line 68 of file satellite-gse-header.cc.
References m_continuationGseHeaderSize, m_endGseHeaderSize, m_endIndicator, m_fullGseHeaderSize, m_labelFieldLengthInBytes, m_startGseHeaderSize, and m_startIndicator.
Referenced by Deserialize().
uint8_t ns3::SatGseHeader::GetStartIndicator | ( | ) | const |
Get start indicator of GSE header.
Definition at line 199 of file satellite-gse-header.cc.
References m_startIndicator.
Referenced by ns3::SatGenericStreamEncapsulator::ProcessPdu().
uint32_t ns3::SatGseHeader::GetTotalLength | ( | ) | const |
Get total length of higher layer PDU.
Definition at line 227 of file satellite-gse-header.cc.
References m_totalLengthInBytes.
Referenced by ns3::SatGenericStreamEncapsulator::ProcessPdu().
|
static |
Get the type ID.
Definition at line 60 of file satellite-gse-header.cc.
Referenced by GetInstanceTypeId().
|
virtual |
Print time stamp of this instance of SatGseHeader.
&os | Output stream to which tag timestamp is printed. |
Definition at line 183 of file satellite-gse-header.cc.
References m_crc, m_endIndicator, m_fragmentId, m_gsePduLengthInBytes, m_labelByte, m_protocolType, m_startIndicator, and m_totalLengthInBytes.
|
virtual |
Serializes information to buffer from this instance of SatGseHeader.
start | Buffer in which the information is serialized |
Definition at line 102 of file satellite-gse-header.cc.
References m_crc, m_endIndicator, m_fragmentId, m_gsePduLengthInBytes, m_labelByte, m_labelFieldLengthInBytes, m_protocolType, m_startIndicator, and m_totalLengthInBytes.
void ns3::SatGseHeader::SetEndIndicator | ( | ) |
Set end indicator to GSE header.
Definition at line 241 of file satellite-gse-header.cc.
References m_endIndicator.
Referenced by ns3::SatGenericStreamEncapsulator::GetNewGsePdu().
void ns3::SatGseHeader::SetFragmentId | ( | uint32_t | id | ) |
Set fragment id to GSE header.
id | Fragment id |
Definition at line 255 of file satellite-gse-header.cc.
References m_fragmentId.
Referenced by ns3::SatGenericStreamEncapsulator::GetNewGsePdu().
void ns3::SatGseHeader::SetGsePduLength | ( | uint32_t | bytes | ) |
Set GSE fragment length to PPDU header.
bytes | GSE length in bytes |
Definition at line 248 of file satellite-gse-header.cc.
References m_gsePduLengthInBytes.
Referenced by ns3::SatGenericStreamEncapsulator::GetNewGsePdu().
void ns3::SatGseHeader::SetStartIndicator | ( | ) |
Set start indicator to GSE header.
Definition at line 234 of file satellite-gse-header.cc.
References m_startIndicator.
Referenced by ns3::SatGenericStreamEncapsulator::GetNewGsePdu().
void ns3::SatGseHeader::SetTotalLength | ( | uint32_t | bytes | ) |
Set total length of higher layer PDU.
Set in START_PPDU status type.
bytes | Size of the full HL packet |
Definition at line 262 of file satellite-gse-header.cc.
References m_totalLengthInBytes.
Referenced by ns3::SatGenericStreamEncapsulator::GetNewGsePdu().
|
private |
Definition at line 188 of file satellite-gse-header.h.
Referenced by GetGseHeaderSizeInBytes(), GetMaxGseHeaderSizeInBytes(), and GetSerializedSize().
|
private |
Definition at line 179 of file satellite-gse-header.h.
Referenced by Print(), and Serialize().
|
private |
Definition at line 187 of file satellite-gse-header.h.
Referenced by GetGseHeaderSizeInBytes(), GetMaxGseHeaderSizeInBytes(), and GetSerializedSize().
|
private |
Definition at line 173 of file satellite-gse-header.h.
Referenced by Deserialize(), GetEndIndicator(), GetSerializedSize(), Print(), Serialize(), and SetEndIndicator().
|
private |
Definition at line 175 of file satellite-gse-header.h.
Referenced by Deserialize(), GetFragmentId(), Print(), Serialize(), and SetFragmentId().
|
private |
Constant variables for determining the header sizes of different GSE fragments.
Definition at line 185 of file satellite-gse-header.h.
Referenced by GetGseHeaderSizeInBytes(), GetMaxGseHeaderSizeInBytes(), and GetSerializedSize().
|
private |
Definition at line 174 of file satellite-gse-header.h.
Referenced by Deserialize(), GetGsePduLength(), Print(), Serialize(), and SetGsePduLength().
|
private |
Definition at line 178 of file satellite-gse-header.h.
Referenced by Print(), and Serialize().
|
staticprivate |
Definition at line 190 of file satellite-gse-header.h.
Referenced by GetGseHeaderSizeInBytes(), GetMaxGseHeaderSizeInBytes(), GetSerializedSize(), and Serialize().
|
private |
Definition at line 177 of file satellite-gse-header.h.
Referenced by Print(), and Serialize().
|
private |
Definition at line 186 of file satellite-gse-header.h.
Referenced by GetGseHeaderSizeInBytes(), GetMaxGseHeaderSizeInBytes(), and GetSerializedSize().
|
private |
GSE header content.
Definition at line 172 of file satellite-gse-header.h.
Referenced by Deserialize(), GetSerializedSize(), GetStartIndicator(), Print(), Serialize(), and SetStartIndicator().
|
private |
Definition at line 176 of file satellite-gse-header.h.
Referenced by Deserialize(), GetTotalLength(), Print(), Serialize(), and SetTotalLength().