A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::lorawan::OneShotSenderHelper Class Reference

This class can be used to install OneShotSender applications on multiple nodes at once. More...

#include "one-shot-sender-helper.h"

+ Collaboration diagram for ns3::lorawan::OneShotSenderHelper:

Public Member Functions

 OneShotSenderHelper ()
 Default constructor.
 
 ~OneShotSenderHelper ()
 Destructor.
 
ApplicationContainer Install (NodeContainer c) const
 Install a OneShotSender application on each node of the input container configured with all the attributes set with SetAttribute or other functions of this class.
 
ApplicationContainer Install (Ptr< Node > node) const
 Install a OneShotSender application on the input Node configured with all the attributes set with SetAttribute or other functions of this class.
 
void SetAttribute (std::string name, const AttributeValue &value)
 Helper function used to set the underlying application attributes.
 
void SetSendTime (Time sendTime)
 Set the send time of the applications.
 

Private Member Functions

Ptr< ApplicationInstallPriv (Ptr< Node > node) const
 Install a OneShotSender application on the input Node configured with all the attributes set with SetAttribute or other functions of this class.
 

Private Attributes

ObjectFactory m_factory
 The object factory.
 
Time m_sendTime
 Time at which the OneShotSender applications will be configured to send the packet.
 

Detailed Description

This class can be used to install OneShotSender applications on multiple nodes at once.

Definition at line 44 of file one-shot-sender-helper.h.

Constructor & Destructor Documentation

◆ OneShotSenderHelper()

ns3::lorawan::OneShotSenderHelper::OneShotSenderHelper ( )

Default constructor.

Definition at line 36 of file one-shot-sender-helper.cc.

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

+ Here is the call graph for this function:

◆ ~OneShotSenderHelper()

ns3::lorawan::OneShotSenderHelper::~OneShotSenderHelper ( )

Destructor.

Definition at line 41 of file one-shot-sender-helper.cc.

Member Function Documentation

◆ Install() [1/2]

ApplicationContainer ns3::lorawan::OneShotSenderHelper::Install ( NodeContainer  c) const

Install a OneShotSender application on each node of the input container configured with all the attributes set with SetAttribute or other functions of this class.

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

Definition at line 64 of file one-shot-sender-helper.cc.

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

+ Here is the call graph for this function:

◆ Install() [2/2]

ApplicationContainer ns3::lorawan::OneShotSenderHelper::Install ( Ptr< Node node) const

Install a OneShotSender application on the input Node configured with all the attributes set with SetAttribute or other functions of this class.

Parameters
nodeThe node on which a OneShotSender will be installed.
Returns
Container of the Ptr to the application installed.

Definition at line 58 of file one-shot-sender-helper.cc.

References InstallPriv().

+ Here is the call graph for this function:

◆ InstallPriv()

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

Install a OneShotSender application on the input Node configured with all the attributes set with SetAttribute or other functions of this class.

Parameters
nodeThe node on which a OneShotSender will be installed.
Returns
A pointer to the applications installed.

Definition at line 76 of file one-shot-sender-helper.cc.

References ns3::ObjectFactory::Create(), m_factory, m_sendTime, and NS_LOG_FUNCTION.

Referenced by Install().

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

◆ SetAttribute()

void ns3::lorawan::OneShotSenderHelper::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 52 of file one-shot-sender-helper.cc.

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

+ Here is the call graph for this function:

◆ SetSendTime()

void ns3::lorawan::OneShotSenderHelper::SetSendTime ( Time  sendTime)

Set the send time of the applications.

Parameters
sendTimeThe Time to set.
Todo:
It does not make sense that all applications send at the exact same time.

Definition at line 46 of file one-shot-sender-helper.cc.

References m_sendTime.

Member Data Documentation

◆ m_factory

ObjectFactory ns3::lorawan::OneShotSenderHelper::m_factory
private

The object factory.

Definition at line 95 of file one-shot-sender-helper.h.

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

◆ m_sendTime

Time ns3::lorawan::OneShotSenderHelper::m_sendTime
private

Time at which the OneShotSender applications will be configured to send the packet.

Definition at line 96 of file one-shot-sender-helper.h.

Referenced by InstallPriv(), and SetSendTime().


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