A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
wifi-transmit-mask-test.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2017 Orange Labs
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Rediet <getachew.redieteab@orange.com>
7 */
8
9#include "ns3/fatal-error.h"
10#include "ns3/log.h"
11#include "ns3/test.h"
12#include "ns3/wifi-phy-band.h"
13#include "ns3/wifi-phy-common.h"
14#include "ns3/wifi-spectrum-value-helper.h"
15#include "ns3/wifi-standards.h"
16
17#include <cmath>
18#include <vector>
19
20using namespace ns3;
21
22NS_LOG_COMPONENT_DEFINE("WifiTransmitMaskTest");
23
24/**
25 * \ingroup wifi-test
26 * \ingroup tests
27 *
28 * \brief Test checks if Wifi spectrum values for OFDM are generated properly.
29 * Different test cases are configured by defining different standards and bandwidth.
30 */
32{
33 public:
34 /**
35 * typedef for a pair of sub-band index and relative power value
36 */
37 typedef std::pair<uint32_t, dBr_u> IndexPowerPair;
38
39 /**
40 * typedef for a vector of pairs of sub-band index and relative power value
41 */
42 typedef std::vector<IndexPowerPair> IndexPowerVect;
43
44 /**
45 * Constructor
46 *
47 * \param name test reference name
48 * \param standard selected standard
49 * \param band selected PHY band
50 * \param channelWidth total channel width
51 * \param centerFrequencies the center frequency per contiguous segment
52 * \param maskRefs vector of expected power values and corresponding indexes of generated PSD
53 * (only start and stop indexes/values given)
54 * \param tolerance tolerance
55 * \param precision precision (in decimals)
56 * \param puncturedSubchannels bitmap indicating whether a 20 MHz subchannel is punctured or not
57 * (only for 802.11ax and later)
58 */
59 WifiOfdmMaskSlopesTestCase(const std::string& name,
60 WifiStandard standard,
61 WifiPhyBand band,
62 MHz_u channelWidth,
63 const std::vector<MHz_u>& centerFrequencies,
64 const IndexPowerVect& maskRefs,
65 dB_u tolerance,
66 std::size_t precision,
67 const std::vector<bool>& puncturedSubchannels = std::vector<bool>{});
68 ~WifiOfdmMaskSlopesTestCase() override = default;
69
70 private:
71 void DoSetup() override;
72 void DoRun() override;
73
74 /**
75 * Interpolate PSD values for indexes between provided start and stop and append to provided
76 * vector.
77 *
78 * \param vect vector of sub-band index and relative power value pairs to which interpolated
79 values should be appended
80 * \param start pair of sub-band index and relative power value for interval start
81 * \param stop pair of sub-band index and relative power value for interval stop
82 */
84 IndexPowerPair start,
85 IndexPowerPair stop) const;
86
87 WifiStandard m_standard; ///< the wifi standard to test
88 WifiPhyBand m_band; ///< the wifi PHY band to test
89 MHz_u m_channelWidth; ///< the total channel width to test
90 std::vector<MHz_u> m_centerFreqs; ///< the center frequency per contiguous segment to test
91 std::vector<bool>
92 m_puncturedSubchannels; ///< bitmap indicating whether a 20 MHz subchannel is punctured or
93 ///< not (only used for 802.11ax and later)
94 Ptr<SpectrumValue> m_actualSpectrum; ///< actual spectrum value
95 IndexPowerVect m_expectedPsd; ///< expected power values
96 dB_u m_tolerance; ///< tolerance
97 std::size_t m_precision; ///< precision for double calculations (in decimals)
98};
99
101 const std::string& name,
102 WifiStandard standard,
103 WifiPhyBand band,
104 MHz_u channelWidth,
105 const std::vector<MHz_u>& centerFrequencies,
106 const IndexPowerVect& maskRefs,
107 dB_u tolerance,
108 std::size_t precision,
109 const std::vector<bool>& puncturedSubchannels)
110 : TestCase(std::string("SpectrumValue ") + name),
111 m_standard{standard},
112 m_band{band},
113 m_channelWidth{channelWidth},
114 m_centerFreqs{centerFrequencies},
115 m_puncturedSubchannels{puncturedSubchannels},
116 m_actualSpectrum{},
117 m_expectedPsd{maskRefs},
118 m_tolerance{tolerance},
119 m_precision{precision}
120{
121 NS_LOG_FUNCTION(this << name << standard << band << channelWidth << tolerance << precision
122 << puncturedSubchannels.size());
123}
124
125void
127{
128 NS_LOG_FUNCTION(this);
129 NS_ASSERT(!m_centerFreqs.empty());
130 NS_ASSERT(m_expectedPsd.size() % 2 == 0); // start/stop pairs expected
131
132 dBr_u outerBandMaximumRejection = 0.0;
133 switch (m_band)
134 {
135 default:
137 outerBandMaximumRejection = -40;
138 break;
140 outerBandMaximumRejection = (m_standard >= WIFI_STANDARD_80211n) ? -45 : -40;
141 break;
143 outerBandMaximumRejection = -40;
144 break;
145 }
146
147 Watt_u refTxPower{1}; // have to work in dBr when comparing though
148 switch (m_standard)
149 {
152 NS_ASSERT((m_channelWidth == 5) || (m_channelWidth == 10));
156 refTxPower,
158 -20.0,
159 -28.0,
160 outerBandMaximumRejection);
161 break;
162
169 refTxPower,
171 -20.0,
172 -28.0,
173 outerBandMaximumRejection);
174 break;
175
182 refTxPower,
184 -20.0,
185 -28.0,
186 outerBandMaximumRejection);
187 break;
188
194 refTxPower,
196 -20.0,
197 -28.0,
198 outerBandMaximumRejection);
199 break;
200
203 NS_ASSERT(m_channelWidth == 20 || m_channelWidth == 40 || m_channelWidth == 80 ||
204 m_channelWidth == 160);
208 refTxPower,
210 -20.0,
211 -28.0,
212 outerBandMaximumRejection);
213 break;
214
217 (m_channelWidth < 80)); // not enough space in 2.4 GHz bands
218 NS_ASSERT(m_channelWidth == 20 || m_channelWidth == 40 || m_channelWidth == 80 ||
219 m_channelWidth == 160);
223 refTxPower,
225 -20.0,
226 -28.0,
227 outerBandMaximumRejection,
229 break;
230
231 default:
232 NS_FATAL_ERROR("Standard unknown or non-OFDM");
233 break;
234 }
235
236 NS_LOG_INFO("Build expected PSD");
237 IndexPowerVect builtPsd;
238 for (uint32_t i = 0; i < m_expectedPsd.size(); i += 2)
239 {
241 }
242 m_expectedPsd = builtPsd;
243}
244
245void
247 IndexPowerPair start,
248 IndexPowerPair stop) const
249{
250 NS_LOG_FUNCTION(start.first << start.second << stop.first << stop.second);
251 NS_ASSERT(start.first <= stop.first);
252
253 if (start.first == stop.first) // only one point, no need to interpolate
254 {
255 NS_ASSERT(start.second == stop.second);
256 vect.push_back(start);
257 NS_LOG_LOGIC("Append (" << start.first << ", " << stop.second << ")");
258 return;
259 }
260
261 double slope = (stop.second - start.second) / (stop.first - start.first);
262 for (uint32_t i = start.first; i <= stop.first; i++)
263 {
264 double val = start.second + slope * (i - start.first);
265 double multiplier = std::round(std::pow(10.0, static_cast<double>(m_precision)));
266 val = std::floor(val * multiplier + 0.5) / multiplier;
267 vect.emplace_back(i, val);
268 NS_LOG_LOGIC("Append (" << i << ", " << val << ")");
269 }
270
271 NS_ASSERT(vect.back().first == stop.first &&
272 TestDoubleIsEqual(vect.back().second, stop.second, m_tolerance));
273}
274
275void
277{
278 NS_LOG_FUNCTION(this);
279 dBr_u currentPower = 0.0; // have to work in dBr so as to compare with expected slopes
280 Watt_u maxPower = (*m_actualSpectrum)[0];
281 for (auto&& vit = m_actualSpectrum->ConstValuesBegin();
282 vit != m_actualSpectrum->ConstValuesEnd();
283 ++vit)
284 {
285 maxPower = std::max(maxPower, *vit);
286 }
287
288 NS_LOG_INFO("Compare expected PSD");
289 for (const auto& [subcarrier, expectedValue] : m_expectedPsd)
290 {
291 currentPower = 10.0 * std::log10((*m_actualSpectrum)[subcarrier] / maxPower);
292 NS_LOG_LOGIC("For " << subcarrier << ", expected: " << expectedValue
293 << " vs obtained: " << currentPower);
294 NS_TEST_EXPECT_MSG_EQ_TOL(currentPower,
295 expectedValue,
297 "Spectrum value mismatch for subcarrier " << subcarrier);
298 }
299}
300
301/**
302 * \ingroup wifi-test
303 * \ingroup tests
304 *
305 * \brief Test suite for checking the consistency of different OFDM-based transmit masks.
306 */
308{
309 public:
311};
312
314
316 : TestSuite("wifi-transmit-mask", Type::UNIT)
317{
318 // LogLevel logLevel = (LogLevel)(LOG_PREFIX_FUNC | LOG_PREFIX_TIME | LOG_LEVEL_ALL);
319 // LogComponentEnable ("WifiTransmitMaskTest", logLevel);
320 // LogComponentEnable ("WifiSpectrumValueHelper", logLevel);
321
322 NS_LOG_INFO("Creating WifiTransmitMaskTestSuite");
323
325 dB_u tol = 10e-2;
326 double prec = 10; // in decimals
327
328 // ============================================================================================
329 // 11p 5MHz
330 NS_LOG_FUNCTION("Check slopes for 11p 5MHz");
331 maskSlopes = {
332 std::make_pair(0, -40.0), // Outer band left (start)
333 std::make_pair(31, -28.375), // Outer band left (stop)
334 std::make_pair(32, -28.000), // Middle band left (start)
335 std::make_pair(60, -20.276), // Middle band left (stop)
336 std::make_pair(61, -20.0), // Flat junction band left (start)
337 std::make_pair(63, -20.0), // Flat junction band left (stop)
338 std::make_pair(64, -20.0), // Inner band left (start)
339 std::make_pair(69, -3.333), // Inner band left (stop)
340 std::make_pair(123, -3.333), // Inner band right (start)
341 std::make_pair(128, -20.0), // Inner band right (stop)
342 std::make_pair(129, -20.0), // Flat junction band right (start)
343 std::make_pair(131, -20.0), // Flat junction band right (stop)
344 std::make_pair(132, -20.276), // Middle band right (start)
345 std::make_pair(160, -28.000), // Middle band right (stop)
346 std::make_pair(161, -28.375), // Outer band right (start)
347 std::make_pair(192, -40.0), // Outer band right (stop)
348 };
349
353 5,
354 {5860},
355 maskSlopes,
356 tol,
357 prec),
358 TestCase::Duration::QUICK);
359
360 // ============================================================================================
361 // 11p 10MHz
362 NS_LOG_FUNCTION("Check slopes for 11p 10MHz");
363 maskSlopes = {
364 std::make_pair(0, -40.0), // Outer band left (start)
365 std::make_pair(31, -28.375), // Outer band left (stop)
366 std::make_pair(32, -28.000), // Middle band left (start)
367 std::make_pair(60, -20.276), // Middle band left (stop)
368 std::make_pair(61, -20.0), // Flat junction band left (start)
369 std::make_pair(63, -20.0), // Flat junction band left (stop)
370 std::make_pair(64, -20.0), // Inner band left (start)
371 std::make_pair(69, -3.333), // Inner band left (stop)
372 std::make_pair(123, -3.333), // Inner band right (start)
373 std::make_pair(128, -20.0), // Inner band right (stop)
374 std::make_pair(129, -20.0), // Flat junction band right (start)
375 std::make_pair(131, -20.0), // Flat junction band right (stop)
376 std::make_pair(132, -20.276), // Middle band right (start)
377 std::make_pair(160, -28.000), // Middle band right (stop)
378 std::make_pair(161, -28.375), // Outer band right (start)
379 std::make_pair(192, -40.0), // Outer band right (stop)
380 };
381
385 10,
386 {5860},
387 maskSlopes,
388 tol,
389 prec),
390 TestCase::Duration::QUICK);
391
392 // ============================================================================================
393 // 11a
394 NS_LOG_FUNCTION("Check slopes for 11a");
395 maskSlopes = {
396 std::make_pair(0, -40.0), // Outer band left (start)
397 std::make_pair(31, -28.375), // Outer band left (stop)
398 std::make_pair(32, -28.000), // Middle band left (start)
399 std::make_pair(60, -20.276), // Middle band left (stop)
400 std::make_pair(61, -20.0), // Flat junction band left (start)
401 std::make_pair(63, -20.0), // Flat junction band left (stop)
402 std::make_pair(64, -20.0), // Inner band left (start)
403 std::make_pair(69, -3.333), // Inner band left (stop)
404 std::make_pair(123, -3.333), // Inner band right (start)
405 std::make_pair(128, -20.0), // Inner band right (stop)
406 std::make_pair(129, -20.0), // Flat junction band right (start)
407 std::make_pair(131, -20.0), // Flat junction band right (stop)
408 std::make_pair(132, -20.276), // Middle band right (start)
409 std::make_pair(160, -28.000), // Middle band right (stop)
410 std::make_pair(161, -28.375), // Outer band right (start)
411 std::make_pair(192, -40.0), // Outer band right (stop)
412 };
413
417 20,
418 {5180},
419 maskSlopes,
420 tol,
421 prec),
422 TestCase::Duration::QUICK);
423
424 // ============================================================================================
425 // 11g
426 NS_LOG_FUNCTION("Check slopes for 11g");
427 // same slopes as 11a
431 20,
432 {2412},
433 maskSlopes,
434 tol,
435 prec),
436 TestCase::Duration::QUICK);
437
438 // ============================================================================================
439 // 11n 20MHz @ 2.4GHz
440 NS_LOG_FUNCTION("Check slopes for 11n 20MHz @ 2.4GHz");
441 maskSlopes = {
442 std::make_pair(0, -45.000), // Outer band left (start)
443 std::make_pair(31, -28.531), // Outer band left (stop)
444 std::make_pair(32, -28.000), // Middle band left (start)
445 std::make_pair(60, -20.276), // Middle band left (stop)
446 std::make_pair(61, -20.0), // Flat junction band left (start)
447 std::make_pair(61, -20.0), // Flat junction band left (stop)
448 std::make_pair(62, -20.0), // Inner band left (start)
449 std::make_pair(67, -3.333), // Inner band left (stop)
450 std::make_pair(125, -3.333), // Inner band right (start)
451 std::make_pair(130, -20.0), // Inner band right (stop)
452 std::make_pair(131, -20.0), // Flat junction band right (start)
453 std::make_pair(131, -20.0), // Flat junction band right (stop)
454 std::make_pair(132, -20.276), // Middle band right (start)
455 std::make_pair(160, -28.000), // Middle band right (stop)
456 std::make_pair(161, -28.531), // Outer band right (start)
457 std::make_pair(192, -45.000), // Outer band right (stop)
458 };
459
460 AddTestCase(new WifiOfdmMaskSlopesTestCase("11n_2.4GHz 20MHz",
463 20,
464 {2412},
465 maskSlopes,
466 tol,
467 prec),
468 TestCase::Duration::QUICK);
469
470 // ============================================================================================
471 // 11n 20MHz @ 5GHz
472 NS_LOG_FUNCTION("Check slopes for 11n 20MHz @ 5GHz");
473 maskSlopes = {
474 std::make_pair(0, -40.0), // Outer band left (start)
475 std::make_pair(31, -28.375), // Outer band left (stop)
476 std::make_pair(32, -28.000), // Middle band left (start)
477 std::make_pair(60, -20.276), // Middle band left (stop)
478 std::make_pair(61, -20.0), // Flat junction band left (start)
479 std::make_pair(61, -20.0), // Flat junction band left (stop)
480 std::make_pair(62, -20.0), // Inner band left (start)
481 std::make_pair(67, -3.333), // Inner band left (stop)
482 std::make_pair(125, -3.333), // Inner band right (start)
483 std::make_pair(130, -20.0), // Inner band right (stop)
484 std::make_pair(131, -20.0), // Flat junction band right (start)
485 std::make_pair(131, -20.0), // Flat junction band right (stop)
486 std::make_pair(132, -20.276), // Middle band right (start)
487 std::make_pair(160, -28.000), // Middle band right (stop)
488 std::make_pair(161, -28.375), // Outer band right (start)
489 std::make_pair(192, -40.0), // Outer band right (stop)
490 };
491
492 AddTestCase(new WifiOfdmMaskSlopesTestCase("11n_5GHz 20MHz",
495 20,
496 {5180},
497 maskSlopes,
498 tol,
499 prec),
500 TestCase::Duration::QUICK);
501
502 // ============================================================================================
503 // 11n 40MHz @ 2.4GHz
504 NS_LOG_FUNCTION("Check slopes for 11n 40MHz @ 2.4GHz");
505 maskSlopes = {
506 std::make_pair(0, -45.000), // Outer band left (start)
507 std::make_pair(63, -28.266), // Outer band left (stop)
508 std::make_pair(64, -28.000), // Middle band left (start)
509 std::make_pair(124, -20.131), // Middle band left (stop)
510 std::make_pair(125, -20.0), // Flat junction band left (start)
511 std::make_pair(125, -20.0), // Flat junction band left (stop)
512 std::make_pair(126, -20.0), // Inner band left (start)
513 std::make_pair(131, -3.333), // Inner band left (stop)
514 std::make_pair(253, -3.333), // Inner band right (start)
515 std::make_pair(258, -20.0), // Inner band right (stop)
516 std::make_pair(259, -20.0), // Flat junction band right (start)
517 std::make_pair(259, -20.0), // Flat junction band right (stop)
518 std::make_pair(260, -20.131), // Middle band right (start)
519 std::make_pair(320, -28.000), // Middle band right (stop)
520 std::make_pair(321, -28.266), // Outer band right (start)
521 std::make_pair(384, -45.000), // Outer band right (stop)
522 };
523
524 AddTestCase(new WifiOfdmMaskSlopesTestCase("11n_2.4GHz 40MHz",
527 40,
528 {2422},
529 maskSlopes,
530 tol,
531 prec),
532 TestCase::Duration::QUICK);
533
534 // ============================================================================================
535 // 11n 20MHz @ 5GHz
536 NS_LOG_FUNCTION("Check slopes for 11n 40MHz @ 5GHz");
537 maskSlopes = {
538 std::make_pair(0, -40.0), // Outer band left (start)
539 std::make_pair(63, -28.188), // Outer band left (stop)
540 std::make_pair(64, -28.000), // Middle band left (start)
541 std::make_pair(124, -20.131), // Middle band left (stop)
542 std::make_pair(125, -20.0), // Flat junction band left (start)
543 std::make_pair(125, -20.0), // Flat junction band left (stop)
544 std::make_pair(126, -20.0), // Inner band left (start)
545 std::make_pair(131, -3.333), // Inner band left (stop)
546 std::make_pair(253, -3.333), // Inner band right (start)
547 std::make_pair(258, -20.0), // Inner band right (stop)
548 std::make_pair(259, -20.0), // Flat junction band right (start)
549 std::make_pair(259, -20.0), // Flat junction band right (stop)
550 std::make_pair(260, -20.131), // Middle band right (start)
551 std::make_pair(320, -28.000), // Middle band right (stop)
552 std::make_pair(321, -28.188), // Outer band right (start)
553 std::make_pair(384, -40.0), // Outer band right (stop)
554 };
555
556 AddTestCase(new WifiOfdmMaskSlopesTestCase("11n_5GHz 40MHz",
559 40,
560 {5190},
561 maskSlopes,
562 tol,
563 prec),
564 TestCase::Duration::QUICK);
565
566 // ============================================================================================
567 // 11ac 20MHz
568 NS_LOG_FUNCTION("Check slopes for 11ac 20MHz");
569 maskSlopes = {
570 std::make_pair(0, -40.0), // Outer band left (start)
571 std::make_pair(31, -28.375), // Outer band left (stop)
572 std::make_pair(32, -28.000), // Middle band left (start)
573 std::make_pair(60, -20.276), // Middle band left (stop)
574 std::make_pair(61, -20.0), // Flat junction band left (start)
575 std::make_pair(61, -20.0), // Flat junction band left (stop)
576 std::make_pair(62, -20.0), // Inner band left (start)
577 std::make_pair(67, -3.333), // Inner band left (stop)
578 std::make_pair(125, -3.333), // Inner band right (start)
579 std::make_pair(130, -20.0), // Inner band right (stop)
580 std::make_pair(131, -20.0), // Flat junction band right (start)
581 std::make_pair(131, -20.0), // Flat junction band right (stop)
582 std::make_pair(132, -20.276), // Middle band right (start)
583 std::make_pair(160, -28.000), // Middle band right (stop)
584 std::make_pair(161, -28.375), // Outer band right (start)
585 std::make_pair(192, -40.0), // Outer band right (stop)
586 };
587
591 20,
592 {5180},
593 maskSlopes,
594 tol,
595 prec),
596 TestCase::Duration::QUICK);
597
598 // ============================================================================================
599 // 11ac 20MHz
600 NS_LOG_FUNCTION("Check slopes for 11ac 40MHz");
601 maskSlopes = {
602 std::make_pair(0, -40.0), // Outer band left (start)
603 std::make_pair(63, -28.188), // Outer band left (stop)
604 std::make_pair(64, -28.000), // Middle band left (start)
605 std::make_pair(124, -20.131), // Middle band left (stop)
606 std::make_pair(125, -20.0), // Flat junction band left (start)
607 std::make_pair(125, -20.0), // Flat junction band left (stop)
608 std::make_pair(126, -20.0), // Inner band left (start)
609 std::make_pair(131, -3.333), // Inner band left (stop)
610 std::make_pair(253, -3.333), // Inner band right (start)
611 std::make_pair(258, -20.0), // Inner band right (stop)
612 std::make_pair(259, -20.0), // Flat junction band right (start)
613 std::make_pair(259, -20.0), // Flat junction band right (stop)
614 std::make_pair(260, -20.131), // Middle band right (start)
615 std::make_pair(320, -28.000), // Middle band right (stop)
616 std::make_pair(321, -28.188), // Outer band right (start)
617 std::make_pair(384, -40.0), // Outer band right (stop)
618 };
619
623 40,
624 {5190},
625 maskSlopes,
626 tol,
627 prec),
628 TestCase::Duration::QUICK);
629
630 // ============================================================================================
631 // 11ac 80MHz
632 NS_LOG_FUNCTION("Check slopes for 11ac 80MHz");
633 maskSlopes = {
634 std::make_pair(0, -40.0), // Outer band left (start)
635 std::make_pair(127, -28.094), // Outer band left (stop)
636 std::make_pair(128, -28.000), // Middle band left (start)
637 std::make_pair(252, -20.064), // Middle band left (stop)
638 std::make_pair(253, -20.0), // Flat junction band left (start)
639 std::make_pair(253, -20.0), // Flat junction band left (stop)
640 std::make_pair(254, -20.0), // Inner band left (start)
641 std::make_pair(259, -3.333), // Inner band left (stop)
642 std::make_pair(509, -3.333), // Inner band right (start)
643 std::make_pair(514, -20.0), // Inner band right (stop)
644 std::make_pair(515, -20.0), // Flat junction band right (start)
645 std::make_pair(515, -20.0), // Flat junction band right (stop)
646 std::make_pair(516, -20.064), // Middle band right (start)
647 std::make_pair(640, -28.000), // Middle band right (stop)
648 std::make_pair(641, -28.094), // Outer band right (start)
649 std::make_pair(768, -40.0), // Outer band right (stop)
650 };
651
655 80,
656 {5210},
657 maskSlopes,
658 tol,
659 prec),
660 TestCase::Duration::QUICK);
661
662 // ============================================================================================
663 // 11ac 20MHz
664 NS_LOG_FUNCTION("Check slopes for 11ac 160MHz");
665 maskSlopes = {
666 std::make_pair(0, -40.0), // Outer band left (start)
667 std::make_pair(255, -28.047), // Outer band left (stop)
668 std::make_pair(256, -28.000), // Middle band left (start)
669 std::make_pair(508, -20.032), // Middle band left (stop)
670 std::make_pair(509, -20.0), // Flat junction band left (start)
671 std::make_pair(509, -20.0), // Flat junction band left (stop)
672 std::make_pair(510, -20.0), // Inner band left (start)
673 std::make_pair(515, -3.333), // Inner band left (stop)
674 std::make_pair(1021, -3.333), // Inner band right (start)
675 std::make_pair(1026, -20.0), // Inner band right (stop)
676 std::make_pair(1027, -20.0), // Flat junction band right (start)
677 std::make_pair(1027, -20.0), // Flat junction band right (stop)
678 std::make_pair(1028, -20.032), // Middle band right (start)
679 std::make_pair(1280, -28.000), // Middle band right (stop)
680 std::make_pair(1281, -28.047), // Outer band right (start)
681 std::make_pair(1536, -40.0), // Outer band right (stop)
682 };
683
684 AddTestCase(new WifiOfdmMaskSlopesTestCase("11ac 160MHz",
687 160,
688 {5250},
689 maskSlopes,
690 tol,
691 prec),
692 TestCase::Duration::QUICK);
693
694 // ============================================================================================
695 // 11ac 80+80MHz
696 NS_LOG_FUNCTION("Check slopes for 11ac 80+80MHz");
697 maskSlopes = {
698 std::make_pair(0, -40.0), // Outer band left (start)
699 std::make_pair(127, -28.094), // Outer band left (stop)
700 std::make_pair(128, -28.000), // Middle band left (start)
701 std::make_pair(252, -20.064), // Middle band left (stop)
702 std::make_pair(253, -20.0), // Flat junction band left (start)
703 std::make_pair(253, -20.0), // Flat junction band left (stop)
704 std::make_pair(254, -20.0), // Inner band left for first segment (start)
705 std::make_pair(259, -3.333), // Inner band left for first segment (stop)
706 std::make_pair(509, -3.333), // Inner band right for first segment (start)
707 std::make_pair(514, -20.0), // Inner band right for first segment (stop)
708 std::make_pair(515, -20.0), // Flat junction band right for first segment (start)
709 std::make_pair(515, -20.0), // Flat junction band right for first segment (stop)
710 std::make_pair(516, -20.01), // start linear sum region left (no interpolation possible, so
711 // provide 2 times the same point)
712 std::make_pair(516, -20.01), // start linear sum region left (no interpolation possible, so
713 // provide 2 times the same point)
714 std::make_pair(639, -24.99), // stop linear sum region left (no interpolation possible, so
715 // provide 2 times the same point)
716 std::make_pair(639, -24.99), // stop linear sum region left (no interpolation possible, so
717 // provide 2 times the same point)
718 std::make_pair(640, -25.0), // middle linear sum region (no interpolation possible, so
719 // provide 2 times the same point)
720 std::make_pair(640, -25.0), // middle linear sum region (no interpolation possible, so
721 // provide 2 times the same point)
722 std::make_pair(641, -24.99), // start linear sum region right (no interpolation possible, so
723 // provide 2 times the same point)
724 std::make_pair(641, -24.99), // start linear sum region right (no interpolation possible, so
725 // provide 2 times the same point)
726 std::make_pair(764, -20.01), // stop linear sum region right (no interpolation possible, so
727 // provide 2 times the same point)
728 std::make_pair(764, -20.01), // stop linear sum region right (no interpolation possible, so
729 // provide 2 times the same point)
730 std::make_pair(765, -20.0), // Flat junction band left (start)
731 std::make_pair(765, -20.0), // Flat junction band left (stop)
732 std::make_pair(766, -20.0), // Inner band left for second segment (start)
733 std::make_pair(771, -3.333), // Inner band left for second segment (stop)
734 std::make_pair(1021, -3.333), // Inner band right for second segment (start)
735 std::make_pair(1026, -20.0), // Inner band right for second segment (stop)
736 std::make_pair(1027, -20.0), // Flat junction band right (start)
737 std::make_pair(1027, -20.0), // Flat junction band right (stop)
738 std::make_pair(1028, -20.016), // Middle band right (start)
739 std::make_pair(1152, -28.000), // Middle band right (stop)
740 std::make_pair(1153, -28.023), // Outer band right (start)
741 std::make_pair(1280, -40.0), // Outer band right (stop)
742 };
743
744 AddTestCase(new WifiOfdmMaskSlopesTestCase("11ac 80+80MHz",
747 160,
748 {5530, 5690},
749 maskSlopes,
750 tol,
751 prec),
752 TestCase::Duration::QUICK);
753
754 // ============================================================================================
755 // 11ax 20MHz @ 2.4GHz
756 NS_LOG_FUNCTION("Check slopes for 11ax 20MHz @ 2.4GHz");
757 maskSlopes = {
758 std::make_pair(0, -45.000), // Outer band left (start)
759 std::make_pair(127, -28.133), // Outer band left (stop)
760 std::make_pair(128, -28.000), // Middle band left (start)
761 std::make_pair(252, -20.064), // Middle band left (stop)
762 std::make_pair(253, -20.0), // Flat junction band left (start)
763 std::make_pair(255, -20.0), // Flat junction band left (stop)
764 std::make_pair(256, -20.0), // Inner band left (start)
765 std::make_pair(261, -3.333), // Inner band left (stop)
766 std::make_pair(262, 0.0), // allocated band left (start)
767 std::make_pair(382, 0.0), // allocated band left (stop)
768 std::make_pair(383, -20.0), // DC band (start)
769 std::make_pair(385, -20.0), // DC band (stop)
770 std::make_pair(386, 0.0), // allocated band right (start)
771 std::make_pair(506, 0.0), // allocated band right (stop)
772 std::make_pair(507, -3.333), // Inner band right (start)
773 std::make_pair(512, -20.0), // Inner band right (stop)
774 std::make_pair(513, -20.0), // Flat junction band right (start)
775 std::make_pair(515, -20.0), // Flat junction band right (stop)
776 std::make_pair(516, -20.064), // Middle band right (start)
777 std::make_pair(640, -28.000), // Middle band right (stop)
778 std::make_pair(641, -28.133), // Outer band right (start)
779 std::make_pair(768, -45.000), // Outer band right (stop)
780 };
781
782 AddTestCase(new WifiOfdmMaskSlopesTestCase("11ax_2.4GHz 20MHz",
785 20,
786 {2412},
787 maskSlopes,
788 tol,
789 prec),
790 TestCase::Duration::QUICK);
791
792 // ============================================================================================
793 // 11ax 20MHz @ 5GHz
794 NS_LOG_FUNCTION("Check slopes for 11ax 20MHz @ 5GHz");
795 maskSlopes = {
796 std::make_pair(0, -40.0), // Outer band left (start)
797 std::make_pair(127, -28.094), // Outer band left (stop)
798 std::make_pair(128, -28.000), // Middle band left (start)
799 std::make_pair(252, -20.064), // Middle band left (stop)
800 std::make_pair(253, -20.0), // Flat junction band left (start)
801 std::make_pair(255, -20.0), // Flat junction band left (stop)
802 std::make_pair(256, -20.0), // Inner band left (start)
803 std::make_pair(261, -3.333), // Inner band left (stop)
804 std::make_pair(262, 0.0), // allocated band left (start)
805 std::make_pair(382, 0.0), // allocated band left (stop)
806 std::make_pair(383, -20.0), // DC band (start)
807 std::make_pair(385, -20.0), // DC band (stop)
808 std::make_pair(386, 0.0), // allocated band right (start)
809 std::make_pair(506, 0.0), // allocated band right (stop)
810 std::make_pair(507, -3.333), // Inner band right (start)
811 std::make_pair(512, -20.0), // Inner band right (stop)
812 std::make_pair(513, -20.0), // Flat junction band right (start)
813 std::make_pair(515, -20.0), // Flat junction band right (stop)
814 std::make_pair(516, -20.064), // Middle band right (start)
815 std::make_pair(640, -28.000), // Middle band right (stop)
816 std::make_pair(641, -28.094), // Outer band right (start)
817 std::make_pair(768, -40.0), // Outer band right (stop)
818 };
819
820 AddTestCase(new WifiOfdmMaskSlopesTestCase("11ax_5GHz 20MHz",
823 20,
824 {5180},
825 maskSlopes,
826 tol,
827 prec),
828 TestCase::Duration::QUICK);
829
830 // ============================================================================================
831 // 11ax 40MHz @ 2.4GHz
832 NS_LOG_FUNCTION("Check slopes for 11ax 40MHz @ 2.4GHz");
833 maskSlopes = {
834 std::make_pair(0, -45.000), // Outer band left (start)
835 std::make_pair(255, -28.066), // Outer band left (stop)
836 std::make_pair(256, -28.000), // Middle band left (start)
837 std::make_pair(505, -20.032), // Middle band left (stop)
838 std::make_pair(506, -20.0), // Flat junction band left (start)
839 std::make_pair(510, -20.0), // Flat junction band left (stop)
840 std::make_pair(511, -20.0), // Inner band left (start)
841 std::make_pair(523, -1.538), // Inner band left (stop)
842 std::make_pair(524, 0.0), // allocated band left (start)
843 std::make_pair(765, 0.0), // allocated band left (stop)
844 std::make_pair(766, -20.0), // DC band (start)
845 std::make_pair(770, -20.0), // DC band (stop)
846 std::make_pair(771, 0.0), // allocated band right (start)
847 std::make_pair(1012, 0.0), // allocated band right (stop)
848 std::make_pair(1013, -1.538), // Inner band right (start)
849 std::make_pair(1025, -20.0), // Inner band right (stop)
850 std::make_pair(1026, -20.0), // Flat junction band right (start)
851 std::make_pair(1030, -20.0), // Flat junction band right (stop)
852 std::make_pair(1031, -20.032), // Middle band right (start)
853 std::make_pair(1280, -28.000), // Middle band right (stop)
854 std::make_pair(1281, -28.066), // Outer band right (start)
855 std::make_pair(1536, -45.000), // Outer band right (stop)
856 };
857
858 AddTestCase(new WifiOfdmMaskSlopesTestCase("11ax_2.4GHz 40MHz",
861 40,
862 {2422},
863 maskSlopes,
864 tol,
865 prec),
866 TestCase::Duration::QUICK);
867
868 // ============================================================================================
869 // 11ax 40MHz @ 5GHz
870 NS_LOG_FUNCTION("Check slopes for 11ax 40MHz @ 5GHz");
871 maskSlopes = {
872 std::make_pair(0, -40.0), // Outer band left (start)
873 std::make_pair(255, -28.047), // Outer band left (stop)
874 std::make_pair(256, -28.000), // Middle band left (start)
875 std::make_pair(505, -20.032), // Middle band left (stop)
876 std::make_pair(506, -20.0), // Flat junction band left (start)
877 std::make_pair(510, -20.0), // Flat junction band left (stop)
878 std::make_pair(511, -20.0), // Inner band left (start)
879 std::make_pair(523, -1.538), // Inner band left (stop)
880 std::make_pair(524, 0.0), // allocated band left (start)
881 std::make_pair(765, 0.0), // allocated band left (stop)
882 std::make_pair(766, -20.0), // DC band (start)
883 std::make_pair(770, -20.0), // DC band (stop)
884 std::make_pair(771, 0.0), // allocated band right (start)
885 std::make_pair(1012, 0.0), // allocated band right (stop)
886 std::make_pair(1013, -1.538), // Inner band right (start)
887 std::make_pair(1025, -20.0), // Inner band right (stop)
888 std::make_pair(1026, -20.0), // Flat junction band right (start)
889 std::make_pair(1030, -20.0), // Flat junction band right (stop)
890 std::make_pair(1031, -20.032), // Middle band right (start)
891 std::make_pair(1280, -28.000), // Middle band right (stop)
892 std::make_pair(1281, -28.047), // Outer band right (start)
893 std::make_pair(1536, -40.0), // Outer band right (stop)
894 };
895
896 AddTestCase(new WifiOfdmMaskSlopesTestCase("11ax_5GHz 40MHz",
899 40,
900 {5190},
901 maskSlopes,
902 tol,
903 prec),
904 TestCase::Duration::QUICK);
905
906 // ============================================================================================
907 // 11ax 80MHz @ 5GHz
908 NS_LOG_FUNCTION("Check slopes for 11ax 80MHz @ 5GHz");
909 maskSlopes = {
910 std::make_pair(0, -40.0), // Outer band left (start)
911 std::make_pair(511, -28.023), // Outer band left (stop)
912 std::make_pair(512, -28.000), // Middle band left (start)
913 std::make_pair(1017, -20.016), // Middle band left (stop)
914 std::make_pair(1018, -20.0), // Flat junction band left (start)
915 std::make_pair(1022, -20.0), // Flat junction band left (stop)
916 std::make_pair(1023, -20.0), // Inner band left (start)
917 std::make_pair(1035, -1.538), // Inner band left (stop)
918 std::make_pair(1036, 0.0), // allocated band left (start)
919 std::make_pair(1533, 0.0), // allocated band left (stop)
920 std::make_pair(1534, -20.0), // DC band (start)
921 std::make_pair(1538, -20.0), // DC band (stop)
922 std::make_pair(1539, 0.0), // allocated band right (start)
923 std::make_pair(2036, 0.0), // allocated band right (stop)
924 std::make_pair(2037, -1.538), // Inner band right (start)
925 std::make_pair(2049, -20.0), // Inner band right (stop)
926 std::make_pair(2050, -20.0), // Flat junction band right (start)
927 std::make_pair(2054, -20.0), // Flat junction band right (stop)
928 std::make_pair(2055, -20.016), // Middle band right (start)
929 std::make_pair(2560, -28.000), // Middle band right (stop)
930 std::make_pair(2561, -28.023), // Outer band right (start)
931 std::make_pair(3072, -40.0), // Outer band right (stop)
932 };
933
934 AddTestCase(new WifiOfdmMaskSlopesTestCase("11ax_5GHz 80MHz",
937 80,
938 {5210},
939 maskSlopes,
940 tol,
941 prec),
942 TestCase::Duration::QUICK);
943
944 // ============================================================================================
945 // 11ax 160MHz @ 5GHz
946 NS_LOG_FUNCTION("Check slopes for 11ax 160MHz @ 5GHz");
947 maskSlopes = {
948 std::make_pair(0, -40.0), // Outer band left (start)
949 std::make_pair(1023, -28.012), // Outer band left (stop)
950 std::make_pair(1024, -28.000), // Middle band left (start)
951 std::make_pair(2041, -20.008), // Middle band left (stop)
952 std::make_pair(2042, -20.0), // Flat junction band left (start)
953 std::make_pair(2046, -20.0), // Flat junction band left (stop)
954 std::make_pair(2047, -20.0), // Inner band left (start)
955 std::make_pair(2059, -1.538), // Inner band left (stop)
956 std::make_pair(2060, 0.0), // first 80 MHz allocated band left (start)
957 std::make_pair(2557, 0.0), // first 80 MHz allocated band left (stop)
958 std::make_pair(2558, -20.0), // first 80 MHz DC band (start)
959 std::make_pair(2562, -20.0), // first 80 MHz DC band (stop)
960 std::make_pair(2563, 0.0), // first 80 MHz allocated band right (start)
961 std::make_pair(3060, 0.0), // first 80 MHz allocated band right (stop)
962 std::make_pair(3061, -20.0), // gap between 80 MHz bands (start)
963 std::make_pair(3083, -20.0), // gap between 80 MHz bands (start)
964 std::make_pair(3084, 0.0), // second 80 MHz allocated band left (start)
965 std::make_pair(3581, 0.0), // second 80 MHz allocated band left (stop)
966 std::make_pair(3582, -20.0), // second 80 MHz DC band (start)
967 std::make_pair(3586, -20.0), // second 80 MHz DC band (stop)
968 std::make_pair(3587, 0.0), // second 80 MHz allocated band right (start)
969 std::make_pair(4084, 0.0), // second 80 MHz allocated band right (stop)
970 std::make_pair(4085, -1.538), // Inner band right (start)
971 std::make_pair(4097, -20.0), // Inner band right (stop)
972 std::make_pair(4098, -20.0), // Flat junction band right (start)
973 std::make_pair(4102, -20.0), // Flat junction band right (stop)
974 std::make_pair(4103, -20.008), // Middle band right (start)
975 std::make_pair(5120, -28.000), // Middle band right (stop)
976 std::make_pair(5121, -28.012), // Outer band right (start)
977 std::make_pair(6144, -40.0), // Outer band right (stop)
978 };
979
980 AddTestCase(new WifiOfdmMaskSlopesTestCase("11ax_5GHz 160MHz",
983 160,
984 {5250},
985 maskSlopes,
986 tol,
987 prec),
988 TestCase::Duration::QUICK);
989
990 // ============================================================================================
991 // 11ax 80+80MHz @ 5GHz
992 NS_LOG_FUNCTION("Check slopes for 11ax 80+80MHz @ 5GHz");
993 maskSlopes = {
994 std::make_pair(0, -40.0), // Outer band left (start)
995 std::make_pair(511, -28.023), // Outer band left (stop)
996 std::make_pair(512, -28.000), // Middle band left (start)
997 std::make_pair(1017, -20.016), // Middle band left (stop)
998 std::make_pair(1018, -20.0), // Flat junction band left (start)
999 std::make_pair(1022, -20.0), // Flat junction band left (stop)
1000 std::make_pair(1023, -20.0), // Inner band left for first segment (start)
1001 std::make_pair(1035, -1.538), // Inner band left for first segment (stop)
1002 std::make_pair(1036, 0.0), // allocated band left for first segment (start)
1003 std::make_pair(1533, 0.0), // allocated band left for first segment (stop)
1004 std::make_pair(1534, -20.0), // DC band for first segment (start)
1005 std::make_pair(1538, -20.0), // DC band for first segment (stop)
1006 std::make_pair(1539, 0.0), // allocated band right for first segment (start)
1007 std::make_pair(2036, 0.0), // allocated band right for first segment (stop)
1008 std::make_pair(2037, -1.538), // Inner band right for first segment (start)
1009 std::make_pair(2049, -20.0), // Inner band right for first segment (stop)
1010 std::make_pair(2050, -20.0), // Flat junction band right for first segment (start)
1011 std::make_pair(2054, -20.0), // Flat junction band right for first segment (stop)
1012 std::make_pair(2055, -20.01), // start linear sum region left (no interpolation possible, so
1013 // provide 2 times the same point)
1014 std::make_pair(2055, -20.01), // start linear sum region left (no interpolation possible, so
1015 // provide 2 times the same point)
1016 std::make_pair(2559, -24.99), // stop linear sum region left (no interpolation possible, so
1017 // provide 2 times the same point)
1018 std::make_pair(2559, -24.99), // stop linear sum region left (no interpolation possible, so
1019 // provide 2 times the same point)
1020 std::make_pair(2560, -25.0), // middle linear sum region (no interpolation possible, so
1021 // provide 2 times the same point)
1022 std::make_pair(2560, -25.0), // middle linear sum region (no interpolation possible, so
1023 // provide 2 times the same point)
1024 std::make_pair(2561, -24.99), // start linear sum region right (no interpolation possible,
1025 // so provide 2 times the same point)
1026 std::make_pair(2561, -24.99), // start linear sum region right (no interpolation possible,
1027 // so provide 2 times the same point)
1028 std::make_pair(3065, -20.01), // stop linear sum region right (no interpolation possible, so
1029 // provide 2 times the same point)
1030 std::make_pair(3065, -20.01), // stop linear sum region right (no interpolation possible, so
1031 // provide 2 times the same point)
1032 std::make_pair(3066, -20.0), // Flat junction band left (start)
1033 std::make_pair(3070, -20.0), // Flat junction band left (stop)
1034 std::make_pair(3071, -20.0), // Inner band left for second segment (start)
1035 std::make_pair(3083, -1.538), // Inner band left for second segment (stop)
1036 std::make_pair(3084, 0.0), // allocated band left for second segment (start)
1037 std::make_pair(3581, 0.0), // allocated band left for second segment (stop)
1038 std::make_pair(3582, -20.0), // DC band for second segment (start)
1039 std::make_pair(3586, -20.0), // DC band for second segment (stop)
1040 std::make_pair(3587, 0.0), // allocated band right for second segment (start)
1041 std::make_pair(4084, 0.0), // allocated band right for second segment (stop)
1042 std::make_pair(4085, -1.538), // Inner band right for second segment (start)
1043 std::make_pair(4097, -20.0), // Inner band right for second segment (stop)
1044 std::make_pair(4098, -20.0), // Flat junction band right (start)
1045 std::make_pair(4102, -20.0), // Flat junction band right (stop)
1046 std::make_pair(4103, -20.016), // Middle band right (start)
1047 std::make_pair(4608, -28.000), // Middle band right (stop)
1048 std::make_pair(4609, -28.023), // Outer band right (start)
1049 std::make_pair(5120, -40.0), // Outer band right (stop)
1050 };
1051
1052 AddTestCase(new WifiOfdmMaskSlopesTestCase("11ax_5GHz 80+80MHz",
1055 160,
1056 {5530, 5690},
1057 maskSlopes,
1058 tol,
1059 prec),
1060 TestCase::Duration::QUICK);
1061
1062 // ============================================================================================
1063 // 11ax 80+80MHz @ 5GHz
1064 NS_LOG_FUNCTION("Check slopes for 11ax 80+80MHz @ 5GHz with larger frequency separation "
1065 "between the two PSDs");
1066 maskSlopes = {
1067 std::make_pair(0, -40.0), // Outer band left (start)
1068 std::make_pair(511, -28.023), // Outer band left (stop)
1069 std::make_pair(512, -28.000), // Middle band left (start)
1070 std::make_pair(1017, -20.016), // Middle band left (stop)
1071 std::make_pair(1018, -20.0), // Flat junction band left (start)
1072 std::make_pair(1022, -20.0), // Flat junction band left (stop)
1073 std::make_pair(1023, -20.0), // Inner band left for first segment (start)
1074 std::make_pair(1035, -1.538), // Inner band left for first segment (stop)
1075 std::make_pair(1036, 0.0), // allocated band left for first segment (start)
1076 std::make_pair(1533, 0.0), // allocated band left for first segment (stop)
1077 std::make_pair(1534, -20.0), // DC band for first segment (start)
1078 std::make_pair(1538, -20.0), // DC band for first segment (stop)
1079 std::make_pair(1539, 0.0), // allocated band right for first segment (start)
1080 std::make_pair(2036, 0.0), // allocated band right for first segment (stop)
1081 std::make_pair(2037, -1.538), // Inner band right for first segment (start)
1082 std::make_pair(2049, -20.0), // Inner band right for first segment (stop)
1083 std::make_pair(2050, -20.0), // Flat junction band right for first segment (start)
1084 std::make_pair(2054, -20.0), // Flat junction band right for first segment (stop)
1085 std::make_pair(2055, -20.01), // start linear sum region left (no interpolation possible, so
1086 // provide 2 times the same point)
1087 std::make_pair(2055, -20.01), // start linear sum region left (no interpolation possible, so
1088 // provide 2 times the same point)
1089 std::make_pair(3583, -24.99), // stop linear sum region left (no interpolation possible, so
1090 // provide 2 times the same point)
1091 std::make_pair(3583, -24.99), // stop linear sum region left (no interpolation possible, so
1092 // provide 2 times the same point)
1093 std::make_pair(3584, -25.0), // middle linear sum region (no interpolation possible, so
1094 // provide 2 times the same point)
1095 std::make_pair(3584, -25.0), // middle linear sum region (no interpolation possible, so
1096 // provide 2 times the same point)
1097 std::make_pair(3585, -24.99), // start linear sum region right (no interpolation possible,
1098 // so provide 2 times the same point)
1099 std::make_pair(3585, -24.99), // start linear sum region right (no interpolation possible,
1100 // so provide 2 times the same point)
1101 std::make_pair(5113, -20.01), // stop linear sum region right (no interpolation possible, so
1102 // provide 2 times the same point)
1103 std::make_pair(5113, -20.01), // stop linear sum region right (no interpolation possible, so
1104 // provide 2 times the same point)
1105 std::make_pair(5114, -20.0), // Flat junction band left (start)
1106 std::make_pair(5118, -20.0), // Flat junction band left (stop)
1107 std::make_pair(5119, -20.0), // Inner band left for second segment (start)
1108 std::make_pair(5131, -1.538), // Inner band left for second segment (stop)
1109 std::make_pair(5132, 0.0), // allocated band left for second segment (start)
1110 std::make_pair(5629, 0.0), // allocated band left for second segment (stop)
1111 std::make_pair(5630, -20.0), // DC band for second segment (start)
1112 std::make_pair(5634, -20.0), // DC band for second segment (stop)
1113 std::make_pair(5635, 0.0), // allocated band right for second segment (start)
1114 std::make_pair(6132, 0.0), // allocated band right for second segment (stop)
1115 std::make_pair(6133, -1.538), // Inner band right for second segment (start)
1116 std::make_pair(6145, -20.0), // Inner band right for second segment (stop)
1117 std::make_pair(6146, -20.0), // Flat junction band right (start)
1118 std::make_pair(6150, -20.0), // Flat junction band right (stop)
1119 std::make_pair(6151, -20.016), // Middle band right (start)
1120 std::make_pair(6656, -28.000), // Middle band right (stop)
1121 std::make_pair(6657, -28.023), // Outer band right (start)
1122 std::make_pair(7168, -40.0), // Outer band right (stop)
1123 };
1124
1125 AddTestCase(new WifiOfdmMaskSlopesTestCase("11ax_5GHz 80+80MHz large separation",
1128 160,
1129 {5210, 5530},
1130 maskSlopes,
1131 tol,
1132 prec),
1133 TestCase::Duration::QUICK);
1134
1135 // ============================================================================================
1136 // 11ax 80MHz @ 5GHz - first 20 MHz subchannel punctured
1137 NS_LOG_FUNCTION("Check slopes for 11ax 80MHz @ 5GHz with first 20 MHz subchannel punctured");
1138 maskSlopes = {
1139 std::make_pair(0, -40.0), // Outer band left (start)
1140 std::make_pair(511, -28.023), // Outer band left (stop)
1141 std::make_pair(512, -28.000), // Middle band left (start)
1142 std::make_pair(1017, -20.016), // Middle band left (stop)
1143 std::make_pair(1018, -20.0), // Flat junction band left (start)
1144 std::make_pair(1022, -20.0), // Flat junction band left (stop)
1145 std::make_pair(1023, -20.0), // punctured band (start)
1146 std::make_pair(1272, -20.0), // punctured band (stop)
1147 std::make_pair(1273, -20.0), // punctured band increasing slope (start)
1148 std::make_pair(1279, 0.0), // punctured band increasing slope (stop)
1149 std::make_pair(1280, 0.0), // allocated band left (start)
1150 std::make_pair(1533, 0.0), // allocated band left (stop)
1151 std::make_pair(1534, -20.0), // DC band (start)
1152 std::make_pair(1538, -20.0), // DC band (stop)
1153 std::make_pair(1539, 0.0), // allocated band right (start)
1154 std::make_pair(2036, 0.0), // allocated band right (stop)
1155 std::make_pair(2037, -1.538), // Inner band right (start)
1156 std::make_pair(2049, -20.0), // Inner band right (stop)
1157 std::make_pair(2050, -20.0), // Flat junction band right (start)
1158 std::make_pair(2054, -20.0), // Flat junction band right (stop)
1159 std::make_pair(2055, -20.016), // Middle band right (start)
1160 std::make_pair(2560, -28.000), // Middle band right (stop)
1161 std::make_pair(2561, -28.023), // Outer band right (start)
1162 std::make_pair(3072, -40.0), // Outer band right (stop)
1163 };
1164
1165 AddTestCase(new WifiOfdmMaskSlopesTestCase("11ax_5GHz 80MHz first subchannel punctured",
1168 80,
1169 {5210},
1170 maskSlopes,
1171 tol,
1172 prec,
1173 {true, false, false, false}),
1174 TestCase::Duration::QUICK);
1175
1176 // ============================================================================================
1177 // 11ax 80MHz @ 5GHz - second 20 MHz subchannel punctured
1178 NS_LOG_FUNCTION("Check slopes for 11ax 80MHz @ 5GHz with second 20 MHz subchannel punctured");
1179 maskSlopes = {
1180 std::make_pair(0, -40.0), // Outer band left (start)
1181 std::make_pair(511, -28.023), // Outer band left (stop)
1182 std::make_pair(512, -28.000), // Middle band left (start)
1183 std::make_pair(1017, -20.016), // Middle band left (stop)
1184 std::make_pair(1018, -20.0), // Flat junction band left (start)
1185 std::make_pair(1022, -20.0), // Flat junction band left (stop)
1186 std::make_pair(1023, -20.0), // Inner band left (start)
1187 std::make_pair(1035, -1.538), // Inner band left (stop)
1188 std::make_pair(1036, 0.0), // allocated band left (start)
1189 std::make_pair(1279, 0.0), // allocated band left (stop)
1190 std::make_pair(1280, 0.0), // punctured band decreasing slope (start)
1191 std::make_pair(1286, -20.0), // punctured band decreasing slope (stop)
1192 std::make_pair(1287, -20.0), // punctured band (start)
1193 std::make_pair(1528, -20.0), // punctured band (stop)
1194 std::make_pair(1529, -20.0), // punctured band increasing slope (start)
1195 std::make_pair(1533, -6.667), // punctured band increasing slope (stop)
1196 std::make_pair(1534, -20.0), // DC band (start)
1197 std::make_pair(1538, -20.0), // DC band (stop)
1198 std::make_pair(1539, 0.0), // allocated band right (start)
1199 std::make_pair(2036, 0.0), // allocated band right (stop)
1200 std::make_pair(2037, -1.538), // Inner band right (start)
1201 std::make_pair(2049, -20.0), // Inner band right (stop)
1202 std::make_pair(2050, -20.0), // Flat junction band right (start)
1203 std::make_pair(2054, -20.0), // Flat junction band right (stop)
1204 std::make_pair(2055, -20.016), // Middle band right (start)
1205 std::make_pair(2560, -28.000), // Middle band right (stop)
1206 std::make_pair(2561, -28.023), // Outer band right (start)
1207 std::make_pair(3072, -40.0), // Outer band right (stop)
1208 };
1209
1210 AddTestCase(new WifiOfdmMaskSlopesTestCase("11ax_5GHz 80MHz second subchannel punctured",
1213 80,
1214 {5210},
1215 maskSlopes,
1216 tol,
1217 prec,
1218 {false, true, false, false}),
1219 TestCase::Duration::QUICK);
1220
1221 // ============================================================================================
1222 // 11ax 80MHz @ 5GHz - third 20 MHz subchannel punctured
1223 NS_LOG_FUNCTION("Check slopes for 11ax 80MHz @ 5GHz with third 20 MHz subchannel punctured");
1224 maskSlopes = {
1225 std::make_pair(0, -40.0), // Outer band left (start)
1226 std::make_pair(511, -28.023), // Outer band left (stop)
1227 std::make_pair(512, -28.000), // Middle band left (start)
1228 std::make_pair(1017, -20.016), // Middle band left (stop)
1229 std::make_pair(1018, -20.0), // Flat junction band left (start)
1230 std::make_pair(1022, -20.0), // Flat junction band left (stop)
1231 std::make_pair(1023, -20.0), // Inner band left (start)
1232 std::make_pair(1035, -1.538), // Inner band left (stop)
1233 std::make_pair(1036, 0.0), // allocated band left (start)
1234 std::make_pair(1533, 0.0), // allocated band left (stop)
1235 std::make_pair(1534, -20.0), // DC band (start)
1236 std::make_pair(1535, -20.0), // DC band (stop)
1237 std::make_pair(1539, -10.0), // punctured band decreasing slope (start)
1238 std::make_pair(1542, -20.0), // punctured band decreasing slope (stop)
1239 std::make_pair(1543, -20.0), // punctured band (start)
1240 std::make_pair(1784, -20.0), // punctured band (stop)
1241 std::make_pair(1785, -20.0), // punctured band increasing slope (start)
1242 std::make_pair(1791, 0.0), // punctured band increasing slope (stop)
1243 std::make_pair(1792, 0.0), // allocated band right (start)
1244 std::make_pair(2036, 0.0), // allocated band right (stop)
1245 std::make_pair(2037, -1.538), // Inner band right (start)
1246 std::make_pair(2049, -20.0), // Inner band right (stop)
1247 std::make_pair(2050, -20.0), // Flat junction band right (start)
1248 std::make_pair(2054, -20.0), // Flat junction band right (stop)
1249 std::make_pair(2055, -20.016), // Middle band right (start)
1250 std::make_pair(2560, -28.000), // Middle band right (stop)
1251 std::make_pair(2561, -28.023), // Outer band right (start)
1252 std::make_pair(3072, -40.0), // Outer band right (stop)
1253 };
1254
1255 AddTestCase(new WifiOfdmMaskSlopesTestCase("11ax_5GHz 80MHz third subchannel punctured",
1258 80,
1259 {5210},
1260 maskSlopes,
1261 tol,
1262 prec,
1263 {false, false, true, false}),
1264 TestCase::Duration::QUICK);
1265
1266 // ============================================================================================
1267 // 11ax 80MHz @ 5GHz - last 20 MHz subchannel punctured
1268 NS_LOG_FUNCTION("Check slopes for 11ax 80MHz @ 5GHz with last 20 MHz subchannel punctured");
1269 maskSlopes = {
1270 std::make_pair(0, -40.0), // Outer band left (start)
1271 std::make_pair(511, -28.023), // Outer band left (stop)
1272 std::make_pair(512, -28.000), // Middle band left (start)
1273 std::make_pair(1017, -20.016), // Middle band left (stop)
1274 std::make_pair(1018, -20.0), // Flat junction band left (start)
1275 std::make_pair(1022, -20.0), // Flat junction band left (stop)
1276 std::make_pair(1023, -20.0), // Inner band left (start)
1277 std::make_pair(1035, -1.538), // Inner band left (stop)
1278 std::make_pair(1036, 0.0), // allocated band left (start)
1279 std::make_pair(1533, 0.0), // allocated band left (stop)
1280 std::make_pair(1534, -20.0), // DC band (start)
1281 std::make_pair(1538, -20.0), // DC band (stop)
1282 std::make_pair(1539, 0.0), // allocated band right (start)
1283 std::make_pair(1791, 0.0), // allocated band right (stop)
1284 std::make_pair(1792, 0.0), // punctured band decreasing slope (start)
1285 std::make_pair(1798, -20.0), // punctured band decreasing slope (stop)
1286 std::make_pair(1799, -20.0), // punctured band (start)
1287 std::make_pair(2049, -20.0), // punctured band (stop)
1288 std::make_pair(2050, -20.0), // Flat junction band right (start)
1289 std::make_pair(2054, -20.0), // Flat junction band right (stop)
1290 std::make_pair(2055, -20.016), // Middle band right (start)
1291 std::make_pair(2560, -28.000), // Middle band right (stop)
1292 std::make_pair(2561, -28.023), // Outer band right (start)
1293 std::make_pair(3072, -40.0), // Outer band right (stop)
1294 };
1295
1296 AddTestCase(new WifiOfdmMaskSlopesTestCase("11ax_5GHz 80MHz last subchannel punctured",
1299 80,
1300 {5210},
1301 maskSlopes,
1302 tol,
1303 prec,
1304 {false, false, false, true}),
1305 TestCase::Duration::QUICK);
1306
1307 // ============================================================================================
1308 // 11ax 160MHz @ 5GHz - first two 20 MHz subchannels punctured
1310 "Check slopes for 11ax 160MHz @ 5GHz with two first 20 MHz subchannels punctured");
1311 maskSlopes = {
1312 std::make_pair(0, -40.0), // Outer band left (start)
1313 std::make_pair(1023, -28.012), // Outer band left (stop)
1314 std::make_pair(1024, -28.000), // Middle band left (start)
1315 std::make_pair(2041, -20.008), // Middle band left (stop)
1316 std::make_pair(2042, -20.0), // Flat junction band left (start)
1317 std::make_pair(2046, -20.0), // Flat junction band left (stop)
1318 std::make_pair(2047, -20.0), // punctured band (start)
1319 std::make_pair(2552, -20.0), // punctured band (stop)
1320 std::make_pair(2553, -20.0), // punctured band increasing slope (start)
1321 std::make_pair(2557, -6.66667), // punctured band increasing slope (stop)
1322 std::make_pair(2558, -20.0), // first 80 MHz DC band (start)
1323 std::make_pair(2562, -20.0), // first 80 MHz DC band (stop)
1324 std::make_pair(2563, 0.0), // first 80 MHz allocated band right (start)
1325 std::make_pair(3060, 0.0), // first 80 MHz allocated band right (stop)
1326 std::make_pair(3061, -20.0), // gap between 80 MHz bands (start)
1327 std::make_pair(3083, -20.0), // gap between 80 MHz bands (start)
1328 std::make_pair(3084, 0.0), // second 80 MHz allocated band left (start)
1329 std::make_pair(3581, 0.0), // second 80 MHz allocated band left (stop)
1330 std::make_pair(3582, -20.0), // second 80 MHz DC band (start)
1331 std::make_pair(3586, -20.0), // second 80 MHz DC band (stop)
1332 std::make_pair(3587, 0.0), // second 80 MHz allocated band right (start)
1333 std::make_pair(4084, 0.0), // second 80 MHz allocated band right (stop)
1334 std::make_pair(4085, -1.538), // Inner band right (start)
1335 std::make_pair(4097, -20.0), // Inner band right (stop)
1336 std::make_pair(4098, -20.0), // Flat junction band right (start)
1337 std::make_pair(4102, -20.0), // Flat junction band right (stop)
1338 std::make_pair(4103, -20.008), // Middle band right (start)
1339 std::make_pair(5120, -28.000), // Middle band right (stop)
1340 std::make_pair(5121, -28.012), // Outer band right (start)
1341 std::make_pair(6144, -40.0), // Outer band right (stop)
1342 };
1343
1345 new WifiOfdmMaskSlopesTestCase("11ax_5GHz 160MHz first subchannels punctured",
1348 160,
1349 {5250},
1350 maskSlopes,
1351 tol,
1352 prec,
1353 {true, true, false, false, false, false, false, false}),
1354 TestCase::Duration::QUICK);
1355
1356 // ============================================================================================
1357 // 11ax 160MHz @ 5GHz - third and fourth 20 MHz subchannels punctured
1359 "Check slopes for 11ax 160MHz @ 5GHz with third and fourth 20 MHz subchannels punctured");
1360 maskSlopes = {
1361 std::make_pair(0, -40.0), // Outer band left (start)
1362 std::make_pair(1023, -28.012), // Outer band left (stop)
1363 std::make_pair(1024, -28.000), // Middle band left (start)
1364 std::make_pair(2041, -20.008), // Middle band left (stop)
1365 std::make_pair(2042, -20.0), // Flat junction band left (start)
1366 std::make_pair(2046, -20.0), // Flat junction band left (stop)
1367 std::make_pair(2047, -20.0), // Inner band left (start)
1368 std::make_pair(2059, -1.538), // Inner band left (stop)
1369 std::make_pair(2060, 0.0), // first 80 MHz allocated band left (start)
1370 std::make_pair(2557, 0.0), // first 80 MHz allocated band left (stop)
1371 std::make_pair(2558, -20.0), // first 80 MHz DC band (start)
1372 std::make_pair(2562, -20.0), // first 80 MHz DC band (stop)
1373 std::make_pair(2563, -10.0), // punctured band decreasing slope (start)
1374 std::make_pair(2566, -20.0), // punctured band decreasing slope (stop)
1375 std::make_pair(2567, -20.0), // punctured band (start)
1376 std::make_pair(3060, -20.0), // punctured band (stop)
1377 std::make_pair(3061, -20.0), // gap between 80 MHz bands (start)
1378 std::make_pair(3083, -20.0), // gap between 80 MHz bands (start)
1379 std::make_pair(3084, 0.0), // second 80 MHz allocated band left (start)
1380 std::make_pair(3581, 0.0), // second 80 MHz allocated band left (stop)
1381 std::make_pair(3582, -20.0), // second 80 MHz DC band (start)
1382 std::make_pair(3586, -20.0), // second 80 MHz DC band (stop)
1383 std::make_pair(3587, 0.0), // second 80 MHz allocated band right (start)
1384 std::make_pair(4084, 0.0), // second 80 MHz allocated band right (stop)
1385 std::make_pair(4085, -1.538), // Inner band right (start)
1386 std::make_pair(4097, -20.0), // Inner band right (stop)
1387 std::make_pair(4098, -20.0), // Flat junction band right (start)
1388 std::make_pair(4102, -20.0), // Flat junction band right (stop)
1389 std::make_pair(4103, -20.008), // Middle band right (start)
1390 std::make_pair(5120, -28.000), // Middle band right (stop)
1391 std::make_pair(5121, -28.012), // Outer band right (start)
1392 std::make_pair(6144, -40.0), // Outer band right (stop)
1393 };
1394
1396 new WifiOfdmMaskSlopesTestCase("11ax_5GHz 160MHz third and fourth subchannels punctured",
1399 160,
1400 {5250},
1401 maskSlopes,
1402 tol,
1403 prec,
1404 {false, false, true, true, false, false, false, false}),
1405 TestCase::Duration::QUICK);
1406
1407 // ============================================================================================
1408 // 11ax 160MHz @ 5GHz - fifth and sixth 20 MHz subchannels punctured
1410 "Check slopes for 11ax 160MHz @ 5GHz with fifth and sixth 20 MHz subchannels punctured");
1411 maskSlopes = {
1412 std::make_pair(0, -40.0), // Outer band left (start)
1413 std::make_pair(1023, -28.012), // Outer band left (stop)
1414 std::make_pair(1024, -28.000), // Middle band left (start)
1415 std::make_pair(2041, -20.008), // Middle band left (stop)
1416 std::make_pair(2042, -20.0), // Flat junction band left (start)
1417 std::make_pair(2046, -20.0), // Flat junction band left (stop)
1418 std::make_pair(2047, -20.0), // Inner band left (start)
1419 std::make_pair(2059, -1.538), // Inner band left (stop)
1420 std::make_pair(2060, 0.0), // first 80 MHz allocated band left (start)
1421 std::make_pair(2557, 0.0), // first 80 MHz allocated band left (stop)
1422 std::make_pair(2558, -20.0), // first 80 MHz DC band (start)
1423 std::make_pair(2562, -20.0), // first 80 MHz DC band (stop)
1424 std::make_pair(2563, 0.0), // first 80 MHz allocated band right (start)
1425 std::make_pair(3060, 0.0), // first 80 MHz allocated band right (stop)
1426 std::make_pair(3061, -20.0), // gap between 80 MHz bands (start)
1427 std::make_pair(3083, -20.0), // gap between 80 MHz bands (start)
1428 std::make_pair(3084, -20.0), // punctured band (start)
1429 std::make_pair(3576, -20.0), // punctured band (stop)
1430 std::make_pair(3577, -20.0), // punctured band increasing slope (start)
1431 std::make_pair(3581, -6.667), // punctured band increasing slope (stop)
1432 std::make_pair(3582, -20.0), // second 80 MHz DC band (start)
1433 std::make_pair(3586, -20.0), // second 80 MHz DC band (stop)
1434 std::make_pair(3587, 0.0), // second 80 MHz allocated band right (start)
1435 std::make_pair(4084, 0.0), // second 80 MHz allocated band right (stop)
1436 std::make_pair(4085, -1.538), // Inner band right (start)
1437 std::make_pair(4097, -20.0), // Inner band right (stop)
1438 std::make_pair(4098, -20.0), // Flat junction band right (start)
1439 std::make_pair(4102, -20.0), // Flat junction band right (stop)
1440 std::make_pair(4103, -20.008), // Middle band right (start)
1441 std::make_pair(5120, -28.000), // Middle band right (stop)
1442 std::make_pair(5121, -28.012), // Outer band right (start)
1443 std::make_pair(6144, -40.0), // Outer band right (stop)
1444 };
1445
1447 new WifiOfdmMaskSlopesTestCase("11ax_5GHz 160MHz fifth and sixth subchannels punctured",
1450 160,
1451 {5250},
1452 maskSlopes,
1453 tol,
1454 prec,
1455 {false, false, false, false, true, true, false, false}),
1456 TestCase::Duration::QUICK);
1457
1458 // ============================================================================================
1459 // 11ax 160MHz @ 5GHz - last two 20 MHz subchannels punctured
1461 "Check slopes for 11ax 160MHz @ 5GHz with two last 20 MHz subchannels punctured");
1462 maskSlopes = {
1463 std::make_pair(0, -40.0), // Outer band left (start)
1464 std::make_pair(1023, -28.012), // Outer band left (stop)
1465 std::make_pair(1024, -28.000), // Middle band left (start)
1466 std::make_pair(2041, -20.008), // Middle band left (stop)
1467 std::make_pair(2042, -20.0), // Flat junction band left (start)
1468 std::make_pair(2046, -20.0), // Flat junction band left (stop)
1469 std::make_pair(2047, -20.0), // Inner band left (start)
1470 std::make_pair(2059, -1.538), // Inner band left (stop)
1471 std::make_pair(2060, 0.0), // first 80 MHz allocated band left (start)
1472 std::make_pair(2557, 0.0), // first 80 MHz allocated band left (stop)
1473 std::make_pair(2558, -20.0), // first 80 MHz DC band (start)
1474 std::make_pair(2562, -20.0), // first 80 MHz DC band (stop)
1475 std::make_pair(2563, 0.0), // first 80 MHz allocated band right (start)
1476 std::make_pair(3060, 0.0), // first 80 MHz allocated band right (stop)
1477 std::make_pair(3061, -20.0), // gap between 80 MHz bands (start)
1478 std::make_pair(3083, -20.0), // gap between 80 MHz bands (start)
1479 std::make_pair(3084, 0.0), // second 80 MHz allocated band left (start)
1480 std::make_pair(3581, 0.0), // second 80 MHz allocated band left (stop)
1481 std::make_pair(3582, -20.0), // second 80 MHz DC band (start)
1482 std::make_pair(3586, -20.0), // second 80 MHz DC band (stop)
1483 std::make_pair(3587, -10.0), // punctured band decreasing slope (start)
1484 std::make_pair(3590, -20.0), // punctured band decreasing slope (stop)
1485 std::make_pair(3591, -20.0), // punctured band (start)
1486 std::make_pair(4097, -20.0), // punctured band (stop)
1487 std::make_pair(4098, -20.0), // Flat junction band right (start)
1488 std::make_pair(4102, -20.0), // Flat junction band right (stop)
1489 std::make_pair(4103, -20.008), // Middle band right (start)
1490 std::make_pair(5120, -28.000), // Middle band right (stop)
1491 std::make_pair(5121, -28.012), // Outer band right (start)
1492 std::make_pair(6144, -40.0), // Outer band right (stop)
1493 };
1494
1496 new WifiOfdmMaskSlopesTestCase("11ax_5GHz 160MHz last subchannels punctured",
1499 160,
1500 {5250},
1501 maskSlopes,
1502 tol,
1503 prec,
1504 {false, false, false, false, false, false, true, true}),
1505 TestCase::Duration::QUICK);
1506}
Test checks if Wifi spectrum values for OFDM are generated properly.
std::vector< IndexPowerPair > IndexPowerVect
typedef for a vector of pairs of sub-band index and relative power value
~WifiOfdmMaskSlopesTestCase() override=default
std::vector< bool > m_puncturedSubchannels
bitmap indicating whether a 20 MHz subchannel is punctured or not (only used for 802....
void DoSetup() override
Implementation to do any local setup required for this TestCase.
WifiPhyBand m_band
the wifi PHY band to test
std::vector< MHz_u > m_centerFreqs
the center frequency per contiguous segment to test
Ptr< SpectrumValue > m_actualSpectrum
actual spectrum value
MHz_u m_channelWidth
the total channel width to test
WifiOfdmMaskSlopesTestCase(const std::string &name, WifiStandard standard, WifiPhyBand band, MHz_u channelWidth, const std::vector< MHz_u > &centerFrequencies, const IndexPowerVect &maskRefs, dB_u tolerance, std::size_t precision, const std::vector< bool > &puncturedSubchannels=std::vector< bool >{})
Constructor.
void InterpolateAndAppendValues(IndexPowerVect &vect, IndexPowerPair start, IndexPowerPair stop) const
Interpolate PSD values for indexes between provided start and stop and append to provided vector.
void DoRun() override
Implementation to actually run this TestCase.
std::pair< uint32_t, dBr_u > IndexPowerPair
typedef for a pair of sub-band index and relative power value
IndexPowerVect m_expectedPsd
expected power values
std::size_t m_precision
precision for double calculations (in decimals)
WifiStandard m_standard
the wifi standard to test
Test suite for checking the consistency of different OFDM-based transmit masks.
Smart pointer class similar to boost::intrusive_ptr.
encapsulates test code
Definition test.h:1050
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
Definition test.cc:292
A suite of tests to run.
Definition test.h:1267
Type
Type of test.
Definition test.h:1274
static Ptr< SpectrumValue > CreateOfdmTxPowerSpectralDensity(MHz_u centerFrequency, MHz_u channelWidth, Watt_u txPower, MHz_u guardBandwidth, dBr_u minInnerBand=-20, dBr_u minOuterband=-28, dBr_u lowestPoint=-40)
Create a transmit power spectral density corresponding to OFDM (802.11a/g).
static Ptr< SpectrumValue > CreateHtOfdmTxPowerSpectralDensity(const std::vector< MHz_u > &centerFrequencies, MHz_u channelWidth, Watt_u txPower, MHz_u guardBandwidth, dBr_u minInnerBand=-20, dBr_u minOuterband=-28, dBr_u lowestPoint=-40)
Create a transmit power spectral density corresponding to OFDM High Throughput (HT) (802....
static Ptr< SpectrumValue > CreateHeOfdmTxPowerSpectralDensity(MHz_u centerFrequency, MHz_u channelWidth, Watt_u txPower, MHz_u guardBandwidth, dBr_u minInnerBand=-20, dBr_u minOuterband=-28, dBr_u lowestPoint=-40, const std::vector< bool > &puncturedSubchannels={})
Create a transmit power spectral density corresponding to OFDM High Efficiency (HE) (802....
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Definition assert.h:55
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition log.h:191
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Definition log.h:271
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition log.h:264
bool TestDoubleIsEqual(const double x1, const double x2, const double epsilon)
Compare two double precision floating point numbers and declare them equal if they are within some ep...
Definition test.cc:36
#define NS_TEST_EXPECT_MSG_EQ_TOL(actual, limit, tol, msg)
Test that actual and expected (limit) values are equal to plus or minus some tolerance and report if ...
Definition test.h:500
WifiStandard
Identifies the IEEE 802.11 specifications that a Wifi device can be configured to use.
WifiPhyBand
Identifies the PHY band.
@ WIFI_STANDARD_80211a
@ WIFI_STANDARD_80211p
@ WIFI_STANDARD_80211n
@ WIFI_STANDARD_80211g
@ WIFI_STANDARD_80211ax
@ WIFI_STANDARD_80211ac
@ WIFI_PHY_BAND_6GHZ
The 6 GHz band.
@ WIFI_PHY_BAND_2_4GHZ
The 2.4 GHz band.
@ WIFI_PHY_BAND_5GHZ
The 5 GHz band.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
STL namespace.
static WifiTransmitMaskTestSuite g_WifiTransmitMaskTestSuite