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 "
network-controller-components.h
"
13
#include "
network-status.h
"
14
15
#include "ns3/object.h"
16
#include "ns3/packet.h"
17
18
namespace
ns3
19
{
20
namespace
lorawan
21
{
22
23
class
NetworkStatus;
24
class
NetworkControllerComponent;
25
26
/**
27
* \ingroup lorawan
28
*
29
* This class collects a series of components that deal with various aspects
30
* of managing the network, and queries them for action when a new packet is
31
* received or other events occur in the network.
32
*/
33
class
NetworkController
:
public
Object
34
{
35
public
:
36
/**
37
* Register this type.
38
* \return The object TypeId.
39
*/
40
static
TypeId
GetTypeId
();
41
42
NetworkController
();
//!< Default constructor
43
~NetworkController
()
override
;
//!< Destructor
44
45
/**
46
* Construct a new NetworkController object providing the NetworkStatus.
47
*
48
* \param networkStatus A pointer to the NetworkStatus object.
49
*/
50
NetworkController
(
Ptr<NetworkStatus>
networkStatus);
51
52
/**
53
* Add a new NetworkControllerComponent.
54
*
55
* \param component A pointer to the NetworkControllerComponent object.
56
*/
57
void
Install
(
Ptr<NetworkControllerComponent>
component);
58
59
/**
60
* Method that is called by the NetworkServer application when a new packet is received.
61
*
62
* \param packet The newly received packet.
63
*/
64
void
OnNewPacket
(
Ptr<const Packet>
packet);
65
66
/**
67
* Method that is called by the NetworkScheduler just before sending a reply
68
* to a certain end device.
69
*
70
* \param endDeviceStatus A pointer to the EndDeviceStatus object.
71
*/
72
void
BeforeSendingReply
(
Ptr<EndDeviceStatus>
endDeviceStatus);
73
74
private
:
75
Ptr<NetworkStatus>
m_status
;
//!< A pointer to the NetworkStatus object.
76
std::list<Ptr<NetworkControllerComponent>>
77
m_components
;
//!< List of NetworkControllerComponent objects.
78
};
79
80
}
// namespace lorawan
81
82
}
// namespace ns3
83
#endif
/* NETWORK_CONTROLLER_H */
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:48
ns3::lorawan::NetworkController
This class collects a series of components that deal with various aspects of managing the network,...
Definition
network-controller.h:34
ns3::lorawan::NetworkController::Install
void Install(Ptr< NetworkControllerComponent > component)
Add a new NetworkControllerComponent.
Definition
network-controller.cc:47
ns3::lorawan::NetworkController::m_status
Ptr< NetworkStatus > m_status
A pointer to the NetworkStatus object.
Definition
network-controller.h:75
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:54
ns3::lorawan::NetworkController::NetworkController
NetworkController()
Default constructor.
Definition
network-controller.cc:30
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:70
ns3::lorawan::NetworkController::GetTypeId
static TypeId GetTypeId()
Register this type.
Definition
network-controller.cc:21
ns3::lorawan::NetworkController::m_components
std::list< Ptr< NetworkControllerComponent > > m_components
List of NetworkControllerComponent objects.
Definition
network-controller.h:77
ns3::lorawan::NetworkController::~NetworkController
~NetworkController() override
Destructor.
Definition
network-controller.cc:41
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 Fri Nov 8 2024 13:59:02 for ns-3 by
1.11.0