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
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Davide Magrin <magrinda@dei.unipd.it>
18
*/
19
20
#ifndef NETWORK_CONTROLLER_H
21
#define NETWORK_CONTROLLER_H
22
23
#include "
network-controller-components.h
"
24
#include "
network-status.h
"
25
26
#include "ns3/object.h"
27
#include "ns3/packet.h"
28
29
namespace
ns3
30
{
31
namespace
lorawan
32
{
33
34
class
NetworkStatus;
35
class
NetworkControllerComponent;
36
37
/**
38
* \ingroup lorawan
39
*
40
* This class collects a series of components that deal with various aspects
41
* of managing the network, and queries them for action when a new packet is
42
* received or other events occur in the network.
43
*/
44
class
NetworkController
:
public
Object
45
{
46
public
:
47
/**
48
* Register this type.
49
* \return The object TypeId.
50
*/
51
static
TypeId
GetTypeId
();
52
53
NetworkController
();
//!< Default constructor
54
~NetworkController
()
override
;
//!< Destructor
55
56
/**
57
* Construct a new NetworkController object providing the NetworkStatus.
58
*
59
* \param networkStatus A pointer to the NetworkStatus object.
60
*/
61
NetworkController
(
Ptr<NetworkStatus>
networkStatus);
62
63
/**
64
* Add a new NetworkControllerComponent.
65
*
66
* \param component A pointer to the NetworkControllerComponent object.
67
*/
68
void
Install
(
Ptr<NetworkControllerComponent>
component);
69
70
/**
71
* Method that is called by the NetworkServer application when a new packet is received.
72
*
73
* \param packet The newly received packet.
74
*/
75
void
OnNewPacket
(
Ptr<const Packet>
packet);
76
77
/**
78
* Method that is called by the NetworkScheduler just before sending a reply
79
* to a certain end device.
80
*
81
* \param endDeviceStatus A pointer to the EndDeviceStatus object.
82
*/
83
void
BeforeSendingReply
(
Ptr<EndDeviceStatus>
endDeviceStatus);
84
85
private
:
86
Ptr<NetworkStatus>
m_status
;
//!< A pointer to the NetworkStatus object.
87
std::list<Ptr<NetworkControllerComponent>>
88
m_components
;
//!< List of NetworkControllerComponent objects.
89
};
90
91
}
// namespace lorawan
92
93
}
// namespace ns3
94
#endif
/* NETWORK_CONTROLLER_H */
ns3::Object
A base class which provides memory management and object aggregation.
Definition:
object.h:89
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:77
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3::lorawan::NetworkController
This class collects a series of components that deal with various aspects of managing the network,...
Definition:
network-controller.h:45
ns3::lorawan::NetworkController::Install
void Install(Ptr< NetworkControllerComponent > component)
Add a new NetworkControllerComponent.
Definition:
network-controller.cc:58
ns3::lorawan::NetworkController::m_status
Ptr< NetworkStatus > m_status
A pointer to the NetworkStatus object.
Definition:
network-controller.h:86
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:65
ns3::lorawan::NetworkController::NetworkController
NetworkController()
Default constructor.
Definition:
network-controller.cc:41
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:81
ns3::lorawan::NetworkController::GetTypeId
static TypeId GetTypeId()
Register this type.
Definition:
network-controller.cc:32
ns3::lorawan::NetworkController::m_components
std::list< Ptr< NetworkControllerComponent > > m_components
List of NetworkControllerComponent objects.
Definition:
network-controller.h:88
ns3::lorawan::NetworkController::~NetworkController
~NetworkController() override
Destructor.
Definition:
network-controller.cc:52
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
network-controller-components.h
network-status.h
src
lorawan
model
network-controller.h
Generated on Mon Aug 12 2024 11:16:15 for ns-3 by
1.9.6