20#ifndef SPECTRUM_HELPER_H
21#define SPECTRUM_HELPER_H
23#include <ns3/attribute.h>
24#include <ns3/net-device-container.h>
25#include <ns3/node-container.h>
26#include <ns3/object-factory.h>
27#include <ns3/propagation-loss-model.h>
28#include <ns3/spectrum-propagation-loss-model.h>
62 template <
typename... Ts>
63 void SetChannel(std::string type, Ts&&... args);
71 template <
typename... Ts>
88 template <
typename... Ts>
105 template <
typename... Ts>
136 template <
typename... Ts>
137 void SetPhy(std::string name, Ts&&... args);
179template <
typename... Ts>
187template <
typename... Ts>
196template <
typename... Ts>
205template <
typename... Ts>
212template <
typename... Ts>
217 m_phy.
Set(std::forward<Ts>(args)...);
Hold a value for an Attribute.
Instantiate subclasses of ns3::Object.
Ptr< Object > Create() const
Create an Object instance of the configured TypeId.
void Set(const std::string &name, const AttributeValue &value, Args &&... args)
Set an attribute to be set during construction.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
Models the propagation loss through a transmission medium.
Smart pointer class similar to boost::intrusive_ptr.
ObjectFactory m_propagationDelay
Propagation delay.
ObjectFactory m_channel
Channel.
Ptr< SpectrumChannel > Create() const
void AddPropagationLoss(std::string name, Ts &&... args)
static SpectrumChannelHelper Default()
Setup a default SpectrumChannel.
void AddSpectrumPropagationLoss(std::string name, Ts &&... args)
void SetPropagationDelay(std::string name, Ts &&... args)
void SetChannel(std::string type, Ts &&... args)
Ptr< SpectrumPropagationLossModel > m_spectrumPropagationLossModel
Spectrum propagation loss model.
Ptr< PropagationLossModel > m_propagationLossModel
Propagation loss model.
Create and configure several SpectrumPhy instances and connect them to a channel.
void SetChannel(Ptr< SpectrumChannel > channel)
set the channel that will be used by SpectrumPhy instances created by this helper
Ptr< SpectrumChannel > m_channel
Channel.
ObjectFactory m_phy
Object factory for the phy objects.
void SetPhyAttribute(std::string name, const AttributeValue &v)
Ptr< SpectrumPhy > Create(Ptr< Node > node, Ptr< NetDevice > device) const
void SetPhy(std::string name, Ts &&... args)
spectrum-aware propagation loss model
Every class exported by the ns3 library is enclosed in the ns3 namespace.