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