12#include "ns3/error-rate-model.h"
13#include "ns3/frame-capture-model.h"
14#include "ns3/interference-helper.h"
17#include "ns3/preamble-detection-model.h"
18#include "ns3/propagation-delay-model.h"
19#include "ns3/propagation-loss-model.h"
20#include "ns3/wifi-net-device.h"
21#include "ns3/yans-wifi-phy.h"
55 channel->SetPropagationLossModel(cur);
60 channel->SetPropagationDelayModel(delay);
67 return c->AssignStreams(stream);
74 m_phys.front().SetTypeId(
"ns3::YansWifiPhy");
92std::vector<Ptr<WifiPhy>>
97 phy->SetInterferenceHelper(interference);
99 phy->SetErrorRateModel(error);
103 phy->SetFrameCaptureModel(frameCapture);
108 phy->SetPreambleDetectionModel(preambleDetection);
111 phy->SetDevice(device);
112 return std::vector<Ptr<WifiPhy>>({phy});
the interface for Wifi's error models
the interface for Wifi's frame capture models
handles interference calculations
static Ptr< T > Find(std::string path)
Given a name path string, look to see if there's an object in the system with that associated to it.
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.
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
Every class exported by the ns3 library is enclosed in the ns3 namespace.