ns3::NwkAddr Class Reference

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)
 
uint32_t Get (void) const
 Get an uint32_t representation of the 25-bit network address. More...
 
void Set (uint32_t nwkAddr)
 Set the NwkAddr, starting from a 32-bit representation of a 25-bit integer. More...
 

Private Attributes

uint32_t m_nwkAddr
 8-bit integer representation of the network id More...
 

Detailed Description

Class representing the Network Address component of a LoraDeviceAddress (25 bits)

Definition at line 67 of file lora-device-address.h.

Constructor & Destructor Documentation

◆ NwkAddr()

ns3::NwkAddr::NwkAddr ( uint32_t  nwkId = 0)

Definition at line 63 of file lora-device-address.cc.

Member Function Documentation

◆ Get()

uint32_t ns3::NwkAddr::Get ( void  ) const

Get an uint32_t representation of the 25-bit network address.

Returns
The Network Address.

Definition at line 81 of file lora-device-address.cc.

References m_nwkAddr.

Referenced by ns3::LoraDeviceAddress::LoraDeviceAddress(), ns3::LoraDeviceAddress::Get(), ns3::LoraDeviceAddressGenerator::GetNextAddress(), ns3::LoraDeviceAddress::GetNwkAddr(), ns3::LoraDeviceAddressGenerator::NextAddress(), and ns3::LoraDeviceAddress::Print().

+ Here is the caller graph for this function:

◆ Set()

void ns3::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 will actually be considered as nwkAddr mod 2^25.

Parameters
nwkAddrThe Network Address to set.

Definition at line 69 of file lora-device-address.cc.

References m_nwkAddr.

Referenced by ns3::LoraDeviceAddress::LoraDeviceAddress(), ns3::LoraDeviceAddressGenerator::LoraDeviceAddressGenerator(), ns3::LoraDeviceAddressGenerator::NextAddress(), ns3::LoraDeviceAddressGenerator::NextNetwork(), ns3::LoraDeviceAddress::Set(), and ns3::LoraDeviceAddress::SetNwkAddr().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_nwkAddr

uint32_t ns3::NwkAddr::m_nwkAddr
private

8-bit integer representation of the network id

Definition at line 91 of file lora-device-address.h.

Referenced by Get(), and Set().


The documentation for this class was generated from the following files: