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

Create a server application which waits for input UDP packets and sends them back to the original sender. More...

#include "udp-echo-helper.h"

+ Collaboration diagram for ns3::UdpEchoServerHelper:

Public Member Functions

 UdpEchoServerHelper (uint16_t port)
 Create UdpEchoServerHelper which will make life easier for people trying to set up simulations with echos. More...
 
ApplicationContainer Install (NodeContainer c) const
 
ApplicationContainer Install (Ptr< Node > node) const
 Create a UdpEchoServerApplication on the specified Node. More...
 
ApplicationContainer Install (std::string nodeName) const
 Create a UdpEchoServerApplication on specified node. More...
 
void SetAttribute (std::string name, const AttributeValue &value)
 Record an attribute to be set in each Application after it is is created. More...
 

Private Member Functions

Ptr< ApplicationInstallPriv (Ptr< Node > node) const
 Install an ns3::UdpEchoServer on the node configured with all the attributes set with SetAttribute. More...
 

Private Attributes

ObjectFactory m_factory
 Object factory. More...
 

Detailed Description

Create a server application which waits for input UDP packets and sends them back to the original sender.

Definition at line 37 of file udp-echo-helper.h.

Constructor & Destructor Documentation

◆ UdpEchoServerHelper()

ns3::UdpEchoServerHelper::UdpEchoServerHelper ( uint16_t  port)

Create UdpEchoServerHelper which will make life easier for people trying to set up simulations with echos.

Parameters
portThe port the server will wait on for incoming packets

Definition at line 28 of file udp-echo-helper.cc.

References ns3::UdpEchoServer::GetTypeId(), m_factory, port, SetAttribute(), and ns3::ObjectFactory::SetTypeId().

+ Here is the call graph for this function:

Member Function Documentation

◆ Install() [1/3]

ApplicationContainer ns3::UdpEchoServerHelper::Install ( NodeContainer  c) const
Parameters
cThe nodes on which to create the Applications. The nodes are specified by a NodeContainer.

Create one udp echo server application on each of the Nodes in the NodeContainer.

Returns
The applications created, one Application per Node in the NodeContainer.

Definition at line 56 of file udp-echo-helper.cc.

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

+ Here is the call graph for this function:

◆ Install() [2/3]

ApplicationContainer ns3::UdpEchoServerHelper::Install ( Ptr< Node node) const

Create a UdpEchoServerApplication on the specified Node.

Parameters
nodeThe node on which to create the Application. The node is specified by a Ptr<Node>.
Returns
An ApplicationContainer holding the Application created,

Definition at line 43 of file udp-echo-helper.cc.

References InstallPriv().

Referenced by LteIpv6RoutingTestCase::DoRun().

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

◆ Install() [3/3]

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

Create a UdpEchoServerApplication on specified node.

Parameters
nodeNameThe node on which to create the application. The node is specified by a node name previously registered with the Object Name Service.
Returns
An ApplicationContainer holding the Application created.

Definition at line 49 of file udp-echo-helper.cc.

References InstallPriv().

+ Here is the call graph for this function:

◆ InstallPriv()

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

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

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

Definition at line 68 of file udp-echo-helper.cc.

References ns3::Node::AddApplication(), ns3::ObjectFactory::Create(), and m_factory.

Referenced by Install().

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

◆ SetAttribute()

void ns3::UdpEchoServerHelper::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 35 of file udp-echo-helper.cc.

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

Referenced by UdpEchoServerHelper().

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

Member Data Documentation

◆ m_factory

ObjectFactory ns3::UdpEchoServerHelper::m_factory
private

Object factory.

Definition at line 99 of file udp-echo-helper.h.

Referenced by UdpEchoServerHelper(), InstallPriv(), and SetAttribute().


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