21 #include <ns3/simulator.h>
22 #include <ns3/config.h>
23 #include <ns3/names.h>
24 #include <ns3/spectrum-channel.h>
25 #include <ns3/spectrum-phy.h>
26 #include <ns3/single-model-spectrum-channel.h>
27 #include <ns3/multi-model-spectrum-channel.h>
28 #include <ns3/half-duplex-ideal-phy.h>
38 h.
SetChannel (
"ns3::SingleModelSpectrumChannel");
113 factory.
Set (n0, v0);
114 factory.
Set (n1, v1);
115 factory.
Set (n2, v2);
116 factory.
Set (n3, v3);
117 factory.
Set (n4, v4);
118 factory.
Set (n5, v5);
119 factory.
Set (n6, v6);
120 factory.
Set (n7, v7);
145 factory.
Set (n0, v0);
146 factory.
Set (n1, v1);
147 factory.
Set (n2, v2);
148 factory.
Set (n3, v3);
149 factory.
Set (n4, v4);
150 factory.
Set (n5, v5);
151 factory.
Set (n6, v6);
152 factory.
Set (n7, v7);
163 channel->SetPropagationDelayModel (delay);
219 phy->SetDevice (device);
Hold a value for an Attribute.
Keep track of the current position and velocity of an object.
Instantiate subclasses of ns3::Object.
void Set(const std::string &name, const AttributeValue &value, Args &&... args)
Set an attribute to be set during construction.
Ptr< Object > Create(void) const
Create an Object instance of the configured TypeId.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
calculate a propagation delay.
Models the propagation loss through a transmission medium.
void SetNext(Ptr< PropagationLossModel > next)
Enables a chain of loss models to act on the signal.
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 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 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())
ObjectFactory m_propagationDelay
Propagation delay.
ObjectFactory m_channel
Channel.
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())
static SpectrumChannelHelper Default()
Setup a default SpectrumChannel.
Ptr< SpectrumChannel > Create(void) const
Ptr< SpectrumPropagationLossModel > m_spectrumPropagationLossModel
Spectrum propagation loss model.
Ptr< PropagationLossModel > m_propagationLossModel
Propagation loss model.
void SetChannel(Ptr< SpectrumChannel > channel)
set the channel that will be used by SpectrumPhy instances created by this helper
void SetPhy(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())
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
spectrum-aware propagation loss model
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Every class exported by the ns3 library is enclosed in the ns3 namespace.