ns-3
ns3::OnOffHelper Class Reference

A helper to make it easier to instantiate an ns3::OnOffApplication on a set of nodes. More...

#include <on-off-helper.h>

List of all members.

Public Member Functions

 OnOffHelper (std::string protocol, Address address)
void SetAttribute (std::string name, const AttributeValue &value)
ApplicationContainer Install (NodeContainer c) const
ApplicationContainer Install (Ptr< Node > node) const
ApplicationContainer Install (std::string nodeName) const

Detailed Description

A helper to make it easier to instantiate an ns3::OnOffApplication on a set of nodes.


Constructor & Destructor Documentation

ns3::OnOffHelper::OnOffHelper ( std::string  protocol,
Address  address 
)

Create an OnOffHelper to make it easier to work with OnOffApplications

Parameters:
protocolthe name of the protocol to use to send traffic by the applications. This string identifies the socket factory type used to create sockets for the applications. A typical value would be ns3::UdpSocketFactory.
addressthe address of the remote node to send traffic to.

References ns3::ObjectFactory::Set(), and ns3::ObjectFactory::SetTypeId().


Member Function Documentation

Install an ns3::OnOffApplication on each node of the input container configured with all the attributes set with SetAttribute.

Parameters:
cNodeContainer of the set of nodes on which an OnOffApplication will be installed.
Returns:
Container of Ptr to the applications installed.

References ns3::ApplicationContainer::Add(), ns3::NodeContainer::Begin(), and ns3::NodeContainer::End().

Install an ns3::OnOffApplication on the node configured with all the attributes set with SetAttribute.

Parameters:
nodeThe node on which an OnOffApplication will be installed.
Returns:
Container of Ptr to the applications installed.
ApplicationContainer ns3::OnOffHelper::Install ( std::string  nodeName) const

Install an ns3::OnOffApplication on the node configured with all the attributes set with SetAttribute.

Parameters:
nodeNameThe node on which an OnOffApplication will be installed.
Returns:
Container of Ptr to the applications installed.
void ns3::OnOffHelper::SetAttribute ( std::string  name,
const AttributeValue value 
)

Helper function used to set the underlying application attributes.

Parameters:
namethe name of the application attribute to set
valuethe value of the application attribute to set

References ns3::ObjectFactory::Set().


The documentation for this class was generated from the following files: