ns3::SatOnOffHelper Class Reference

A helper to make it easier to instantiate an ns3::SatOnOffApplication on a set of nodes. More...

#include "satellite-on-off-helper.h"

Public Member Functions

 SatOnOffHelper (std::string protocol, Address address)
 Create an SatOnOffHelper to make it easier to work with SatOnOffApplications. More...
 
ApplicationContainer Install (NodeContainer c) const
 Install an ns3::SatOnOffApplication on each node of the input container configured with all the attributes set with SetAttribute. More...
 
ApplicationContainer Install (Ptr< Node > node) const
 Install an ns3::SatOnOffApplication on the node configured with all the attributes set with SetAttribute. More...
 
void SetAttribute (std::string name, const AttributeValue &value)
 Helper function used to set the underlying application attributes. More...
 
void SetConstantRate (DataRate dataRate, uint32_t packetSize=512)
 Helper function to set a constant rate source. More...
 

Private Member Functions

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

Private Attributes

ObjectFactory m_factory
 Object factory. More...
 

Detailed Description

A helper to make it easier to instantiate an ns3::SatOnOffApplication on a set of nodes.

Definition at line 43 of file satellite-on-off-helper.h.

Constructor & Destructor Documentation

◆ SatOnOffHelper()

ns3::SatOnOffHelper::SatOnOffHelper ( std::string  protocol,
Address  address 
)

Create an SatOnOffHelper to make it easier to work with SatOnOffApplications.

Parameters
protocolthe name of the protocol to use to send traffic by the applications. This string identifies the socket factory type used to create sockets for the applications. A typical value would be ns3::UdpSocketFactory.
addressthe address of the remote node to send traffic to.

Definition at line 29 of file satellite-on-off-helper.cc.

References m_factory.

Member Function Documentation

◆ Install() [1/2]

ApplicationContainer ns3::SatOnOffHelper::Install ( NodeContainer  c) const

Install an ns3::SatOnOffApplication on each node of the input container configured with all the attributes set with SetAttribute.

Parameters
cNodeContainer of the set of nodes on which an SatOnOffApplication will be installed.
Returns
Container of Ptr to the applications installed.

Definition at line 49 of file satellite-on-off-helper.cc.

References InstallPriv().

Referenced by ns3::SatTrafficHelper::AddPoissonTraffic(), ns3::SatTrafficHelper::AddVoipTraffic(), and ns3::SimulationHelper::InstallTrafficModel().

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

◆ Install() [2/2]

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

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

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

Definition at line 43 of file satellite-on-off-helper.cc.

References InstallPriv().

+ Here is the call graph for this function:

◆ InstallPriv()

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

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

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

Definition at line 61 of file satellite-on-off-helper.cc.

References m_factory.

Referenced by Install().

+ Here is the caller graph for this function:

◆ SetAttribute()

void ns3::SatOnOffHelper::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 37 of file satellite-on-off-helper.cc.

References m_factory.

Referenced by ns3::SatTrafficHelper::AddPoissonTraffic(), ns3::SatTrafficHelper::AddVoipTraffic(), and ns3::SimulationHelper::InstallTrafficModel().

+ Here is the caller graph for this function:

◆ SetConstantRate()

void ns3::SatOnOffHelper::SetConstantRate ( DataRate  dataRate,
uint32_t  packetSize = 512 
)

Helper function to set a constant rate source.

Equivalent to setting the attributes OnTime to constant 1000 seconds, OffTime to constant 0 seconds, and the DataRate and PacketSize set accordingly

Parameters
dataRateDataRate object for the sending rate
packetSizesize in bytes of the packet payloads generated

Definition at line 70 of file satellite-on-off-helper.cc.

References m_factory.

Member Data Documentation

◆ m_factory

ObjectFactory ns3::SatOnOffHelper::m_factory
private

Object factory.

Definition at line 104 of file satellite-on-off-helper.h.

Referenced by SatOnOffHelper(), InstallPriv(), SetAttribute(), and SetConstantRate().


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