A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::FlentHelper Class Reference

A helper to make it easier to instantiate an ns3::FlentApplication. More...

#include "flent-helper.h"

Collaboration diagram for ns3::FlentHelper:

Public Member Functions

 FlentHelper (std::string testname, Address address)
 Create an FlentHelper to make it easier to work with FlentApplication.
Time GetStopTime () const
 Get the overall stop time of the simulation.
ApplicationContainer Install (Ptr< Node > node) const
 Install an ns3::FlentApplication on the node configured with all the attributes set with SetAttribute.
ApplicationContainer Install (std::string nodeName) const
 Install an ns3::FlentApplication on the node configured with all the attributes set with SetAttribute.
void SetAttribute (std::string name, const AttributeValue &value)
 Helper function used to set the underlying application attributes.
void SetTestLength (Time length)
 Set the length of the Flent test.
void SetTestStartTime (Time start)
 Set the test start time.

Private Member Functions

Ptr< Application > InstallPriv (Ptr< Node > node) const
 Install an ns3::FlentApplication on the node configured with all the attributes set with SetAttribute.

Private Attributes

ObjectFactory m_factory
 Object factory.
Time m_length {Seconds(60)}
 The duration of the Flent test.
Time m_startTime {0}
 The start time of the Flent test.

Detailed Description

A helper to make it easier to instantiate an ns3::FlentApplication.

Definition at line 29 of file flent-helper.h.

Constructor & Destructor Documentation

◆ FlentHelper()

ns3::FlentHelper::FlentHelper ( std::string testname,
Address address )

Create an FlentHelper to make it easier to work with FlentApplication.

Parameters
[in]testnamethe name of the test to run on FlentApplication The supported tests are ping, tcp_upload, tcp_download and rrul.
[in]Addressthe address of the remote host to send traffic to.

Definition at line 20 of file flent-helper.cc.

References m_factory.

Member Function Documentation

◆ GetStopTime()

Time ns3::FlentHelper::GetStopTime ( ) const

Get the overall stop time of the simulation.

Returns
Stop time (start + length + 10s cooldown)

Definition at line 50 of file flent-helper.cc.

References m_length, m_startTime, and ns3::Seconds().

Here is the call graph for this function:

◆ Install() [1/2]

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

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

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

Definition at line 56 of file flent-helper.cc.

References InstallPriv().

Referenced by FlentApplicationPing::DoRun(), FlentApplicationRrul::DoRun(), FlentApplicationTcpDownload::DoRun(), and FlentApplicationTcpUpload::DoRun().

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

◆ Install() [2/2]

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

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

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

Definition at line 62 of file flent-helper.cc.

References ns3::Names::Find(), and InstallPriv().

Here is the call graph for this function:

◆ InstallPriv()

Ptr< Application > ns3::FlentHelper::InstallPriv ( Ptr< Node > node) const
private

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

Parameters
nodeThe node on which an FlentApplication will be installed.
Returns
Ptr to the application installed.

Definition at line 69 of file flent-helper.cc.

References m_factory.

Referenced by Install(), and Install().

Here is the caller graph for this function:

◆ SetAttribute()

void ns3::FlentHelper::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

Definition at line 28 of file flent-helper.cc.

References m_factory.

Referenced by FlentApplicationPing::DoRun(), FlentApplicationRrul::DoRun(), FlentApplicationTcpDownload::DoRun(), and FlentApplicationTcpUpload::DoRun().

Here is the caller graph for this function:

◆ SetTestLength()

void ns3::FlentHelper::SetTestLength ( Time length)

Set the length of the Flent test.

Parameters
LengthTest length

Definition at line 42 of file flent-helper.cc.

References m_factory, and m_length.

◆ SetTestStartTime()

void ns3::FlentHelper::SetTestStartTime ( Time start)

Set the test start time.

Parameters
startTest start time

Definition at line 34 of file flent-helper.cc.

References m_factory, and m_startTime.

Member Data Documentation

◆ m_factory

ObjectFactory ns3::FlentHelper::m_factory
private

Object factory.

Definition at line 95 of file flent-helper.h.

Referenced by FlentHelper(), InstallPriv(), SetAttribute(), SetTestLength(), and SetTestStartTime().

◆ m_length

Time ns3::FlentHelper::m_length {Seconds(60)}
private

The duration of the Flent test.

Definition at line 97 of file flent-helper.h.

Referenced by GetStopTime(), and SetTestLength().

◆ m_startTime

Time ns3::FlentHelper::m_startTime {0}
private

The start time of the Flent test.

Definition at line 96 of file flent-helper.h.

Referenced by GetStopTime(), and SetTestStartTime().


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