5G-LENA nr-v4.0-29-g6d8085cd
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
ns3::NrRlcAmHeader Class Reference

The packet header for the AM Radio Link Control (RLC) protocol packets. More...

#include "nr-rlc-am-header.h"

+ Inheritance diagram for ns3::NrRlcAmHeader:
+ Collaboration diagram for ns3::NrRlcAmHeader:

Public Types

enum  DataControlPdu_t { CONTROL_PDU = 0 , DATA_PDU = 1 }
 DataControlPdu_t enumeration. More...
 
enum  ExtensionBit_t { DATA_FIELD_FOLLOWS = 0 , E_LI_FIELDS_FOLLOWS = 1 }
 ExtensionBit_t typedef. More...
 
enum  FramingInfoByte_t { FIRST_BYTE = 0x00 , NO_FIRST_BYTE = 0x02 , LAST_BYTE = 0x00 , NO_LAST_BYTE = 0x01 }
 FramingInfoByte_t enumeration. More...
 
enum  LastSegmentFlag_t { NO_LAST_PDU_SEGMENT = 0 , LAST_PDU_SEGMENT = 1 }
 LastSegmentFlag_t typedef. More...
 
enum  PollingBit_t { STATUS_REPORT_NOT_REQUESTED = 0 , STATUS_REPORT_IS_REQUESTED = 1 }
 PollingBit_t enumeration. More...
 
enum  ResegmentationFlag_t { PDU = 0 , SEGMENT = 1 }
 ResegmentationFlag_t typedef. More...
 

Public Member Functions

 NrRlcAmHeader ()
 Constructor.
 
uint32_t Deserialize (Buffer::Iterator start) override
 
nr::SequenceNumber10 GetAckSn () const
 
uint8_t GetFramingInfo () const
 
TypeId GetInstanceTypeId () const override
 
uint16_t GetLastOffset () const
 
uint8_t GetLastSegmentFlag () const
 
uint8_t GetPollingBit () const
 
uint8_t GetResegmentationFlag () const
 
uint16_t GetSegmentOffset () const
 
nr::SequenceNumber10 GetSequenceNumber () const
 
uint32_t GetSerializedSize () const override
 
bool IsControlPdu () const
 
bool IsDataPdu () const
 
bool IsNackPresent (nr::SequenceNumber10 nack)
 
bool OneMoreNackWouldFitIn (uint16_t bytes)
 
uint8_t PopExtensionBit ()
 
uint16_t PopLengthIndicator ()
 
int PopNack ()
 
void Print (std::ostream &os) const override
 
void PushExtensionBit (uint8_t extensionBit)
 
void PushLengthIndicator (uint16_t lengthIndicator)
 
void PushNack (int nack)
 
void Serialize (Buffer::Iterator start) const override
 
void SetAckSn (nr::SequenceNumber10 ackSn)
 
void SetControlPdu (uint8_t controlPduType)
 
void SetDataPdu ()
 Set data PDU function.
 
void SetFramingInfo (uint8_t framingInfo)
 
void SetLastSegmentFlag (uint8_t lsf)
 
void SetPollingBit (uint8_t pollingBit)
 
void SetResegmentationFlag (uint8_t resegFlag)
 
void SetSegmentOffset (uint16_t segmentOffset)
 
void SetSequenceNumber (nr::SequenceNumber10 sequenceNumber)
 

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type ID.
 

Static Public Attributes

static constexpr uint8_t STATUS_PDU {0}
 Control PDU type status.
 

Detailed Description

The packet header for the AM Radio Link Control (RLC) protocol packets.

This class has fields corresponding to those in an RLC header as well as methods for serialization to and deserialization from a byte buffer. It follows 3GPP TS 36.322 Radio Link Control (RLC) protocol specification.

Introspection did not find any typical Config paths.
No Attributes are defined for this type.
No TraceSources are defined for this type.
Size of this type is 152 bytes (on a 64-bit architecture).

Definition at line 27 of file nr-rlc-am-header.h.

Member Enumeration Documentation

◆ DataControlPdu_t

DataControlPdu_t enumeration.

Definition at line 58 of file nr-rlc-am-header.h.

◆ ExtensionBit_t

ExtensionBit_t typedef.

Definition at line 133 of file nr-rlc-am-header.h.

◆ FramingInfoByte_t

FramingInfoByte_t enumeration.

Definition at line 98 of file nr-rlc-am-header.h.

◆ LastSegmentFlag_t

LastSegmentFlag_t typedef.

Definition at line 193 of file nr-rlc-am-header.h.

◆ PollingBit_t

PollingBit_t enumeration.

Definition at line 173 of file nr-rlc-am-header.h.

◆ ResegmentationFlag_t

ResegmentationFlag_t typedef.

Definition at line 153 of file nr-rlc-am-header.h.

Constructor & Destructor Documentation

◆ NrRlcAmHeader()

ns3::NrRlcAmHeader::NrRlcAmHeader ( )

Constructor.

Creates a null header

Definition at line 18 of file nr-rlc-am-header.cc.

◆ ~NrRlcAmHeader()

ns3::NrRlcAmHeader::~NrRlcAmHeader ( )
override

Definition at line 32 of file nr-rlc-am-header.cc.

Member Function Documentation

◆ Deserialize()

uint32_t ns3::NrRlcAmHeader::Deserialize ( Buffer::Iterator  start)
override

Definition at line 470 of file nr-rlc-am-header.cc.

◆ GetAckSn()

nr::SequenceNumber10 ns3::NrRlcAmHeader::GetAckSn ( ) const

Get ack sn function

Returns
sequence number

Definition at line 266 of file nr-rlc-am-header.cc.

Referenced by ns3::NrRlcAm::DoReceivePdu().

+ Here is the caller graph for this function:

◆ GetFramingInfo()

uint8_t ns3::NrRlcAmHeader::GetFramingInfo ( ) const

Get framing info

Returns
framing info

Definition at line 86 of file nr-rlc-am-header.cc.

◆ GetInstanceTypeId()

TypeId ns3::NrRlcAmHeader::GetInstanceTypeId ( ) const
override

Definition at line 282 of file nr-rlc-am-header.cc.

◆ GetLastOffset()

uint16_t ns3::NrRlcAmHeader::GetLastOffset ( ) const

Get last offset function

Returns
last offset

Definition at line 187 of file nr-rlc-am-header.cc.

◆ GetLastSegmentFlag()

uint8_t ns3::NrRlcAmHeader::GetLastSegmentFlag ( ) const

Get last segment flag function

Returns
last segment flag

Definition at line 169 of file nr-rlc-am-header.cc.

◆ GetPollingBit()

uint8_t ns3::NrRlcAmHeader::GetPollingBit ( ) const

Get polling bit function

Returns
polling bit

Definition at line 157 of file nr-rlc-am-header.cc.

Referenced by ns3::NrRlcAm::DoReceivePdu().

+ Here is the caller graph for this function:

◆ GetResegmentationFlag()

uint8_t ns3::NrRlcAmHeader::GetResegmentationFlag ( ) const

Get resegmentation flag function

Returns
resegmentation flag

Definition at line 145 of file nr-rlc-am-header.cc.

Referenced by ns3::NrRlcAm::DoReceivePdu().

+ Here is the caller graph for this function:

◆ GetSegmentOffset()

uint16_t ns3::NrRlcAmHeader::GetSegmentOffset ( ) const

Get segment offset function

Returns
segment offset

Definition at line 181 of file nr-rlc-am-header.cc.

◆ GetSequenceNumber()

nr::SequenceNumber10 ns3::NrRlcAmHeader::GetSequenceNumber ( ) const

Get sequence number

Returns
sequence number

Definition at line 92 of file nr-rlc-am-header.cc.

Referenced by ns3::NrRlcAm::DoNotifyTxOpportunity(), and ns3::NrRlcAm::DoReceivePdu().

+ Here is the caller graph for this function:

◆ GetSerializedSize()

uint32_t ns3::NrRlcAmHeader::GetSerializedSize ( ) const
override

Definition at line 341 of file nr-rlc-am-header.cc.

◆ GetTypeId()

TypeId ns3::NrRlcAmHeader::GetTypeId ( )
static

Get the type ID.

Returns
the object TypeId

Definition at line 272 of file nr-rlc-am-header.cc.

◆ IsControlPdu()

bool ns3::NrRlcAmHeader::IsControlPdu ( ) const

Is control PDU function

Returns
true if control PDU

Definition at line 68 of file nr-rlc-am-header.cc.

Referenced by ns3::NrRlcAm::DoReceivePdu().

+ Here is the caller graph for this function:

◆ IsDataPdu()

bool ns3::NrRlcAmHeader::IsDataPdu ( ) const

Is data PDU function

Returns
true if data PDU

Definition at line 62 of file nr-rlc-am-header.cc.

Referenced by ns3::NrRlcAm::DoReceivePdu().

+ Here is the caller graph for this function:

◆ IsNackPresent()

bool ns3::NrRlcAmHeader::IsNackPresent ( nr::SequenceNumber10  nack)
Parameters
nackSN of the NACK
Returns
true if the NACK is present in the STATUS PDU, false otherwise

Definition at line 233 of file nr-rlc-am-header.cc.

References ns3::nr::SequenceNumber10::GetValue(), and STATUS_PDU.

Referenced by ns3::NrRlcAm::DoReceivePdu().

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

◆ OneMoreNackWouldFitIn()

bool ns3::NrRlcAmHeader::OneMoreNackWouldFitIn ( uint16_t  bytes)
Parameters
bytesmax allowed CONTROL PDU size
Returns
true if one more NACK would fit in the CONTROL PDU; false otherwise

Definition at line 199 of file nr-rlc-am-header.cc.

References STATUS_PDU.

Referenced by ns3::NrRlcAm::DoNotifyTxOpportunity().

+ Here is the caller graph for this function:

◆ PopExtensionBit()

uint8_t ns3::NrRlcAmHeader::PopExtensionBit ( )

Pop extension bit function

Returns
the extension bit

Definition at line 121 of file nr-rlc-am-header.cc.

◆ PopLengthIndicator()

uint16_t ns3::NrRlcAmHeader::PopLengthIndicator ( )

Pop length indicator function

Returns
the length indicator

Definition at line 130 of file nr-rlc-am-header.cc.

◆ PopNack()

int ns3::NrRlcAmHeader::PopNack ( )

Retrieve one NACK from the CONTROL PDU

Returns
the SN >= 0 of the next nack; returns -1 if no NACK is left

Definition at line 249 of file nr-rlc-am-header.cc.

References STATUS_PDU.

◆ Print()

void ns3::NrRlcAmHeader::Print ( std::ostream &  os) const
override

Definition at line 288 of file nr-rlc-am-header.cc.

◆ PushExtensionBit()

void ns3::NrRlcAmHeader::PushExtensionBit ( uint8_t  extensionBit)

Push extension bit function

Parameters
extensionBitthe extension bit

Definition at line 98 of file nr-rlc-am-header.cc.

Referenced by ns3::NrRlcAm::DoNotifyTxOpportunity().

+ Here is the caller graph for this function:

◆ PushLengthIndicator()

void ns3::NrRlcAmHeader::PushLengthIndicator ( uint16_t  lengthIndicator)

Push length indicator function

Parameters
lengthIndicatorthe length indicator

Definition at line 115 of file nr-rlc-am-header.cc.

Referenced by ns3::NrRlcAm::DoNotifyTxOpportunity().

+ Here is the caller graph for this function:

◆ PushNack()

void ns3::NrRlcAmHeader::PushNack ( int  nack)

Add one more NACK to the CONTROL PDU

Parameters
nack

Definition at line 215 of file nr-rlc-am-header.cc.

References STATUS_PDU.

Referenced by ns3::NrRlcAm::DoNotifyTxOpportunity().

+ Here is the caller graph for this function:

◆ Serialize()

void ns3::NrRlcAmHeader::Serialize ( Buffer::Iterator  start) const
override

Definition at line 347 of file nr-rlc-am-header.cc.

◆ SetAckSn()

void ns3::NrRlcAmHeader::SetAckSn ( nr::SequenceNumber10  ackSn)

Set ack sn function

Parameters
ackSnack sn

Definition at line 193 of file nr-rlc-am-header.cc.

Referenced by ns3::NrRlcAm::DoNotifyTxOpportunity().

+ Here is the caller graph for this function:

◆ SetControlPdu()

void ns3::NrRlcAmHeader::SetControlPdu ( uint8_t  controlPduType)

Set control PDU function

Parameters
controlPduType

Definition at line 54 of file nr-rlc-am-header.cc.

Referenced by ns3::NrRlcAm::DoNotifyTxOpportunity().

+ Here is the caller graph for this function:

◆ SetDataPdu()

void ns3::NrRlcAmHeader::SetDataPdu ( )

Set data PDU function.

Definition at line 47 of file nr-rlc-am-header.cc.

Referenced by ns3::NrRlcAm::DoNotifyTxOpportunity().

+ Here is the caller graph for this function:

◆ SetFramingInfo()

void ns3::NrRlcAmHeader::SetFramingInfo ( uint8_t  framingInfo)

Set sequence number

Parameters
framingInfoframing info

Definition at line 74 of file nr-rlc-am-header.cc.

Referenced by ns3::NrRlcAm::DoNotifyTxOpportunity().

+ Here is the caller graph for this function:

◆ SetLastSegmentFlag()

void ns3::NrRlcAmHeader::SetLastSegmentFlag ( uint8_t  lsf)

Set last segment flag function

Parameters
lsflast segment flag

Definition at line 163 of file nr-rlc-am-header.cc.

Referenced by ns3::NrRlcAm::DoNotifyTxOpportunity().

+ Here is the caller graph for this function:

◆ SetPollingBit()

void ns3::NrRlcAmHeader::SetPollingBit ( uint8_t  pollingBit)

Set polling bit function

Parameters
pollingBitpolling bit

Definition at line 151 of file nr-rlc-am-header.cc.

Referenced by ns3::NrRlcAm::DoNotifyTxOpportunity().

+ Here is the caller graph for this function:

◆ SetResegmentationFlag()

void ns3::NrRlcAmHeader::SetResegmentationFlag ( uint8_t  resegFlag)

Pop extension bit function

Parameters
resegFlagresegmentation flag

Definition at line 139 of file nr-rlc-am-header.cc.

Referenced by ns3::NrRlcAm::DoNotifyTxOpportunity().

+ Here is the caller graph for this function:

◆ SetSegmentOffset()

void ns3::NrRlcAmHeader::SetSegmentOffset ( uint16_t  segmentOffset)

Set segment offset function

Parameters
segmentOffsetsegment offset

Definition at line 175 of file nr-rlc-am-header.cc.

Referenced by ns3::NrRlcAm::DoNotifyTxOpportunity().

+ Here is the caller graph for this function:

◆ SetSequenceNumber()

void ns3::NrRlcAmHeader::SetSequenceNumber ( nr::SequenceNumber10  sequenceNumber)

Set sequence number

Parameters
sequenceNumbersequence number

Definition at line 80 of file nr-rlc-am-header.cc.

Referenced by ns3::NrRlcAm::DoNotifyTxOpportunity().

+ Here is the caller graph for this function:

Member Data Documentation

◆ STATUS_PDU

constexpr uint8_t ns3::NrRlcAmHeader::STATUS_PDU {0}
staticconstexpr

Control PDU type status.

Definition at line 65 of file nr-rlc-am-header.h.

Referenced by ns3::NrRlcAm::DoNotifyTxOpportunity(), IsNackPresent(), OneMoreNackWouldFitIn(), PopNack(), and PushNack().


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