A Discrete-Event Network Simulator
API
ns3::YansWavePhyHelper Class Reference

To trace WaveNetDevice, we have to overwrite the trace functions of class YansWifiPhyHelper. More...

#include "wave-helper.h"

+ Inheritance diagram for ns3::YansWavePhyHelper:
+ Collaboration diagram for ns3::YansWavePhyHelper:

Static Public Member Functions

static YansWavePhyHelper Default (void)
 Create a phy helper in a default working state. More...
 

Private Member Functions

virtual void EnableAsciiInternal (Ptr< OutputStreamWrapper > stream, std::string prefix, Ptr< NetDevice > nd, bool explicitFilename)
 Enable ascii trace output on the indicated net device. More...
 
virtual void EnablePcapInternal (std::string prefix, Ptr< NetDevice > nd, bool promiscuous, bool explicitFilename)
 Enable pcap output the indicated net device. More...
 

Additional Inherited Members

- Public Types inherited from ns3::WifiPhyHelper
enum  SupportedPcapDataLinkTypes { DLT_IEEE802_11 = PcapHelper::DLT_IEEE802_11 , DLT_PRISM_HEADER = PcapHelper::DLT_PRISM_HEADER , DLT_IEEE802_11_RADIO = PcapHelper::DLT_IEEE802_11_RADIO }
 An enumeration of the pcap data link types (DLTs) which this helper supports. More...
 
- Public Member Functions inherited from ns3::YansWifiPhyHelper
 YansWifiPhyHelper ()
 Create a PHY helper. More...
 
void SetChannel (Ptr< YansWifiChannel > channel)
 
void SetChannel (std::string channelName)
 
- Public Member Functions inherited from ns3::WifiPhyHelper
 WifiPhyHelper ()
 
virtual ~WifiPhyHelper ()
 
void DisablePreambleDetectionModel ()
 Disable the preamble detection model. More...
 
PcapHelper::DataLinkType GetPcapDataLinkType (void) const
 Get the data link type of PCAP traces to be used. More...
 
void Set (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 SetFrameCaptureModel (std::string type, Args &&... args)
 Helper function used to set the frame capture model. More...
 
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...
 
- Public Member Functions inherited from ns3::PcapHelperForDevice
 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...
 
- Public Member Functions inherited from ns3::AsciiTraceHelperForDevice
 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...
 
- Static Protected Member Functions inherited from ns3::WifiPhyHelper
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)
 
- Protected Attributes inherited from ns3::WifiPhyHelper
ObjectFactory m_errorRateModel
 error rate model More...
 
ObjectFactory m_frameCaptureModel
 frame capture model More...
 
ObjectFactory m_interferenceHelper
 interference helper More...
 
ObjectFactory m_phy
 PHY object. More...
 
ObjectFactory m_preambleDetectionModel
 preamble detection model More...
 

Detailed Description

To trace WaveNetDevice, we have to overwrite the trace functions of class YansWifiPhyHelper.

The source code is very similar with YansWifiPhy, only with some adaptation.

Definition at line 40 of file wave-helper.h.

Member Function Documentation

◆ Default()

YansWavePhyHelper ns3::YansWavePhyHelper::Default ( void  )
static

Create a phy helper in a default working state.

Returns
A phy helper

Definition at line 123 of file wave-helper.cc.

References ns3::WifiPhyHelper::SetErrorRateModel().

Referenced by WaveNetDeviceExample::CreateWaveNodes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EnableAsciiInternal()

void ns3::YansWavePhyHelper::EnableAsciiInternal ( Ptr< OutputStreamWrapper stream,
std::string  prefix,
Ptr< NetDevice nd,
bool  explicitFilename 
)
privatevirtual

Enable ascii trace output on the indicated net device.

Internal:

NetDevice-specific implementation mechanism for hooking the trace and writing to the trace file.

Parameters
streamThe output stream object to use when logging ascii traces.
prefixFilename prefix to use for ascii trace files.
ndNet device for which you want to enable tracing.
explicitFilenameTreat the prefix as an explicit filename if true

Reimplemented from ns3::WifiPhyHelper.

Definition at line 172 of file wave-helper.cc.

References ns3::AsciiPhyReceiveSinkWithContext(), ns3::AsciiPhyReceiveSinkWithoutContext(), ns3::AsciiPhyTransmitSinkWithContext(), ns3::AsciiPhyTransmitSinkWithoutContext(), ns3::Config::Connect(), ns3::Config::ConnectWithoutContext(), ns3::AsciiTraceHelper::CreateFileStream(), ns3::Packet::EnablePrinting(), ns3::AsciiTraceHelper::GetFilenameFromDevice(), ns3::Node::GetId(), ns3::NetDevice::GetIfIndex(), ns3::NetDevice::GetNode(), ns3::Object::GetObject(), ns3::MakeBoundCallback(), and NS_LOG_INFO.

+ Here is the call graph for this function:

◆ EnablePcapInternal()

void ns3::YansWavePhyHelper::EnablePcapInternal ( std::string  prefix,
Ptr< NetDevice nd,
bool  promiscuous,
bool  explicitFilename 
)
privatevirtual

Enable pcap output the indicated net device.

NetDevice-specific implementation mechanism for hooking the trace and writing to the trace file.

Parameters
prefixFilename prefix to use for pcap files.
ndNet device for which you want to enable tracing.
promiscuousIf true capture all possible packets available at the device.
explicitFilenameTreat the prefix as an explicit filename if true

Reimplemented from ns3::WifiPhyHelper.

Definition at line 131 of file wave-helper.cc.

References ns3::PcapHelper::CreateFile(), create-module::file, ns3::PcapHelper::GetFilenameFromDevice(), ns3::Object::GetObject(), ns3::WifiPhyHelper::GetPcapDataLinkType(), ns3::WaveNetDevice::GetPhys(), ns3::MakeBoundCallback(), NS_ABORT_MSG_IF, NS_LOG_INFO, ns3::WifiPhyHelper::PcapSniffRxEvent(), ns3::WifiPhyHelper::PcapSniffTxEvent(), and third::phy.

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: