A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
gateway-status.h
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
9
#ifndef GATEWAY_STATUS_H
10
#define GATEWAY_STATUS_H
11
12
#include "
gateway-lorawan-mac.h
"
13
14
#include "ns3/address.h"
15
#include "ns3/net-device.h"
16
#include "ns3/object.h"
17
18
namespace
ns3
19
{
20
namespace
lorawan
21
{
22
23
/**
24
* \ingroup lorawan
25
*
26
* This class represents the network server's knowledge about a gateway in
27
* the LoRaWAN network it is administering.
28
*
29
* The network server's NetworkStatus component contains a list of instances of
30
* this class, one for gateway in the network. Each instance contains all
31
* the parameters and information of the gateway. This class is used by the network server for
32
* downlink scheduling and sending purposes. That is, to check the gateway's availability for radio
33
* transmission, and then to retrieve the correct Net Device to send the packet through.
34
*/
35
class
GatewayStatus
:
public
Object
36
{
37
public
:
38
/**
39
* Register this type.
40
* \return The object TypeId.
41
*/
42
static
TypeId
GetTypeId
();
43
44
GatewayStatus
();
//!< Default constructor
45
~GatewayStatus
()
override
;
//!< Destructor
46
47
/**
48
* Construct a new GatewayStatus object with values.
49
*
50
* \param address The Address of the P2PNetDevice of the gateway connected to the network
51
* server. \param netDevice A pointer to the NetDevice through which to reach this gateway from
52
* the server. \param gwMac A pointer to the MAC layer of the gateway.
53
*/
54
GatewayStatus
(
Address
address,
Ptr<NetDevice>
netDevice,
Ptr<GatewayLorawanMac>
gwMac);
55
56
/**
57
* Get this gateway's P2P link address.
58
*
59
* \return The Address instance.
60
*/
61
Address
GetAddress
();
62
63
/**
64
* Set this gateway's P2P link address.
65
*
66
* \param address The Address instance.
67
*/
68
void
SetAddress
(
Address
address);
69
70
/**
71
* Get the NetDevice through which it's possible to contact this gateway from the server.
72
*
73
* \return A pointer to the NetDevice.
74
*/
75
Ptr<NetDevice>
GetNetDevice
();
76
77
/**
78
* Set the NetDevice through which it's possible to contact this gateway from the server.
79
*
80
* \param netDevice A pointer to the NetDevice.
81
*/
82
void
SetNetDevice
(
Ptr<NetDevice>
netDevice);
83
84
/**
85
* Get a pointer to this gateway's MAC instance.
86
*
87
* \return A pointer to the MAC layer object.
88
*/
89
Ptr<GatewayLorawanMac>
GetGatewayMac
();
90
91
///**
92
// * Set a pointer to this gateway's MAC instance.
93
// */
94
// void SetGatewayMac (Ptr<GatewayLorawanMac> gwMac);
95
96
/**
97
* Query whether or not this gateway is available for immediate transmission
98
* on this frequency.
99
*
100
* \param frequency The frequency at which the gateway's availability should be queried.
101
* \return True if the gateway's available, false otherwise.
102
*/
103
bool
IsAvailableForTransmission
(
double
frequency);
104
105
/**
106
* Set the time of the next scheduled transmission for the gateway.
107
*
108
* \param nextTransmissionTime The Time value.
109
*/
110
void
SetNextTransmissionTime
(
Time
nextTransmissionTime);
111
// Time GetNextTransmissionTime ();
112
113
private
:
114
Address
m_address
;
//!< The Address of the P2PNetDevice of this gateway
115
116
Ptr<NetDevice>
117
m_netDevice
;
//!< The NetDevice through which to reach this gateway from the server
118
119
Ptr<GatewayLorawanMac>
m_gatewayMac
;
//!< The Mac layer of the gateway
120
121
Time
m_nextTransmissionTime
;
//!< This gateway's next transmission time
122
};
123
}
// namespace lorawan
124
125
}
// namespace ns3
126
#endif
/* DEVICE_STATUS_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::Time
Simulation virtual time values and global simulation resolution.
Definition
nstime.h:94
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
ns3::lorawan::GatewayStatus
This class represents the network server's knowledge about a gateway in the LoRaWAN network it is adm...
Definition
gateway-status.h:36
ns3::lorawan::GatewayStatus::SetAddress
void SetAddress(Address address)
Set this gateway's P2P link address.
Definition
gateway-status.cc:58
ns3::lorawan::GatewayStatus::~GatewayStatus
~GatewayStatus() override
Destructor.
Definition
gateway-status.cc:33
ns3::lorawan::GatewayStatus::IsAvailableForTransmission
bool IsAvailableForTransmission(double frequency)
Set a pointer to this gateway's MAC instance.
Definition
gateway-status.cc:84
ns3::lorawan::GatewayStatus::GetAddress
Address GetAddress()
Get this gateway's P2P link address.
Definition
gateway-status.cc:50
ns3::lorawan::GatewayStatus::m_netDevice
Ptr< NetDevice > m_netDevice
The NetDevice through which to reach this gateway from the server.
Definition
gateway-status.h:117
ns3::lorawan::GatewayStatus::m_nextTransmissionTime
Time m_nextTransmissionTime
This gateway's next transmission time.
Definition
gateway-status.h:121
ns3::lorawan::GatewayStatus::SetNextTransmissionTime
void SetNextTransmissionTime(Time nextTransmissionTime)
Set the time of the next scheduled transmission for the gateway.
Definition
gateway-status.cc:116
ns3::lorawan::GatewayStatus::GetGatewayMac
Ptr< GatewayLorawanMac > GetGatewayMac()
Get a pointer to this gateway's MAC instance.
Definition
gateway-status.cc:78
ns3::lorawan::GatewayStatus::m_gatewayMac
Ptr< GatewayLorawanMac > m_gatewayMac
The Mac layer of the gateway.
Definition
gateway-status.h:119
ns3::lorawan::GatewayStatus::GetTypeId
static TypeId GetTypeId()
Register this type.
Definition
gateway-status.cc:21
ns3::lorawan::GatewayStatus::GetNetDevice
Ptr< NetDevice > GetNetDevice()
Get the NetDevice through which it's possible to contact this gateway from the server.
Definition
gateway-status.cc:66
ns3::lorawan::GatewayStatus::m_address
Address m_address
The Address of the P2PNetDevice of this gateway.
Definition
gateway-status.h:114
ns3::lorawan::GatewayStatus::GatewayStatus
GatewayStatus()
Default constructor.
Definition
gateway-status.cc:28
ns3::lorawan::GatewayStatus::SetNetDevice
void SetNetDevice(Ptr< NetDevice > netDevice)
Set the NetDevice through which it's possible to contact this gateway from the server.
Definition
gateway-status.cc:72
gateway-lorawan-mac.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
lorawan
model
gateway-status.h
Generated on Fri Nov 8 2024 13:59:02 for ns-3 by
1.11.0