ns3::LinkCheckAns Class Reference

Implementation of the LinkCheckAns LoRaWAN MAC command. More...

#include "lorawan-mac-command.h"

+ Inheritance diagram for ns3::LinkCheckAns:
+ Collaboration diagram for ns3::LinkCheckAns:

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...
 

Detailed Description

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 151 of file lorawan-mac-command.h.

Constructor & Destructor Documentation

◆ LinkCheckAns() [1/2]

ns3::LinkCheckAns::LinkCheckAns ( )

◆ LinkCheckAns() [2/2]

ns3::LinkCheckAns::LinkCheckAns ( uint8_t  margin,
uint8_t  gwCnt 
)

Member Function Documentation

◆ Deserialize()

uint8_t ns3::LinkCheckAns::Deserialize ( Buffer::Iterator &  start)
virtual

Deserialize the buffer into a MAC command.

Parameters
startA pointer to the buffer that contains the serialized command.
Returns
the number of bytes that were consumed.

Implements ns3::LorawanMacCommand.

Definition at line 204 of file lorawan-mac-command.cc.

References m_gwCnt, m_margin, and ns3::LorawanMacCommand::m_serializedSize.

◆ GetGwCnt()

uint8_t ns3::LinkCheckAns::GetGwCnt ( void  ) const

Get the gateway count value.

Returns
The gateway count value.

Definition at line 250 of file lorawan-mac-command.cc.

References m_gwCnt.

◆ GetMargin()

uint8_t ns3::LinkCheckAns::GetMargin ( void  ) const

Get the demodulation margin value.

Returns
The demodulation margin value.

Definition at line 234 of file lorawan-mac-command.cc.

References m_margin.

◆ IncrementGwCnt()

void ns3::LinkCheckAns::IncrementGwCnt ( void  )

Increment this LorawanMacCommand's gwCnt value.

Definition at line 258 of file lorawan-mac-command.cc.

References m_gwCnt.

◆ Print()

void ns3::LinkCheckAns::Print ( std::ostream &  os) const
virtual

Print the contents of this MAC command in human-readable format.

Parameters
osThe std::ostream instance on which to print the MAC command.

Implements ns3::LorawanMacCommand.

Definition at line 216 of file lorawan-mac-command.cc.

References m_gwCnt, and m_margin.

◆ Serialize()

void ns3::LinkCheckAns::Serialize ( Buffer::Iterator &  start) const
virtual

Serialize the contents of this MAC command into a buffer, according to the LoRaWAN standard.

Parameters
startA pointer to the buffer into which to serialize the command.

Implements ns3::LorawanMacCommand.

Definition at line 191 of file lorawan-mac-command.cc.

References ns3::LorawanMacCommand::GetCIDFromLorawanMacCommand(), ns3::LorawanMacCommand::m_commandType, m_gwCnt, and m_margin.

+ Here is the call graph for this function:

◆ SetGwCnt()

void ns3::LinkCheckAns::SetGwCnt ( uint8_t  gwCnt)

Set the gateway count value.

Parameters
gwCntThe count value to set.

Definition at line 242 of file lorawan-mac-command.cc.

References m_gwCnt.

◆ SetMargin()

void ns3::LinkCheckAns::SetMargin ( uint8_t  margin)

Set the demodulation margin value.

Parameters
marginThe demodulation margin to set.

Definition at line 226 of file lorawan-mac-command.cc.

References m_margin.

Member Data Documentation

◆ m_gwCnt

uint8_t ns3::LinkCheckAns::m_gwCnt
private

This MAC command's gateway count value.

Definition at line 203 of file lorawan-mac-command.h.

Referenced by Deserialize(), GetGwCnt(), IncrementGwCnt(), Print(), Serialize(), and SetGwCnt().

◆ m_margin

uint8_t ns3::LinkCheckAns::m_margin
private

This MAC command's demodulation margin value.

Definition at line 198 of file lorawan-mac-command.h.

Referenced by Deserialize(), GetMargin(), Print(), Serialize(), and SetMargin().


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