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

Create a Waveform generator, which can be used to inject specific noise in the channel. More...

#include "waveform-generator-helper.h"

+ Collaboration diagram for ns3::WaveformGeneratorHelper:

Public Member Functions

 WaveformGeneratorHelper ()
 
 ~WaveformGeneratorHelper ()
 
NetDeviceContainer Install (NodeContainer c) const
 
NetDeviceContainer Install (Ptr< Node > node) const
 
NetDeviceContainer Install (std::string nodeName) const
 
template<typename... Ts>
void SetAntenna (std::string type, Ts &&... args)
 
void SetChannel (Ptr< SpectrumChannel > channel)
 set the SpectrumChannel that will be used by SpectrumPhy instances created by this helper
 
void SetChannel (std::string channelName)
 set the SpectrumChannel that will be used by SpectrumPhy instances created by this helper
 
void SetDeviceAttribute (std::string n1, const AttributeValue &v1)
 
void SetPhyAttribute (std::string name, const AttributeValue &v)
 
void SetTxPowerSpectralDensity (Ptr< SpectrumValue > txPsd)
 

Protected Attributes

ObjectFactory m_antenna
 Object factory for the Antenna objects.
 
Ptr< SpectrumChannelm_channel
 Channel.
 
ObjectFactory m_device
 Object factory for the NetDevice objects.
 
ObjectFactory m_phy
 Object factory for the phy objects.
 
Ptr< SpectrumValuem_txPsd
 Tx power spectral density.
 

Detailed Description

Create a Waveform generator, which can be used to inject specific noise in the channel.

Definition at line 42 of file waveform-generator-helper.h.

Constructor & Destructor Documentation

◆ WaveformGeneratorHelper()

ns3::WaveformGeneratorHelper::WaveformGeneratorHelper ( )

Definition at line 38 of file waveform-generator-helper.cc.

References m_antenna, m_device, m_phy, and ns3::ObjectFactory::SetTypeId().

+ Here is the call graph for this function:

◆ ~WaveformGeneratorHelper()

ns3::WaveformGeneratorHelper::~WaveformGeneratorHelper ( )

Definition at line 45 of file waveform-generator-helper.cc.

Member Function Documentation

◆ Install() [1/3]

NetDeviceContainer ns3::WaveformGeneratorHelper::Install ( NodeContainer  c) const
Parameters
cthe set of nodes on which a device must be created
Returns
a device container which contains all the devices created by this method.

Definition at line 82 of file waveform-generator-helper.cc.

References ns3::NodeContainer::Begin(), ns3::ObjectFactory::Create(), ns3::NodeContainer::End(), ns3::Object::GetObject(), m_antenna, m_channel, m_device, m_phy, m_txPsd, NS_ASSERT, and NS_ASSERT_MSG.

Referenced by WaveformGeneratorTestCase::DoRun(), and Install().

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

◆ Install() [2/3]

NetDeviceContainer ns3::WaveformGeneratorHelper::Install ( Ptr< Node node) const
Parameters
nodethe node on which a device must be created
Returns
a device container which contains all the devices created by this method.

Definition at line 122 of file waveform-generator-helper.cc.

References Install().

+ Here is the call graph for this function:

◆ Install() [3/3]

NetDeviceContainer ns3::WaveformGeneratorHelper::Install ( std::string  nodeName) const
Parameters
nodeNamethe name of node on which a device must be created
Returns
a device container which contains all the devices created by this method.

Definition at line 128 of file waveform-generator-helper.cc.

References Install().

+ Here is the call graph for this function:

◆ SetAntenna()

template<typename... Ts>
void ns3::WaveformGeneratorHelper::SetAntenna ( std::string  type,
Ts &&...  args 
)
Template Parameters
Ts[deduced] Argument types
Parameters
typethe type of the model to set
[in]argsName and AttributeValue pairs to set.

Configure the AntennaModel instance for each new device to be created

Definition at line 125 of file waveform-generator-helper.h.

References m_antenna.

◆ SetChannel() [1/2]

void ns3::WaveformGeneratorHelper::SetChannel ( Ptr< SpectrumChannel channel)

set the SpectrumChannel that will be used by SpectrumPhy instances created by this helper

Parameters
channel

Definition at line 50 of file waveform-generator-helper.cc.

References m_channel.

Referenced by WaveformGeneratorTestCase::DoRun().

+ Here is the caller graph for this function:

◆ SetChannel() [2/2]

void ns3::WaveformGeneratorHelper::SetChannel ( std::string  channelName)

set the SpectrumChannel that will be used by SpectrumPhy instances created by this helper

Parameters
channelName

Definition at line 56 of file waveform-generator-helper.cc.

References m_channel.

◆ SetDeviceAttribute()

void ns3::WaveformGeneratorHelper::SetDeviceAttribute ( std::string  n1,
const AttributeValue v1 
)
Parameters
n1the name of the attribute to set
v1the value of the attribute to set

Set these attributes on each AlohaNoackNetDevice created

Definition at line 76 of file waveform-generator-helper.cc.

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

+ Here is the call graph for this function:

◆ SetPhyAttribute()

void ns3::WaveformGeneratorHelper::SetPhyAttribute ( std::string  name,
const AttributeValue v 
)
Parameters
namethe name of the attribute to set
vthe value of the attribute

Set these attributes on each HdOfdmSpectrumPhy instance to be created

Definition at line 70 of file waveform-generator-helper.cc.

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

Referenced by WaveformGeneratorTestCase::DoRun().

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

◆ SetTxPowerSpectralDensity()

void ns3::WaveformGeneratorHelper::SetTxPowerSpectralDensity ( Ptr< SpectrumValue txPsd)
Parameters
txPsdthe Power Spectral Density to be used for transmission by all created PHY instances

Definition at line 63 of file waveform-generator-helper.cc.

References m_txPsd, and NS_LOG_FUNCTION.

Referenced by WaveformGeneratorTestCase::DoRun().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_antenna

ObjectFactory ns3::WaveformGeneratorHelper::m_antenna
protected

Object factory for the Antenna objects.

Definition at line 114 of file waveform-generator-helper.h.

Referenced by WaveformGeneratorHelper(), Install(), and SetAntenna().

◆ m_channel

Ptr<SpectrumChannel> ns3::WaveformGeneratorHelper::m_channel
protected

Channel.

Definition at line 115 of file waveform-generator-helper.h.

Referenced by Install(), and SetChannel().

◆ m_device

ObjectFactory ns3::WaveformGeneratorHelper::m_device
protected

Object factory for the NetDevice objects.

Definition at line 113 of file waveform-generator-helper.h.

Referenced by WaveformGeneratorHelper(), Install(), and SetDeviceAttribute().

◆ m_phy

ObjectFactory ns3::WaveformGeneratorHelper::m_phy
protected

Object factory for the phy objects.

Definition at line 112 of file waveform-generator-helper.h.

Referenced by WaveformGeneratorHelper(), Install(), and SetPhyAttribute().

◆ m_txPsd

Ptr<SpectrumValue> ns3::WaveformGeneratorHelper::m_txPsd
protected

Tx power spectral density.

Definition at line 116 of file waveform-generator-helper.h.

Referenced by Install(), and SetTxPowerSpectralDensity().


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