A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::LrWpanSpectrumValueHelper Class Reference

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

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

+ Collaboration diagram for ns3::LrWpanSpectrumValueHelper:

Public Member Functions

 LrWpanSpectrumValueHelper ()
 
virtual ~LrWpanSpectrumValueHelper ()
 
Ptr< SpectrumValueCreateNoisePowerSpectralDensity (uint32_t channel)
 create spectrum value for noise
 
Ptr< SpectrumValueCreateTxPowerSpectralDensity (double txPower, uint32_t channel)
 create spectrum value
 
void SetNoiseFactor (double f)
 Set the noise factor added to the thermal noise.
 

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
 

Private Attributes

double m_noiseFactor
 A scaling factor for the noise power.
 

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 ( )

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

References m_noiseFactor, and NS_LOG_FUNCTION.

◆ ~LrWpanSpectrumValueHelper()

ns3::LrWpanSpectrumValueHelper::~LrWpanSpectrumValueHelper ( )
virtual

Definition at line 68 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 107 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::SetRxSensitivity().

+ Here is the caller graph for this function:

◆ 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 74 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::PlmeSetAttributeRequest(), and ns3::LrWpanPhy::SetRxSensitivity().

+ Here is the caller graph for this function:

◆ SetNoiseFactor()

void ns3::LrWpanSpectrumValueHelper::SetNoiseFactor ( double  f)

Set the noise factor added to the thermal noise.

Parameters
fA dimensionless ratio (i.e. Not in dB)

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

References m_noiseFactor.

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

+ Here is the caller graph for this function:

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

References 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(), ns3::LrWpanPhy::GetCurrentSignalPsd(), and ns3::LrWpanPhy::StartRx().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_noiseFactor

double ns3::LrWpanSpectrumValueHelper::m_noiseFactor
private

A scaling factor for the noise power.

It specifies how much additional noise the device contribute to the thermal noise (floor noise).

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

Referenced by LrWpanSpectrumValueHelper(), CreateNoisePowerSpectralDensity(), and SetNoiseFactor().


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