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);
void SetChannel(Ptr< SpectrumChannel > channel)
set the channel that will be used by SpectrumPhy instances created by this helper ...
void SetNext(Ptr< PropagationLossModel > next)
Enables a chain of loss models to act on the signal.
Hold a value for an Attribute.
ObjectFactory m_propagationDelay
Propagation delay.
Ptr< SpectrumChannel > m_channel
Channel.
ObjectFactory m_channel
Channel.
ObjectFactory m_phy
Object factory for the phy objects.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
Ptr< SpectrumPropagationLossModel > m_spectrumPropagationLossModel
Spectrum propagation loss model.
Keep track of the current position and velocity of an object.
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())
Ptr< Object > Create(void) const
Create an Object instance of the configured TypeId.
calculate a propagation delay.
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())
Ptr< PropagationLossModel > m_propagationLossModel
Propagation loss model.
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
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())
Every class exported by the ns3 library is enclosed in the ns3 namespace.
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 Set(std::string name, const AttributeValue &value)
Set an attribute to be set during construction.
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())
Instantiate subclasses of ns3::Object.
static SpectrumChannelHelper Default()
Setup a default SpectrumChannel.
Models the propagation loss through a transmission medium.
void SetPhyAttribute(std::string name, const AttributeValue &v)
spectrum-aware propagation loss model
Ptr< SpectrumChannel > Create(void) const
Ptr< SpectrumPhy > Create(Ptr< Node > node, Ptr< NetDevice > device) const