A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
aodv-helper.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2009 IITP RAS
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Authors: Pavel Boyko <boyko@iitp.ru>, written after OlsrHelper by Mathieu Lacage
7 * <mathieu.lacage@sophia.inria.fr>
8 */
9
10#ifndef AODV_HELPER_H
11#define AODV_HELPER_H
12
13#include "ns3/ipv4-routing-helper.h"
14#include "ns3/node-container.h"
15#include "ns3/node.h"
16#include "ns3/object-factory.h"
17
18namespace ns3
19{
20/**
21 * \ingroup aodv
22 * \brief Helper class that adds AODV routing to nodes.
23 */
25{
26 public:
27 AodvHelper();
28
29 /**
30 * \returns pointer to clone of this AodvHelper
31 *
32 * \internal
33 * This method is mainly for internal use by the other helpers;
34 * clients are expected to free the dynamic memory allocated by this method
35 */
36 AodvHelper* Copy() const override;
37
38 /**
39 * \param node the node on which the routing protocol will run
40 * \returns a newly-created routing protocol
41 *
42 * This method will be called by ns3::InternetStackHelper::Install
43 *
44 * \todo support installing AODV on the subset of all available IP interfaces
45 */
46 Ptr<Ipv4RoutingProtocol> Create(Ptr<Node> node) const override;
47 /**
48 * \param name the name of the attribute to set
49 * \param value the value of the attribute to set.
50 *
51 * This method controls the attributes of ns3::aodv::RoutingProtocol
52 */
53 void Set(std::string name, const AttributeValue& value);
54 /**
55 * Assign a fixed random variable stream number to the random variables
56 * used by this model. Return the number of streams (possibly zero) that
57 * have been assigned. The Install() method of the InternetStackHelper
58 * should have previously been called by the user.
59 *
60 * \param stream first stream index to use
61 * \param c NodeContainer of the set of nodes for which AODV
62 * should be modified to use a fixed stream
63 * \return the number of stream indices assigned by this helper
64 */
65 int64_t AssignStreams(NodeContainer c, int64_t stream);
66
67 private:
68 /** the factory to create AODV routing object */
70};
71
72} // namespace ns3
73
74#endif /* AODV_HELPER_H */
Helper class that adds AODV routing to nodes.
Definition aodv-helper.h:25
int64_t AssignStreams(NodeContainer c, int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
AodvHelper * Copy() const override
void Set(std::string name, const AttributeValue &value)
ObjectFactory m_agentFactory
the factory to create AODV routing object
Definition aodv-helper.h:69
Ptr< Ipv4RoutingProtocol > Create(Ptr< Node > node) const override
Hold a value for an Attribute.
Definition attribute.h:59
a factory to create ns3::Ipv4RoutingProtocol objects
keep track of a set of node pointers.
Instantiate subclasses of ns3::Object.
Smart pointer class similar to boost::intrusive_ptr.
Every class exported by the ns3 library is enclosed in the ns3 namespace.