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>
36 class SpectrumChannel;
62 template <
typename... Ts>
71 template <
typename... Ts>
88 template <
typename... Ts>
105 template <
typename... Ts>
136 template <
typename... Ts>
179 template <
typename... Ts>
187 template <
typename... Ts>
196 template <
typename... Ts>
205 template <
typename... Ts>
212 template <
typename... Ts>
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.
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.