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. | |
| typedef std::pair< uint8_t, SatEnums::SatCapacityAllocationCategory_t > | RequestDescriptor_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. | |
Static Public Member Functions | |
| 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. | |
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.
| typedef std::map<RequestDescriptor_t, uint16_t> ns3::SatCrMessage::RequestContainer_t |
Define type RequestContainer_t.
Definition at line 433 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 428 of file satellite-control-message.h.
| Enumerator | |
|---|---|
| CR_BLOCK_SMALL | |
| CR_BLOCK_LARGE | |
Definition at line 404 of file satellite-control-message.h.
| 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().
| ns3::SatCrMessage::~SatCrMessage | ( | ) |
Destructor for SatCrMessage.
Definition at line 398 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 404 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 415 of file satellite-control-message.cc.
References m_requestData.
| double ns3::SatCrMessage::GetCnoEstimate | ( | void | ) | const |
Get C/N0 estimate.
Definition at line 427 of file satellite-control-message.cc.
References m_forwardLinkCNo.
|
inlinevirtual |
Get type of the message.
Implements ns3::SatControlMessage.
Definition at line 439 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 421 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 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.
|
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.
| bool ns3::SatCrMessage::IsNotEmpty | ( | ) | const |
Has the CR non-zero content.
Definition at line 457 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 434 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 513 of file satellite-control-message.h.
Referenced by GetSizeInBytes().
|
staticprivate |
Type field of the CR control element.
Definition at line 506 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 496 of file satellite-control-message.h.
Referenced by SatCrMessage(), GetSizeInBytes(), and GetTypeId().
|
private |
C/N0 estimate.
Definition at line 501 of file satellite-control-message.h.
Referenced by SatCrMessage(), GetCnoEstimate(), and SetCnoEstimate().
|
private |
Definition at line 488 of file satellite-control-message.h.
Referenced by AddControlElement(), GetCapacityRequestContent(), GetNumCapacityRequestElements(), GetSizeInBytes(), and IsNotEmpty().