Loading...
Searching...
No Matches
ns3::SatCrMessage Class Reference

The packet for the Capacity Request (CR) messages. More...

#include "satellite-control-message.h"

Inheritance diagram for ns3::SatCrMessage:
Collaboration diagram for ns3::SatCrMessage:

Public Types

typedef std::map< RequestDescriptor_t, uint16_t > RequestContainer_t
 Define type RequestContainer_t.
typedef std::pair< uint8_t, SatEnums::SatCapacityAllocationCategory_tRequestDescriptor_t
 Define type RequestDescriptor_t.
enum  SatCrBlockSize_t { CR_BLOCK_SMALL , CR_BLOCK_LARGE }

Public Member Functions

 SatCrMessage ()
 Constructor for SatCrMessage.
 ~SatCrMessage ()
 Destructor for SatCrMessage.
void AddControlElement (uint8_t rcIndex, SatEnums::SatCapacityAllocationCategory_t cac, uint32_t value)
 Add a control element to capacity request.
const RequestContainer_t GetCapacityRequestContent () const
 Get the capacity request content.
double GetCnoEstimate () const
 Get C/N0 estimate.
SatControlMsgTag::SatControlMsgType_t GetMsgType () const
 Get type of the message.
uint32_t GetNumCapacityRequestElements () const
 The number of capacity request elements.
virtual uint32_t GetSizeInBytes () const
 Get real size of the CR message, which can be used to e.g.
bool IsNotEmpty () const
 Has the CR non-zero content.
void SetCnoEstimate (double cno)
 Set C/N0 estimate.
Public Member Functions inherited from ns3::SatControlMessage
 SatControlMessage ()
 Default constructor for SatControlMessage.
 ~SatControlMessage ()
 Destructor.

Static Public Member Functions

static TypeId GetTypeId (void)
 methods derived from base classes
Static Public Member Functions inherited from ns3::SatControlMessage
static TypeId GetTypeId (void)
 methods derived from base classes

Private Attributes

SatCrBlockSize_t m_crBlockSizeType
 Control element size is defined by attribute.
double m_forwardLinkCNo
 C/N0 estimate.
RequestContainer_t m_requestData

Static Private Attributes

static const uint32_t CONTROL_MSG_COMMON_HEADER_SIZE_IN_BYTES = 3
 RCST_status + power headroom = 1 Byte CNI = 1 Byte Least margin transmission mode request = 1 Byte.
static const uint32_t CONTROL_MSG_TYPE_VALUE_SIZE_IN_BYTES = 1
 Type field of the CR control element.

Detailed Description

The packet for the Capacity Request (CR) messages.

(Tagged by SatControlMsgTag with type value SAT_CR_CTRL_MSG) NOTE! Message implementation doesn't follow specification (ETSI EN 301 542-2). However it implements method GetSizeInBytes, which can be used to simulate real CR message size.

Definition at line 401 of file satellite-control-message.h.

Member Typedef Documentation

◆ RequestContainer_t

Define type RequestContainer_t.

Definition at line 433 of file satellite-control-message.h.

◆ RequestDescriptor_t

Member Enumeration Documentation

◆ SatCrBlockSize_t

Enumerator
CR_BLOCK_SMALL 
CR_BLOCK_LARGE 

Definition at line 404 of file satellite-control-message.h.

Constructor & Destructor Documentation

◆ SatCrMessage()

ns3::SatCrMessage::SatCrMessage ( )

Constructor for SatCrMessage.

Definition at line 391 of file satellite-control-message.cc.

References SatCrMessage(), CR_BLOCK_SMALL, m_crBlockSizeType, and m_forwardLinkCNo.

Referenced by SatCrMessage().

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

◆ ~SatCrMessage()

ns3::SatCrMessage::~SatCrMessage ( )

Destructor for SatCrMessage.

Definition at line 398 of file satellite-control-message.cc.

Member Function Documentation

◆ AddControlElement()

void ns3::SatCrMessage::AddControlElement ( uint8_t rcIndex,
SatEnums::SatCapacityAllocationCategory_t cac,
uint32_t value )

Add a control element to capacity request.

Definition at line 404 of file satellite-control-message.cc.

References m_requestData.

◆ GetCapacityRequestContent()

const SatCrMessage::RequestContainer_t ns3::SatCrMessage::GetCapacityRequestContent ( ) const

Get the capacity request content.

Returns
RequestContainer_t Capacity request container

Definition at line 415 of file satellite-control-message.cc.

References m_requestData.

◆ GetCnoEstimate()

double ns3::SatCrMessage::GetCnoEstimate ( void ) const

Get C/N0 estimate.

Returns
Estimate of the C/N0.

Definition at line 427 of file satellite-control-message.cc.

References m_forwardLinkCNo.

◆ GetMsgType()

SatControlMsgTag::SatControlMsgType_t ns3::SatCrMessage::GetMsgType ( ) const
inlinevirtual

Get type of the message.

Returns
SatControlMsgTag::SAT_CR_CTRL_MSG

Implements ns3::SatControlMessage.

Definition at line 439 of file satellite-control-message.h.

References ns3::SatControlMsgTag::SAT_CR_CTRL_MSG.

◆ GetNumCapacityRequestElements()

uint32_t ns3::SatCrMessage::GetNumCapacityRequestElements ( ) const

The number of capacity request elements.

Returns
uint32_t Number of CR elements

Definition at line 421 of file satellite-control-message.cc.

References m_requestData.

◆ GetSizeInBytes()

uint32_t ns3::SatCrMessage::GetSizeInBytes ( ) const
virtual

Get real size of the CR message, which can be used to e.g.

simulate real size.

Returns
Real size of the CR message.

CR_BLOCK_SMALL = 2 CR_BLOCK_LARGE = 3

Implements ns3::SatControlMessage.

Definition at line 441 of file satellite-control-message.cc.

References CONTROL_MSG_COMMON_HEADER_SIZE_IN_BYTES, CONTROL_MSG_TYPE_VALUE_SIZE_IN_BYTES, CR_BLOCK_SMALL, m_crBlockSizeType, and m_requestData.

◆ GetTypeId()

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

methods derived from base classes

Definition at line 374 of file satellite-control-message.cc.

References ns3::SatControlMessage::SatControlMessage(), CR_BLOCK_LARGE, CR_BLOCK_SMALL, and m_crBlockSizeType.

Here is the call graph for this function:

◆ IsNotEmpty()

bool ns3::SatCrMessage::IsNotEmpty ( ) const

Has the CR non-zero content.

Returns
bool Flag to indicate whether the CR has non-zero content

Definition at line 457 of file satellite-control-message.cc.

References m_requestData.

◆ SetCnoEstimate()

void ns3::SatCrMessage::SetCnoEstimate ( double cno)

Set C/N0 estimate.

Parameters
cnoThe estimate of the C/N0.

Definition at line 434 of file satellite-control-message.cc.

References m_forwardLinkCNo.

Member Data Documentation

◆ CONTROL_MSG_COMMON_HEADER_SIZE_IN_BYTES

const uint32_t ns3::SatCrMessage::CONTROL_MSG_COMMON_HEADER_SIZE_IN_BYTES = 3
staticprivate

RCST_status + power headroom = 1 Byte CNI = 1 Byte Least margin transmission mode request = 1 Byte.

Definition at line 513 of file satellite-control-message.h.

Referenced by GetSizeInBytes().

◆ CONTROL_MSG_TYPE_VALUE_SIZE_IN_BYTES

const uint32_t ns3::SatCrMessage::CONTROL_MSG_TYPE_VALUE_SIZE_IN_BYTES = 1
staticprivate

Type field of the CR control element.

Definition at line 506 of file satellite-control-message.h.

Referenced by GetSizeInBytes().

◆ m_crBlockSizeType

SatCrBlockSize_t ns3::SatCrMessage::m_crBlockSizeType
private

Control element size is defined by attribute.

Note that according to specifications the valid values are

  • SMALL = 2 bytes
  • LARGE = 3 bytes

Definition at line 496 of file satellite-control-message.h.

Referenced by SatCrMessage(), GetSizeInBytes(), and GetTypeId().

◆ m_forwardLinkCNo

double ns3::SatCrMessage::m_forwardLinkCNo
private

C/N0 estimate.

Definition at line 501 of file satellite-control-message.h.

Referenced by SatCrMessage(), GetCnoEstimate(), and SetCnoEstimate().

◆ m_requestData


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