A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lora-device-address-generator.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2017 University of Padova
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Davide Magrin <magrinda@dei.unipd.it>
7 */
8
10
11namespace ns3
12{
13namespace lorawan
14{
15
16NS_LOG_COMPONENT_DEFINE("LoraDeviceAddressGenerator");
17
18TypeId
20{
21 static TypeId tid = TypeId("ns3::LoraDeviceAddressGenerator")
23 .SetGroupName("lorawan")
24 .AddConstructor<LoraDeviceAddressGenerator>();
25 return tid;
26}
27
29{
30 NS_LOG_FUNCTION(this << unsigned(nwkId) << nwkAddr);
31
32 m_currentNwkId.Set(nwkId);
33 m_currentNwkAddr.Set(nwkAddr);
34}
35
46
57
65
66} // namespace lorawan
67} // namespace ns3
Object()
Caller graph was not generated because of its size.
Definition object.cc:93
a unique identifier for an interface.
Definition type-id.h:50
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition type-id.cc:999
LoraDeviceAddress NextAddress()
Allocate the next LoraDeviceAddress.
NwkAddr m_currentNwkAddr
The current Network Address value.
NwkID m_currentNwkId
The current Network Id value.
LoraDeviceAddress GetNextAddress()
Get the LoraDeviceAddress that will be allocated upon a call to NextAddress.
LoraDeviceAddress NextNetwork()
Get the first address from the next network.
LoraDeviceAddressGenerator(const uint8_t nwkId=0, const uint32_t nwkAddr=0)
Initialise the base NwkID and the first NwkAddr to be used by the generator.
This class represents the device address of a LoraWAN end device.
Class representing the Network Address component of a LoraDeviceAddress (25 bits).
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition log.h:194
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Every class exported by the ns3 library is enclosed in the ns3 namespace.