Loading...
Searching...
No Matches
ns3::NwkID Class Reference

Class representing the NetworkId component of a LoraDeviceAddress (7 bits). More...

#include "lora-device-address.h"

Public Member Functions

 NwkID (uint8_t nwkId=0)
uint8_t Get (void) 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

Detailed Description

Class representing the NetworkId component of a LoraDeviceAddress (7 bits).

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

Constructor & Destructor Documentation

◆ NwkID()

ns3::NwkID::NwkID ( uint8_t nwkId = 0)

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

References m_nwkId.

Member Function Documentation

◆ Get()

uint8_t ns3::NwkID::Get ( void ) const

Get an uint8_t representation of the 7-bit network ID.

Returns
The Network Id.

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

References m_nwkId.

Referenced by ns3::LoraDeviceAddress::LoraDeviceAddress().

Here is the caller graph for this function:

◆ Set()

void ns3::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.

Parameters
nwkIdThe Network Id value to set.

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

References m_nwkId.

Member Data Documentation

◆ m_nwkId

uint8_t ns3::NwkID::m_nwkId
private

8-bit integer representation of the network id

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

Referenced by NwkID(), Get(), and Set().


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