22 #include "ns3/aodv-routing-protocol.h"
23 #include "ns3/ipv4-list-routing.h"
24 #include "ns3/names.h"
25 #include "ns3/node-list.h"
60 int64_t currentStream = stream;
62 for (
auto i = c.
Begin(); i != c.
End(); ++i)
72 currentStream += aodv->AssignStreams(currentStream);
82 for (uint32_t i = 0; i <
list->GetNRoutingProtocols(); i++)
84 listProto =
list->GetRoutingProtocol(i, priority);
85 listAodv = DynamicCast<aodv::RoutingProtocol>(listProto);
88 currentStream += listAodv->AssignStreams(currentStream);
94 return (currentStream - stream);
Helper class that adds AODV routing to nodes.
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
Ptr< Ipv4RoutingProtocol > Create(Ptr< Node > node) const override
Hold a value for an Attribute.
Access to the IPv4 forwarding table, interfaces, and configuration.
a factory to create ns3::Ipv4RoutingProtocol objects
keep track of a set of node pointers.
Iterator End() const
Get an iterator which indicates past-the-last Node in the container.
Iterator Begin() const
Get an iterator which refers to the first Node in the container.
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.
Ptr< T > GetObject() const
Get a pointer to the requested aggregated Object.
void AggregateObject(Ptr< Object > other)
Aggregate two Objects together.
Smart pointer class similar to boost::intrusive_ptr.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Every class exported by the ns3 library is enclosed in the ns3 namespace.