Class representing the Network Address component of a LoraDeviceAddress (25 bits) More...
#include "lora-device-address.h"
Public Member Functions | |
NwkAddr (uint32_t nwkId=0) | |
Construct a new NwkAddr object. | |
uint32_t | Get () const |
Get an uint32_t representation of the 25-bit network address. | |
void | Set (uint32_t nwkAddr) |
Set the NwkAddr, starting from a 32-bit representation of a 25-bit integer. | |
Private Attributes | |
uint32_t | m_nwkAddr |
8-bit integer representation of the network id | |
Class representing the Network Address component of a LoraDeviceAddress (25 bits)
Definition at line 66 of file lora-device-address.h.
ns3::lorawan::NwkAddr::NwkAddr | ( | uint32_t | nwkId = 0 | ) |
Construct a new NwkAddr object.
nwkId | Network addr value [0:2^25-1]. |
Definition at line 51 of file lora-device-address.cc.
uint32_t ns3::lorawan::NwkAddr::Get | ( | ) | const |
Get an uint32_t representation of the 25-bit network address.
Definition at line 69 of file lora-device-address.cc.
References m_nwkAddr.
Referenced by ns3::lorawan::LoraDeviceAddress::LoraDeviceAddress(), ns3::lorawan::LoraDeviceAddress::Get(), ns3::lorawan::LoraDeviceAddressGenerator::GetNextAddress(), ns3::lorawan::LoraDeviceAddress::GetNwkAddr(), ns3::lorawan::LoraDeviceAddressGenerator::NextAddress(), and ns3::lorawan::LoraDeviceAddress::Print().
void ns3::lorawan::NwkAddr::Set | ( | uint32_t | nwkAddr | ) |
Set the NwkAddr, starting from a 32-bit representation of a 25-bit integer.
This method will ignore the most significant bits of the argument. This means that all arguments such that nwkAddr > 2^25-1 will actually be considered as nwkAddr mod 2^25-1.
nwkAddr | The Network Address to set. |
Definition at line 57 of file lora-device-address.cc.
References m_nwkAddr, and NS_LOG_WARN.
Referenced by ns3::lorawan::LoraDeviceAddress::LoraDeviceAddress(), ns3::lorawan::LoraDeviceAddressGenerator::LoraDeviceAddressGenerator(), ns3::lorawan::LoraDeviceAddressGenerator::NextAddress(), ns3::lorawan::LoraDeviceAddressGenerator::NextNetwork(), ns3::lorawan::LoraDeviceAddress::Set(), and ns3::lorawan::LoraDeviceAddress::SetNwkAddr().
|
private |
8-bit integer representation of the network id
Definition at line 97 of file lora-device-address.h.