A helper to make it easier to instantiate an ns3::PacketSinkApplication on a set of nodes. More...
#include "packet-sink-helper.h"
Public Member Functions | |
PacketSinkHelper (std::string protocol, Address address) | |
Create a PacketSinkHelper to make it easier to work with PacketSinkApplications. | |
ApplicationContainer | Install (NodeContainer c) const |
Install an ns3::PacketSinkApplication on each node of the input container configured with all the attributes set with SetAttribute. | |
ApplicationContainer | Install (Ptr< Node > node) const |
Install an ns3::PacketSinkApplication on each node of the input container configured with all the attributes set with SetAttribute. | |
ApplicationContainer | Install (std::string nodeName) const |
Install an ns3::PacketSinkApplication on each node of the input container 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. | |
Private Member Functions | |
Ptr< Application > | InstallPriv (Ptr< Node > node) const |
Install an ns3::PacketSink on the node configured with all the attributes set with SetAttribute. | |
Private Attributes | |
ObjectFactory | m_factory |
Object factory. | |
A helper to make it easier to instantiate an ns3::PacketSinkApplication on a set of nodes.
Definition at line 35 of file packet-sink-helper.h.
ns3::PacketSinkHelper::PacketSinkHelper | ( | std::string | protocol, |
Address | address | ||
) |
Create a PacketSinkHelper to make it easier to work with PacketSinkApplications.
protocol | the name of the protocol to use to receive traffic This string identifies the socket factory type used to create sockets for the applications. A typical value would be ns3::TcpSocketFactory. |
address | the address of the sink, |
Definition at line 29 of file packet-sink-helper.cc.
References m_factory, ns3::ObjectFactory::Set(), and ns3::ObjectFactory::SetTypeId().
ApplicationContainer ns3::PacketSinkHelper::Install | ( | NodeContainer | c | ) | const |
Install an ns3::PacketSinkApplication on each node of the input container configured with all the attributes set with SetAttribute.
c | NodeContainer of the set of nodes on which a PacketSinkApplication will be installed. |
Definition at line 56 of file packet-sink-helper.cc.
References ns3::ApplicationContainer::Add(), ns3::NodeContainer::Begin(), ns3::NodeContainer::End(), and InstallPriv().
Referenced by BuildAppsTest(), BulkSendBasicTestCase::DoRun(), BulkSendSeqTsSizeTestCase::DoRun(), BriteTopologyFunctionTestCase::DoRun(), LenaCqaFfMacSchedulerTestCase1::DoRun(), LenaCqaFfMacSchedulerTestCase2::DoRun(), ns3::LenaDeactivateBearerTestCase::DoRun(), LenaFdTbfqFfMacSchedulerTestCase1::DoRun(), LenaFdTbfqFfMacSchedulerTestCase2::DoRun(), LteDistributedFfrAreaTestCase::DoRun(), LenaPssFfMacSchedulerTestCase1::DoRun(), LenaPssFfMacSchedulerTestCase2::DoRun(), LteRadioLinkFailureTestCase::DoRun(), LenaTdTbfqFfMacSchedulerTestCase1::DoRun(), LenaTdTbfqFfMacSchedulerTestCase2::DoRun(), LteX2HandoverMeasuresTestCase::DoRun(), LteX2HandoverTestCase::DoRun(), WifiAcMappingTest::DoRun(), WifiMsduAggregatorThroughputTest::DoRun(), and experiment().
ApplicationContainer ns3::PacketSinkHelper::Install | ( | Ptr< Node > | node | ) | const |
Install an ns3::PacketSinkApplication on each node of the input container configured with all the attributes set with SetAttribute.
node | The node on which a PacketSinkApplication will be installed. |
Definition at line 43 of file packet-sink-helper.cc.
References InstallPriv().
ApplicationContainer ns3::PacketSinkHelper::Install | ( | std::string | nodeName | ) | const |
Install an ns3::PacketSinkApplication on each node of the input container configured with all the attributes set with SetAttribute.
nodeName | The name of the node on which a PacketSinkApplication will be installed. |
Definition at line 49 of file packet-sink-helper.cc.
References InstallPriv().
|
private |
Install an ns3::PacketSink on the node configured with all the attributes set with SetAttribute.
node | The node on which an PacketSink will be installed. |
Definition at line 68 of file packet-sink-helper.cc.
References ns3::ObjectFactory::Create(), and m_factory.
Referenced by Install().
void ns3::PacketSinkHelper::SetAttribute | ( | 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 37 of file packet-sink-helper.cc.
References m_factory, and ns3::ObjectFactory::Set().
Referenced by BulkSendSeqTsSizeTestCase::DoRun(), and experiment().
|
private |
Object factory.
Definition at line 95 of file packet-sink-helper.h.
Referenced by PacketSinkHelper(), InstallPriv(), and SetAttribute().