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

Implements Wifi SpectrumValue for the 2.4 GHz ISM band only, with a 5 MHz spectrum resolution. More...

#include "wifi-spectrum-value-helper.h"

Public Member Functions

virtual ~WifiSpectrumValue5MhzFactory ()
 Destructor. More...
 
virtual Ptr< SpectrumValueCreateConstant (double psd)
 Creates a SpectrumValue instance with a constant value for all frequencies. More...
 
virtual Ptr< SpectrumValueCreateRfFilter (uint8_t channel)
 Creates a SpectrumValue instance which represents the frequency response of the RF filter which is used by a wifi device to receive signals when tuned to a particular channel. More...
 
virtual Ptr< SpectrumValueCreateTxPowerSpectralDensity (double txPower, uint8_t channel)
 Creates a SpectrumValue instance that represents the TX Power Spectral Density of a wifi device corresponding to the provided parameters. More...
 

Detailed Description

Implements Wifi SpectrumValue for the 2.4 GHz ISM band only, with a 5 MHz spectrum resolution.

Definition at line 287 of file wifi-spectrum-value-helper.h.

Constructor & Destructor Documentation

◆ ~WifiSpectrumValue5MhzFactory()

ns3::WifiSpectrumValue5MhzFactory::~WifiSpectrumValue5MhzFactory ( )
virtual

Destructor.

Definition at line 709 of file wifi-spectrum-value-helper.cc.

Member Function Documentation

◆ CreateConstant()

Ptr< SpectrumValue > ns3::WifiSpectrumValue5MhzFactory::CreateConstant ( double  psd)
virtual

Creates a SpectrumValue instance with a constant value for all frequencies.

Parameters
psdthe constant value
Returns
a Ptr to a newly created SpectrumValue

Definition at line 737 of file wifi-spectrum-value-helper.cc.

References ns3::g_WifiSpectrumModel5Mhz.

Referenced by SpectrumIdealPhyTestCase::DoRun().

+ Here is the caller graph for this function:

◆ CreateRfFilter()

Ptr< SpectrumValue > ns3::WifiSpectrumValue5MhzFactory::CreateRfFilter ( uint8_t  channel)
virtual

Creates a SpectrumValue instance which represents the frequency response of the RF filter which is used by a wifi device to receive signals when tuned to a particular channel.

Parameters
channelthe number of the channel (1 <= channel <= 13)
Returns
a Ptr to a newly created SpectrumValue

Definition at line 779 of file wifi-spectrum-value-helper.cc.

References third::channel, ns3::g_WifiSpectrumModel5Mhz, and NS_ASSERT.

◆ CreateTxPowerSpectralDensity()

Ptr< SpectrumValue > ns3::WifiSpectrumValue5MhzFactory::CreateTxPowerSpectralDensity ( double  txPower,
uint8_t  channel 
)
virtual

Creates a SpectrumValue instance that represents the TX Power Spectral Density of a wifi device corresponding to the provided parameters.

Since the spectrum model has a resolution of 5 MHz, we model the transmitted signal with a constant density over a 20MHz bandwidth centered on the center frequency of the channel. The transmission power outside the transmission power density is calculated considering the transmit spectrum mask, see IEEE Std. 802.11-2007, Annex I. The two bands just outside of the main 20 MHz are allocated power at -28 dB down from the center 20 MHz, and the two bands outside of this are allocated power at -40 dB down (with a total bandwidth of 60 MHz containing non-zero power allocation).

Parameters
txPowerthe total TX power in W
channelthe number of the channel (1 <= channel <= 13)
Returns
a Ptr to a newly created SpectrumValue

Definition at line 746 of file wifi-spectrum-value-helper.cc.

References third::channel, ns3::g_WifiSpectrumModel5Mhz, and NS_ASSERT.

Referenced by SpectrumIdealPhyTestCase::DoRun(), and ThreeGppSpectrumPropagationLossModelTest::DoRun().

+ Here is the caller graph for this function:

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