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

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

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

Public Member Functions

virtual ~SpectrumValue5MhzFactory ()=default
 Destructor. More...
 
virtual Ptr< SpectrumValueCreateConstant (double psd)
 Creates a SpectrumValue instance with a constant value for all frequencies. 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 37 of file ism-spectrum-value-helper.h.

Constructor & Destructor Documentation

◆ ~SpectrumValue5MhzFactory()

virtual ns3::SpectrumValue5MhzFactory::~SpectrumValue5MhzFactory ( )
virtualdefault

Destructor.

Member Function Documentation

◆ CreateConstant()

Ptr< SpectrumValue > ns3::SpectrumValue5MhzFactory::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 57 of file ism-spectrum-value-helper.cc.

References ns3::g_WifiSpectrumModel5Mhz.

Referenced by SpectrumIdealPhyTestCase::DoRun().

+ Here is the caller graph for this function:

◆ CreateTxPowerSpectralDensity()

Ptr< SpectrumValue > ns3::SpectrumValue5MhzFactory::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 65 of file ism-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: