21 #include "ns3/inet-socket-address.h"
22 #include "ns3/packet-socket-address.h"
23 #include "ns3/string.h"
24 #include "ns3/data-rate.h"
25 #include "ns3/uinteger.h"
26 #include "ns3/names.h"
27 #include "ns3/random-variable-stream.h"
28 #include "ns3/onoff-application.h"
54 Ptr<Node> node = Names::Find<Node> (nodeName);
82 int64_t currentStream = stream;
92 currentStream += onoff->AssignStreams (currentStream);
96 return (currentStream - stream);
holds a vector of ns3::Application pointers.
uint32_t AddApplication(Ptr< Application > application)
Associate an Application to this Node.
uint32_t GetNApplications(void) const
std::vector< Ptr< Node > >::const_iterator Iterator
Node container iterator.
Hold variables of type string.
void Add(ApplicationContainer other)
Append the contents of another ApplicationContainer to the end of this container. ...
Hold a value for an Attribute.
ObjectFactory m_factory
Object factory.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
Iterator End(void) const
Get an iterator which indicates past-the-last Node in the container.
int64_t AssignStreams(NodeContainer c, int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
a polymophic address class
Class for representing data rates.
Ptr< Application > GetApplication(uint32_t index) const
Retrieve the index-th Application associated to this node.
The base class for all ns3 applications.
Ptr< Object > Create(void) const
Create an Object instance of the configured TypeId.
Hold an unsigned integer type.
OnOffHelper(std::string protocol, Address address)
Create an OnOffHelper to make it easier to work with OnOffApplications.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SetConstantRate(DataRate dataRate, uint32_t packetSize=512)
Helper function to set a constant rate source.
keep track of a set of node pointers.
Iterator Begin(void) const
Get an iterator which refers to the first Node in the container.
void Set(std::string name, const AttributeValue &value)
Set an attribute to be set during construction.
AttributeValue implementation for Address.
AttributeValue implementation for DataRate.
Ptr< Application > InstallPriv(Ptr< Node > node) const
Install an ns3::OnOffApplication on the node configured with all the attributes set with SetAttribute...
static const uint32_t packetSize
ApplicationContainer Install(NodeContainer c) const
Install an ns3::OnOffApplication on each node of the input container configured with all the attribut...
void SetAttribute(std::string name, const AttributeValue &value)
Helper function used to set the underlying application attributes.