A helper to make it easier to instantiate an application on a set of nodes. More...
#include "application-helper.h"
Public Member Functions | |
ApplicationHelper (const std::string &typeId) | |
Create an application of a given type ID. | |
ApplicationHelper (TypeId typeId) | |
Create an application of a given type ID. | |
int64_t | AssignStreams (NodeContainer c, int64_t stream) |
Assigns a unique (monotonically increasing) stream number to all applications that match the configured type of this application helper instance. | |
ApplicationContainer | Install (const std::string &nodeName) |
Install an application on the node configured with all the attributes set with SetAttribute. | |
ApplicationContainer | Install (NodeContainer c) |
Install an application on each node of the input container configured with all the attributes set with SetAttribute. | |
ApplicationContainer | Install (Ptr< Node > node) |
Install an application on the node configured with all the attributes set with SetAttribute. | |
void | SetAttribute (const std::string &name, const AttributeValue &value) |
Helper function used to set the underlying application attributes. | |
void | SetTypeId (const std::string &typeId) |
Allow the helper to be repurposed for another application type. | |
void | SetTypeId (TypeId typeId) |
Allow the helper to be repurposed for another application type. | |
Static Public Member Functions | |
static int64_t | AssignStreamsToAllApps (NodeContainer c, int64_t stream) |
Assign a fixed random variable stream number to the random variables used by all the applications. | |
Protected Member Functions | |
virtual Ptr< Application > | DoInstall (Ptr< Node > node) |
Install an application on the node configured with all the attributes set with SetAttribute. | |
Protected Attributes | |
ObjectFactory | m_factory |
Object factory. | |
A helper to make it easier to instantiate an application on a set of nodes.
Definition at line 27 of file application-helper.h.
|
explicit |
Create an application of a given type ID.
typeId | the type ID. |
Definition at line 18 of file application-helper.cc.
References SetTypeId().
|
explicit |
Create an application of a given type ID.
typeId | the type ID expressed as a string. |
Definition at line 23 of file application-helper.cc.
References SetTypeId().
int64_t ns3::ApplicationHelper::AssignStreams | ( | NodeContainer | c, |
int64_t | stream ) |
Assigns a unique (monotonically increasing) stream number to all applications that match the configured type of this application helper instance.
Return the number of streams (possibly zero) that have been assigned. The Install() method should have previously been called by the user.
stream | first stream index to use |
c | NodeContainer of the set of nodes for which the application should be modified to use a fixed stream |
Definition at line 81 of file application-helper.cc.
References ns3::NodeContainer::Begin(), ns3::NodeContainer::End(), ns3::ObjectFactory::GetTypeId(), ns3::ObjectFactory::IsTypeIdSet(), m_factory, and NS_ABORT_MSG_IF.
|
static |
Assign a fixed random variable stream number to the random variables used by all the applications.
Return the number of streams (possibly zero) that have been assigned. The Install() method should have previously been called by the user.
stream | first stream index to use |
c | NodeContainer of the set of nodes for which their applications should be modified to use a fixed stream |
Definition at line 101 of file application-helper.cc.
References ns3::NodeContainer::Begin(), and ns3::NodeContainer::End().
|
protectedvirtual |
Install an application on the node configured with all the attributes set with SetAttribute.
node | The node on which an application will be installed. |
Reimplemented in ns3::RadvdHelper.
Definition at line 72 of file application-helper.cc.
References ns3::ObjectFactory::Create(), m_factory, and NS_ABORT_MSG_IF.
Referenced by Install(), Install(), and Install().
ApplicationContainer ns3::ApplicationHelper::Install | ( | const std::string & | nodeName | ) |
Install an application on the node configured with all the attributes set with SetAttribute.
nodeName | The node on which an application will be installed. |
Definition at line 53 of file application-helper.cc.
References DoInstall(), ns3::Names::Find(), and NS_ABORT_MSG_IF.
ApplicationContainer ns3::ApplicationHelper::Install | ( | NodeContainer | c | ) |
Install an application on each node of the input container configured with all the attributes set with SetAttribute.
c | NodeContainer of the set of nodes on which an application will be installed. |
Definition at line 61 of file application-helper.cc.
References ns3::ApplicationContainer::Add(), ns3::NodeContainer::Begin(), DoInstall(), and ns3::NodeContainer::End().
Referenced by BuildAppsTest(), BuildAppsTest(), CreateBulkFlow(), CreateOnOffFlow(), BriteTopologyFunctionTestCase::DoRun(), BulkSendBasicTestCase::DoRun(), BulkSendSeqTsSizeTestCase::DoRun(), CsmaPingTestCase::DoRun(), LenaCqaFfMacSchedulerTestCase1::DoRun(), LenaCqaFfMacSchedulerTestCase2::DoRun(), LenaFdTbfqFfMacSchedulerTestCase1::DoRun(), LenaFdTbfqFfMacSchedulerTestCase2::DoRun(), LenaPssFfMacSchedulerTestCase1::DoRun(), LenaPssFfMacSchedulerTestCase2::DoRun(), LenaTdTbfqFfMacSchedulerTestCase1::DoRun(), LenaTdTbfqFfMacSchedulerTestCase2::DoRun(), LteDistributedFfrAreaTestCase::DoRun(), LteIpv6RoutingTestCase::DoRun(), LteRadioLinkFailureTestCase::DoRun(), LteX2HandoverMeasuresTestCase::DoRun(), LteX2HandoverTestCase::DoRun(), ns3::LenaDeactivateBearerTestCase::DoRun(), Ns3TcpCubicTestCase::DoRun(), RadvdTestCase::DoRun(), ThreeGppHttpObjectTestCase::DoRun(), UdpClientServerTestCase::DoRun(), UdpTraceClientServerTestCase::DoRun(), WifiAcMappingTest::DoRun(), WifiMsduAggregatorThroughputTest::DoRun(), experiment(), experiment(), AodvExample::InstallApplications(), DsdvManetExample::InstallApplications(), TracerouteExample::InstallApplications(), InstallBulkSend(), and RoutingExperiment::Run().
ApplicationContainer ns3::ApplicationHelper::Install | ( | Ptr< Node > | node | ) |
Install an application on the node configured with all the attributes set with SetAttribute.
node | The node on which an application will be installed. |
Definition at line 47 of file application-helper.cc.
References DoInstall().
void ns3::ApplicationHelper::SetAttribute | ( | const std::string & | name, |
const AttributeValue & | value ) |
Helper function used to set the underlying application attributes.
name | the name of the application attribute to set |
value | the value of the application attribute to set |
Definition at line 41 of file application-helper.cc.
References m_factory, and ns3::ObjectFactory::Set().
Referenced by ns3::UdpClientHelper::UdpClientHelper(), ns3::UdpClientHelper::UdpClientHelper(), ns3::UdpEchoClientHelper::UdpEchoClientHelper(), ns3::UdpEchoClientHelper::UdpEchoClientHelper(), ns3::UdpEchoServerHelper::UdpEchoServerHelper(), ns3::UdpServerHelper::UdpServerHelper(), ns3::UdpTraceClientHelper::UdpTraceClientHelper(), ns3::UdpTraceClientHelper::UdpTraceClientHelper(), BuildAppsTest(), BuildAppsTest(), CreateBulkFlow(), CreateOnOffFlow(), BriteTopologyFunctionTestCase::DoRun(), BulkSendBasicTestCase::DoRun(), BulkSendSeqTsSizeTestCase::DoRun(), LenaCqaFfMacSchedulerTestCase1::DoRun(), LenaCqaFfMacSchedulerTestCase2::DoRun(), LenaFdTbfqFfMacSchedulerTestCase1::DoRun(), LenaFdTbfqFfMacSchedulerTestCase2::DoRun(), LenaPssFfMacSchedulerTestCase1::DoRun(), LenaPssFfMacSchedulerTestCase2::DoRun(), LenaTdTbfqFfMacSchedulerTestCase1::DoRun(), LenaTdTbfqFfMacSchedulerTestCase2::DoRun(), LteDistributedFfrAreaTestCase::DoRun(), LteIpv6RoutingTestCase::DoRun(), LteRadioLinkFailureTestCase::DoRun(), LteX2HandoverMeasuresTestCase::DoRun(), ns3::LenaDeactivateBearerTestCase::DoRun(), Ns3TcpCubicTestCase::DoRun(), UdpClientServerTestCase::DoRun(), UdpTraceClientServerTestCase::DoRun(), experiment(), experiment(), AodvExample::InstallApplications(), DsdvManetExample::InstallApplications(), TracerouteExample::InstallApplications(), InstallBulkSend(), and RoutingExperiment::Run().
void ns3::ApplicationHelper::SetTypeId | ( | const std::string & | typeId | ) |
Allow the helper to be repurposed for another application type.
typeId | the type ID expressed as a string. |
Definition at line 35 of file application-helper.cc.
References m_factory, and ns3::ObjectFactory::SetTypeId().
void ns3::ApplicationHelper::SetTypeId | ( | TypeId | typeId | ) |
Allow the helper to be repurposed for another application type.
typeId | the type ID. |
Definition at line 29 of file application-helper.cc.
References m_factory, and ns3::ObjectFactory::SetTypeId().
Referenced by ApplicationHelper(), and ApplicationHelper().
|
protected |
Object factory.
Definition at line 129 of file application-helper.h.
Referenced by ns3::BulkSendHelper::BulkSendHelper(), ns3::OnOffHelper::OnOffHelper(), ns3::PacketSinkHelper::PacketSinkHelper(), ns3::PingHelper::PingHelper(), ns3::ThreeGppHttpClientHelper::ThreeGppHttpClientHelper(), ns3::ThreeGppHttpServerHelper::ThreeGppHttpServerHelper(), ns3::V4TraceRouteHelper::V4TraceRouteHelper(), AssignStreams(), DoInstall(), ns3::RadvdHelper::DoInstall(), SetAttribute(), ns3::OnOffHelper::SetConstantRate(), SetTypeId(), and SetTypeId().