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 
67  void EnableAdr(bool enableAdr);
68 
73  void SetAdr(std::string type);
74 
75  private:
76  void InstallComponents(Ptr<LoraNetworkServer> netServer);
77  Ptr<Application> InstallPriv(Ptr<Node> node);
78 
79  ObjectFactory m_factory;
80 
81  PointToPointHelper p2pHelper;
82 
84 
85  ObjectFactory m_adrSupportFactory;
86 };
87 
88 } // namespace ns3
89 
90 #endif /* LORA_NETWORK_SERVER_HELPER_H */
This class can install Network Server applications on multiple nodes at once.
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)
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)
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.