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 namespace ns3
33 {
34 
35 class LoraNetworkStatus;
36 class LoraNetworkControllerComponent;
37 
43 class LoraNetworkController : public Object
44 {
45  public:
46  static TypeId GetTypeId(void);
47 
49  LoraNetworkController(Ptr<LoraNetworkStatus> networkStatus);
50  virtual ~LoraNetworkController();
51 
55  void Install(Ptr<LoraNetworkControllerComponent> component);
56 
62  void OnNewPacket(Ptr<const Packet> packet);
63 
68  void BeforeSendingReply(Ptr<LoraEndDeviceStatus> endDeviceStatus);
69 
70  private:
71  Ptr<LoraNetworkStatus> m_status;
72  std::list<Ptr<LoraNetworkControllerComponent>> m_components;
73 };
74 
75 } /* namespace ns3 */
76 
77 #endif /* LORA_NETWORK_CONTROLLER_H */
This class collects a series of components that deal with various aspects of managing the network,...
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
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.