25#include "ns3/assert.h"
44 for (
int i = -4; i < 13 + 7; i++)
47 bi.
fl = 2407.0e6 + i * 5.0e6;
48 bi.
fh = 2407.0e6 + (i + 1) * 5.0e6;
49 bi.
fc = (bi.
fl + bi.
fh) / 2;
76 double txPowerDensity = txPower / 20e6;
81 (*txPsd)[channel - 1] = txPowerDensity * 1e-4;
82 (*txPsd)[channel] = txPowerDensity * 1e-4;
83 (*txPsd)[channel + 1] = txPowerDensity * 0.0015849;
84 (*txPsd)[channel + 2] = txPowerDensity * 0.0015849;
85 (*txPsd)[channel + 3] = txPowerDensity;
86 (*txPsd)[channel + 4] = txPowerDensity;
87 (*txPsd)[channel + 5] = txPowerDensity;
88 (*txPsd)[channel + 6] = txPowerDensity;
89 (*txPsd)[channel + 7] = txPowerDensity * 0.0015849;
90 (*txPsd)[channel + 8] = txPowerDensity * 0.0015849;
91 (*txPsd)[channel + 9] = txPowerDensity * 1e-4;
92 (*txPsd)[channel + 10] = txPowerDensity * 1e-4;
Smart pointer class similar to boost::intrusive_ptr.
virtual Ptr< SpectrumValue > CreateConstant(double psd)
Creates a SpectrumValue instance with a constant value for all frequencies.
virtual Ptr< SpectrumValue > CreateTxPowerSpectralDensity(double txPower, uint8_t channel)
Creates a SpectrumValue instance that represents the TX Power Spectral Density of a wifi device corre...
Static class to initialize the values for the 2.4 GHz Wi-Fi spectrum model.
WifiSpectrumModel5MhzInitializer()
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static Ptr< SpectrumModel > g_WifiSpectrumModel5Mhz
static initializer for the class
std::vector< BandInfo > Bands
Container of BandInfo.
static class ns3::WifiSpectrumModel5MhzInitializer g_WifiSpectrumModel5MhzInitializerInstance
initialization instance for WifiSpectrumModel5Mhz
The building block of a SpectrumModel.
double fc
center frequency
double fl
lower limit of subband
double fh
upper limit of subband