Implementation of the LinkAdrReq LoRaWAN MAC command. More...
#include "lorawan-mac-command.h"
Inheritance diagram for ns3::LinkAdrReq:
Collaboration diagram for ns3::LinkAdrReq:Public Member Functions | |
| LinkAdrReq () | |
| LinkAdrReq (uint8_t dataRate, uint8_t txPower, uint16_t channelMask, uint8_t chMaskCntl, uint8_t nbRep) | |
| virtual uint8_t | Deserialize (Buffer::Iterator &start) |
| Deserialize the buffer into a MAC command. More... | |
| uint8_t | GetDataRate (void) |
| Return the data rate prescribed by this MAC command. More... | |
| std::list< int > | GetEnabledChannelsList (void) |
| Get the list of enabled channels. More... | |
| int | GetRepetitions (void) |
| Get the number of repetitions prescribed by this MAC command. More... | |
| uint8_t | GetTxPower (void) |
| Get the transmission power prescribed by this 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 | |
| uint16_t | m_channelMask |
| uint8_t | m_chMaskCntl |
| uint8_t | m_dataRate |
| uint8_t | m_nbRep |
| uint8_t | m_txPower |
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 LinkAdrReq LoRaWAN MAC command.
With this command, the network server can request a device to change its data rate, transmission power and the channel it uses for uplink transmissions.
Definition at line 217 of file lorawan-mac-command.h.
| ns3::LinkAdrReq::LinkAdrReq | ( | ) |
Definition at line 272 of file lorawan-mac-command.cc.
References ns3::LINK_ADR_REQ, ns3::LorawanMacCommand::m_commandType, and ns3::LorawanMacCommand::m_serializedSize.
| ns3::LinkAdrReq::LinkAdrReq | ( | uint8_t | dataRate, |
| uint8_t | txPower, | ||
| uint16_t | channelMask, | ||
| uint8_t | chMaskCntl, | ||
| uint8_t | nbRep | ||
| ) |
Definition at line 280 of file lorawan-mac-command.cc.
References ns3::LINK_ADR_REQ, 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 310 of file lorawan-mac-command.cc.
References m_channelMask, m_chMaskCntl, m_dataRate, m_nbRep, ns3::LorawanMacCommand::m_serializedSize, and m_txPower.
| uint8_t ns3::LinkAdrReq::GetDataRate | ( | void | ) |
Return the data rate prescribed by this MAC command.
Definition at line 341 of file lorawan-mac-command.cc.
References m_dataRate.
| std::list< int > ns3::LinkAdrReq::GetEnabledChannelsList | ( | void | ) |
Get the list of enabled channels.
This method takes the 16-bit channel mask and translates it to a list of integers that can be more easily parsed.
Definition at line 357 of file lorawan-mac-command.cc.
References m_channelMask.
| int ns3::LinkAdrReq::GetRepetitions | ( | void | ) |
Get the number of repetitions prescribed by this MAC command.
Definition at line 375 of file lorawan-mac-command.cc.
References m_nbRep.
| uint8_t ns3::LinkAdrReq::GetTxPower | ( | void | ) |
Get the transmission power prescribed by this MAC command.
The MAC layer is expected to translate this value to a certain power in dBm when communicating it to the PHY, and the translation will vary based on the region of the device.
Definition at line 349 of file lorawan-mac-command.cc.
References m_txPower.
|
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 328 of file lorawan-mac-command.cc.
References m_channelMask, m_chMaskCntl, m_dataRate, m_nbRep, and m_txPower.
|
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 298 of file lorawan-mac-command.cc.
References ns3::LorawanMacCommand::GetCIDFromLorawanMacCommand(), m_channelMask, m_chMaskCntl, ns3::LorawanMacCommand::m_commandType, m_dataRate, m_nbRep, and m_txPower.
Here is the call graph for this function:
|
private |
Definition at line 268 of file lorawan-mac-command.h.
Referenced by Deserialize(), GetEnabledChannelsList(), Print(), and Serialize().
|
private |
Definition at line 269 of file lorawan-mac-command.h.
Referenced by Deserialize(), Print(), and Serialize().
|
private |
Definition at line 266 of file lorawan-mac-command.h.
Referenced by Deserialize(), GetDataRate(), Print(), and Serialize().
|
private |
Definition at line 270 of file lorawan-mac-command.h.
Referenced by Deserialize(), GetRepetitions(), Print(), and Serialize().
|
private |
Definition at line 267 of file lorawan-mac-command.h.
Referenced by Deserialize(), GetTxPower(), Print(), and Serialize().