23 #ifndef LORA_DEVICE_ADDRESS_H
24 #define LORA_DEVICE_ADDRESS_H
26 #include <ns3/address.h>
41 NwkID(uint8_t nwkId = 0);
52 void Set(uint8_t nwkId);
59 uint8_t
Get(
void)
const;
83 void Set(uint32_t nwkAddr);
90 uint32_t
Get(
void)
const;
137 void Set(uint32_t address);
147 void Set(uint8_t nwkId, uint32_t nwkAddr);
152 uint32_t
Get(
void)
const;
199 std::string
Print(
void)
const;
This class represents the device address of a LoraWAN End Device.
NwkID m_nwkId
The network Id of this address.
static LoraDeviceAddress Deserialize(const uint8_t buf[4])
Convert the input buffer into a new address.
Address ConvertTo(void) const
Convert this instance of LoraDeviceAddress to an Address.
bool operator>(const LoraDeviceAddress &other) const
static LoraDeviceAddress ConvertFrom(const Address &address)
Convert from an ordinary address to a LoraDeviceAddress instance.
void Set(uint32_t address)
Set the address as a 32 bit integer.
uint32_t GetNwkAddr(void)
Get the NwkAddr of this device.
void Serialize(uint8_t buf[4]) const
Convert this address to a buffer.
bool operator!=(const LoraDeviceAddress &other) const
bool operator==(const LoraDeviceAddress &other) const
void SetNwkID(uint8_t nwkId)
Set the NwkID of this device.
uint32_t Get(void) const
Get the address in 32-bit integer form.
uint8_t GetNwkID(void)
Get the NwkID of this device.
static uint8_t GetType(void)
void SetNwkAddr(uint32_t nwkAddr)
Set the NwkAddr of this device.
void Set(uint8_t nwkId, uint32_t nwkAddr)
Set the address, combining a network id and a network address.
std::string Print(void) const
Print the address bit-by-bit to a human-readable string.
NwkAddr m_nwkAddr
The network address of this address.
bool operator<(const LoraDeviceAddress &other) const
Class representing the Network Address component of a LoraDeviceAddress (25 bits)
NwkAddr(uint32_t nwkId=0)
void Set(uint32_t nwkAddr)
Set the NwkAddr, starting from a 32-bit representation of a 25-bit integer.
uint32_t Get(void) const
Get an uint32_t representation of the 25-bit network address.
uint32_t m_nwkAddr
8-bit integer representation of the network id
Class representing the NetworkId component of a LoraDeviceAddress (7 bits).
uint8_t m_nwkId
8-bit integer representation of the network id
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.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.
std::ostream & operator<<(std::ostream &os, const GeoCoordinate &coordinate)