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
network-controller.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 NETWORK_CONTROLLER_H
10
#define NETWORK_CONTROLLER_H
11
12
#include "ns3/object.h"
13
#include "ns3/packet.h"
14
15
namespace
ns3
16
{
17
namespace
lorawan
18
{
19
20
class
NetworkStatus
;
21
class
EndDeviceStatus
;
22
class
NetworkControllerComponent
;
23
24
/**
25
* @ingroup lorawan
26
*
27
* This class collects a series of components that deal with various aspects
28
* of managing the network, and queries them for action when a new packet is
29
* received or other events occur in the network.
30
*/
31
class
NetworkController
:
public
Object
32
{
33
public
:
34
/**
35
* Register this type.
36
* @return The object TypeId.
37
*/
38
static
TypeId
GetTypeId
();
39
40
NetworkController
();
//!< Default constructor
41
~NetworkController
()
override
;
//!< Destructor
42
43
/**
44
* Construct a new NetworkController object providing the NetworkStatus.
45
*
46
* @param networkStatus A pointer to the NetworkStatus object.
47
*/
48
NetworkController
(
Ptr<NetworkStatus>
networkStatus);
49
50
/**
51
* Add a new NetworkControllerComponent.
52
*
53
* @param component A pointer to the NetworkControllerComponent object.
54
*/
55
void
Install
(
Ptr<NetworkControllerComponent>
component);
56
57
/**
58
* Method that is called by the NetworkServer application when a new packet is received.
59
*
60
* @param packet The newly received packet.
61
*/
62
void
OnNewPacket
(
Ptr<const Packet>
packet);
63
64
/**
65
* Method that is called by the NetworkScheduler just before sending a reply
66
* to a certain end device.
67
*
68
* @param endDeviceStatus A pointer to the EndDeviceStatus object.
69
*/
70
void
BeforeSendingReply
(
Ptr<EndDeviceStatus>
endDeviceStatus);
71
72
private
:
73
Ptr<NetworkStatus>
m_status
;
//!< A pointer to the NetworkStatus object.
74
std::list<Ptr<NetworkControllerComponent>>
75
m_components
;
//!< List of NetworkControllerComponent objects.
76
};
77
78
}
// namespace lorawan
79
}
// namespace ns3
80
81
#endif
/* NETWORK_CONTROLLER_H */
ns3::Object::Object
Object()
Caller graph was not generated because of its size.
Definition
object.cc:93
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
ptr.h:70
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:50
ns3::lorawan::EndDeviceStatus
This class represents the network server's knowledge about an end device in the LoRaWAN network it is...
Definition
end-device-status.h:71
ns3::lorawan::NetworkControllerComponent
Generic class describing a component of the NetworkController.
Definition
network-controller-components.h:37
ns3::lorawan::NetworkController::Install
void Install(Ptr< NetworkControllerComponent > component)
Add a new NetworkControllerComponent.
Definition
network-controller.cc:50
ns3::lorawan::NetworkController::m_status
Ptr< NetworkStatus > m_status
A pointer to the NetworkStatus object.
Definition
network-controller.h:73
ns3::lorawan::NetworkController::OnNewPacket
void OnNewPacket(Ptr< const Packet > packet)
Method that is called by the NetworkServer application when a new packet is received.
Definition
network-controller.cc:57
ns3::lorawan::NetworkController::NetworkController
NetworkController()
Default constructor.
Definition
network-controller.cc:33
ns3::lorawan::NetworkController::BeforeSendingReply
void BeforeSendingReply(Ptr< EndDeviceStatus > endDeviceStatus)
Method that is called by the NetworkScheduler just before sending a reply to a certain end device.
Definition
network-controller.cc:73
ns3::lorawan::NetworkController::GetTypeId
static TypeId GetTypeId()
Register this type.
Definition
network-controller.cc:24
ns3::lorawan::NetworkController::m_components
std::list< Ptr< NetworkControllerComponent > > m_components
List of NetworkControllerComponent objects.
Definition
network-controller.h:75
ns3::lorawan::NetworkController::~NetworkController
~NetworkController() override
Destructor.
Definition
network-controller.cc:44
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:33
ns3::lorawan
Definition
forwarder-helper.cc:19
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
lorawan
model
network-controller.h
Generated on
for ns-3 by
1.15.0