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. More...
 
typedef std::pair< uint8_t, SatEnums::SatCapacityAllocationCategory_tRequestDescriptor_t
 Define type RequestDescriptor_t. More...
 
enum  SatCrBlockSize_t { CR_BLOCK_SMALL , CR_BLOCK_LARGE }
 

Public Member Functions

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

Static Public Member Functions

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

Private Attributes

SatCrBlockSize_t m_crBlockSizeType
 Control element size is defined by attribute. More...
 
double m_forwardLinkCNo
 C/N0 estimate. More...
 
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. More...
 
static const uint32_t CONTROL_MSG_TYPE_VALUE_SIZE_IN_BYTES = 1
 Type field of the CR control element. More...
 

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 404 of file satellite-control-message.h.

Member Typedef Documentation

◆ RequestContainer_t

Define type RequestContainer_t.

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

◆ RequestDescriptor_t

Define type RequestDescriptor_t.

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

Member Enumeration Documentation

◆ SatCrBlockSize_t

Enumerator
CR_BLOCK_SMALL 
CR_BLOCK_LARGE 

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

Constructor & Destructor Documentation

◆ SatCrMessage()

ns3::SatCrMessage::SatCrMessage ( )

Constructor for SatCrMessage.

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

◆ ~SatCrMessage()

ns3::SatCrMessage::~SatCrMessage ( )

Destructor for SatCrMessage.

Definition at line 410 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 416 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 427 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 439 of file satellite-control-message.cc.

References m_forwardLinkCNo.

◆ GetInstanceTypeId()

TypeId ns3::SatCrMessage::GetInstanceTypeId ( void  ) const
virtual

Get the type ID of instance.

Returns
the object TypeId

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

References GetTypeId().

+ Here is the call graph for this function:

◆ GetMsgType()

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

Get type of the message.

Returns
SatControlMsgTag::SAT_CR_CTRL_MSG

Implements ns3::SatControlMessage.

Definition at line 448 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 433 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 453 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 379 of file satellite-control-message.cc.

References CR_BLOCK_LARGE, CR_BLOCK_SMALL, and m_crBlockSizeType.

Referenced by GetInstanceTypeId().

+ Here is the caller 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 469 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 446 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 522 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 515 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 505 of file satellite-control-message.h.

Referenced by GetSizeInBytes(), and GetTypeId().

◆ m_forwardLinkCNo

double ns3::SatCrMessage::m_forwardLinkCNo
private

C/N0 estimate.

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

Referenced by GetCnoEstimate(), and SetCnoEstimate().

◆ m_requestData


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