A Discrete-Event Network Simulator
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
27namespace ns3
28{
32
35{
36 m_agentFactory.SetTypeId("ns3::dsdv::RoutingProtocol");
37}
38
41{
42 return new DsdvHelper(*this);
43}
44
47{
49 node->AggregateObject(agent);
50 return agent;
51}
52
53void
54DsdvHelper::Set(std::string name, const AttributeValue& value)
55{
56 m_agentFactory.Set(name, value);
57}
58
59} // namespace ns3
Hold a value for an Attribute.
Definition attribute.h:59
Helper class that adds DSDV routing to nodes.
Definition dsdv-helper.h:36
ObjectFactory m_agentFactory
Object factory.
Definition dsdv-helper.h:65
DsdvHelper * Copy() const override
void Set(std::string name, const AttributeValue &value)
~DsdvHelper() override
Ptr< Ipv4RoutingProtocol > Create(Ptr< Node > node) const override
a factory to create ns3::Ipv4RoutingProtocol objects
Ptr< Object > Create() const
Create an Object instance of the configured TypeId.
void Set(const std::string &name, const AttributeValue &value, Args &&... args)
Set an attribute to be set during construction.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
Smart pointer class similar to boost::intrusive_ptr.
Every class exported by the ns3 library is enclosed in the ns3 namespace.