A Discrete-Event Network Simulator
API
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
ns3::LrWpanSpectrumValueHelper Class Reference

This class defines all functions to create spectrum model for LrWpan. More...

#include "lr-wpan-spectrum-value-helper.h"

Public Member Functions

 LrWpanSpectrumValueHelper (void)
 
virtual ~LrWpanSpectrumValueHelper (void)
 
Ptr< SpectrumValueCreateNoisePowerSpectralDensity (uint32_t channel)
 create spectrum value for noise More...
 
Ptr< SpectrumValueCreateTxPowerSpectralDensity (double txPower, uint32_t channel)
 create spectrum value More...
 

Static Public Member Functions

static double TotalAvgPower (Ptr< const SpectrumValue > psd, uint32_t channel)
 total average power of the signal is the integral of the PSD using the limits of the given channel More...
 

Private Attributes

double m_noiseFactor
 A scaling factor for the noise power. More...
 

Detailed Description

This class defines all functions to create spectrum model for LrWpan.

Definition at line 34 of file lr-wpan-spectrum-value-helper.h.

Constructor & Destructor Documentation

◆ LrWpanSpectrumValueHelper()

ns3::LrWpanSpectrumValueHelper::LrWpanSpectrumValueHelper ( void  )

Definition at line 59 of file lr-wpan-spectrum-value-helper.cc.

References m_noiseFactor, and NS_LOG_FUNCTION.

◆ ~LrWpanSpectrumValueHelper()

ns3::LrWpanSpectrumValueHelper::~LrWpanSpectrumValueHelper ( void  )
virtual

Definition at line 65 of file lr-wpan-spectrum-value-helper.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ CreateNoisePowerSpectralDensity()

Ptr< SpectrumValue > ns3::LrWpanSpectrumValueHelper::CreateNoisePowerSpectralDensity ( uint32_t  channel)

create spectrum value for noise

Parameters
channelthe channel number per IEEE802.15.4
Returns
a Ptr to a newly created SpectrumValue instance

Definition at line 104 of file lr-wpan-spectrum-value-helper.cc.

References third::channel, ns3::g_LrWpanSpectrumModel, m_noiseFactor, NS_ASSERT_MSG(), and NS_LOG_FUNCTION.

Referenced by ns3::LrWpanPhy::LrWpanPhy().

◆ CreateTxPowerSpectralDensity()

Ptr< SpectrumValue > ns3::LrWpanSpectrumValueHelper::CreateTxPowerSpectralDensity ( double  txPower,
uint32_t  channel 
)

create spectrum value

Parameters
txPowerthe power transmission in dBm
channelthe channel number per IEEE802.15.4
Returns
a Ptr to a newly created SpectrumValue instance

Definition at line 71 of file lr-wpan-spectrum-value-helper.cc.

References third::channel, ns3::g_LrWpanSpectrumModel, NS_ASSERT_MSG(), and NS_LOG_FUNCTION.

Referenced by LrWpanSpectrumValueHelperTestCase::DoRun(), ns3::LrWpanPhy::LrWpanPhy(), and ns3::LrWpanPhy::PlmeSetAttributeRequest().

◆ TotalAvgPower()

double ns3::LrWpanSpectrumValueHelper::TotalAvgPower ( Ptr< const SpectrumValue psd,
uint32_t  channel 
)
static

total average power of the signal is the integral of the PSD using the limits of the given channel

Parameters
psdspectral density
channelthe channel number per IEEE802.15.4
Returns
total power (using composite trap. rule to numerally integrate)

Definition at line 127 of file lr-wpan-spectrum-value-helper.cc.

References third::channel, ns3::g_LrWpanSpectrumModel, NS_ASSERT, and NS_LOG_FUNCTION.

Referenced by ns3::LrWpanPhy::CheckInterference(), LrWpanSpectrumValueHelperTestCase::DoRun(), ns3::LrWpanPhy::EndCca(), ns3::LrWpanPhy::EndEd(), ns3::LrWpanPhy::EndRx(), and ns3::LrWpanPhy::StartRx().

Member Data Documentation

◆ m_noiseFactor

double ns3::LrWpanSpectrumValueHelper::m_noiseFactor
private

A scaling factor for the noise power.

Definition at line 68 of file lr-wpan-spectrum-value-helper.h.

Referenced by CreateNoisePowerSpectralDensity(), and LrWpanSpectrumValueHelper().


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