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

Setup a SpectrumChannel. More...

#include "spectrum-helper.h"

+ Collaboration diagram for ns3::SpectrumChannelHelper:

Public Member Functions

void AddPropagationLoss (Ptr< PropagationLossModel > m)
 Add a new single-frequency propagation loss model instance to this channel helper.
 
template<typename... Ts>
void AddPropagationLoss (std::string name, Ts &&... args)
 
void AddSpectrumPropagationLoss (Ptr< SpectrumPropagationLossModel > m)
 Add a new frequency-dependent propagation loss model instance to this channel helper.
 
template<typename... Ts>
void AddSpectrumPropagationLoss (std::string name, Ts &&... args)
 
Ptr< SpectrumChannelCreate () const
 
template<typename... Ts>
void SetChannel (std::string type, Ts &&... args)
 
template<typename... Ts>
void SetPropagationDelay (std::string name, Ts &&... args)
 

Static Public Member Functions

static SpectrumChannelHelper Default ()
 Setup a default SpectrumChannel.
 

Private Attributes

ObjectFactory m_channel
 Channel.
 
ObjectFactory m_propagationDelay
 Propagation delay.
 
Ptr< PropagationLossModelm_propagationLossModel
 Propagation loss model.
 
Ptr< SpectrumPropagationLossModelm_spectrumPropagationLossModel
 Spectrum propagation loss model.
 

Detailed Description

Setup a SpectrumChannel.

Definition at line 33 of file spectrum-helper.h.

Member Function Documentation

◆ AddPropagationLoss() [1/2]

void ns3::SpectrumChannelHelper::AddPropagationLoss ( Ptr< PropagationLossModel > m)

Add a new single-frequency propagation loss model instance to this channel helper.

Parameters
ma pointer to the instance of the propagation loss model

Definition at line 33 of file spectrum-helper.cc.

References m_propagationLossModel.

◆ AddPropagationLoss() [2/2]

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

Add a new single-frequency propagation loss model to this channel helper.

Definition at line 178 of file spectrum-helper.h.

References AddPropagationLoss(), and ns3::ObjectFactory::Create().

Referenced by AddPropagationLoss(), and SpectrumIdealPhyTestCase::DoRun().

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

◆ AddSpectrumPropagationLoss() [1/2]

void ns3::SpectrumChannelHelper::AddSpectrumPropagationLoss ( Ptr< SpectrumPropagationLossModel > m)

Add a new frequency-dependent propagation loss model instance to this channel helper.

Parameters
ma pointer to the instance of the propagation loss model

Definition at line 40 of file spectrum-helper.cc.

References m_spectrumPropagationLossModel.

◆ AddSpectrumPropagationLoss() [2/2]

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

Add a new frequency-dependent propagation loss model to this channel helper.

Definition at line 187 of file spectrum-helper.h.

References AddSpectrumPropagationLoss(), and ns3::ObjectFactory::Create().

Referenced by AddSpectrumPropagationLoss(), and Default().

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

◆ Create()

Ptr< SpectrumChannel > ns3::SpectrumChannelHelper::Create ( ) const
Returns
a new channel

Create a channel based on the configuration parameters set previously.

Definition at line 47 of file spectrum-helper.cc.

References ns3::ObjectFactory::Create(), m_channel, m_propagationDelay, m_propagationLossModel, and m_spectrumPropagationLossModel.

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

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

◆ Default()

SpectrumChannelHelper ns3::SpectrumChannelHelper::Default ( )
static

Setup a default SpectrumChannel.

The Default mode is: Channel: "ns3::SingleModelSpectrumChannel", PropagationDelay: "ns3::ConstantSpeedPropagationDelayModel", and SpectrumPropagationLoss: "ns3::FriisSpectrumPropagationLossModel".

Returns
a Default-configured SpectrumChannelHelper

Definition at line 23 of file spectrum-helper.cc.

References AddSpectrumPropagationLoss(), SetChannel(), and SetPropagationDelay().

Referenced by WaveformGeneratorTestCase::DoRun().

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

◆ SetChannel()

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

Definition at line 170 of file spectrum-helper.h.

References m_channel, ns3::ObjectFactory::Set(), and ns3::ObjectFactory::SetTypeId().

Referenced by Default(), SpectrumIdealPhyTestCase::DoRun(), and WaveformGeneratorTestCase::DoRun().

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

◆ SetPropagationDelay()

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

Configure a propagation delay for this channel.

Definition at line 196 of file spectrum-helper.h.

References m_propagationDelay.

Referenced by Default(), and SpectrumIdealPhyTestCase::DoRun().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_channel

ObjectFactory ns3::SpectrumChannelHelper::m_channel
private

Channel.

Definition at line 109 of file spectrum-helper.h.

Referenced by Create(), and SetChannel().

◆ m_propagationDelay

ObjectFactory ns3::SpectrumChannelHelper::m_propagationDelay
private

Propagation delay.

Definition at line 108 of file spectrum-helper.h.

Referenced by Create(), and SetPropagationDelay().

◆ m_propagationLossModel

Ptr<PropagationLossModel> ns3::SpectrumChannelHelper::m_propagationLossModel
private

Propagation loss model.

Definition at line 107 of file spectrum-helper.h.

Referenced by AddPropagationLoss(), and Create().

◆ m_spectrumPropagationLossModel

Ptr<SpectrumPropagationLossModel> ns3::SpectrumChannelHelper::m_spectrumPropagationLossModel
private

Spectrum propagation loss model.

Definition at line 106 of file spectrum-helper.h.

Referenced by AddSpectrumPropagationLoss(), and Create().


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