A Discrete-Event Network Simulator
lorawan @ (+)
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Typedefs
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
j
l
m
n
o
p
q
r
s
t
w
Enumerator
a
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
Related Symbols
:
a
b
c
d
e
g
h
i
j
l
m
n
o
p
q
r
s
t
u
w
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
Enumerator
e
l
v
Macros
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
▼
ns-3
►
ns-3 Documentation
►
All Environment Variables
Todo List
Deprecated List
Bug List
►
Topics
►
Namespaces
►
Classes
▼
Files
▼
File List
►
doc
►
examples
▼
src
►
antenna
►
aodv
►
applications
►
bridge
►
brite
►
buildings
►
click
►
config-store
►
core
►
csma
►
csma-layout
►
dsdv
►
dsr
►
energy
►
fd-net-device
►
flow-monitor
►
internet
►
internet-apps
▼
lorawan
►
examples
►
helper
▼
model
adr-component.cc
adr-component.h
building-penetration-loss.cc
building-penetration-loss.h
class-a-end-device-lorawan-mac.cc
class-a-end-device-lorawan-mac.h
correlated-shadowing-propagation-loss-model.cc
►
correlated-shadowing-propagation-loss-model.h
end-device-lora-phy.cc
end-device-lora-phy.h
end-device-lorawan-mac.cc
►
end-device-lorawan-mac.h
►
end-device-status.cc
►
end-device-status.h
forwarder.cc
forwarder.h
gateway-lora-phy.cc
►
gateway-lora-phy.h
gateway-lorawan-mac.cc
gateway-lorawan-mac.h
gateway-status.cc
gateway-status.h
hex-grid-position-allocator.cc
hex-grid-position-allocator.h
logical-lora-channel-helper.cc
logical-lora-channel-helper.h
►
logical-lora-channel.cc
►
logical-lora-channel.h
►
lora-channel.cc
►
lora-channel.h
lora-device-address-generator.cc
lora-device-address-generator.h
►
lora-device-address.cc
►
lora-device-address.h
lora-frame-header.cc
lora-frame-header.h
►
lora-interference-helper.cc
►
lora-interference-helper.h
lora-net-device.cc
lora-net-device.h
►
lora-phy.cc
►
lora-phy.h
lora-radio-energy-model.cc
lora-radio-energy-model.h
lora-tag.cc
lora-tag.h
lora-tx-current-model.cc
lora-tx-current-model.h
►
lora-utils.cc
►
lora-utils.h
lorawan-mac-header.cc
lorawan-mac-header.h
lorawan-mac.cc
lorawan-mac.h
mac-command.cc
►
mac-command.h
network-controller-components.cc
network-controller-components.h
network-controller.cc
network-controller.h
network-scheduler.cc
network-scheduler.h
network-server.cc
network-server.h
network-status.cc
network-status.h
one-shot-sender.cc
one-shot-sender.h
periodic-sender.cc
periodic-sender.h
simple-end-device-lora-phy.cc
simple-end-device-lora-phy.h
simple-gateway-lora-phy.cc
simple-gateway-lora-phy.h
sub-band.cc
sub-band.h
►
test
►
lr-wpan
►
lte
►
mesh
►
mobility
►
mpi
►
netanim
►
network
►
nix-vector-routing
►
olsr
►
openflow
►
point-to-point
►
point-to-point-layout
►
propagation
►
sixlowpan
►
spectrum
►
stats
►
tap-bridge
►
test
►
topology-read
►
traffic-control
►
uan
►
virtual-net-device
►
visualizer
►
wifi
►
wimax
►
zigbee
►
utils
►
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
network-status.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2018 University of Padova
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Authors: Martina Capuzzo <capuzzom@dei.unipd.it>
7
* Davide Magrin <magrinda@dei.unipd.it>
8
*/
9
10
#ifndef NETWORK_STATUS_H
11
#define NETWORK_STATUS_H
12
13
#include "
class-a-end-device-lorawan-mac.h
"
14
#include "
end-device-status.h
"
15
#include "
gateway-status.h
"
16
#include "
lora-device-address.h
"
17
#include "
network-scheduler.h
"
18
19
#include <iterator>
20
21
namespace
ns3
22
{
23
namespace
lorawan
24
{
25
26
/**
27
* @ingroup lorawan
28
*
29
* This class represents the knowledge about the state of the network that is
30
* available at the network server. It is essentially a collection of two maps:
31
* one containing DeviceStatus objects, and the other containing GatewayStatus
32
* objects.
33
*
34
* This class is meant to be queried by NetworkController components, which
35
* can decide to take action based on the current status of the network.
36
*/
37
class
NetworkStatus
:
public
Object
38
{
39
public
:
40
/**
41
* Register this type.
42
* @return The object TypeId.
43
*/
44
static
TypeId
GetTypeId
();
45
46
NetworkStatus
();
//!< Default constructor
47
~NetworkStatus
()
override
;
//!< Destructor
48
49
/**
50
* Add a device to the ones that are tracked by this NetworkStatus object.
51
*
52
* @param edMac Pointer to the MAC layer object of the device to be tracked.
53
*/
54
void
AddNode
(
Ptr<ClassAEndDeviceLorawanMac>
edMac);
55
56
/**
57
* Add a new gateway to the list of gateways connected to the network.
58
*
59
* Each gateway is identified by its NetDevice Address in the network connecting it to the
60
* network server.
61
*
62
* @param address The gateway's NetDevice Address.
63
* @param gwStatus A pointer to a GatewayStatus object for the gateway.
64
*/
65
void
AddGateway
(
Address
& address,
Ptr<GatewayStatus>
gwStatus);
66
67
/**
68
* Update network status on a received packet.
69
*
70
* @param packet The received packet.
71
* @param gwaddress Address of the gateway this packet was received from.
72
*/
73
void
OnReceivedPacket
(
Ptr<const Packet>
packet,
const
Address
& gwaddress);
74
75
/**
76
* Return whether the specified device needs a reply.
77
*
78
* @param deviceAddress The address of the device we are interested in.
79
* @return True if we need to reply to the last packet from the device, false otherwise.
80
*/
81
bool
NeedsReply
(
LoraDeviceAddress
deviceAddress);
82
83
/**
84
* Return whether we have a gateway that is available to send a reply to the specified
85
* device.
86
*
87
* @param deviceAddress The address of the device we are interested in.
88
* @param window The device reception window we are currently targeting (1 or 2).
89
* @return The Address of the gateway which measured the best RSSI of the last packet from the
90
* device, selected among the gateways being currently available for downlink transmission.
91
*/
92
Address
GetBestGatewayForDevice
(
LoraDeviceAddress
deviceAddress,
int
window);
93
94
/**
95
* Send a packet through a gateway.
96
*
97
* This function assumes that the packet is already tagged with a LoraTag
98
* that will inform the gateway of the parameters to use for the
99
* transmission.
100
*
101
* @param packet The packet.
102
* @param gwAddress The address of the gateway.
103
*/
104
void
SendThroughGateway
(
Ptr<Packet>
packet,
Address
gwAddress);
105
106
/**
107
* Get the reply packet prepared for a reception window of a device.
108
*
109
* @param edAddress The address of the device.
110
* @param windowNumber The reception window number (1 or 2).
111
* @return The reply packet.
112
*/
113
Ptr<Packet>
GetReplyForDevice
(
LoraDeviceAddress
edAddress,
int
windowNumber);
114
115
/**
116
* Get the EndDeviceStatus of the device that sent a packet.
117
*
118
* @param packet The packet sent by the end device.
119
* @return A pointer to the end device status.
120
*/
121
Ptr<EndDeviceStatus>
GetEndDeviceStatus
(
Ptr<const Packet>
packet);
122
123
/**
124
* Get the EndDeviceStatus corresponding to a LoraDeviceAddress.
125
*
126
* @param address The LoraDeviceAddress of the end device.
127
* @return A pointer to the end device status.
128
*/
129
Ptr<EndDeviceStatus>
GetEndDeviceStatus
(
LoraDeviceAddress
address);
130
131
/**
132
* Return the number of end devices currently managed by the server.
133
*
134
* @return The number of end devices as an int.
135
*/
136
int
CountEndDevices
();
137
138
public
:
139
std::map<LoraDeviceAddress, Ptr<EndDeviceStatus>>
140
m_endDeviceStatuses
;
//!< Map tracking the state of devices connected to this network server
141
std::map<Address, Ptr<GatewayStatus>>
142
m_gatewayStatuses
;
//!< Map tracking the state of gateways connected to this network server
143
};
37
class
NetworkStatus
:
public
Object
{
…
};
144
145
}
// namespace lorawan
146
147
}
// namespace ns3
148
#endif
/* NETWORK_STATUS_H */
class-a-end-device-lorawan-mac.h
ns3::Address
a polymophic address class
Definition
address.h:90
ns3::Object
A base class which provides memory management and object aggregation.
Definition
object.h:78
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:49
ns3::lorawan::LoraDeviceAddress
This class represents the device address of a LoraWAN end device.
Definition
lora-device-address.h:106
ns3::lorawan::NetworkStatus
This class represents the knowledge about the state of the network that is available at the network s...
Definition
network-status.h:38
ns3::lorawan::NetworkStatus::~NetworkStatus
~NetworkStatus() override
Destructor.
Definition
network-status.cc:46
ns3::lorawan::NetworkStatus::GetEndDeviceStatus
Ptr< EndDeviceStatus > GetEndDeviceStatus(Ptr< const Packet > packet)
Get the EndDeviceStatus of the device that sent a packet.
Definition
network-status.cc:192
ns3::lorawan::NetworkStatus::OnReceivedPacket
void OnReceivedPacket(Ptr< const Packet > packet, const Address &gwaddress)
Update network status on a received packet.
Definition
network-status.cc:88
ns3::lorawan::NetworkStatus::NetworkStatus
NetworkStatus()
Default constructor.
Definition
network-status.cc:41
ns3::lorawan::NetworkStatus::NeedsReply
bool NeedsReply(LoraDeviceAddress deviceAddress)
Return whether the specified device needs a reply.
Definition
network-status.cc:109
ns3::lorawan::NetworkStatus::AddNode
void AddNode(Ptr< ClassAEndDeviceLorawanMac > edMac)
Add a device to the ones that are tracked by this NetworkStatus object.
Definition
network-status.cc:52
ns3::lorawan::NetworkStatus::CountEndDevices
int CountEndDevices()
Return the number of end devices currently managed by the server.
Definition
network-status.cc:232
ns3::lorawan::NetworkStatus::m_endDeviceStatuses
std::map< LoraDeviceAddress, Ptr< EndDeviceStatus > > m_endDeviceStatuses
Map tracking the state of devices connected to this network server.
Definition
network-status.h:140
ns3::lorawan::NetworkStatus::SendThroughGateway
void SendThroughGateway(Ptr< Packet > packet, Address gwAddress)
Send a packet through a gateway.
Definition
network-status.cc:159
ns3::lorawan::NetworkStatus::m_gatewayStatuses
std::map< Address, Ptr< GatewayStatus > > m_gatewayStatuses
Map tracking the state of gateways connected to this network server.
Definition
network-status.h:142
ns3::lorawan::NetworkStatus::AddGateway
void AddGateway(Address &address, Ptr< GatewayStatus > gwStatus)
Add a new gateway to the list of gateways connected to the network.
Definition
network-status.cc:72
ns3::lorawan::NetworkStatus::GetTypeId
static TypeId GetTypeId()
Register this type.
Definition
network-status.cc:32
ns3::lorawan::NetworkStatus::GetReplyForDevice
Ptr< Packet > GetReplyForDevice(LoraDeviceAddress edAddress, int windowNumber)
Get the reply packet prepared for a reception window of a device.
Definition
network-status.cc:167
ns3::lorawan::NetworkStatus::GetBestGatewayForDevice
Address GetBestGatewayForDevice(LoraDeviceAddress deviceAddress, int window)
Return whether we have a gateway that is available to send a reply to the specified device.
Definition
network-status.cc:116
end-device-status.h
gateway-status.h
lora-device-address.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
network-scheduler.h
src
lorawan
model
network-status.h
Generated on Tue Apr 29 2025 20:45:48 for ns-3 by
1.11.0