ns3::LinkAdrAns Class Reference

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

#include "lorawan-mac-command.h"

+ Inheritance diagram for ns3::LinkAdrAns:
+ Collaboration diagram for ns3::LinkAdrAns:

Public Member Functions

 LinkAdrAns ()
 
 LinkAdrAns (bool powerAck, bool dataRateAck, bool channelMaskAck)
 
virtual uint8_t Deserialize (Buffer::Iterator &start)
 Deserialize the buffer into a MAC command. 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...
 
- 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

bool m_channelMaskAck
 
bool m_dataRateAck
 
bool m_powerAck
 

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 LinkAdrAns LoRaWAN MAC command.

With this command, the end device acknowledges a LinkAdrReq.

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

Constructor & Destructor Documentation

◆ LinkAdrAns() [1/2]

ns3::LinkAdrAns::LinkAdrAns ( )

◆ LinkAdrAns() [2/2]

ns3::LinkAdrAns::LinkAdrAns ( bool  powerAck,
bool  dataRateAck,
bool  channelMaskAck 
)

Member Function Documentation

◆ Deserialize()

uint8_t ns3::LinkAdrAns::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 416 of file lorawan-mac-command.cc.

References m_channelMaskAck, m_dataRateAck, m_powerAck, and ns3::LorawanMacCommand::m_serializedSize.

◆ Print()

void ns3::LinkAdrAns::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 433 of file lorawan-mac-command.cc.

◆ Serialize()

void ns3::LinkAdrAns::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 403 of file lorawan-mac-command.cc.

References ns3::LorawanMacCommand::GetCIDFromLorawanMacCommand(), m_channelMaskAck, ns3::LorawanMacCommand::m_commandType, m_dataRateAck, and m_powerAck.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_channelMaskAck

bool ns3::LinkAdrAns::m_channelMaskAck
private

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

Referenced by Deserialize(), and Serialize().

◆ m_dataRateAck

bool ns3::LinkAdrAns::m_dataRateAck
private

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

Referenced by Deserialize(), and Serialize().

◆ m_powerAck

bool ns3::LinkAdrAns::m_powerAck
private

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

Referenced by Deserialize(), and Serialize().


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