A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
forwarder-helper.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 FORWARDER_HELPER_H
10#define FORWARDER_HELPER_H
11
12#include "ns3/application-container.h"
13#include "ns3/node-container.h"
14#include "ns3/object-factory.h"
15
16namespace ns3
17{
18namespace lorawan
19{
20
21/**
22 * @ingroup lorawan
23 *
24 * This class can be used to install Forwarder applications on a set of gateways.
25 */
27{
28 public:
29 ForwarderHelper(); //!< Default constructor
30 ~ForwarderHelper(); //!< Destructor
31
32 /**
33 * Helper function used to set the underlying application attributes.
34 *
35 * @param name The name of the application attribute to set.
36 * @param value The value of the application attribute to set.
37 */
38 void SetAttribute(std::string name, const AttributeValue& value);
39
40 /**
41 * Install a Forwarder application on each node of the input container configured with
42 * all the attributes set with SetAttribute or other functions of this class.
43 *
44 * @param c NodeContainer of the set of nodes on which an Forwarder will be installed.
45 * @return Container of Ptr to the applications installed.
46 */
48
49 /**
50 * Install a Forwarder application on the input Node configured with all the attributes
51 * set with SetAttribute or other functions of this class.
52 *
53 * @param node The node on which a Forwarder will be installed.
54 * @return Container of the Ptr to the application installed.
55 */
57
58 private:
59 /**
60 * Install a Forwarder application on the input Node configured with all the attributes
61 * set with SetAttribute or other functions of this class.
62 *
63 * @param node The node on which a Forwarder will be installed.
64 * @return A pointer to the applications installed.
65 */
67
68 ObjectFactory m_factory; //!< The object factory
69};
70
71} // namespace lorawan
72} // namespace ns3
73
74#endif /* FORWARDER_HELPER_H */
holds a vector of ns3::Application pointers.
Hold a value for an Attribute.
Definition attribute.h:59
keep track of a set of node pointers.
Instantiate subclasses of ns3::Object.
Smart pointer class similar to boost::intrusive_ptr.
Definition ptr.h:70
void SetAttribute(std::string name, const AttributeValue &value)
Helper function used to set the underlying application attributes.
ObjectFactory m_factory
The object factory.
ApplicationContainer Install(NodeContainer c) const
Install a Forwarder application on each node of the input container configured with all the attribute...
ForwarderHelper()
Default constructor.
Ptr< Application > InstallPriv(Ptr< Node > node) const
Install a Forwarder application on the input Node configured with all the attributes set with SetAttr...
Every class exported by the ns3 library is enclosed in the ns3 namespace.