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
dsdv-helper.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2010 Hemanth Narra
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Authors: Hemanth Narra <hemanth@ittc.ku.com>, written after OlsrHelper by Mathieu Lacage
7
* <mathieu.lacage@sophia.inria.fr>
8
*
9
* James P.G. Sterbenz <jpgs@ittc.ku.edu>, director
10
* ResiliNets Research Group https://resilinets.org/
11
* Information and Telecommunication Technology Center (ITTC)
12
* and Department of Electrical Engineering and Computer Science
13
* The University of Kansas Lawrence, KS USA.
14
*
15
* Work supported in part by NSF FIND (Future Internet Design) Program
16
* under grant CNS-0626918 (Postmodern Internet Architecture),
17
* NSF grant CNS-1050226 (Multilayer Network Resilience Analysis and Experimentation on GENI),
18
* US Department of Defense (DoD), and ITTC at The University of Kansas.
19
*/
20
#include "
dsdv-helper.h
"
21
22
#include "ns3/dsdv-routing-protocol.h"
23
#include "ns3/ipv4-list-routing.h"
24
#include "ns3/names.h"
25
#include "ns3/node-list.h"
26
27
namespace
ns3
28
{
29
DsdvHelper::~DsdvHelper
()
30
{
31
}
32
33
DsdvHelper::DsdvHelper
()
34
:
Ipv4RoutingHelper
()
35
{
36
m_agentFactory
.
SetTypeId
(
"ns3::dsdv::RoutingProtocol"
);
37
}
38
39
DsdvHelper
*
40
DsdvHelper::Copy
()
const
41
{
42
return
new
DsdvHelper
(*
this
);
43
}
44
45
Ptr<Ipv4RoutingProtocol>
46
DsdvHelper::Create
(
Ptr<Node>
node)
const
47
{
48
Ptr<dsdv::RoutingProtocol>
agent =
m_agentFactory
.
Create
<
dsdv::RoutingProtocol
>();
49
node->AggregateObject(agent);
50
return
agent;
51
}
52
53
void
54
DsdvHelper::Set
(std::string name,
const
AttributeValue
& value)
55
{
56
m_agentFactory
.
Set
(name, value);
57
}
58
59
}
// namespace ns3
ns3::AttributeValue
Hold a value for an Attribute.
Definition
attribute.h:59
ns3::DsdvHelper
Helper class that adds DSDV routing to nodes.
Definition
dsdv-helper.h:36
ns3::DsdvHelper::m_agentFactory
ObjectFactory m_agentFactory
Object factory.
Definition
dsdv-helper.h:65
ns3::DsdvHelper::DsdvHelper
DsdvHelper()
Definition
dsdv-helper.cc:33
ns3::DsdvHelper::Copy
DsdvHelper * Copy() const override
Definition
dsdv-helper.cc:40
ns3::DsdvHelper::Set
void Set(std::string name, const AttributeValue &value)
Definition
dsdv-helper.cc:54
ns3::DsdvHelper::~DsdvHelper
~DsdvHelper() override
Definition
dsdv-helper.cc:29
ns3::DsdvHelper::Create
Ptr< Ipv4RoutingProtocol > Create(Ptr< Node > node) const override
Definition
dsdv-helper.cc:46
ns3::Ipv4RoutingHelper
a factory to create ns3::Ipv4RoutingProtocol objects
Definition
ipv4-routing-helper.h:35
ns3::ObjectFactory::Create
Ptr< Object > Create() const
Create an Object instance of the configured TypeId.
Definition
object-factory.cc:82
ns3::ObjectFactory::Set
void Set(const std::string &name, const AttributeValue &value, Args &&... args)
Set an attribute to be set during construction.
Definition
object-factory.h:213
ns3::ObjectFactory::SetTypeId
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
Definition
object-factory.cc:31
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::dsdv::RoutingProtocol
DSDV routing protocol.
Definition
dsdv-routing-protocol.h:45
dsdv-helper.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
dsdv
helper
dsdv-helper.cc
Generated on Tue Dec 10 2024 18:20:39 for ns-3 by
1.11.0