The packet for the Capacity Request (CR) messages. More...
#include "satellite-control-message.h"
Public Types | |
typedef std::map< RequestDescriptor_t, uint16_t > | RequestContainer_t |
Define type RequestContainer_t. More... | |
typedef std::pair< uint8_t, SatEnums::SatCapacityAllocationCategory_t > | RequestDescriptor_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... | |
Static Public Member Functions | |
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... | |
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 407 of file satellite-control-message.h.
typedef std::map<RequestDescriptor_t, uint16_t> ns3::SatCrMessage::RequestContainer_t |
Define type RequestContainer_t.
Definition at line 445 of file satellite-control-message.h.
typedef std::pair<uint8_t, SatEnums::SatCapacityAllocationCategory_t> ns3::SatCrMessage::RequestDescriptor_t |
Define type RequestDescriptor_t.
Definition at line 440 of file satellite-control-message.h.
Enumerator | |
---|---|
CR_BLOCK_SMALL | |
CR_BLOCK_LARGE |
Definition at line 410 of file satellite-control-message.h.
ns3::SatCrMessage::SatCrMessage | ( | ) |
Constructor for SatCrMessage.
Definition at line 407 of file satellite-control-message.cc.
ns3::SatCrMessage::~SatCrMessage | ( | ) |
Destructor for SatCrMessage.
Definition at line 414 of file satellite-control-message.cc.
void ns3::SatCrMessage::AddControlElement | ( | uint8_t | rcIndex, |
SatEnums::SatCapacityAllocationCategory_t | cac, | ||
uint32_t | value | ||
) |
Add a control element to capacity request.
Definition at line 420 of file satellite-control-message.cc.
References m_requestData.
const SatCrMessage::RequestContainer_t ns3::SatCrMessage::GetCapacityRequestContent | ( | ) | const |
Get the capacity request content.
Definition at line 431 of file satellite-control-message.cc.
References m_requestData.
double ns3::SatCrMessage::GetCnoEstimate | ( | void | ) | const |
Get C/N0 estimate.
Definition at line 443 of file satellite-control-message.cc.
References m_forwardLinkCNo.
|
virtual |
Get the type ID of instance.
Definition at line 400 of file satellite-control-message.cc.
References GetTypeId().
|
inlinevirtual |
Get type of the message.
Implements ns3::SatControlMessage.
Definition at line 451 of file satellite-control-message.h.
References ns3::SatControlMsgTag::SAT_CR_CTRL_MSG.
uint32_t ns3::SatCrMessage::GetNumCapacityRequestElements | ( | ) | const |
The number of capacity request elements.
Definition at line 437 of file satellite-control-message.cc.
References m_requestData.
|
virtual |
Get real size of the CR message, which can be used to e.g.
simulate real size.
CR_BLOCK_SMALL = 2 CR_BLOCK_LARGE = 3
Implements ns3::SatControlMessage.
Definition at line 457 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.
|
static |
methods derived from base classes
Definition at line 382 of file satellite-control-message.cc.
References CR_BLOCK_LARGE, CR_BLOCK_SMALL, and m_crBlockSizeType.
Referenced by GetInstanceTypeId().
bool ns3::SatCrMessage::IsNotEmpty | ( | ) | const |
Has the CR non-zero content.
Definition at line 473 of file satellite-control-message.cc.
References m_requestData.
void ns3::SatCrMessage::SetCnoEstimate | ( | double | cno | ) |
Set C/N0 estimate.
cno | The estimate of the C/N0. |
Definition at line 450 of file satellite-control-message.cc.
References m_forwardLinkCNo.
|
staticprivate |
RCST_status + power headroom = 1 Byte CNI = 1 Byte Least margin transmission mode request = 1 Byte.
Definition at line 525 of file satellite-control-message.h.
Referenced by GetSizeInBytes().
|
staticprivate |
Type field of the CR control element.
Definition at line 518 of file satellite-control-message.h.
Referenced by GetSizeInBytes().
|
private |
Control element size is defined by attribute.
Note that according to specifications the valid values are
Definition at line 508 of file satellite-control-message.h.
Referenced by GetSizeInBytes(), and GetTypeId().
|
private |
C/N0 estimate.
Definition at line 513 of file satellite-control-message.h.
Referenced by GetCnoEstimate(), and SetCnoEstimate().
|
private |
Definition at line 500 of file satellite-control-message.h.
Referenced by AddControlElement(), GetCapacityRequestContent(), GetNumCapacityRequestElements(), GetSizeInBytes(), and IsNotEmpty().