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 | |
Ptr< SpectrumValue > | CreateTxPowerSpectralDensity (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. | |
This class defines all functions to create spectrum model for LrWpan.
Definition at line 26 of file lr-wpan-spectrum-value-helper.h.
ns3::lrwpan::LrWpanSpectrumValueHelper::LrWpanSpectrumValueHelper | ( | ) |
Definition at line 53 of file lr-wpan-spectrum-value-helper.cc.
References m_noiseFactor, and NS_LOG_FUNCTION.
|
virtual |
Definition at line 59 of file lr-wpan-spectrum-value-helper.cc.
References NS_LOG_FUNCTION.
Ptr< SpectrumValue > ns3::lrwpan::LrWpanSpectrumValueHelper::CreateNoisePowerSpectralDensity | ( | uint32_t | channel | ) |
create spectrum value for noise
channel | the channel number per IEEE802.15.4 |
Definition at line 98 of file lr-wpan-spectrum-value-helper.cc.
References ns3::Create(), ns3::lrwpan::g_LrWpanSpectrumModel, m_noiseFactor, NS_ASSERT_MSG, and NS_LOG_FUNCTION.
Referenced by ns3::lrwpan::LrWpanPhy::SetRxSensitivity().
Ptr< SpectrumValue > ns3::lrwpan::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 65 of file lr-wpan-spectrum-value-helper.cc.
References ns3::Create(), ns3::lrwpan::g_LrWpanSpectrumModel, NS_ASSERT_MSG, and NS_LOG_FUNCTION.
Referenced by LrWpanSpectrumValueHelperTestCase::DoRun(), ns3::lrwpan::LrWpanPhy::PlmeSetAttributeRequest(), and ns3::lrwpan::LrWpanPhy::SetRxSensitivity().
void ns3::lrwpan::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 121 of file lr-wpan-spectrum-value-helper.cc.
References m_noiseFactor.
Referenced by ns3::lrwpan::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 127 of file lr-wpan-spectrum-value-helper.cc.
References ns3::lrwpan::g_LrWpanSpectrumModel, NS_ASSERT, and NS_LOG_FUNCTION.
Referenced by ns3::lrwpan::LrWpanPhy::CheckInterference(), LrWpanSpectrumValueHelperTestCase::DoRun(), ns3::lrwpan::LrWpanPhy::EndCca(), ns3::lrwpan::LrWpanPhy::EndEd(), ns3::lrwpan::LrWpanPhy::EndRx(), ns3::lrwpan::LrWpanPhy::GetCurrentSignalPsd(), and ns3::lrwpan::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 68 of file lr-wpan-spectrum-value-helper.h.
Referenced by LrWpanSpectrumValueHelper(), CreateNoisePowerSpectralDensity(), and SetNoiseFactor().