Make it easy to create and manage PHY objects for the spectrum model. More...
#include "spectrum-wifi-helper.h"
Public Member Functions | |
SpectrumWifiPhyHelper (uint8_t nLinks=1) | |
Create a PHY helper. More... | |
void | SetChannel (Ptr< SpectrumChannel > channel) |
void | SetChannel (std::string channelName) |
void | SetChannel (uint8_t linkId, Ptr< SpectrumChannel > channel) |
void | SetChannel (uint8_t linkId, std::string channelName) |
![]() | |
WifiPhyHelper (uint8_t nLinks=1) | |
Constructor. More... | |
~WifiPhyHelper () override | |
void | DisablePreambleDetectionModel () |
Disable the preamble detection model on all links. More... | |
PcapHelper::DataLinkType | GetPcapDataLinkType () const |
Get the data link type of PCAP traces to be used. More... | |
void | Set (std::string name, const AttributeValue &v) |
void | Set (uint8_t linkId, std::string name, const AttributeValue &v) |
template<typename... Args> | |
void | SetErrorRateModel (std::string type, Args &&... args) |
Helper function used to set the error rate model. More... | |
template<typename... Args> | |
void | SetErrorRateModel (uint8_t linkId, std::string type, Args &&... args) |
template<typename... Args> | |
void | SetFrameCaptureModel (std::string type, Args &&... args) |
Helper function used to set the frame capture model. More... | |
template<typename... Args> | |
void | SetFrameCaptureModel (uint8_t linkId, std::string type, Args &&... args) |
template<typename... Args> | |
void | SetInterferenceHelper (std::string type, Args &&... args) |
Helper function used to set the interference helper. More... | |
void | SetPcapDataLinkType (SupportedPcapDataLinkTypes dlt) |
Set the data link type of PCAP traces to be used. More... | |
template<typename... Args> | |
void | SetPreambleDetectionModel (std::string type, Args &&... args) |
Helper function used to set the preamble detection model. More... | |
template<typename... Args> | |
void | SetPreambleDetectionModel (uint8_t linkId, std::string type, Args &&... args) |
![]() | |
PcapHelperForDevice () | |
Construct a PcapHelperForDevice. More... | |
virtual | ~PcapHelperForDevice () |
Destroy a PcapHelperForDevice. More... | |
void | EnablePcap (std::string prefix, NetDeviceContainer d, bool promiscuous=false) |
Enable pcap output on each device in the container which is of the appropriate type. More... | |
void | EnablePcap (std::string prefix, NodeContainer n, bool promiscuous=false) |
Enable pcap output on each device (which is of the appropriate type) in the nodes provided in the container. More... | |
void | EnablePcap (std::string prefix, Ptr< NetDevice > nd, bool promiscuous=false, bool explicitFilename=false) |
Enable pcap output the indicated net device. More... | |
void | EnablePcap (std::string prefix, std::string ndName, bool promiscuous=false, bool explicitFilename=false) |
Enable pcap output the indicated net device using a device previously named using the ns-3 object name service. More... | |
void | EnablePcap (std::string prefix, uint32_t nodeid, uint32_t deviceid, bool promiscuous=false) |
Enable pcap output on the device specified by a global node-id (of a previously created node) and associated device-id. More... | |
void | EnablePcapAll (std::string prefix, bool promiscuous=false) |
Enable pcap output on each device (which is of the appropriate type) in the set of all nodes created in the simulation. More... | |
![]() | |
AsciiTraceHelperForDevice () | |
Construct an AsciiTraceHelperForDevice. More... | |
virtual | ~AsciiTraceHelperForDevice () |
Destroy an AsciiTraceHelperForDevice. More... | |
void | EnableAscii (Ptr< OutputStreamWrapper > stream, NetDeviceContainer d) |
Enable ascii trace output on each device in the container which is of the appropriate type. More... | |
void | EnableAscii (Ptr< OutputStreamWrapper > stream, NodeContainer n) |
Enable ascii trace output on each device (which is of the appropriate type) in the nodes provided in the container. More... | |
void | EnableAscii (Ptr< OutputStreamWrapper > stream, Ptr< NetDevice > nd) |
Enable ascii trace output on the indicated net device. More... | |
void | EnableAscii (Ptr< OutputStreamWrapper > stream, std::string ndName) |
Enable ascii trace output the indicated net device using a device previously named using the ns-3 object name service. More... | |
void | EnableAscii (Ptr< OutputStreamWrapper > stream, uint32_t nodeid, uint32_t deviceid) |
Enable ascii trace output on the device specified by a global node-id (of a previously created node) and associated device-id. More... | |
void | EnableAscii (std::string prefix, NetDeviceContainer d) |
Enable ascii trace output on each device in the container which is of the appropriate type. More... | |
void | EnableAscii (std::string prefix, NodeContainer n) |
Enable ascii trace output on each device (which is of the appropriate type) in the nodes provided in the container. More... | |
void | EnableAscii (std::string prefix, Ptr< NetDevice > nd, bool explicitFilename=false) |
Enable ascii trace output on the indicated net device. More... | |
void | EnableAscii (std::string prefix, std::string ndName, bool explicitFilename=false) |
Enable ascii trace output the indicated net device using a device previously named using the ns-3 object name service. More... | |
void | EnableAscii (std::string prefix, uint32_t nodeid, uint32_t deviceid, bool explicitFilename) |
Enable ascii trace output on the device specified by a global node-id (of a previously created node) and associated device-id. More... | |
void | EnableAsciiAll (Ptr< OutputStreamWrapper > stream) |
Enable ascii trace output on each device (which is of the appropriate type) in the set of all nodes created in the simulation. More... | |
void | EnableAsciiAll (std::string prefix) |
Enable ascii trace output on each device (which is of the appropriate type) in the set of all nodes created in the simulation. More... | |
Private Member Functions | |
std::vector< Ptr< WifiPhy > > | Create (Ptr< Node > node, Ptr< WifiNetDevice > device) const override |
Private Attributes | |
std::vector< Ptr< SpectrumChannel > > | m_channels |
the channels More... | |
Additional Inherited Members | |
![]() | |
enum | SupportedPcapDataLinkTypes { DLT_IEEE802_11 , DLT_PRISM_HEADER , DLT_IEEE802_11_RADIO } |
An enumeration of the pcap data link types (DLTs) which this helper supports. More... | |
![]() | |
static void | PcapSniffRxEvent (Ptr< PcapFileWrapper > file, Ptr< const Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu, SignalNoiseDbm signalNoise, uint16_t staId=SU_STA_ID) |
static void | PcapSniffTxEvent (Ptr< PcapFileWrapper > file, Ptr< const Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu, uint16_t staId=SU_STA_ID) |
![]() | |
std::vector< ObjectFactory > | m_errorRateModel |
error rate model More... | |
std::vector< ObjectFactory > | m_frameCaptureModel |
frame capture model More... | |
ObjectFactory | m_interferenceHelper |
interference helper More... | |
std::vector< ObjectFactory > | m_phy |
PHY object. More... | |
std::vector< ObjectFactory > | m_preambleDetectionModel |
preamble detection model More... | |
Make it easy to create and manage PHY objects for the spectrum model.
The Pcap and ASCII traces generated by the EnableAscii and EnablePcap methods defined in this class correspond to PHY-level traces and come to us via WifiPhyHelper
Definition at line 37 of file spectrum-wifi-helper.h.
ns3::SpectrumWifiPhyHelper::SpectrumWifiPhyHelper | ( | uint8_t | nLinks = 1 | ) |
Create a PHY helper.
nLinks | the number of links to configure (>1 only for 11be devices) |
Definition at line 38 of file spectrum-wifi-helper.cc.
References m_channels, ns3::WifiPhyHelper::m_phy, NS_ABORT_IF, third::phy, ns3::WifiPhyHelper::SetErrorRateModel(), and ns3::WifiPhyHelper::SetInterferenceHelper().
|
overrideprivatevirtual |
node | the node on which we wish to create a wifi PHY |
device | the device within which this PHY will be created |
This method implements the pure virtual method defined in ns3::WifiPhyHelper.
Implements ns3::WifiPhyHelper.
Definition at line 84 of file spectrum-wifi-helper.cc.
References ns3::ObjectFactory::Create(), ns3::Object::GetObject(), m_channels, ns3::WifiPhyHelper::m_errorRateModel, ns3::WifiPhyHelper::m_frameCaptureModel, ns3::WifiPhyHelper::m_interferenceHelper, ns3::WifiPhyHelper::m_phy, ns3::WifiPhyHelper::m_preambleDetectionModel, and third::phy.
void ns3::SpectrumWifiPhyHelper::SetChannel | ( | Ptr< SpectrumChannel > | channel | ) |
channel | the channel to associate to this helper |
Every PHY created by a call to Install is associated to this channel.
Definition at line 52 of file spectrum-wifi-helper.cc.
References third::channel, and m_channels.
Referenced by Bug2843TestCase::DoRun(), TestUlOfdmaPowerControl::DoSetup(), and MultiLinkOperationsTestBase::SetChannels().
void ns3::SpectrumWifiPhyHelper::SetChannel | ( | std::string | channelName | ) |
channelName | The name of the channel to associate to this helper |
Every PHY created by a call to Install is associated to this channel.
Definition at line 61 of file spectrum-wifi-helper.cc.
References third::channel, and m_channels.
void ns3::SpectrumWifiPhyHelper::SetChannel | ( | uint8_t | linkId, |
Ptr< SpectrumChannel > | channel | ||
) |
channel | the channel to associate to this helper |
linkId | ID of the link to configure (>0 only for 11be devices) |
The PHY associated with the given link and created by a call to Install is associated to this channel.
Definition at line 71 of file spectrum-wifi-helper.cc.
References third::channel, and m_channels.
void ns3::SpectrumWifiPhyHelper::SetChannel | ( | uint8_t | linkId, |
std::string | channelName | ||
) |
channelName | The name of the channel to associate to this helper |
linkId | ID of the link to configure (>0 only for 11be devices) |
The PHY associated with the given link and created by a call to Install is associated to this channel.
Definition at line 77 of file spectrum-wifi-helper.cc.
References third::channel, and m_channels.
|
private |
the channels
Definition at line 86 of file spectrum-wifi-helper.h.
Referenced by SpectrumWifiPhyHelper(), Create(), and SetChannel().