Implementation of the LinkAdrAns LoRaWAN MAC command. More...
#include "mac-command.h"
| Public Member Functions | |
| LinkAdrAns () | |
| Default constructor. | |
| LinkAdrAns (bool powerAck, bool dataRateAck, bool channelMaskAck) | |
| Constructor with given fields. | |
| uint8_t | Deserialize (Buffer::Iterator &start) override | 
| Deserialize the buffer into a MAC command. | |
| bool | GetChannelMaskAck () const | 
| Get the ChannelMaskAck field value of the LinkAdrAns command. | |
| bool | GetDataRateAck () const | 
| Get the DataRateAck field value of the LinkAdrAns command. | |
| bool | GetPowerAck () const | 
| Get the PowerAck field value of the LinkAdrAns command. | |
| void | Print (std::ostream &os) const override | 
| Print the contents of this MAC command in human-readable format. | |
| void | Serialize (Buffer::Iterator &start) const override | 
| Serialize the contents of this MAC command into a buffer, according to the LoRaWAN standard. | |
| Public Member Functions inherited from ns3::lorawan::MacCommand | |
| MacCommand () | |
| Default constructor. | |
| virtual | ~MacCommand () | 
| Destructor. | |
| virtual enum MacCommandType | GetCommandType () const | 
| Get the commandType of this MAC command. | |
| virtual uint8_t | GetSerializedSize () const | 
| Get serialized length of this MAC command. | |
| Public Member Functions inherited from ns3::SimpleRefCount< MacCommand > | |
| SimpleRefCount () | |
| Default constructor. | |
| uint32_t | GetReferenceCount () const | 
| Get the reference count of the object. | |
| SimpleRefCount & | operator= (const SimpleRefCount &o) | 
| Assignment operator. | |
| void | Ref () const | 
| Increment the reference count. | |
| void | Unref () const | 
| Decrement the reference count. | |
| Private Attributes | |
| bool | m_channelMaskAck | 
| The ChannelMaskACK field. | |
| bool | m_dataRateAck | 
| The DataRateACK field. | |
| bool | m_powerAck | 
| The PowerACK field. | |
| Additional Inherited Members | |
| Static Public Member Functions inherited from ns3::lorawan::MacCommand | |
| static uint8_t | GetCIDFromMacCommand (enum MacCommandType commandType) | 
| Get the CID that corresponds to a type of MAC command. | |
| Protected Attributes inherited from ns3::lorawan::MacCommand | |
| enum MacCommandType | m_commandType | 
| The type of this command. | |
| uint8_t | m_serializedSize | 
| This MAC command's serialized size. | |
Implementation of the LinkAdrAns LoRaWAN MAC command.
With this command, the end device acknowledges a LinkAdrReq.
Definition at line 270 of file mac-command.h.
| ns3::lorawan::LinkAdrAns::LinkAdrAns | ( | ) | 
Default constructor.
Definition at line 300 of file mac-command.cc.
References ns3::lorawan::LINK_ADR_ANS, ns3::lorawan::MacCommand::m_commandType, ns3::lorawan::MacCommand::m_serializedSize, and NS_LOG_FUNCTION.
| ns3::lorawan::LinkAdrAns::LinkAdrAns | ( | bool | powerAck, | 
| bool | dataRateAck, | ||
| bool | channelMaskAck ) | 
Constructor with given fields.
| powerAck | The PowerACK field to set. | 
| dataRateAck | The DataRateACK field to set. | 
| channelMaskAck | The ChannelMaskACK field to set. | 
Definition at line 307 of file mac-command.cc.
References ns3::lorawan::LINK_ADR_ANS, m_channelMaskAck, ns3::lorawan::MacCommand::m_commandType, m_dataRateAck, m_powerAck, ns3::lorawan::MacCommand::m_serializedSize, and NS_LOG_FUNCTION.
| 
 | overridevirtual | 
Deserialize the buffer into a MAC command.
| start | A pointer to the buffer that contains the serialized command. | 
Implements ns3::lorawan::MacCommand.
Definition at line 327 of file mac-command.cc.
References m_channelMaskAck, m_dataRateAck, m_powerAck, ns3::lorawan::MacCommand::m_serializedSize, and NS_LOG_FUNCTION.
| bool ns3::lorawan::LinkAdrAns::GetChannelMaskAck | ( | ) | const | 
Get the ChannelMaskAck field value of the LinkAdrAns command.
Definition at line 364 of file mac-command.cc.
References m_channelMaskAck, and NS_LOG_FUNCTION.
| bool ns3::lorawan::LinkAdrAns::GetDataRateAck | ( | ) | const | 
Get the DataRateAck field value of the LinkAdrAns command.
Definition at line 357 of file mac-command.cc.
References m_dataRateAck, and NS_LOG_FUNCTION.
| bool ns3::lorawan::LinkAdrAns::GetPowerAck | ( | ) | const | 
Get the PowerAck field value of the LinkAdrAns command.
Definition at line 350 of file mac-command.cc.
References m_powerAck, and NS_LOG_FUNCTION.
| 
 | overridevirtual | 
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::lorawan::MacCommand.
Definition at line 339 of file mac-command.cc.
References m_channelMaskAck, m_dataRateAck, m_powerAck, and NS_LOG_FUNCTION.
| 
 | overridevirtual | 
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::lorawan::MacCommand.
Definition at line 318 of file mac-command.cc.
References ns3::lorawan::MacCommand::GetCIDFromMacCommand(), m_channelMaskAck, ns3::lorawan::MacCommand::m_commandType, m_dataRateAck, m_powerAck, and NS_LOG_FUNCTION.
| 
 | private | 
The ChannelMaskACK field.
Definition at line 321 of file mac-command.h.
Referenced by LinkAdrAns(), Deserialize(), GetChannelMaskAck(), Print(), and Serialize().
| 
 | private | 
The DataRateACK field.
Definition at line 320 of file mac-command.h.
Referenced by LinkAdrAns(), Deserialize(), GetDataRateAck(), Print(), and Serialize().
| 
 | private | 
The PowerACK field.
Definition at line 319 of file mac-command.h.
Referenced by LinkAdrAns(), Deserialize(), GetPowerAck(), Print(), and Serialize().