A Discrete-Event Network Simulator
API
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
ns3::SpectrumChannelHelper Class Reference

Setup a SpectrumChannel. More...

#include "spectrum-helper.h"

Public Member Functions

void AddPropagationLoss (std::string name, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue())
 
void AddPropagationLoss (Ptr< PropagationLossModel > m)
 Add a new single-frequency propagation loss model instance to this channel helper. More...
 
void AddSpectrumPropagationLoss (std::string name, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue())
 
void AddSpectrumPropagationLoss (Ptr< SpectrumPropagationLossModel > m)
 Add a new frequency-dependent propagation loss model instance to this channel helper. More...
 
Ptr< SpectrumChannelCreate (void) const
 
void SetChannel (std::string type, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue())
 
void SetPropagationDelay (std::string name, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue())
 

Static Public Member Functions

static SpectrumChannelHelper Default ()
 Setup a default SpectrumChannel. More...
 

Private Attributes

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

Detailed Description

Setup a SpectrumChannel.

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

Member Function Documentation

◆ AddPropagationLoss() [1/2]

void ns3::SpectrumChannelHelper::AddPropagationLoss ( std::string  name,
std::string  n0 = "",
const AttributeValue v0 = EmptyAttributeValue (),
std::string  n1 = "",
const AttributeValue v1 = EmptyAttributeValue (),
std::string  n2 = "",
const AttributeValue v2 = EmptyAttributeValue (),
std::string  n3 = "",
const AttributeValue v3 = EmptyAttributeValue (),
std::string  n4 = "",
const AttributeValue v4 = EmptyAttributeValue (),
std::string  n5 = "",
const AttributeValue v5 = EmptyAttributeValue (),
std::string  n6 = "",
const AttributeValue v6 = EmptyAttributeValue (),
std::string  n7 = "",
const AttributeValue v7 = EmptyAttributeValue () 
)
Parameters
namethe name of the model to set
n0the name of the attribute to set
v0the value of the attribute to set
n1the name of the attribute to set
v1the value of the attribute to set
n2the name of the attribute to set
v2the value of the attribute to set
n3the name of the attribute to set
v3the value of the attribute to set
n4the name of the attribute to set
v4the value of the attribute to set
n5the name of the attribute to set
v5the value of the attribute to set
n6the name of the attribute to set
v6the value of the attribute to set
n7the name of the attribute to set
v7the value of the attribute to set

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

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

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

Referenced by SpectrumIdealPhyTestCase::DoRun().

◆ AddPropagationLoss() [2/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 94 of file spectrum-helper.cc.

References m_propagationLossModel, and ns3::PropagationLossModel::SetNext().

◆ AddSpectrumPropagationLoss() [1/2]

void ns3::SpectrumChannelHelper::AddSpectrumPropagationLoss ( std::string  name,
std::string  n0 = "",
const AttributeValue v0 = EmptyAttributeValue (),
std::string  n1 = "",
const AttributeValue v1 = EmptyAttributeValue (),
std::string  n2 = "",
const AttributeValue v2 = EmptyAttributeValue (),
std::string  n3 = "",
const AttributeValue v3 = EmptyAttributeValue (),
std::string  n4 = "",
const AttributeValue v4 = EmptyAttributeValue (),
std::string  n5 = "",
const AttributeValue v5 = EmptyAttributeValue (),
std::string  n6 = "",
const AttributeValue v6 = EmptyAttributeValue (),
std::string  n7 = "",
const AttributeValue v7 = EmptyAttributeValue () 
)
Parameters
namethe name of the model to set
n0the name of the attribute to set
v0the value of the attribute to set
n1the name of the attribute to set
v1the value of the attribute to set
n2the name of the attribute to set
v2the value of the attribute to set
n3the name of the attribute to set
v3the value of the attribute to set
n4the name of the attribute to set
v4the value of the attribute to set
n5the name of the attribute to set
v5the value of the attribute to set
n6the name of the attribute to set
v6the value of the attribute to set
n7the name of the attribute to set
v7the value of the attribute to set

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

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

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

Referenced by Default().

◆ AddSpectrumPropagationLoss() [2/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 126 of file spectrum-helper.cc.

References m_spectrumPropagationLossModel.

◆ Create()

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

Create a channel based on the configuration parameters set previously.

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

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

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

◆ Default()

SpectrumChannelHelper ns3::SpectrumChannelHelper::Default ( void  )
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 35 of file spectrum-helper.cc.

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

◆ SetChannel()

void ns3::SpectrumChannelHelper::SetChannel ( std::string  type,
std::string  n0 = "",
const AttributeValue v0 = EmptyAttributeValue (),
std::string  n1 = "",
const AttributeValue v1 = EmptyAttributeValue (),
std::string  n2 = "",
const AttributeValue v2 = EmptyAttributeValue (),
std::string  n3 = "",
const AttributeValue v3 = EmptyAttributeValue (),
std::string  n4 = "",
const AttributeValue v4 = EmptyAttributeValue (),
std::string  n5 = "",
const AttributeValue v5 = EmptyAttributeValue (),
std::string  n6 = "",
const AttributeValue v6 = EmptyAttributeValue (),
std::string  n7 = "",
const AttributeValue v7 = EmptyAttributeValue () 
)
Parameters
typethe type of the SpectrumChannel to use
n0the name of the attribute to set
v0the value of the attribute to set
n1the name of the attribute to set
v1the value of the attribute to set
n2the name of the attribute to set
v2the value of the attribute to set
n3the name of the attribute to set
v3the value of the attribute to set
n4the name of the attribute to set
v4the value of the attribute to set
n5the name of the attribute to set
v5the value of the attribute to set
n6the name of the attribute to set
v6the value of the attribute to set
n7the name of the attribute to set
v7the value of the attribute to set

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

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

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

◆ SetPropagationDelay()

void ns3::SpectrumChannelHelper::SetPropagationDelay ( std::string  name,
std::string  n0 = "",
const AttributeValue v0 = EmptyAttributeValue (),
std::string  n1 = "",
const AttributeValue v1 = EmptyAttributeValue (),
std::string  n2 = "",
const AttributeValue v2 = EmptyAttributeValue (),
std::string  n3 = "",
const AttributeValue v3 = EmptyAttributeValue (),
std::string  n4 = "",
const AttributeValue v4 = EmptyAttributeValue (),
std::string  n5 = "",
const AttributeValue v5 = EmptyAttributeValue (),
std::string  n6 = "",
const AttributeValue v6 = EmptyAttributeValue (),
std::string  n7 = "",
const AttributeValue v7 = EmptyAttributeValue () 
)
Parameters
namethe name of the model to set
n0the name of the attribute to set
v0the value of the attribute to set
n1the name of the attribute to set
v1the value of the attribute to set
n2the name of the attribute to set
v2the value of the attribute to set
n3the name of the attribute to set
v3the value of the attribute to set
n4the name of the attribute to set
v4the value of the attribute to set
n5the name of the attribute to set
v5the value of the attribute to set
n6the name of the attribute to set
v6the value of the attribute to set
n7the name of the attribute to set
v7the value of the attribute to set

Configure a propagation delay for this channel.

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

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

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

Member Data Documentation

◆ m_channel

ObjectFactory ns3::SpectrumChannelHelper::m_channel
private

Channel.

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

Referenced by Create(), and SetChannel().

◆ m_propagationDelay

ObjectFactory ns3::SpectrumChannelHelper::m_propagationDelay
private

Propagation delay.

Definition at line 203 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 202 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 201 of file spectrum-helper.h.

Referenced by AddSpectrumPropagationLoss(), and Create().


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