21#include "ns3/data-rate.h"
22#include "ns3/inet-socket-address.h"
24#include "ns3/onoff-application.h"
25#include "ns3/packet-socket-address.h"
26#include "ns3/random-variable-stream.h"
27#include "ns3/string.h"
28#include "ns3/uinteger.h"
55 Ptr<Node> node = Names::Find<Node>(nodeName);
75 node->AddApplication(app);
83 int64_t currentStream = stream;
88 for (
uint32_t j = 0; j < node->GetNApplications(); j++)
93 currentStream += onoff->AssignStreams(currentStream);
97 return (currentStream - stream);
a polymophic address class
AttributeValue implementation for Address.
holds a vector of ns3::Application pointers.
void Add(ApplicationContainer other)
Append the contents of another ApplicationContainer to the end of this container.
The base class for all ns3 applications.
Hold a value for an Attribute.
Class for representing data rates.
AttributeValue implementation for DataRate.
keep track of a set of node pointers.
std::vector< Ptr< Node > >::const_iterator Iterator
Node container iterator.
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.
OnOffHelper(std::string protocol, Address address)
Create an OnOffHelper to make it easier to work with OnOffApplications.
void SetConstantRate(DataRate dataRate, uint32_t packetSize=512)
Helper function to set a constant rate source.
ObjectFactory m_factory
Object factory.
int64_t AssignStreams(NodeContainer c, int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
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.
Ptr< Application > InstallPriv(Ptr< Node > node) const
Install an ns3::OnOffApplication on the node configured with all the attributes set with SetAttribute...
Smart pointer class similar to boost::intrusive_ptr.
Hold variables of type string.
Hold an unsigned integer type.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static const uint32_t packetSize
Packet size generated at the AP.