A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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)
 total average power of the signal is the integral of the PSD 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

ns3::LrWpanSpectrumValueHelper::LrWpanSpectrumValueHelper ( void  )

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

References m_noiseFactor, and NS_LOG_FUNCTION.

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

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

References NS_LOG_FUNCTION.

Member Function Documentation

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 100 of file lr-wpan-spectrum-value-helper.cc.

References ns3::g_LrWpanSpectrumModel, m_noiseFactor, NS_ASSERT_MSG, and NS_LOG_FUNCTION.

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

+ Here is the caller graph for this function:

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 67 of file lr-wpan-spectrum-value-helper.cc.

References ns3::g_LrWpanSpectrumModel, NS_ASSERT_MSG, and NS_LOG_FUNCTION.

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

+ Here is the caller graph for this function:

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

total average power of the signal is the integral of the PSD

Parameters
psdspectral density
Returns
total power (using composite trap. rule to numerally integrate

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

References NS_LOG_FUNCTION, and ns3::Sum().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

double ns3::LrWpanSpectrumValueHelper::m_noiseFactor
private

A scaling factor for the noise power.

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

Referenced by CreateNoisePowerSpectralDensity(), and LrWpanSpectrumValueHelper().


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