A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
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
18
namespace
ns3
19
{
20
/**
21
* \ingroup aodv
22
* \brief Helper class that adds AODV routing to nodes.
23
*/
24
class
AodvHelper
:
public
Ipv4RoutingHelper
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 */
69
ObjectFactory
m_agentFactory
;
70
};
71
72
}
// namespace ns3
73
74
#endif
/* AODV_HELPER_H */
ns3::AodvHelper
Helper class that adds AODV routing to nodes.
Definition
aodv-helper.h:25
ns3::AodvHelper::AodvHelper
AodvHelper()
Definition
aodv-helper.cc:20
ns3::AodvHelper::AssignStreams
int64_t AssignStreams(NodeContainer c, int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
Definition
aodv-helper.cc:47
ns3::AodvHelper::Copy
AodvHelper * Copy() const override
Definition
aodv-helper.cc:27
ns3::AodvHelper::Set
void Set(std::string name, const AttributeValue &value)
Definition
aodv-helper.cc:41
ns3::AodvHelper::m_agentFactory
ObjectFactory m_agentFactory
the factory to create AODV routing object
Definition
aodv-helper.h:69
ns3::AodvHelper::Create
Ptr< Ipv4RoutingProtocol > Create(Ptr< Node > node) const override
Definition
aodv-helper.cc:33
ns3::AttributeValue
Hold a value for an Attribute.
Definition
attribute.h:59
ns3::Ipv4RoutingHelper
a factory to create ns3::Ipv4RoutingProtocol objects
Definition
ipv4-routing-helper.h:35
ns3::NodeContainer
keep track of a set of node pointers.
Definition
node-container.h:29
ns3::ObjectFactory
Instantiate subclasses of ns3::Object.
Definition
object-factory.h:37
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
aodv
helper
aodv-helper.h
Generated on Fri Nov 8 2024 13:58:58 for ns-3 by
1.11.0