A Discrete-Event Network Simulator
API
ns3::UdpTraceClientHelper Class Reference

Create UdpTraceClient application which sends UDP packets based on a trace file of an MPEG4 stream. More...

#include "udp-client-server-helper.h"

+ Collaboration diagram for ns3::UdpTraceClientHelper:

Public Member Functions

 UdpTraceClientHelper ()
 Create UdpTraceClientHelper which will make life easier for people trying to set up simulations with udp-client-server. More...
 
 UdpTraceClientHelper (Address addr, std::string filename)
 Create UdpTraceClientHelper which will make life easier for people trying to set up simulations with udp-client-server. More...
 
 UdpTraceClientHelper (Address ip, uint16_t port, std::string filename)
 Create UdpTraceClientHelper which will make life easier for people trying to set up simulations with udp-client-server. More...
 
ApplicationContainer Install (NodeContainer c)
 
void SetAttribute (std::string name, const AttributeValue &value)
 Record an attribute to be set in each Application after it is is created. More...
 

Private Attributes

ObjectFactory m_factory
 Object factory. More...
 

Detailed Description

Create UdpTraceClient application which sends UDP packets based on a trace file of an MPEG4 stream.

Trace files could be downloaded form : http://www2.tkn.tu-berlin.de/research/trace/ltvt.html (the 2 first lines of the file should be removed) A valid trace file is a file with 4 columns:

  • -1- the first one represents the frame index
  • -2- the second one indicates the type of the frame: I, P or B
  • -3- the third one indicates the time on which the frame was generated by the encoder
  • -4- the fourth one indicates the frame size in byte

Definition at line 158 of file udp-client-server-helper.h.

Constructor & Destructor Documentation

◆ UdpTraceClientHelper() [1/3]

ns3::UdpTraceClientHelper::UdpTraceClientHelper ( )

Create UdpTraceClientHelper which will make life easier for people trying to set up simulations with udp-client-server.

Definition at line 106 of file udp-client-server-helper.cc.

References ns3::UdpTraceClient::GetTypeId(), m_factory, and ns3::ObjectFactory::SetTypeId().

+ Here is the call graph for this function:

◆ UdpTraceClientHelper() [2/3]

ns3::UdpTraceClientHelper::UdpTraceClientHelper ( Address  ip,
uint16_t  port,
std::string  filename 
)

Create UdpTraceClientHelper which will make life easier for people trying to set up simulations with udp-client-server.

Use this variant with addresses that do not include a port value (e.g., Ipv4Address and Ipv6Address).

Parameters
ipThe IP address of the remote UDP server
portThe port number of the remote UDP server
filenamethe file from which packet traces will be loaded

Definition at line 111 of file udp-client-server-helper.cc.

References first::address, ns3::UdpTraceClient::GetTypeId(), m_factory, port, SetAttribute(), and ns3::ObjectFactory::SetTypeId().

+ Here is the call graph for this function:

◆ UdpTraceClientHelper() [3/3]

ns3::UdpTraceClientHelper::UdpTraceClientHelper ( Address  addr,
std::string  filename 
)

Create UdpTraceClientHelper which will make life easier for people trying to set up simulations with udp-client-server.

Use this variant with addresses that do include a port value (e.g., InetSocketAddress and Inet6SocketAddress).

Parameters
addrThe address of the remote UDP server
filenamethe file from which packet traces will be loaded

Definition at line 119 of file udp-client-server-helper.cc.

References first::address, ns3::UdpTraceClient::GetTypeId(), m_factory, SetAttribute(), and ns3::ObjectFactory::SetTypeId().

+ Here is the call graph for this function:

Member Function Documentation

◆ Install()

ApplicationContainer ns3::UdpTraceClientHelper::Install ( NodeContainer  c)
Parameters
cthe nodes

Create one UDP trace client application on each of the input nodes

Returns
the applications created, one application per input node.

Definition at line 133 of file udp-client-server-helper.cc.

References ns3::ApplicationContainer::Add(), ns3::Node::AddApplication(), ns3::NodeContainer::Begin(), ns3::ObjectFactory::Create(), ns3::NodeContainer::End(), and m_factory.

Referenced by UdpTraceClientServerTestCase::DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetAttribute()

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

Record an attribute to be set in each Application after it is is created.

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

Definition at line 127 of file udp-client-server-helper.cc.

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

Referenced by UdpTraceClientHelper(), and UdpTraceClientServerTestCase::DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_factory

ObjectFactory ns3::UdpTraceClientHelper::m_factory
private

Object factory.

Definition at line 208 of file udp-client-server-helper.h.

Referenced by UdpTraceClientHelper(), Install(), and SetAttribute().


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