23#include "ns3/error-rate-model.h"
24#include "ns3/frame-capture-model.h"
25#include "ns3/interference-helper.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"
68 channel->SetPropagationLossModel(cur);
73 channel->SetPropagationDelayModel(delay);
80 return c->AssignStreams(stream);
87 m_phy.at(0).SetTypeId(
"ns3::YansWifiPhy");
105std::vector<Ptr<WifiPhy>>
110 phy->SetInterferenceHelper(interference);
112 phy->SetErrorRateModel(error);
116 phy->SetFrameCaptureModel(frameCapture);
121 phy->SetPreambleDetectionModel(preambleDetection);
124 phy->SetDevice(device);
125 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_phy
PHY object.
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.