23 #include "ns3/error-rate-model.h"
24 #include "ns3/frame-capture-model.h"
25 #include "ns3/interference-helper.h"
27 #include "ns3/names.h"
28 #include "ns3/preamble-detection-model.h"
29 #include "ns3/propagation-delay-model.h"
30 #include "ns3/propagation-loss-model.h"
31 #include "ns3/wifi-net-device.h"
32 #include "ns3/yans-wifi-phy.h"
66 channel->SetPropagationLossModel(cur);
71 channel->SetPropagationDelayModel(delay);
78 return c->AssignStreams(stream);
85 m_phys.front().SetTypeId(
"ns3::YansWifiPhy");
103 std::vector<Ptr<WifiPhy>>
108 phy->SetInterferenceHelper(interference);
110 phy->SetErrorRateModel(error);
114 phy->SetFrameCaptureModel(frameCapture);
119 phy->SetPreambleDetectionModel(preambleDetection);
122 phy->SetDevice(device);
123 return std::vector<Ptr<WifiPhy>>({
phy});
the interface for Wifi's error models
the interface for Wifi's frame capture models
handles interference calculations
Ptr< Object > Create() const
Create an Object instance of the configured TypeId.
the interface for Wifi's preamble detection models
calculate a propagation delay.
Models the propagation loss through a transmission medium.
Smart pointer class similar to boost::intrusive_ptr.
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_phys
PHY objects.
std::vector< ObjectFactory > m_errorRateModel
error rate model
ObjectFactory m_interferenceHelper
interference helper
manage and create wifi channel objects for the YANS model.
ObjectFactory m_propagationDelay
propagation delay model
int64_t AssignStreams(Ptr< YansWifiChannel > c, int64_t stream)
Assign a fixed random variable stream number to the random variables used by the channel.
YansWifiChannelHelper()
Create a channel helper without any parameter set.
static YansWifiChannelHelper Default()
Create a channel helper in a default working state.
void SetPropagationDelay(std::string name, Ts &&... args)
void AddPropagationLoss(std::string name, Ts &&... args)
Ptr< YansWifiChannel > Create() const
std::vector< ObjectFactory > m_propagationLoss
vector of propagation loss models
Ptr< YansWifiChannel > m_channel
YANS wifi channel.
YansWifiPhyHelper()
Create a PHY helper.
std::vector< Ptr< WifiPhy > > Create(Ptr< Node > node, Ptr< WifiNetDevice > device) const override
void SetChannel(Ptr< YansWifiChannel > channel)
#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.