Create a server application which waits for input UDP packets and uses the information carried into their payload to compute delay and to determine if some packets are lost. More...
#include "udp-client-server-helper.h"
Public Member Functions | |
UdpServerHelper () | |
Create UdpServerHelper which will make life easier for people trying to set up simulations with udp-client-server application. More... | |
UdpServerHelper (uint16_t port) | |
Create UdpServerHelper which will make life easier for people trying to set up simulations with udp-client-server application. More... | |
Ptr< UdpServer > | GetServer (void) |
Return the last created server. More... | |
ApplicationContainer | Install (NodeContainer c) |
Create one UDP server application on each of the Nodes in the NodeContainer. 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 Attributes | |
ObjectFactory | m_factory |
Object factory. More... | |
Ptr< UdpServer > | m_server |
The last created server application. More... | |
Create a server application which waits for input UDP packets and uses the information carried into their payload to compute delay and to determine if some packets are lost.
Definition at line 37 of file udp-client-server-helper.h.
ns3::UdpServerHelper::UdpServerHelper | ( | ) |
Create UdpServerHelper which will make life easier for people trying to set up simulations with udp-client-server application.
Definition at line 29 of file udp-client-server-helper.cc.
References ns3::UdpServer::GetTypeId(), m_factory, and ns3::ObjectFactory::SetTypeId().
ns3::UdpServerHelper::UdpServerHelper | ( | uint16_t | port | ) |
Create UdpServerHelper which will make life easier for people trying to set up simulations with udp-client-server application.
port | The port the server will wait on for incoming packets |
Definition at line 34 of file udp-client-server-helper.cc.
References ns3::UdpServer::GetTypeId(), m_factory, port, SetAttribute(), and ns3::ObjectFactory::SetTypeId().
Return the last created server.
This function is mainly used for testing.
Definition at line 63 of file udp-client-server-helper.cc.
References m_server.
Referenced by UdpClientServerTestCase::DoRun(), and UdpTraceClientServerTestCase::DoRun().
ApplicationContainer ns3::UdpServerHelper::Install | ( | NodeContainer | c | ) |
Create one UDP server application on each of the Nodes in the NodeContainer.
c | The nodes on which to create the Applications. The nodes are specified by a NodeContainer. |
Definition at line 47 of file udp-client-server-helper.cc.
References ns3::ApplicationContainer::Add(), ns3::Node::AddApplication(), ns3::NodeContainer::Begin(), ns3::ObjectFactory::Create(), ns3::NodeContainer::End(), m_factory, and m_server.
Referenced by UdpClientServerTestCase::DoRun(), UdpTraceClientServerTestCase::DoRun(), and Experiment::Run().
void ns3::UdpServerHelper::SetAttribute | ( | std::string | name, |
const AttributeValue & | value | ||
) |
Record an attribute to be set in each Application after it is is created.
name | the name of the attribute to set |
value | the value of the attribute to set |
Definition at line 41 of file udp-client-server-helper.cc.
References m_factory, and ns3::ObjectFactory::Set().
Referenced by UdpServerHelper().
|
private |
Object factory.
Definition at line 83 of file udp-client-server-helper.h.
Referenced by Install(), SetAttribute(), and UdpServerHelper().
The last created server application.
Definition at line 84 of file udp-client-server-helper.h.
Referenced by GetServer(), and Install().