20 #include "spectrum-helper.h" 
   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> 
   35 SpectrumChannelHelper::Default (
void)
 
   37   SpectrumChannelHelper h;
 
   38   h.SetChannel (
"ns3::SingleModelSpectrumChannel");
 
   39   h.SetPropagationDelay (
"ns3::ConstantSpeedPropagationDelayModel");
 
   40   h.AddSpectrumPropagationLoss (
"ns3::FriisSpectrumPropagationLossModel");
 
   57   m_channel.
Set (n0, v0);
 
   58   m_channel.
Set (n1, v1);
 
   59   m_channel.
Set (n2, v2);
 
   60   m_channel.
Set (n3, v3);
 
   61   m_channel.
Set (n4, v4);
 
   62   m_channel.
Set (n5, v5);
 
   63   m_channel.
Set (n6, v6);
 
   64   m_channel.
Set (n7, v7);
 
   96   m->
SetNext (m_propagationLossModel);
 
   97   m_propagationLossModel = m;
 
  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);
 
  128   m->SetNext (m_spectrumPropagationLossModel);
 
  129   m_spectrumPropagationLossModel = m;
 
  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);
 
  153   m_propagationDelay = factory;
 
  160   channel->AddSpectrumPropagationLossModel (m_spectrumPropagationLossModel);
 
  161   channel->AddPropagationLossModel (m_propagationLossModel);
 
  163   channel->SetPropagationDelayModel (delay);
 
void SetChannel(Ptr< SpectrumChannel > channel)
void SetNext(Ptr< PropagationLossModel > next)
Enables a chain of loss models to act on the signal. 
Hold a value for an Attribute. 
virtual void SetDevice(Ptr< NetDevice > d)=0
#define NS_ASSERT(condition)
Ptr< SpectrumChannel > Create(void) const 
void SetTypeId(TypeId tid)
virtual void SetChannel(Ptr< SpectrumChannel > c)=0
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 
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())
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())
void Set(std::string name, const AttributeValue &value)
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. 
Ptr< SpectrumPhy > Create(Ptr< Node > node, Ptr< NetDevice > device) const 
Modelize the propagation loss through a transmission medium. 
virtual void SetMobility(Ptr< MobilityModel > m)=0
void SetPhyAttribute(std::string name, const AttributeValue &v)
spectrum-aware propagation loss model 
Ptr< T > GetObject(void) const