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

Create and configure several SpectrumPhy instances and connect them to a channel. More...

#include "spectrum-helper.h"

+ Collaboration diagram for ns3::SpectrumPhyHelper:

Public Member Functions

Ptr< SpectrumPhyCreate (Ptr< Node > node, Ptr< NetDevice > device) const
 
void SetChannel (Ptr< SpectrumChannel > channel)
 set the channel that will be used by SpectrumPhy instances created by this helper
 
void SetChannel (std::string channelName)
 set the channel that will be used by SpectrumPhy instances created by this helper
 
template<typename... Ts>
void SetPhy (std::string name, Ts &&... args)
 
void SetPhyAttribute (std::string name, const AttributeValue &v)
 

Private Attributes

Ptr< SpectrumChannelm_channel
 Channel.
 
ObjectFactory m_phy
 Object factory for the phy objects.
 

Detailed Description

Create and configure several SpectrumPhy instances and connect them to a channel.

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

Member Function Documentation

◆ Create()

Ptr< SpectrumPhy > ns3::SpectrumPhyHelper::Create ( Ptr< Node node,
Ptr< NetDevice device 
) const
Parameters
node
device
Returns
a newly created SpectrumPhy instance

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

References ns3::ObjectFactory::Create(), m_channel, m_phy, and NS_ASSERT.

+ Here is the call graph for this function:

◆ SetChannel() [1/2]

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

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

Parameters
channel

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

References m_channel.

◆ SetChannel() [2/2]

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

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

Parameters
channelName

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

References m_channel.

◆ SetPhy()

template<typename... Ts>
void ns3::SpectrumPhyHelper::SetPhy ( std::string  name,
Ts &&...  args 
)
Template Parameters
Ts[deduced] Argument types
Parameters
namethe type of SpectrumPhy to use
[in]argsName and AttributeValue pairs to set.

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

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

+ Here is the call graph for this function:

◆ SetPhyAttribute()

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

Set an attribute of the SpectrumPhy instances to be created

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

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

+ Here is the call graph for this function:

Member Data Documentation

◆ m_channel

Ptr<SpectrumChannel> ns3::SpectrumPhyHelper::m_channel
private

Channel.

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

Referenced by Create(), and SetChannel().

◆ m_phy

ObjectFactory ns3::SpectrumPhyHelper::m_phy
private

Object factory for the phy objects.

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

Referenced by Create(), SetPhy(), and SetPhyAttribute().


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