Loading...
Searching...
No Matches
lora-network-controller.h
Go to the documentation of this file.
1/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2017 University of Padova
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Author: Davide Magrin <magrinda@dei.unipd.it>
19 *
20 * Modified by: Bastien Tauran <bastien.tauran@viveris.fr>
21 */
22
23#ifndef LORA_NETWORK_CONTROLLER_H
24#define LORA_NETWORK_CONTROLLER_H
25
27#include "lora-network-status.h"
28
29#include "ns3/object.h"
30#include "ns3/packet.h"
31
32#include <list>
33
34namespace ns3
35{
36
39
45class LoraNetworkController : public Object
46{
47 public:
48 static TypeId GetTypeId(void);
49
51 LoraNetworkController(Ptr<LoraNetworkStatus> networkStatus);
52 virtual ~LoraNetworkController();
53
57 void Install(Ptr<LoraNetworkControllerComponent> component);
58
64 void OnNewPacket(Ptr<const Packet> packet);
65
70 void BeforeSendingReply(Ptr<LoraEndDeviceStatus> endDeviceStatus);
71
72 private:
73 Ptr<LoraNetworkStatus> m_status;
74 std::list<Ptr<LoraNetworkControllerComponent>> m_components;
75};
76
77} /* namespace ns3 */
78
79#endif /* LORA_NETWORK_CONTROLLER_H */
Generic class describing a component of the NetworkController.
void Install(Ptr< LoraNetworkControllerComponent > component)
Add a new LoraNetworkControllerComponent.
void OnNewPacket(Ptr< const Packet > packet)
Method that is called by the NetworkServer when a new packet is received.
Ptr< LoraNetworkStatus > m_status
void BeforeSendingReply(Ptr< LoraEndDeviceStatus > endDeviceStatus)
Method that is called by the NetworkScheduler just before sending a reply to a certain End Device.
std::list< Ptr< LoraNetworkControllerComponent > > m_components
This class represents the knowledge about the state of the network that is available at the Network S...
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.