29 #include "ns3/fatal-error.h" 30 #include "ns3/assert.h" 54 : m_centerFrequency (
f),
88 NS_LOG_FUNCTION (centerFrequency << channelWidth << bandBandwidth << guardBandwidth);
99 double centerFrequencyHz = centerFrequency * 1e6;
100 double bandwidth = (channelWidth + (2.0 * guardBandwidth)) * 1e6;
102 uint32_t numBands =
static_cast<uint32_t
> ((bandwidth / bandBandwidth) + 0.5);
104 if (numBands % 2 == 0)
110 NS_ASSERT_MSG (numBands % 2 == 1,
"Number of bands should be odd");
111 NS_LOG_DEBUG (
"Num bands " << numBands <<
" band bandwidth " << bandBandwidth);
114 double startingFrequencyHz = centerFrequencyHz - (numBands / 2 * bandBandwidth) - bandBandwidth / 2;
115 for (
size_t i = 0; i < numBands; i++)
118 double f = startingFrequencyHz + (i * bandBandwidth);
120 f += bandBandwidth / 2;
122 f += bandBandwidth / 2;
124 NS_LOG_DEBUG (
"creating band " << i <<
" (" << info.
fl <<
":" << info.
fc <<
":" << info.
fh <<
")");
125 bands.push_back (info);
127 ret = Create<SpectrumModel> (bands);
139 uint16_t channelWidth = 22;
140 double bandBandwidth = 312500;
144 uint32_t nGuardBands =
static_cast<uint32_t
> (((2 * guardBandwidth * 1e6) / bandBandwidth) + 0.5);
145 uint32_t nAllocatedBands =
static_cast<uint32_t
> (((channelWidth * 1e6) / bandBandwidth) + 0.5);
148 double txPowerPerBand = txPowerW / nAllocatedBands;
151 if ((i >= (nGuardBands / 2)) && (i <= ((nGuardBands / 2) + nAllocatedBands - 1)))
153 *vit = txPowerPerBand / (bit->fh - bit->fl);
162 NS_LOG_FUNCTION (centerFrequency << channelWidth << txPowerW << guardBandwidth);
163 double bandBandwidth = 0;
164 uint32_t innerSlopeWidth = 0;
165 switch (channelWidth)
168 bandBandwidth = 312500;
169 innerSlopeWidth =
static_cast<uint32_t
> ((2e6 / bandBandwidth) + 0.5);
172 bandBandwidth = 156250;
173 innerSlopeWidth =
static_cast<uint32_t
> ((1e6 / bandBandwidth) + 0.5);
176 bandBandwidth = 78125;
177 innerSlopeWidth =
static_cast<uint32_t
> ((5e5 / bandBandwidth) + 0.5);
180 NS_FATAL_ERROR (
"Channel width " << channelWidth <<
" should be correctly set.");
185 uint32_t nGuardBands =
static_cast<uint32_t
> (((2 * guardBandwidth * 1e6) / bandBandwidth) + 0.5);
186 uint32_t nAllocatedBands =
static_cast<uint32_t
> (((channelWidth * 1e6) / bandBandwidth) + 0.5);
192 double txPowerPerBandW = txPowerW / 52;
193 NS_LOG_DEBUG (
"Power per band " << txPowerPerBandW <<
"W");
194 uint32_t start1 = (nGuardBands / 2) + 6;
195 uint32_t stop1 = start1 + 26 - 1;
196 uint32_t start2 = stop1 + 2;
197 uint32_t stop2 = start2 + 26 - 1;
200 std::vector <StartStop> subBands;
201 subBands.push_back (std::make_pair (start1, stop1));
202 subBands.push_back (std::make_pair (start2, stop2));
203 StartStop maskBand (0, nAllocatedBands + nGuardBands);
205 txPowerPerBandW, nGuardBands,
206 innerSlopeWidth, -40.0);
215 NS_LOG_FUNCTION (centerFrequency << channelWidth << txPowerW << guardBandwidth);
216 double bandBandwidth = 312500;
218 uint32_t nGuardBands =
static_cast<uint32_t
> (((2 * guardBandwidth * 1e6) / bandBandwidth) + 0.5);
219 uint32_t nAllocatedBands =
static_cast<uint32_t
> (((channelWidth * 1e6) / bandBandwidth) + 0.5);
221 double txPowerPerBandW = 0.0;
226 uint32_t start1 = (nGuardBands / 2) + 4;
227 uint32_t stop1 = start1 + 28 - 1;
228 uint32_t start2 = stop1 + 2;
229 uint32_t stop2 = start2 + 28 - 1;
230 uint32_t start3 = stop2 + (2 * 4);
231 uint32_t stop3 = start3 + 28 - 1;
232 uint32_t start4 = stop3 + 2;
233 uint32_t stop4 = start4 + 28 - 1;
234 uint32_t start5 = stop4 + (2 * 4);
235 uint32_t stop5 = start5 + 28 - 1;
236 uint32_t start6 = stop5 + 2;
237 uint32_t stop6 = start6 + 28 - 1;
238 uint32_t start7 = stop6 + (2 * 4);
239 uint32_t stop7 = start7 + 28 - 1;
240 uint32_t start8 = stop7 + 2;
241 uint32_t stop8 = start8 + 28 - 1;
242 uint32_t start9 = stop8 + (2 * 4);
243 uint32_t stop9 = start9 + 28 - 1;
244 uint32_t start10 = stop9 + 2;
245 uint32_t stop10 = start10 + 28 - 1;
246 uint32_t start11 = stop10 + (2 * 4);
247 uint32_t stop11 = start11 + 28 - 1;
248 uint32_t start12 = stop11 + 2;
249 uint32_t stop12 = start12 + 28 - 1;
250 uint32_t start13 = stop12 + (2 * 4);
251 uint32_t stop13 = start13 + 28 - 1;
252 uint32_t start14 = stop13 + 2;
253 uint32_t stop14 = start14 + 28 - 1;
254 uint32_t start15 = stop14 + (2 * 4);
255 uint32_t stop15 = start15 + 28 - 1;
256 uint32_t start16 = stop15 + 2;
257 uint32_t stop16 = start16 + 28 - 1;
259 uint32_t innerSlopeWidth =
static_cast<uint32_t
> ((2e6 / bandBandwidth) + 0.5);
260 double lowestPointDbr = (centerFrequency >= 5000) ?
263 std::vector <StartStop> subBands;
264 StartStop maskBand (0, nAllocatedBands + nGuardBands);
265 switch (channelWidth)
269 txPowerPerBandW = txPowerW / 56;
270 subBands.push_back (std::make_pair (start1, stop1));
271 subBands.push_back (std::make_pair (start2, stop2));
276 txPowerPerBandW = txPowerW / 112;
277 subBands.push_back (std::make_pair (start1, stop1));
278 subBands.push_back (std::make_pair (start2, stop2));
279 subBands.push_back (std::make_pair (start3, stop3));
280 subBands.push_back (std::make_pair (start4, stop4));
285 txPowerPerBandW = txPowerW / 224;
287 subBands.push_back (std::make_pair (start1, stop1));
288 subBands.push_back (std::make_pair (start2, stop2));
289 subBands.push_back (std::make_pair (start3, stop3));
290 subBands.push_back (std::make_pair (start4, stop4));
291 subBands.push_back (std::make_pair (start5, stop5));
292 subBands.push_back (std::make_pair (start6, stop6));
293 subBands.push_back (std::make_pair (start7, stop7));
294 subBands.push_back (std::make_pair (start8, stop8));
299 txPowerPerBandW = txPowerW / 448;
301 subBands.push_back (std::make_pair (start1, stop1));
302 subBands.push_back (std::make_pair (start2, stop2));
303 subBands.push_back (std::make_pair (start3, stop3));
304 subBands.push_back (std::make_pair (start4, stop4));
305 subBands.push_back (std::make_pair (start5, stop5));
306 subBands.push_back (std::make_pair (start6, stop6));
307 subBands.push_back (std::make_pair (start7, stop7));
308 subBands.push_back (std::make_pair (start8, stop8));
309 subBands.push_back (std::make_pair (start9, stop9));
310 subBands.push_back (std::make_pair (start10, stop10));
311 subBands.push_back (std::make_pair (start11, stop11));
312 subBands.push_back (std::make_pair (start12, stop12));
313 subBands.push_back (std::make_pair (start13, stop13));
314 subBands.push_back (std::make_pair (start14, stop14));
315 subBands.push_back (std::make_pair (start15, stop15));
316 subBands.push_back (std::make_pair (start16, stop16));
322 txPowerPerBandW, nGuardBands,
323 innerSlopeWidth, lowestPointDbr);
332 NS_LOG_FUNCTION (centerFrequency << channelWidth << txPowerW << guardBandwidth);
333 double bandBandwidth = 78125;
335 uint32_t nGuardBands =
static_cast<uint32_t
> (((2 * guardBandwidth * 1e6) / bandBandwidth) + 0.5);
336 uint32_t nAllocatedBands =
static_cast<uint32_t
> (((channelWidth * 1e6) / bandBandwidth) + 0.5);
338 double txPowerPerBandW = 0.0;
348 uint32_t innerSlopeWidth =
static_cast<uint32_t
> ((1e6 / bandBandwidth) + 0.5);
349 double lowestPointDbr = (centerFrequency >= 5000) ?
352 std::vector <StartStop> subBands;
353 StartStop maskBand (0, nAllocatedBands + nGuardBands);
354 switch (channelWidth)
358 txPowerPerBandW = txPowerW / 242;
359 innerSlopeWidth =
static_cast<uint32_t
> ((5e5 / bandBandwidth) + 0.5);
363 start1 = (nGuardBands / 2) + 6;
364 stop1 = start1 + 121 - 1;
366 stop2 = start2 + 121 - 1;
367 subBands.push_back (std::make_pair (start1, stop1));
368 subBands.push_back (std::make_pair (start2, stop2));
372 txPowerPerBandW = txPowerW / 484;
376 start1 = (nGuardBands / 2) + 12;
377 stop1 = start1 + 242 - 1;
379 stop2 = start2 + 242 - 1;
380 subBands.push_back (std::make_pair (start1, stop1));
381 subBands.push_back (std::make_pair (start2, stop2));
385 txPowerPerBandW = txPowerW / 996;
389 start1 = (nGuardBands / 2) + 12;
390 stop1 = start1 + 498 - 1;
392 stop2 = start2 + 498 - 1;
393 subBands.push_back (std::make_pair (start1, stop1));
394 subBands.push_back (std::make_pair (start2, stop2));
398 txPowerPerBandW = txPowerW / (2 * 996);
399 start1 = (nGuardBands / 2) + 12;
400 stop1 = start1 + 498 - 1;
402 stop2 = start2 + 498 - 1;
403 start3 = stop2 + (2 * 12);
404 stop3 = start3 + 498 - 1;
406 stop4 = start4 + 498 - 1;
407 subBands.push_back (std::make_pair (start1, stop1));
408 subBands.push_back (std::make_pair (start2, stop2));
409 subBands.push_back (std::make_pair (start3, stop3));
410 subBands.push_back (std::make_pair (start4, stop4));
413 NS_FATAL_ERROR (
"ChannelWidth " << channelWidth <<
" unsupported");
419 txPowerPerBandW, nGuardBands,
420 innerSlopeWidth, lowestPointDbr);
440 const double kT_dBm_Hz = -174.0;
441 double kT_W_Hz = std::pow (10.0, (kT_dBm_Hz - 30) / 10.0);
442 double noiseFigureLinear = std::pow (10.0, noiseFigureDb / 10.0);
443 double noisePowerSpectralDensity = kT_W_Hz * noiseFigureLinear;
446 (*noisePsd) = noisePowerSpectralDensity;
447 NS_LOG_INFO (
"NoisePowerSpectralDensity has integrated power of " <<
Integral (*noisePsd));
454 NS_LOG_FUNCTION (centerFrequency << channelWidth << bandGranularity << guardBandwidth);
459 uint32_t bandBandwidth =
static_cast<uint32_t
> (bandGranularity);
460 size_t numBandsInFilter =
static_cast<size_t> (channelWidth * 1e6 / bandBandwidth);
461 if (channelWidth % bandBandwidth != 0)
463 numBandsInFilter += 1;
465 NS_LOG_INFO (
"Num bands in filter: " << numBandsInFilter);
467 NS_ASSERT_MSG ((numBandsInFilter % 2 == 1) && (numBands % 2 == 1),
"Should have odd number of bands");
468 size_t startIndex = (numBands - numBandsInFilter) / 2;
471 for (
size_t i = startIndex; i < startIndex + numBandsInFilter; i++, vit++, bit++)
475 NS_LOG_LOGIC (
"Added subbands " << startIndex <<
" to " << startIndex + numBandsInFilter <<
" to filter");
481 double txPowerPerBandW, uint32_t nGuardBands,
482 uint32_t innerSlopeWidth,
double lowestPointDbr)
484 NS_LOG_FUNCTION (c << allocatedSubBands.front ().first << allocatedSubBands.back ().second << maskBand.first << maskBand.second << txPowerPerBandW << nGuardBands << innerSlopeWidth << lowestPointDbr);
485 uint32_t numSubBands = allocatedSubBands.size ();
487 uint32_t numMaskBands = maskBand.second - maskBand.first + 1;
488 NS_ASSERT (numSubBands && numBands && numMaskBands);
489 NS_LOG_LOGIC (
"Power per band " << txPowerPerBandW <<
"W");
492 double txPowerRefDbm = (10.0 * std::log10 (txPowerPerBandW * 1000.0));
493 double txPowerInnerBandMinDbm = txPowerRefDbm - 20;
494 double txPowerMiddleBandMinDbm = txPowerRefDbm - 28;
495 double txPowerOuterBandMinDbm = txPowerRefDbm + lowestPointDbr;
498 uint32_t outerSlopeWidth = nGuardBands / 4;
499 uint32_t middleSlopeWidth = outerSlopeWidth - (innerSlopeWidth / 2);
501 maskBand.first + outerSlopeWidth - 1);
502 StartStop middleBandLeft (outerBandLeft.second + 1,
503 outerBandLeft.second + middleSlopeWidth);
504 StartStop innerBandLeft (allocatedSubBands.front ().first - innerSlopeWidth,
505 allocatedSubBands.front ().first - 1);
506 StartStop flatJunctionLeft (middleBandLeft.second + 1,
507 innerBandLeft.first - 1);
508 StartStop outerBandRight (maskBand.second - outerSlopeWidth + 1,
510 StartStop middleBandRight (outerBandRight.first - middleSlopeWidth,
511 outerBandRight.first - 1);
512 StartStop innerBandRight (allocatedSubBands.back ().second + 1,
513 allocatedSubBands.back ().second + innerSlopeWidth);
514 StartStop flatJunctionRight (innerBandRight.second + 1,
515 middleBandRight.first - 1);
516 NS_LOG_DEBUG (
"outerBandLeft=[" << outerBandLeft.first <<
";" << outerBandLeft.second <<
"] " <<
517 "middleBandLeft=[" << middleBandLeft.first <<
";" << middleBandLeft.second <<
"] " <<
518 "flatJunctionLeft=[" << flatJunctionLeft.first <<
";" << flatJunctionLeft.second <<
"] " <<
519 "innerBandLeft=[" << innerBandLeft.first <<
";" << innerBandLeft.second <<
"] " <<
520 "subBands=[" << allocatedSubBands.front ().first <<
";" << allocatedSubBands.back ().second <<
"] " <<
521 "innerBandRight=[" << innerBandRight.first <<
";" << innerBandRight.second <<
"] " <<
522 "flatJunctionRight=[" << flatJunctionRight.first <<
";" << flatJunctionRight.second <<
"] " <<
523 "middleBandRight=[" << middleBandRight.first <<
";" << middleBandRight.second <<
"] " <<
524 "outerBandRight=[" << outerBandRight.first <<
";" << outerBandRight.second <<
"] ");
525 NS_ASSERT (numMaskBands == ((allocatedSubBands.back ().second - allocatedSubBands.front ().first + 1)
526 + 2 * (innerSlopeWidth + middleSlopeWidth + outerSlopeWidth)
527 + (flatJunctionLeft.second - flatJunctionLeft.first + 1)
528 + (flatJunctionRight.second - flatJunctionRight.first + 1)));
531 double innerSlope = 20.0 / innerSlopeWidth;
532 double middleSlope = 8.0 / middleSlopeWidth;
533 double outerSlope = (txPowerMiddleBandMinDbm - txPowerOuterBandMinDbm) / outerSlopeWidth;
538 double txPowerW = 0.0;
539 for (
size_t i = 0; i < numBands; i++, vit++, bit++)
541 if (i < maskBand.first || i > maskBand.second)
545 else if (i <= outerBandLeft.second && i >= outerBandLeft.first)
547 txPowerW =
DbmToW (txPowerOuterBandMinDbm + ((i - outerBandLeft.first) * outerSlope));
549 else if (i <= middleBandLeft.second && i >= middleBandLeft.first)
551 txPowerW =
DbmToW (txPowerMiddleBandMinDbm + ((i - middleBandLeft.first) * middleSlope));
553 else if (i <= flatJunctionLeft.second && i >= flatJunctionLeft.first)
555 txPowerW =
DbmToW (txPowerInnerBandMinDbm);
557 else if (i <= innerBandLeft.second && i >= innerBandLeft.first)
559 txPowerW =
DbmToW (txPowerInnerBandMinDbm + ((i - innerBandLeft.first) * innerSlope));
561 else if (i <= allocatedSubBands.back ().second && i >= allocatedSubBands.front ().first)
563 bool insideSubBand =
false;
564 for (uint32_t j = 0; !insideSubBand && j < numSubBands; j++)
566 insideSubBand = (i <= allocatedSubBands[j].second) && (i >= allocatedSubBands[j].
first);
570 txPowerW = txPowerPerBandW;
574 txPowerW =
DbmToW (txPowerInnerBandMinDbm);
577 else if (i <= innerBandRight.second && i >= innerBandRight.first)
579 txPowerW =
DbmToW (txPowerRefDbm - ((i - innerBandRight.first + 1) * innerSlope));
581 else if (i <= flatJunctionRight.second && i >= flatJunctionRight.first)
583 txPowerW =
DbmToW (txPowerInnerBandMinDbm);
585 else if (i <= middleBandRight.second && i >= middleBandRight.first)
587 txPowerW =
DbmToW (txPowerInnerBandMinDbm - ((i - middleBandRight.first + 1) * middleSlope));
589 else if (i <= outerBandRight.second && i >= outerBandRight.first)
591 txPowerW =
DbmToW (txPowerMiddleBandMinDbm - ((i - outerBandRight.first + 1) * outerSlope));
597 double txPowerDbr = 10 * std::log10 (txPowerW / txPowerPerBandW);
599 *vit = txPowerW / (bit->fh - bit->fl);
601 NS_LOG_INFO (
"Added signal power to subbands " << allocatedSubBands.front ().first <<
"-" << allocatedSubBands.back ().second);
609 double currentTxPowerW =
Integral (*c);
610 double normalizationRatio = currentTxPowerW / txPowerW;
611 NS_LOG_LOGIC (
"Current power: " << currentTxPowerW <<
"W vs expected power: " << txPowerW <<
"W" <<
612 " -> ratio (C/E) = " << normalizationRatio);
616 *vit = (*vit) / normalizationRatio;
623 double mW = std::pow (10.0, dBm / 10.0);
646 for (
int i = -4; i < 13 + 7; i++)
649 bi.
fl = 2407.0e6 + i * 5.0e6;
650 bi.
fh = 2407.0e6 + (i + 1) * 5.0e6;
651 bi.
fc = (bi.
fl + bi.
fh) / 2;
652 bands.push_back (bi);
681 double txPowerDensity = txPower / 20e6;
686 (*txPsd)[
channel - 1] = txPowerDensity * 1e-4;
687 (*txPsd)[
channel] = txPowerDensity * 1e-4;
688 (*txPsd)[
channel + 1] = txPowerDensity * 0.0015849;
689 (*txPsd)[
channel + 2] = txPowerDensity * 0.0015849;
690 (*txPsd)[
channel + 3] = txPowerDensity;
691 (*txPsd)[
channel + 4] = txPowerDensity;
692 (*txPsd)[
channel + 5] = txPowerDensity;
693 (*txPsd)[
channel + 6] = txPowerDensity;
694 (*txPsd)[
channel + 7] = txPowerDensity * 0.0015849;
695 (*txPsd)[
channel + 8] = txPowerDensity * 0.0015849;
696 (*txPsd)[
channel + 9] = txPowerDensity * 1e-4;
697 (*txPsd)[
channel + 10] = txPowerDensity * 1e-4;
size_t GetNumBands() const
static std::map< WifiSpectrumModelId, Ptr< SpectrumModel > > g_wifiSpectrumModelMap
static initializer for the class
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
static class ns3::WifiSpectrumModel5MhzInitializer g_WifiSpectrumModel5MhzInitializerInstance
initialization instance for WifiSpectrumModel5Mhz
double Integral(const SpectrumValue &arg)
NS_ASSERT_MSG(false, "Ipv4AddressGenerator::MaskToIndex(): Impossible")
static Ptr< SpectrumValue > CreateHtOfdmTxPowerSpectralDensity(uint32_t centerFrequency, uint16_t channelWidth, double txPowerW, uint16_t guardBandwidth)
Create a transmit power spectral density corresponding to OFDM High Throughput (HT) (802...
WifiSpectrumModelId(uint32_t f, uint16_t w, double b, uint16_t g)
Constructor.
#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.
static Ptr< SpectrumModel > GetSpectrumModel(uint32_t centerFrequency, uint16_t channelWidth, double bandBandwidth, uint16_t guardBandwidth)
Return a SpectrumModel instance corresponding to the center frequency and channel width...
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
static Ptr< SpectrumValue > CreateDsssTxPowerSpectralDensity(uint32_t centerFrequency, double txPowerW, uint16_t guardBandwidth)
Create a transmit power spectral density corresponding to DSSS.
std::vector< BandInfo > Bands
Container of BandInfo.
SpectrumModelUid_t GetUid() const
bool operator<(const EventId &a, const EventId &b)
std::pair< uint32_t, uint32_t > StartStop
typedef for a pair of start and stop sub-band indexes
static void CreateSpectrumMaskForOfdm(Ptr< SpectrumValue > c, std::vector< StartStop > allocatedSubBands, StartStop maskBand, double txPowerPerBandW, uint32_t nGuardBands, uint32_t innerSlopeWidth, double lowestPointDbr)
Create a transmit power spectral density corresponding to OFDM transmit spectrum mask requirements fo...
uint32_t m_centerFrequency
center frequency (in MHz)
double fc
center frequency
static void NormalizeSpectrumMask(Ptr< SpectrumValue > c, double txPowerW)
Normalize the transmit spectrum mask generated by CreateSpectrumMaskForOfdm so that the total transmi...
uint16_t m_guardBandwidth
guard band width (in MHz)
static Ptr< SpectrumValue > CreateNoisePowerSpectralDensity(uint32_t centerFrequency, uint16_t channelWidth, double bandBandwidth, double noiseFigure, uint16_t guardBandwidth)
Create a power spectral density corresponding to the noise.
static Ptr< SpectrumValue > CreateHeOfdmTxPowerSpectralDensity(uint32_t centerFrequency, uint16_t channelWidth, double txPowerW, uint16_t guardBandwidth)
Create a transmit power spectral density corresponding to OFDM High Efficiency (HE) (802...
double f(double x, void *params)
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...
virtual ~WifiSpectrumValue5MhzFactory()
Destructor.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
double fl
lower limit of subband
virtual Ptr< SpectrumValue > CreateConstant(double psd)
Creates a SpectrumValue instance with a constant value for all frequencies.
Wifi Spectrum Model structure.
static Ptr< SpectrumValue > CreateRfFilter(uint32_t centerFrequency, uint16_t channelWidth, double bandBandwidth, uint16_t guardBandwidth)
Create a spectral density corresponding to the RF filter.
Ptr< const SpectrumModel > GetSpectrumModel() const
NS_LOG_LOGIC("Net device "<< nd<< " is not bridged")
static double DbmToW(double dbm)
Convert from dBm to Watts.
WifiSpectrumModel5MhzInitializer()
virtual ~WifiSpectrumValueHelper()
Destructor.
double m_bandBandwidth
width of each band (in Hz)
Values::iterator ValuesBegin()
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Static class to initialize the values for the 2.4 GHz Wi-Fi spectrum model.
virtual Ptr< SpectrumValue > CreateRfFilter(uint8_t channel)
Creates a SpectrumValue instance which represents the frequency response of the RF filter which is us...
static Ptr< SpectrumValue > CreateOfdmTxPowerSpectralDensity(uint32_t centerFrequency, uint16_t channelWidth, double txPowerW, uint16_t guardBandwidth)
Create a transmit power spectral density corresponding to OFDM (802.11a/g).
uint16_t m_channelWidth
channel width (in MHz)
double fh
upper limit of subband
static Ptr< SpectrumModel > g_WifiSpectrumModel5Mhz
static initializer for the class
The building block of a SpectrumModel.
Bands::const_iterator ConstBandsBegin() const