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/address.h"
13#include "ns3/application-container.h"
14#include "ns3/attribute.h"
15#include "ns3/forwarder.h"
16#include "ns3/net-device.h"
17#include "ns3/node-container.h"
18#include "ns3/object-factory.h"
19
20#include <stdint.h>
21#include <string>
22
23namespace ns3
24{
25namespace lorawan
26{
27
28/**
29 * \ingroup lorawan
30 *
31 * This class can be used to install Forwarder applications on a set of gateways.
32 */
34{
35 public:
36 ForwarderHelper(); //!< Default constructor
37 ~ForwarderHelper(); //!< Destructor
38
39 /**
40 * Helper function used to set the underlying application attributes.
41 *
42 * \param name The name of the application attribute to set.
43 * \param value The value of the application attribute to set.
44 */
45 void SetAttribute(std::string name, const AttributeValue& value);
46
47 /**
48 * Install a Forwarder application on each node of the input container configured with
49 * all the attributes set with SetAttribute or other functions of this class.
50 *
51 * \param c NodeContainer of the set of nodes on which an Forwarder will be installed.
52 * \return Container of Ptr to the applications installed.
53 */
55
56 /**
57 * Install a Forwarder application on the input Node configured with all the attributes
58 * set with SetAttribute or other functions of this class.
59 *
60 * \param node The node on which a Forwarder will be installed.
61 * \return Container of the Ptr to the application installed.
62 */
64
65 private:
66 /**
67 * Install a Forwarder application on the input Node configured with all the attributes
68 * set with SetAttribute or other functions of this class.
69 *
70 * \param node The node on which a Forwarder will be installed.
71 * \return A pointer to the applications installed.
72 */
74
75 ObjectFactory m_factory; //!< The object factory
76};
77
78} // namespace lorawan
79
80} // namespace ns3
81#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.
This class can be used to install Forwarder applications on a set of gateways.
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.