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

This class can be used to install PeriodicSender applications on a wide range of nodes. More...

#include "periodic-sender-helper.h"

+ Collaboration diagram for ns3::lorawan::PeriodicSenderHelper:

Public Member Functions

 PeriodicSenderHelper ()
 Default constructor.
 
 ~PeriodicSenderHelper ()
 Destructor.
 
ApplicationContainer Install (NodeContainer c) const
 Install a PeriodicSender 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 PeriodicSender 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 SetPacketSize (uint8_t size)
 Set the base value for applications packet size in bytes.
 
void SetPacketSizeRandomVariable (Ptr< RandomVariableStream > rv)
 Set a random variable to enable a random size to be added to the base packet size for each new transmission of PacketSender applications.
 
void SetPeriod (Time period)
 Set the period to be used by the applications created by this helper.
 

Private Member Functions

Ptr< ApplicationInstallPriv (Ptr< Node > node) const
 Install a PeriodicSender 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 factory to create PeriodicSender applications.
 
Ptr< UniformRandomVariablem_initialDelay
 The random variable used to extract a start off delay for each PeriodicSender application.
 
Ptr< UniformRandomVariablem_intervalProb
 The random variable used to pick inter-transmission intervals of different applications from a discrete probability distribution.
 
Time m_period
 The base period with which the application will be set to send messages.
 
uint8_t m_pktSize
 The base packet size.
 
Ptr< RandomVariableStreamm_pktSizeRV
 Whether or not a random component is added to the packet size.
 

Detailed Description

This class can be used to install PeriodicSender applications on a wide range of nodes.

Definition at line 45 of file periodic-sender-helper.h.

Constructor & Destructor Documentation

◆ PeriodicSenderHelper()

ns3::lorawan::PeriodicSenderHelper::PeriodicSenderHelper ( )

Default constructor.

Definition at line 37 of file periodic-sender-helper.cc.

References m_factory, m_initialDelay, m_intervalProb, m_pktSize, m_pktSizeRV, ns3::ObjectBase::SetAttribute(), and ns3::ObjectFactory::SetTypeId().

+ Here is the call graph for this function:

◆ ~PeriodicSenderHelper()

ns3::lorawan::PeriodicSenderHelper::~PeriodicSenderHelper ( )

Destructor.

Definition at line 55 of file periodic-sender-helper.cc.

Member Function Documentation

◆ Install() [1/2]

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

Install a PeriodicSender 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 PeriodicSender will be installed.
Returns
Container of Ptr to the applications installed.

Definition at line 72 of file periodic-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::PeriodicSenderHelper::Install ( Ptr< Node node) const

Install a PeriodicSender 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 PeriodicSender will be installed.
Returns
Container of the Ptr to the application installed.

Definition at line 66 of file periodic-sender-helper.cc.

References InstallPriv().

+ Here is the call graph for this function:

◆ InstallPriv()

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

Install a PeriodicSender 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 PeriodicSender will be installed.
Returns
A pointer to the application installed.

Definition at line 84 of file periodic-sender-helper.cc.

References ns3::ObjectFactory::Create(), ns3::Days(), ns3::UniformRandomVariable::GetValue(), ns3::Hours(), m_factory, m_initialDelay, m_intervalProb, m_period, m_pktSize, m_pktSizeRV, ns3::Minutes(), NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::Seconds().

Referenced by Install().

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

◆ SetAttribute()

void ns3::lorawan::PeriodicSenderHelper::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 60 of file periodic-sender-helper.cc.

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

+ Here is the call graph for this function:

◆ SetPacketSize()

void ns3::lorawan::PeriodicSenderHelper::SetPacketSize ( uint8_t  size)

Set the base value for applications packet size in bytes.

Parameters
sizeThe packet size in bytes.

Definition at line 148 of file periodic-sender-helper.cc.

References m_pktSize.

◆ SetPacketSizeRandomVariable()

void ns3::lorawan::PeriodicSenderHelper::SetPacketSizeRandomVariable ( Ptr< RandomVariableStream rv)

Set a random variable to enable a random size to be added to the base packet size for each new transmission of PacketSender applications.

Parameters
rvThe random variable.

Definition at line 142 of file periodic-sender-helper.cc.

References m_pktSizeRV.

◆ SetPeriod()

void ns3::lorawan::PeriodicSenderHelper::SetPeriod ( Time  period)

Set the period to be used by the applications created by this helper.

A value of Seconds (0) results in randomly generated periods according to the model contained in the TR 45.820 document.

Parameters
periodThe period to set.

Definition at line 136 of file periodic-sender-helper.cc.

References m_period.

Member Data Documentation

◆ m_factory

ObjectFactory ns3::lorawan::PeriodicSenderHelper::m_factory
private

The factory to create PeriodicSender applications.

Definition at line 113 of file periodic-sender-helper.h.

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

◆ m_initialDelay

Ptr<UniformRandomVariable> ns3::lorawan::PeriodicSenderHelper::m_initialDelay
private

The random variable used to extract a start off delay for each PeriodicSender application.

Definition at line 114 of file periodic-sender-helper.h.

Referenced by PeriodicSenderHelper(), and InstallPriv().

◆ m_intervalProb

Ptr<UniformRandomVariable> ns3::lorawan::PeriodicSenderHelper::m_intervalProb
private

The random variable used to pick inter-transmission intervals of different applications from a discrete probability distribution.

Definition at line 117 of file periodic-sender-helper.h.

Referenced by PeriodicSenderHelper(), and InstallPriv().

◆ m_period

Time ns3::lorawan::PeriodicSenderHelper::m_period
private

The base period with which the application will be set to send messages.

Definition at line 119 of file periodic-sender-helper.h.

Referenced by InstallPriv(), and SetPeriod().

◆ m_pktSize

uint8_t ns3::lorawan::PeriodicSenderHelper::m_pktSize
private

The base packet size.

Definition at line 122 of file periodic-sender-helper.h.

Referenced by PeriodicSenderHelper(), InstallPriv(), and SetPacketSize().

◆ m_pktSizeRV

Ptr<RandomVariableStream> ns3::lorawan::PeriodicSenderHelper::m_pktSizeRV
private

Whether or not a random component is added to the packet size.

Definition at line 121 of file periodic-sender-helper.h.

Referenced by PeriodicSenderHelper(), InstallPriv(), and SetPacketSizeRandomVariable().


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