24#include "ns3/spectrum-wifi-phy.h"
25#include "ns3/interference-helper.h"
26#include "ns3/error-rate-model.h"
27#include "ns3/frame-capture-model.h"
28#include "ns3/preamble-detection-model.h"
29#include "ns3/mobility-model.h"
30#include "ns3/wifi-net-device.h"
43 phy.SetTypeId (
"ns3::SpectrumWifiPhy");
82std::vector<Ptr<WifiPhy>>
85 std::vector<Ptr<WifiPhy>> ret;
88 for (std::size_t i = 0; i <
m_phy.size (); i++)
91 phy->CreateWifiSpectrumPhyInterface (device);
92 phy->SetInterferenceHelper (interference);
94 phy->SetErrorRateModel (error);
98 phy->SetFrameCaptureModel (frameCapture);
103 phy->SetPreambleDetectionModel (preambleDetection);
106 phy->SetDevice (device);
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(void) const
Create an Object instance of the configured TypeId.
Ptr< T > GetObject(void) 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.