Implementation of the LinkCheckAns LoRaWAN MAC command. More...
#include "lorawan-mac-command.h"
Public Member Functions | |
LinkCheckAns () | |
LinkCheckAns (uint8_t margin, uint8_t gwCnt) | |
virtual uint8_t | Deserialize (Buffer::Iterator &start) |
Deserialize the buffer into a MAC command. More... | |
uint8_t | GetGwCnt (void) const |
Get the gateway count value. More... | |
uint8_t | GetMargin (void) const |
Get the demodulation margin value. More... | |
void | IncrementGwCnt (void) |
Increment this LorawanMacCommand's gwCnt value. More... | |
virtual void | Print (std::ostream &os) const |
Print the contents of this MAC command in human-readable format. More... | |
virtual void | Serialize (Buffer::Iterator &start) const |
Serialize the contents of this MAC command into a buffer, according to the LoRaWAN standard. More... | |
void | SetGwCnt (uint8_t gwCnt) |
Set the gateway count value. More... | |
void | SetMargin (uint8_t margin) |
Set the demodulation margin value. More... | |
Public Member Functions inherited from ns3::LorawanMacCommand | |
LorawanMacCommand () | |
virtual | ~LorawanMacCommand () |
virtual enum MacCommandType | GetCommandType (void) const |
Get the commandType of this MAC command. More... | |
virtual uint8_t | GetSerializedSize (void) const |
Get serialized length of this MAC command. More... | |
Private Attributes | |
uint8_t | m_gwCnt |
This MAC command's gateway count value. More... | |
uint8_t | m_margin |
This MAC command's demodulation margin value. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from ns3::LorawanMacCommand | |
static uint8_t | GetCIDFromLorawanMacCommand (enum MacCommandType commandType) |
Get the CID that corresponds to this MAC command. More... | |
static TypeId | GetTypeId (void) |
Protected Attributes inherited from ns3::LorawanMacCommand | |
enum MacCommandType | m_commandType |
The type of this command. More... | |
uint8_t | m_serializedSize |
This MAC command's serialized size. More... | |
Implementation of the LinkCheckAns LoRaWAN MAC command.
This command contains the demodulation margin and the number of receiving gateways of the packet containing the LinkCheckReq command.
Definition at line 155 of file lorawan-mac-command.h.
ns3::LinkCheckAns::LinkCheckAns | ( | ) |
Definition at line 173 of file lorawan-mac-command.cc.
References ns3::LINK_CHECK_ANS, ns3::LorawanMacCommand::m_commandType, and ns3::LorawanMacCommand::m_serializedSize.
ns3::LinkCheckAns::LinkCheckAns | ( | uint8_t | margin, |
uint8_t | gwCnt | ||
) |
Definition at line 183 of file lorawan-mac-command.cc.
References ns3::LINK_CHECK_ANS, ns3::LorawanMacCommand::m_commandType, and ns3::LorawanMacCommand::m_serializedSize.
|
virtual |
Deserialize the buffer into a MAC command.
start | A pointer to the buffer that contains the serialized command. |
Implements ns3::LorawanMacCommand.
Definition at line 207 of file lorawan-mac-command.cc.
References m_gwCnt, m_margin, and ns3::LorawanMacCommand::m_serializedSize.
uint8_t ns3::LinkCheckAns::GetGwCnt | ( | void | ) | const |
Get the gateway count value.
Definition at line 253 of file lorawan-mac-command.cc.
References m_gwCnt.
uint8_t ns3::LinkCheckAns::GetMargin | ( | void | ) | const |
Get the demodulation margin value.
Definition at line 237 of file lorawan-mac-command.cc.
References m_margin.
void ns3::LinkCheckAns::IncrementGwCnt | ( | void | ) |
Increment this LorawanMacCommand's gwCnt value.
Definition at line 261 of file lorawan-mac-command.cc.
References m_gwCnt.
|
virtual |
Print the contents of this MAC command in human-readable format.
os | The std::ostream instance on which to print the MAC command. |
Implements ns3::LorawanMacCommand.
Definition at line 219 of file lorawan-mac-command.cc.
|
virtual |
Serialize the contents of this MAC command into a buffer, according to the LoRaWAN standard.
start | A pointer to the buffer into which to serialize the command. |
Implements ns3::LorawanMacCommand.
Definition at line 194 of file lorawan-mac-command.cc.
References ns3::LorawanMacCommand::GetCIDFromLorawanMacCommand(), ns3::LorawanMacCommand::m_commandType, m_gwCnt, and m_margin.
void ns3::LinkCheckAns::SetGwCnt | ( | uint8_t | gwCnt | ) |
Set the gateway count value.
gwCnt | The count value to set. |
Definition at line 245 of file lorawan-mac-command.cc.
References m_gwCnt.
void ns3::LinkCheckAns::SetMargin | ( | uint8_t | margin | ) |
Set the demodulation margin value.
margin | The demodulation margin to set. |
Definition at line 229 of file lorawan-mac-command.cc.
References m_margin.
|
private |
This MAC command's gateway count value.
Definition at line 207 of file lorawan-mac-command.h.
Referenced by Deserialize(), GetGwCnt(), IncrementGwCnt(), Print(), Serialize(), and SetGwCnt().
|
private |
This MAC command's demodulation margin value.
Definition at line 202 of file lorawan-mac-command.h.
Referenced by Deserialize(), GetMargin(), Print(), Serialize(), and SetMargin().