Class representing the NetworkId component of a LoraDeviceAddress (7 bits). More...
#include "lora-device-address.h"
Public Member Functions | |
| NwkID (uint8_t nwkId=0) | |
| Construct a new NwkID object. | |
| uint8_t | Get () const |
| Get an uint8_t representation of the 7-bit network ID. | |
| void | Set (uint8_t nwkId) |
| Set the NwkID, starting from a 8-bit representation of a 7-bit integer. | |
Private Attributes | |
| uint8_t | m_nwkId |
| 8-bit integer representation of the network id | |
Class representing the NetworkId component of a LoraDeviceAddress (7 bits).
Definition at line 26 of file lora-device-address.h.
| ns3::lorawan::NwkID::NwkID | ( | uint8_t | nwkId = 0 | ) |
| uint8_t ns3::lorawan::NwkID::Get | ( | ) | const |
Get an uint8_t representation of the 7-bit network ID.
Definition at line 43 of file lora-device-address.cc.
References m_nwkId.
Referenced by ns3::lorawan::LoraDeviceAddress::LoraDeviceAddress().
| void ns3::lorawan::NwkID::Set | ( | uint8_t | nwkId | ) |
Set the NwkID, starting from a 8-bit representation of a 7-bit integer.
This method will ignore the most significant bit of the argument. This means that all arguments such that nwkId > 127 will actually be considered as nwkId mod 127.
| nwkId | The Network Id value to set. |
Definition at line 31 of file lora-device-address.cc.
References m_nwkId, and NS_LOG_WARN.
|
private |
8-bit integer representation of the network id
Definition at line 57 of file lora-device-address.h.