lora-network-server-helper.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_SERVER_HELPER_H
24 #define LORA_NETWORK_SERVER_HELPER_H
25 
26 #include "ns3/address.h"
27 #include "ns3/application-container.h"
28 #include "ns3/attribute.h"
29 #include "ns3/lora-network-server.h"
30 #include "ns3/net-device.h"
31 #include "ns3/node-container.h"
32 #include "ns3/object-factory.h"
33 #include "ns3/point-to-point-helper.h"
34 
35 #include <stdint.h>
36 #include <string>
37 
38 namespace ns3
39 {
40 
44 class LoraNetworkServerHelper : public Object
45 {
46  public:
51  static TypeId GetTypeId(void);
52 
54 
56 
57  void SetAttribute(std::string name, const AttributeValue& value);
58 
59  ApplicationContainer Install(NodeContainer c);
60 
61  ApplicationContainer Install(Ptr<Node> node);
62 
66  void SetGateways(NodeContainer gateways);
67 
71  void SetEndDevices(NodeContainer endDevices);
72 
77  void EnableAdr(bool enableAdr);
78 
83  void SetAdr(std::string type);
84 
85  private:
86  void InstallComponents(Ptr<LoraNetworkServer> netServer);
87  Ptr<Application> InstallPriv(Ptr<Node> node);
88 
89  ObjectFactory m_factory;
90 
91  NodeContainer m_gateways;
92 
93  NodeContainer m_endDevices;
94 
95  PointToPointHelper p2pHelper;
96 
98 
99  ObjectFactory m_adrSupportFactory;
100 };
101 
102 } // namespace ns3
103 
104 #endif /* LORA_NETWORK_SERVER_HELPER_H */
This class can install Network Server applications on multiple nodes at once.
void SetGateways(NodeContainer gateways)
Set which gateways will need to be connected to this NS.
PointToPointHelper p2pHelper
Helper to create PointToPoint links.
static TypeId GetTypeId(void)
Get the type ID.
void SetAdr(std::string type)
Set the ADR implementation to use in the Network Server created by this helper.
Ptr< Application > InstallPriv(Ptr< Node > node)
void InstallComponents(Ptr< LoraNetworkServer > netServer)
NodeContainer m_endDevices
Set of endDevices to connect to this NS.
void SetEndDevices(NodeContainer endDevices)
Set which end devices will be managed by this NS.
ApplicationContainer Install(NodeContainer c)
void EnableAdr(bool enableAdr)
Enable (true) or disable (false) the ADR component in the Network Server created by this helper.
void SetAttribute(std::string name, const AttributeValue &value)
NodeContainer m_gateways
Set of gateways to connect to this NS.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.