5G-LENA nr-v3.3-159-ga6832aa7
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
ns3::TrafficGeneratorHelper Class Reference

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

#include "traffic-generator-helper.h"

Public Member Functions

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

Detailed Description

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

Definition at line 27 of file traffic-generator-helper.h.

Constructor & Destructor Documentation

◆ TrafficGeneratorHelper()

ns3::TrafficGeneratorHelper::TrafficGeneratorHelper ( std::string  protocol,
Address  address,
TypeId  ftpTypeId 
)

Create an TrafficGeneratorHelper to make it easier to work with TrafficGenerator types

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.
ftpTypeIda TypeId of the FTP application to be used by this helper

Definition at line 16 of file traffic-generator-helper.cc.

Member Function Documentation

◆ Install() [1/3]

ApplicationContainer ns3::TrafficGeneratorHelper::Install ( NodeContainer  c) const

Install an ns3::TrafficGenerator 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 TrafficGenerator will be installed.
Returns
Container of Ptr to the applications installed.

Definition at line 45 of file traffic-generator-helper.cc.

◆ Install() [2/3]

ApplicationContainer ns3::TrafficGeneratorHelper::Install ( Ptr< Node >  node) const

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

Parameters
nodeThe node on which an TrafficGenerator will be installed.
Returns
Container of Ptr to the applications installed.

Definition at line 32 of file traffic-generator-helper.cc.

◆ Install() [3/3]

ApplicationContainer ns3::TrafficGeneratorHelper::Install ( std::string  nodeName) const

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

Parameters
nodeNameThe node on which an TrafficGenerator will be installed.
Returns
Container of Ptr to the applications installed.

Definition at line 38 of file traffic-generator-helper.cc.

◆ SetAttribute()

void ns3::TrafficGeneratorHelper::SetAttribute ( std::string  name,
const AttributeValue &  value 
)

Helper function used to set the underlying application attributes, not the socket attributes.

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

Definition at line 26 of file traffic-generator-helper.cc.


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