This class defines all functions to create spectrum model for LrWpan. More...
#include "lr-wpan-spectrum-value-helper.h"
Public Member Functions | |
LrWpanSpectrumValueHelper () | |
virtual | ~LrWpanSpectrumValueHelper () |
Ptr< SpectrumValue > | CreateNoisePowerSpectralDensity (uint32_t channel) |
create spectrum value for noise More... | |
Ptr< SpectrumValue > | CreateTxPowerSpectralDensity (double txPower, uint32_t channel) |
create spectrum value More... | |
void | SetNoiseFactor (double f) |
Set the noise factor added to the thermal noise. 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... | |
This class defines all functions to create spectrum model for LrWpan.
Definition at line 34 of file lr-wpan-spectrum-value-helper.h.
ns3::LrWpanSpectrumValueHelper::LrWpanSpectrumValueHelper | ( | ) |
Definition at line 62 of file lr-wpan-spectrum-value-helper.cc.
References m_noiseFactor, and NS_LOG_FUNCTION.
|
virtual |
Definition at line 68 of file lr-wpan-spectrum-value-helper.cc.
References NS_LOG_FUNCTION.
Ptr< SpectrumValue > ns3::LrWpanSpectrumValueHelper::CreateNoisePowerSpectralDensity | ( | uint32_t | channel | ) |
create spectrum value for noise
channel | the channel number per IEEE802.15.4 |
Definition at line 107 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::SetRxSensitivity().
Ptr< SpectrumValue > ns3::LrWpanSpectrumValueHelper::CreateTxPowerSpectralDensity | ( | double | txPower, |
uint32_t | channel | ||
) |
create spectrum value
txPower | the power transmission in dBm |
channel | the channel number per IEEE802.15.4 |
Definition at line 74 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::PlmeSetAttributeRequest(), and ns3::LrWpanPhy::SetRxSensitivity().
void ns3::LrWpanSpectrumValueHelper::SetNoiseFactor | ( | double | f | ) |
Set the noise factor added to the thermal noise.
f | A dimensionless ratio (i.e. Not in dB) |
Definition at line 130 of file lr-wpan-spectrum-value-helper.cc.
References f(), and m_noiseFactor.
Referenced by ns3::LrWpanPhy::SetRxSensitivity().
|
static |
total average power of the signal is the integral of the PSD using the limits of the given channel
psd | spectral density |
channel | the channel number per IEEE802.15.4 |
Definition at line 136 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(), ns3::LrWpanPhy::GetCurrentSignalPsd(), and ns3::LrWpanPhy::StartRx().
|
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().