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 | ) |
Construct a new NwkID object.
nwkId | The network id value [0:127]. |
Definition at line 25 of file lora-device-address.cc.
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(), ns3::lorawan::LoraDeviceAddress::Get(), ns3::lorawan::LoraDeviceAddressGenerator::GetNextAddress(), ns3::lorawan::LoraDeviceAddress::GetNwkID(), ns3::lorawan::LoraDeviceAddressGenerator::NextNetwork(), and ns3::lorawan::LoraDeviceAddress::Print().
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.
Referenced by ns3::lorawan::LoraDeviceAddress::LoraDeviceAddress(), ns3::lorawan::LoraDeviceAddressGenerator::LoraDeviceAddressGenerator(), ns3::lorawan::LoraDeviceAddressGenerator::NextNetwork(), ns3::lorawan::LoraDeviceAddress::Set(), and ns3::lorawan::LoraDeviceAddress::SetNwkID().
|
private |
8-bit integer representation of the network id
Definition at line 57 of file lora-device-address.h.