23 #include "ns3/error-rate-model.h"
24 #include "ns3/frame-capture-model.h"
25 #include "ns3/interference-helper.h"
27 #include "ns3/mobility-model.h"
28 #include "ns3/names.h"
29 #include "ns3/preamble-detection-model.h"
30 #include "ns3/spectrum-wifi-phy.h"
31 #include "ns3/wifi-net-device.h"
44 phy.SetTypeId(
"ns3::SpectrumWifiPhy");
83 std::vector<Ptr<WifiPhy>>
86 std::vector<Ptr<WifiPhy>> ret;
88 for (std::size_t i = 0; i <
m_phy.size(); i++)
91 phy->CreateWifiSpectrumPhyInterface(device);
93 phy->SetInterferenceHelper(interference);
95 phy->SetErrorRateModel(error);
99 phy->SetFrameCaptureModel(frameCapture);
103 auto preambleDetection =
105 phy->SetPreambleDetectionModel(preambleDetection);
108 phy->SetDevice(device);
110 ret.emplace_back(
phy);
the interface for Wifi's error models
the interface for Wifi's frame capture models
handles interference calculations
Keep track of the current position and velocity of an object.
Ptr< Object > Create() const
Create an Object instance of the configured TypeId.
Ptr< T > GetObject() const
Get a pointer to the requested aggregated Object.
the interface for Wifi's preamble detection models
Smart pointer class similar to boost::intrusive_ptr.
std::vector< Ptr< SpectrumChannel > > m_channels
the channels
std::vector< Ptr< WifiPhy > > Create(Ptr< Node > node, Ptr< WifiNetDevice > device) const override
SpectrumWifiPhyHelper(uint8_t nLinks=1)
Create a PHY helper.
void SetChannel(Ptr< SpectrumChannel > channel)
void SetErrorRateModel(std::string type, Args &&... args)
Helper function used to set the error rate model.
void SetInterferenceHelper(std::string type, Args &&... args)
Helper function used to set the interference helper.
std::vector< ObjectFactory > m_frameCaptureModel
frame capture model
std::vector< ObjectFactory > m_preambleDetectionModel
preamble detection model
std::vector< ObjectFactory > m_phy
PHY object.
std::vector< ObjectFactory > m_errorRateModel
error rate model
ObjectFactory m_interferenceHelper
interference helper
#define NS_ABORT_IF(cond)
Abnormal program termination if a condition is true.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Every class exported by the ns3 library is enclosed in the ns3 namespace.