A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
tx-duration-test.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2009 CTTC
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Authors: Nicola Baldo <nbaldo@cttc.es>
7 * Sébastien Deronne <sebastien.deronne@gmail.com>
8 */
9
10#include "ns3/dsss-phy.h"
11#include "ns3/eht-phy.h" //includes OFDM, HT, VHT and HE
12#include "ns3/eht-ppdu.h" //includes OFDM, HT, VHT and HE
13#include "ns3/erp-ofdm-phy.h"
14#include "ns3/he-ru.h"
15#include "ns3/log.h"
16#include "ns3/packet.h"
17#include "ns3/simulator.h"
18#include "ns3/test.h"
19#include "ns3/wifi-psdu.h"
20#include "ns3/yans-wifi-phy.h"
21
22#include <list>
23#include <numeric>
24
25using namespace ns3;
26
27NS_LOG_COMPONENT_DEFINE("TxDurationTest");
28
29namespace
30{
31/**
32 * Create an HE or an EHT RU Specification.
33 * If a primary80 is provided, an HE RU Specification is created, other it is an EHT RU
34 * Specification.
35 *
36 * @param ruType the RU type
37 * @param index the RU index (starting at 1)
38 * @param primaryOrLow80MHz whether the RU is allocated in the primary 80MHz channel or in the low
39 * 80 MHz if the RU is allocated in the secondary 160 MHz
40 * @param primary160MHz whether the RU is allocated in the primary 160MHz channel (only for EHT)
41 * @return the created RU Specification.
42 */
45 std::size_t index,
46 bool primaryOrLow80MHz,
47 std::optional<bool> primary160MHz = std::nullopt)
48{
49 if (!primary160MHz)
50 {
51 return HeRu::RuSpec{ruType, index, primaryOrLow80MHz};
52 }
53 return EhtRu::RuSpec{ruType, index, *primary160MHz, primaryOrLow80MHz};
54}
55
56} // namespace
57
58/**
59 * @ingroup wifi-test
60 * @ingroup tests
61 *
62 * @brief Tx Duration Test
63 */
65{
66 public:
68 ~TxDurationTest() override;
69 void DoRun() override;
70
71 private:
72 /**
73 * Check if the payload tx duration returned by the PHY corresponds to a known value
74 *
75 * @param size size of payload in octets (includes everything after the PHY header)
76 * @param payloadMode the WifiMode used for the transmission
77 * @param channelWidth the channel width used for the transmission
78 * @param guardInterval the guard interval duration used for the transmission
79 * @param preamble the WifiPreamble used for the transmission
80 * @param knownDuration the known duration value of the transmission
81 *
82 * @return true if values correspond, false otherwise
83 */
85 WifiMode payloadMode,
86 MHz_u channelWidth,
87 Time guardInterval,
88 WifiPreamble preamble,
89 Time knownDuration);
90
91 /**
92 * Check if the overall tx duration returned by the PHY corresponds to a known value
93 *
94 * @param size size of payload in octets (includes everything after the PHY header)
95 * @param payloadMode the WifiMode used for the transmission
96 * @param channelWidth the channel width used for the transmission
97 * @param guardInterval the guard interval duration used for the transmission
98 * @param preamble the WifiPreamble used for the transmission
99 * @param knownDuration the known duration value of the transmission
100 *
101 * @return true if values correspond, false otherwise
102 */
103 bool CheckTxDuration(uint32_t size,
104 WifiMode payloadMode,
105 MHz_u channelWidth,
106 Time guardInterval,
107 WifiPreamble preamble,
108 Time knownDuration);
109
110 /**
111 * Check if the overall Tx duration returned by WifiPhy for a MU PPDU
112 * corresponds to a known value
113 *
114 * @param sizes the list of PSDU sizes for each station in octets
115 * @param userInfos the list of HE MU specific user transmission parameters
116 * @param channelWidth the channel width used for the transmission
117 * @param guardInterval the guard interval duration used for the transmission
118 * @param preamble the WifiPreamble used for the transmission
119 * @param knownDuration the known duration value of the transmission
120 *
121 * @return true if values correspond, false otherwise
122 */
123 static bool CheckMuTxDuration(const std::list<uint32_t>& sizes,
124 const std::list<HeMuUserInfo>& userInfos,
125 MHz_u channelWidth,
126 Time guardInterval,
127 WifiPreamble preamble,
128 Time knownDuration);
129
130 /**
131 * Calculate the overall Tx duration returned by WifiPhy for list of sizes.
132 * A map of WifiPsdu indexed by STA-ID is built using the provided lists
133 * and handed over to the corresponding SU/MU WifiPhy Tx duration computing
134 * method.
135 * Note that provided lists should be of same size.
136 *
137 * @param sizes the list of PSDU sizes for each station in octets
138 * @param staIds the list of STA-IDs of each station
139 * @param txVector the TXVECTOR used for the transmission of the PPDU
140 * @param band the selected wifi PHY band
141 *
142 * @return the overall Tx duration for the list of sizes (SU or MU PPDU)
143 */
144 static Time CalculateTxDurationUsingList(const std::list<uint32_t>& sizes,
145 const std::list<uint16_t>& staIds,
146 const WifiTxVector& txVector,
147 WifiPhyBand band);
148};
149
151 : TestCase("Wifi TX Duration")
152{
153}
154
158
159bool
161 WifiMode payloadMode,
162 MHz_u channelWidth,
163 Time guardInterval,
164 WifiPreamble preamble,
165 Time knownDuration)
166{
167 WifiTxVector txVector;
168 txVector.SetMode(payloadMode);
169 txVector.SetPreambleType(preamble);
170 txVector.SetChannelWidth(channelWidth);
171 txVector.SetGuardInterval(guardInterval);
172 std::list<WifiPhyBand> testedBands;
174 if ((payloadMode.GetModulationClass() >= WIFI_MOD_CLASS_OFDM) && (channelWidth <= 160))
175 {
176 testedBands.push_back(WIFI_PHY_BAND_5GHZ);
177 }
178 if (payloadMode.GetModulationClass() >= WIFI_MOD_CLASS_HE)
179 {
180 testedBands.push_back(WIFI_PHY_BAND_6GHZ);
181 }
182 if ((payloadMode.GetModulationClass() != WIFI_MOD_CLASS_OFDM) &&
183 (payloadMode.GetModulationClass() != WIFI_MOD_CLASS_VHT) && (channelWidth < 80))
184 {
185 testedBands.push_back(WIFI_PHY_BAND_2_4GHZ);
186 }
187 for (auto& testedBand : testedBands)
188 {
189 if ((testedBand == WIFI_PHY_BAND_2_4GHZ) &&
190 (payloadMode.GetModulationClass() >= WIFI_MOD_CLASS_OFDM))
191 {
192 knownDuration +=
193 MicroSeconds(6); // 2.4 GHz band should be at the end of the bands to test
194 }
195 Time calculatedDuration = YansWifiPhy::GetPayloadDuration(size, txVector, testedBand);
196 if (calculatedDuration != knownDuration)
197 {
198 std::cerr << "size=" << size << " band=" << testedBand << " mode=" << payloadMode
199 << " channelWidth=" << channelWidth << " guardInterval=" << guardInterval
200 << " datarate=" << payloadMode.GetDataRate(channelWidth, guardInterval, 1)
201 << " known=" << knownDuration << " calculated=" << calculatedDuration
202 << std::endl;
203 return false;
204 }
205 }
206 return true;
207}
208
209bool
211 WifiMode payloadMode,
212 MHz_u channelWidth,
213 Time guardInterval,
214 WifiPreamble preamble,
215 Time knownDuration)
216{
217 WifiTxVector txVector{};
218 txVector.SetMode(payloadMode);
219 txVector.SetPreambleType(preamble);
220 txVector.SetChannelWidth(channelWidth);
221 txVector.SetGuardInterval(guardInterval);
222 std::list<WifiPhyBand> testedBands;
224 if ((payloadMode.GetModulationClass() >= WIFI_MOD_CLASS_OFDM) && (channelWidth <= 160))
225 {
226 testedBands.push_back(WIFI_PHY_BAND_5GHZ);
227 }
228 if (payloadMode.GetModulationClass() >= WIFI_MOD_CLASS_HE)
229 {
230 testedBands.push_back(WIFI_PHY_BAND_6GHZ);
231 }
232 if ((payloadMode.GetModulationClass() != WIFI_MOD_CLASS_OFDM) &&
233 (payloadMode.GetModulationClass() != WIFI_MOD_CLASS_VHT) && (channelWidth < 80))
234 {
235 testedBands.push_back(WIFI_PHY_BAND_2_4GHZ);
236 }
237 for (auto& testedBand : testedBands)
238 {
239 if ((testedBand == WIFI_PHY_BAND_2_4GHZ) &&
240 (payloadMode.GetModulationClass() >= WIFI_MOD_CLASS_OFDM))
241 {
242 knownDuration +=
243 MicroSeconds(6); // 2.4 GHz band should be at the end of the bands to test
244 }
245 Time calculatedDuration = YansWifiPhy::CalculateTxDuration(size, txVector, testedBand);
246 Time calculatedDurationUsingList =
247 CalculateTxDurationUsingList(std::list<uint32_t>{size},
248 std::list<uint16_t>{SU_STA_ID},
249 txVector,
250 testedBand);
251 if (calculatedDuration != knownDuration ||
252 calculatedDuration != calculatedDurationUsingList)
253 {
254 std::cerr << "size=" << size << " band=" << testedBand << " mode=" << payloadMode
255 << " channelWidth=" << channelWidth << " guardInterval=" << guardInterval
256 << " datarate=" << payloadMode.GetDataRate(channelWidth, guardInterval, 1)
257 << " preamble=" << preamble << " known=" << knownDuration
258 << " calculated=" << calculatedDuration
259 << " calculatedUsingList=" << calculatedDurationUsingList << std::endl;
260 return false;
261 }
262 }
263 return true;
264}
265
266bool
267TxDurationTest::CheckMuTxDuration(const std::list<uint32_t>& sizes,
268 const std::list<HeMuUserInfo>& userInfos,
269 MHz_u channelWidth,
270 Time guardInterval,
271 WifiPreamble preamble,
272 Time knownDuration)
273{
274 NS_ASSERT(sizes.size() == userInfos.size() && sizes.size() > 1);
276 channelWidth < std::accumulate(
277 std::begin(userInfos),
278 std::end(userInfos),
279 MHz_u{0},
280 [](const MHz_u prevBw, const HeMuUserInfo& info) {
281 return prevBw + WifiRu::GetBandwidth(WifiRu::GetRuType(info.ru));
282 }),
283 "Cannot accommodate all the RUs in the provided band"); // MU-MIMO (for which allocations
284 // use the same RU) is not supported
285 WifiTxVector txVector;
286 txVector.SetPreambleType(preamble);
287 txVector.SetChannelWidth(channelWidth);
288 txVector.SetGuardInterval(guardInterval);
289 if (IsEht(preamble))
290 {
291 txVector.SetEhtPpduType(0);
292 }
293 std::list<uint16_t> staIds;
294
295 uint16_t staId = 1;
296 for (const auto& userInfo : userInfos)
297 {
298 txVector.SetHeMuUserInfo(staId, userInfo);
299 staIds.push_back(staId++);
300 }
301 txVector.SetSigBMode(VhtPhy::GetVhtMcs0());
302 const uint16_t ruAllocPer20 = IsEht(preamble) ? 64 : 192;
303 txVector.SetRuAllocation({ruAllocPer20, ruAllocPer20}, 0);
304
306 std::list<WifiPhyBand> testedBands;
307 if (channelWidth <= 160)
308 {
309 testedBands.push_back(WIFI_PHY_BAND_5GHZ);
310 }
311 testedBands.push_back(WIFI_PHY_BAND_6GHZ);
312 if (channelWidth < 80)
313 {
314 // Durations vary depending on frequency; test also 2.4 GHz (bug 1971)
315 testedBands.push_back(WIFI_PHY_BAND_2_4GHZ);
316 }
317 for (auto& testedBand : testedBands)
318 {
319 if (testedBand == WIFI_PHY_BAND_2_4GHZ)
320 {
321 knownDuration +=
322 MicroSeconds(6); // 2.4 GHz band should be at the end of the bands to test
323 }
324 Time calculatedDuration;
325 uint32_t longestSize = 0;
326 auto iterStaId = staIds.begin();
327 for (auto& size : sizes)
328 {
329 Time ppduDurationForSta =
330 YansWifiPhy::CalculateTxDuration(size, txVector, testedBand, *iterStaId);
331 if (ppduDurationForSta > calculatedDuration)
332 {
333 calculatedDuration = ppduDurationForSta;
334 staId = *iterStaId;
335 longestSize = size;
336 }
337 ++iterStaId;
338 }
339 Time calculatedDurationUsingList =
340 CalculateTxDurationUsingList(sizes, staIds, txVector, testedBand);
341 if (calculatedDuration != knownDuration ||
342 calculatedDuration != calculatedDurationUsingList)
343 {
344 std::cerr << "size=" << longestSize << " band=" << testedBand << " staId=" << staId
345 << " nss=" << +txVector.GetNss(staId) << " mode=" << txVector.GetMode(staId)
346 << " channelWidth=" << channelWidth << " guardInterval=" << guardInterval
347 << " datarate="
348 << txVector.GetMode(staId).GetDataRate(channelWidth,
349 guardInterval,
350 txVector.GetNss(staId))
351 << " known=" << knownDuration << " calculated=" << calculatedDuration
352 << " calculatedUsingList=" << calculatedDurationUsingList << std::endl;
353 return false;
354 }
355 }
356 return true;
357}
358
359Time
360TxDurationTest::CalculateTxDurationUsingList(const std::list<uint32_t>& sizes,
361 const std::list<uint16_t>& staIds,
362 const WifiTxVector& txVector,
363 WifiPhyBand band)
364{
365 NS_ASSERT(sizes.size() == staIds.size());
366 WifiConstPsduMap psduMap;
367 auto itStaId = staIds.begin();
368 WifiMacHeader hdr;
369 hdr.SetType(WIFI_MAC_CTL_ACK); // so that size may not be empty while being as short as possible
370 for (auto& size : sizes)
371 {
372 // MAC header and FCS are to deduce from size
373 psduMap[*itStaId++] =
374 Create<WifiPsdu>(Create<Packet>(size - hdr.GetSerializedSize() - 4), hdr);
375 }
376 return WifiPhy::CalculateTxDuration(psduMap, txVector, band);
377}
378
379void
381{
382 // IEEE Std 802.11-2007 Table 18-2 "Example of LENGTH calculations for CCK"
383 auto retval = CheckPayloadDuration(1023,
385 MHz_u{22},
386 NanoSeconds(800),
388 MicroSeconds(744)) &&
391 MHz_u{22},
392 NanoSeconds(800),
394 MicroSeconds(745)) &&
397 MHz_u{22},
398 NanoSeconds(800),
400 MicroSeconds(746)) &&
403 MHz_u{22},
404 NanoSeconds(800),
406 MicroSeconds(747));
407
408 NS_TEST_EXPECT_MSG_EQ(retval, true, "an 802.11b CCK duration failed");
409
410 // Similar, but we add PHY preamble and header durations
411 // and we test different rates.
412 // The payload durations for modes other than 11mbb have been
413 // calculated by hand according to IEEE Std 802.11-2007 18.2.3.5
414 retval = CheckTxDuration(1023,
416 MHz_u{22},
417 NanoSeconds(800),
419 MicroSeconds(744 + 96)) &&
420 CheckTxDuration(1024,
422 MHz_u{22},
423 NanoSeconds(800),
425 MicroSeconds(745 + 96)) &&
426 CheckTxDuration(1025,
428 MHz_u{22},
429 NanoSeconds(800),
431 MicroSeconds(746 + 96)) &&
432 CheckTxDuration(1026,
434 MHz_u{22},
435 NanoSeconds(800),
437 MicroSeconds(747 + 96)) &&
438 CheckTxDuration(1023,
440 MHz_u{22},
441 NanoSeconds(800),
443 MicroSeconds(744 + 192)) &&
444 CheckTxDuration(1024,
446 MHz_u{22},
447 NanoSeconds(800),
449 MicroSeconds(745 + 192)) &&
450 CheckTxDuration(1025,
452 MHz_u{22},
453 NanoSeconds(800),
455 MicroSeconds(746 + 192)) &&
456 CheckTxDuration(1026,
458 MHz_u{22},
459 NanoSeconds(800),
461 MicroSeconds(747 + 192)) &&
462 CheckTxDuration(1023,
464 MHz_u{22},
465 NanoSeconds(800),
467 MicroSeconds(1488 + 96)) &&
468 CheckTxDuration(1024,
470 MHz_u{22},
471 NanoSeconds(800),
473 MicroSeconds(1490 + 96)) &&
474 CheckTxDuration(1025,
476 MHz_u{22},
477 NanoSeconds(800),
479 MicroSeconds(1491 + 96)) &&
480 CheckTxDuration(1026,
482 MHz_u{22},
483 NanoSeconds(800),
485 MicroSeconds(1493 + 96)) &&
486 CheckTxDuration(1023,
488 MHz_u{22},
489 NanoSeconds(800),
491 MicroSeconds(1488 + 192)) &&
492 CheckTxDuration(1024,
494 MHz_u{22},
495 NanoSeconds(800),
497 MicroSeconds(1490 + 192)) &&
498 CheckTxDuration(1025,
500 MHz_u{22},
501 NanoSeconds(800),
503 MicroSeconds(1491 + 192)) &&
504 CheckTxDuration(1026,
506 MHz_u{22},
507 NanoSeconds(800),
509 MicroSeconds(1493 + 192)) &&
510 CheckTxDuration(1023,
512 MHz_u{22},
513 NanoSeconds(800),
515 MicroSeconds(4092 + 96)) &&
516 CheckTxDuration(1024,
518 MHz_u{22},
519 NanoSeconds(800),
521 MicroSeconds(4096 + 96)) &&
522 CheckTxDuration(1025,
524 MHz_u{22},
525 NanoSeconds(800),
527 MicroSeconds(4100 + 96)) &&
528 CheckTxDuration(1026,
530 MHz_u{22},
531 NanoSeconds(800),
533 MicroSeconds(4104 + 96)) &&
534 CheckTxDuration(1023,
536 MHz_u{22},
537 NanoSeconds(800),
539 MicroSeconds(4092 + 192)) &&
540 CheckTxDuration(1024,
542 MHz_u{22},
543 NanoSeconds(800),
545 MicroSeconds(4096 + 192)) &&
546 CheckTxDuration(1025,
548 MHz_u{22},
549 NanoSeconds(800),
551 MicroSeconds(4100 + 192)) &&
552 CheckTxDuration(1026,
554 MHz_u{22},
555 NanoSeconds(800),
557 MicroSeconds(4104 + 192)) &&
558 CheckTxDuration(1023,
560 MHz_u{22},
561 NanoSeconds(800),
563 MicroSeconds(8184 + 192)) &&
564 CheckTxDuration(1024,
566 MHz_u{22},
567 NanoSeconds(800),
569 MicroSeconds(8192 + 192)) &&
570 CheckTxDuration(1025,
572 MHz_u{22},
573 NanoSeconds(800),
575 MicroSeconds(8200 + 192)) &&
576 CheckTxDuration(1026,
578 MHz_u{22},
579 NanoSeconds(800),
581 MicroSeconds(8208 + 192)) &&
582 CheckTxDuration(1023,
584 MHz_u{22},
585 NanoSeconds(800),
587 MicroSeconds(8184 + 192)) &&
588 CheckTxDuration(1024,
590 MHz_u{22},
591 NanoSeconds(800),
593 MicroSeconds(8192 + 192)) &&
594 CheckTxDuration(1025,
596 MHz_u{22},
597 NanoSeconds(800),
599 MicroSeconds(8200 + 192)) &&
600 CheckTxDuration(1026,
602 MHz_u{22},
603 NanoSeconds(800),
605 MicroSeconds(8208 + 192));
606
607 // values from
608 // https://web.archive.org/web/20100711002639/http://mailman.isi.edu/pipermail/ns-developers/2009-July/006226.html
609 retval = CheckTxDuration(14,
611 MHz_u{22},
612 NanoSeconds(800),
614 MicroSeconds(304));
615
616 // values from http://www.oreillynet.com/pub/a/wireless/2003/08/08/wireless_throughput.html
617 retval = CheckTxDuration(1536,
619 MHz_u{22},
620 NanoSeconds(800),
622 MicroSeconds(1310)) &&
625 MHz_u{22},
626 NanoSeconds(800),
628 MicroSeconds(248)) &&
631 MHz_u{22},
632 NanoSeconds(800),
634 MicroSeconds(203));
635
636 NS_TEST_EXPECT_MSG_EQ(retval, true, "an 802.11b duration failed");
637
638 // 802.11a durations
639 // values from http://www.oreillynet.com/pub/a/wireless/2003/08/08/wireless_throughput.html
640 retval = CheckTxDuration(1536,
642 MHz_u{20},
643 NanoSeconds(800),
645 MicroSeconds(248)) &&
648 MHz_u{20},
649 NanoSeconds(800),
651 MicroSeconds(32)) &&
654 MHz_u{20},
655 NanoSeconds(800),
657 MicroSeconds(24));
658
659 NS_TEST_EXPECT_MSG_EQ(retval, true, "an 802.11a duration failed");
660
661 // 802.11g durations are same as 802.11a durations but with 6 us signal extension
662 retval = CheckTxDuration(1536,
664 MHz_u{20},
665 NanoSeconds(800),
667 MicroSeconds(254)) &&
670 MHz_u{20},
671 NanoSeconds(800),
673 MicroSeconds(38)) &&
676 MHz_u{20},
677 NanoSeconds(800),
679 MicroSeconds(30));
680
681 NS_TEST_EXPECT_MSG_EQ(retval, true, "an 802.11g duration failed");
682
683 // 802.11n durations
684 retval = CheckTxDuration(1536,
686 MHz_u{20},
687 NanoSeconds(800),
689 MicroSeconds(228)) &&
692 MHz_u{20},
693 NanoSeconds(800),
695 MicroSeconds(48)) &&
698 MHz_u{20},
699 NanoSeconds(800),
701 MicroSeconds(40)) &&
702 CheckTxDuration(1536,
704 MHz_u{20},
705 NanoSeconds(400),
707 NanoSeconds(1742400)) &&
710 MHz_u{20},
711 NanoSeconds(400),
713 MicroSeconds(126)) &&
716 MHz_u{20},
717 NanoSeconds(400),
719 NanoSeconds(57600)) &&
720 CheckTxDuration(1536,
722 MHz_u{20},
723 NanoSeconds(400),
725 NanoSeconds(226800)) &&
728 MHz_u{20},
729 NanoSeconds(400),
731 NanoSeconds(46800)) &&
734 MHz_u{20},
735 NanoSeconds(400),
737 NanoSeconds(39600)) &&
738 CheckTxDuration(1536,
740 MHz_u{40},
741 NanoSeconds(800),
743 MicroSeconds(128)) &&
746 MHz_u{40},
747 NanoSeconds(800),
749 MicroSeconds(44)) &&
752 MHz_u{40},
753 NanoSeconds(800),
755 MicroSeconds(40)) &&
756 CheckTxDuration(1536,
758 MHz_u{40},
759 NanoSeconds(400),
761 NanoSeconds(118800)) &&
764 MHz_u{40},
765 NanoSeconds(400),
767 NanoSeconds(43200)) &&
770 MHz_u{40},
771 NanoSeconds(400),
773 NanoSeconds(39600));
774
775 NS_TEST_EXPECT_MSG_EQ(retval, true, "an 802.11n duration failed");
776
777 // 802.11ac durations
778 retval = CheckTxDuration(1536,
780 MHz_u{20},
781 NanoSeconds(800),
783 MicroSeconds(196)) &&
786 MHz_u{20},
787 NanoSeconds(800),
789 MicroSeconds(48)) &&
792 MHz_u{20},
793 NanoSeconds(800),
795 MicroSeconds(40)) &&
796 CheckTxDuration(1536,
798 MHz_u{20},
799 NanoSeconds(400),
801 MicroSeconds(180)) &&
804 MHz_u{20},
805 NanoSeconds(400),
807 NanoSeconds(46800)) &&
810 MHz_u{20},
811 NanoSeconds(400),
813 NanoSeconds(39600)) &&
814 CheckTxDuration(1536,
816 MHz_u{40},
817 NanoSeconds(800),
819 MicroSeconds(108)) &&
822 MHz_u{40},
823 NanoSeconds(800),
825 MicroSeconds(40)) &&
828 MHz_u{40},
829 NanoSeconds(800),
831 MicroSeconds(40)) &&
832 CheckTxDuration(1536,
834 MHz_u{40},
835 NanoSeconds(400),
837 NanoSeconds(100800)) &&
840 MHz_u{40},
841 NanoSeconds(400),
843 NanoSeconds(39600)) &&
846 MHz_u{40},
847 NanoSeconds(400),
849 NanoSeconds(39600)) &&
850 CheckTxDuration(1536,
852 MHz_u{80},
853 NanoSeconds(800),
855 MicroSeconds(460)) &&
858 MHz_u{80},
859 NanoSeconds(800),
861 MicroSeconds(60)) &&
864 MHz_u{80},
865 NanoSeconds(800),
867 MicroSeconds(44)) &&
868 CheckTxDuration(1536,
870 MHz_u{80},
871 NanoSeconds(400),
873 NanoSeconds(417600)) &&
876 MHz_u{80},
877 NanoSeconds(400),
879 NanoSeconds(57600)) &&
882 MHz_u{80},
883 NanoSeconds(400),
885 NanoSeconds(43200)) &&
886 CheckTxDuration(1536,
888 MHz_u{80},
889 NanoSeconds(800),
891 MicroSeconds(68)) &&
894 MHz_u{80},
895 NanoSeconds(800),
897 MicroSeconds(40)) &&
900 MHz_u{80},
901 NanoSeconds(800),
903 MicroSeconds(40)) &&
904 CheckTxDuration(1536,
906 MHz_u{80},
907 NanoSeconds(400),
909 NanoSeconds(64800)) &&
912 MHz_u{80},
913 NanoSeconds(400),
915 NanoSeconds(39600)) &&
918 MHz_u{80},
919 NanoSeconds(400),
921 NanoSeconds(39600)) &&
922 CheckTxDuration(1536,
924 MHz_u{160},
925 NanoSeconds(800),
927 MicroSeconds(56)) &&
930 MHz_u{160},
931 NanoSeconds(800),
933 MicroSeconds(40)) &&
936 MHz_u{160},
937 NanoSeconds(800),
939 MicroSeconds(40)) &&
940 CheckTxDuration(1536,
942 MHz_u{160},
943 NanoSeconds(400),
945 MicroSeconds(54)) &&
948 MHz_u{160},
949 NanoSeconds(400),
951 NanoSeconds(39600)) &&
954 MHz_u{160},
955 NanoSeconds(400),
957 NanoSeconds(39600));
958
959 NS_TEST_EXPECT_MSG_EQ(retval, true, "an 802.11ac duration failed");
960
961 // 802.11ax SU durations
962 retval = CheckTxDuration(1536,
964 MHz_u{20},
965 NanoSeconds(800),
967 NanoSeconds(1485600)) &&
970 MHz_u{20},
971 NanoSeconds(800),
973 NanoSeconds(125600)) &&
976 MHz_u{20},
977 NanoSeconds(800),
979 NanoSeconds(71200)) &&
980 CheckTxDuration(1536,
982 MHz_u{40},
983 NanoSeconds(800),
985 NanoSeconds(764800)) &&
988 MHz_u{40},
989 NanoSeconds(800),
991 NanoSeconds(84800)) &&
994 MHz_u{40},
995 NanoSeconds(800),
997 NanoSeconds(57600)) &&
998 CheckTxDuration(1536,
1000 MHz_u{80},
1001 NanoSeconds(800),
1003 NanoSeconds(397600)) &&
1004 CheckTxDuration(76,
1006 MHz_u{80},
1007 NanoSeconds(800),
1009 NanoSeconds(71200)) &&
1010 CheckTxDuration(14,
1012 MHz_u{80},
1013 NanoSeconds(800),
1015 NanoSeconds(57600)) &&
1016 CheckTxDuration(1536,
1018 MHz_u{160},
1019 NanoSeconds(800),
1021 NanoSeconds(220800)) &&
1022 CheckTxDuration(76,
1024 MHz_u{160},
1025 NanoSeconds(800),
1027 NanoSeconds(57600)) &&
1028 CheckTxDuration(14,
1030 MHz_u{160},
1031 NanoSeconds(800),
1033 NanoSeconds(57600)) &&
1034 CheckTxDuration(1536,
1036 MHz_u{20},
1037 NanoSeconds(1600),
1039 NanoSeconds(1570400)) &&
1040 CheckTxDuration(76,
1042 MHz_u{20},
1043 NanoSeconds(1600),
1045 NanoSeconds(130400)) &&
1046 CheckTxDuration(14,
1048 MHz_u{20},
1049 NanoSeconds(1600),
1051 NanoSeconds(72800)) &&
1052 CheckTxDuration(1536,
1054 MHz_u{40},
1055 NanoSeconds(1600),
1057 NanoSeconds(807200)) &&
1058 CheckTxDuration(76,
1060 MHz_u{40},
1061 NanoSeconds(1600),
1063 NanoSeconds(87200)) &&
1064 CheckTxDuration(14,
1066 MHz_u{40},
1067 NanoSeconds(1600),
1069 NanoSeconds(58400)) &&
1070 CheckTxDuration(1536,
1072 MHz_u{80},
1073 NanoSeconds(1600),
1075 NanoSeconds(418400)) &&
1076 CheckTxDuration(76,
1078 MHz_u{80},
1079 NanoSeconds(1600),
1081 NanoSeconds(72800)) &&
1082 CheckTxDuration(14,
1084 MHz_u{80},
1085 NanoSeconds(1600),
1087 NanoSeconds(58400)) &&
1088 CheckTxDuration(1536,
1090 MHz_u{160},
1091 NanoSeconds(1600),
1093 NanoSeconds(231200)) &&
1094 CheckTxDuration(76,
1096 MHz_u{160},
1097 NanoSeconds(1600),
1099 NanoSeconds(58400)) &&
1100 CheckTxDuration(14,
1102 MHz_u{160},
1103 NanoSeconds(1600),
1105 NanoSeconds(58400)) &&
1106 CheckTxDuration(1536,
1108 MHz_u{20},
1109 NanoSeconds(3200),
1111 MicroSeconds(1740)) &&
1112 CheckTxDuration(76,
1114 MHz_u{20},
1115 NanoSeconds(3200),
1117 MicroSeconds(140)) &&
1118 CheckTxDuration(14,
1120 MHz_u{20},
1121 NanoSeconds(3200),
1123 MicroSeconds(76)) &&
1124 CheckTxDuration(1536,
1126 MHz_u{40},
1127 NanoSeconds(3200),
1129 MicroSeconds(892)) &&
1130 CheckTxDuration(76,
1132 MHz_u{40},
1133 NanoSeconds(3200),
1135 MicroSeconds(92)) &&
1136 CheckTxDuration(14,
1138 MHz_u{40},
1139 NanoSeconds(3200),
1141 MicroSeconds(60)) &&
1142 CheckTxDuration(1536,
1144 MHz_u{80},
1145 NanoSeconds(3200),
1147 MicroSeconds(460)) &&
1148 CheckTxDuration(76,
1150 MHz_u{80},
1151 NanoSeconds(3200),
1153 MicroSeconds(76)) &&
1154 CheckTxDuration(14,
1156 MHz_u{80},
1157 NanoSeconds(3200),
1159 MicroSeconds(60)) &&
1160 CheckTxDuration(1536,
1162 MHz_u{160},
1163 NanoSeconds(3200),
1165 MicroSeconds(252)) &&
1166 CheckTxDuration(76,
1168 MHz_u{160},
1169 NanoSeconds(3200),
1171 MicroSeconds(60)) &&
1172 CheckTxDuration(14,
1174 MHz_u{160},
1175 NanoSeconds(3200),
1177 MicroSeconds(60)) &&
1178 CheckTxDuration(1536,
1180 MHz_u{20},
1181 NanoSeconds(800),
1183 NanoSeconds(139200)) &&
1184 CheckTxDuration(76,
1186 MHz_u{20},
1187 NanoSeconds(800),
1189 NanoSeconds(57600)) &&
1190 CheckTxDuration(14,
1192 MHz_u{20},
1193 NanoSeconds(800),
1195 NanoSeconds(57600)) &&
1196 CheckTxDuration(1536,
1198 MHz_u{40},
1199 NanoSeconds(800),
1201 NanoSeconds(98400)) &&
1202 CheckTxDuration(76,
1204 MHz_u{40},
1205 NanoSeconds(800),
1207 NanoSeconds(57600)) &&
1208 CheckTxDuration(14,
1210 MHz_u{40},
1211 NanoSeconds(800),
1213 NanoSeconds(57600)) &&
1214 CheckTxDuration(1536,
1216 MHz_u{80},
1217 NanoSeconds(800),
1219 NanoSeconds(71200)) &&
1220 CheckTxDuration(76,
1222 MHz_u{80},
1223 NanoSeconds(800),
1225 NanoSeconds(57600)) &&
1226 CheckTxDuration(14,
1228 MHz_u{80},
1229 NanoSeconds(800),
1231 NanoSeconds(57600)) &&
1232 CheckTxDuration(1536,
1234 MHz_u{160},
1235 NanoSeconds(800),
1237 NanoSeconds(57600)) &&
1238 CheckTxDuration(76,
1240 MHz_u{160},
1241 NanoSeconds(800),
1243 NanoSeconds(57600)) &&
1244 CheckTxDuration(14,
1246 MHz_u{160},
1247 NanoSeconds(800),
1249 NanoSeconds(57600)) &&
1250 CheckTxDuration(1536,
1252 MHz_u{20},
1253 NanoSeconds(1600),
1255 NanoSeconds(144800)) &&
1256 CheckTxDuration(76,
1258 MHz_u{20},
1259 NanoSeconds(1600),
1261 NanoSeconds(58400)) &&
1262 CheckTxDuration(14,
1264 MHz_u{20},
1265 NanoSeconds(1600),
1267 NanoSeconds(58400)) &&
1268 CheckTxDuration(1536,
1270 MHz_u{40},
1271 NanoSeconds(1600),
1273 NanoSeconds(101600)) &&
1274 CheckTxDuration(76,
1276 MHz_u{40},
1277 NanoSeconds(1600),
1279 NanoSeconds(58400)) &&
1280 CheckTxDuration(14,
1282 MHz_u{40},
1283 NanoSeconds(1600),
1285 NanoSeconds(58400)) &&
1286 CheckTxDuration(1536,
1288 MHz_u{80},
1289 NanoSeconds(1600),
1291 NanoSeconds(72800)) &&
1292 CheckTxDuration(76,
1294 MHz_u{80},
1295 NanoSeconds(1600),
1297 NanoSeconds(58400)) &&
1298 CheckTxDuration(14,
1300 MHz_u{80},
1301 NanoSeconds(1600),
1303 NanoSeconds(58400)) &&
1304 CheckTxDuration(1536,
1306 MHz_u{160},
1307 NanoSeconds(1600),
1309 NanoSeconds(58400)) &&
1310 CheckTxDuration(76,
1312 MHz_u{160},
1313 NanoSeconds(1600),
1315 NanoSeconds(58400)) &&
1316 CheckTxDuration(14,
1318 MHz_u{160},
1319 NanoSeconds(1600),
1321 NanoSeconds(58400)) &&
1322 CheckTxDuration(1536,
1324 MHz_u{20},
1325 NanoSeconds(3200),
1327 MicroSeconds(156)) &&
1328 CheckTxDuration(76,
1330 MHz_u{20},
1331 NanoSeconds(3200),
1333 MicroSeconds(60)) &&
1334 CheckTxDuration(14,
1336 MHz_u{20},
1337 NanoSeconds(3200),
1339 MicroSeconds(60)) &&
1340 CheckTxDuration(1536,
1342 MHz_u{40},
1343 NanoSeconds(3200),
1345 MicroSeconds(108)) &&
1346 CheckTxDuration(76,
1348 MHz_u{40},
1349 NanoSeconds(3200),
1351 MicroSeconds(60)) &&
1352 CheckTxDuration(14,
1354 MHz_u{40},
1355 NanoSeconds(3200),
1357 MicroSeconds(60)) &&
1358 CheckTxDuration(1536,
1360 MHz_u{80},
1361 NanoSeconds(3200),
1363 MicroSeconds(76)) &&
1364 CheckTxDuration(76,
1366 MHz_u{80},
1367 NanoSeconds(3200),
1369 MicroSeconds(60)) &&
1370 CheckTxDuration(14,
1372 MHz_u{80},
1373 NanoSeconds(3200),
1375 MicroSeconds(60)) &&
1376 CheckTxDuration(1536,
1378 MHz_u{160},
1379 NanoSeconds(3200),
1381 MicroSeconds(60)) &&
1382 CheckTxDuration(76,
1384 MHz_u{160},
1385 NanoSeconds(3200),
1387 MicroSeconds(60)) &&
1388 CheckTxDuration(14,
1390 MHz_u{160},
1391 NanoSeconds(3200),
1393 MicroSeconds(60));
1394
1395 NS_TEST_EXPECT_MSG_EQ(retval, true, "an 802.11ax SU duration failed");
1396
1397 // 802.11ax MU durations
1398 retval = CheckMuTxDuration(
1399 std::list<uint32_t>{1536, 1536},
1400 std::list<HeMuUserInfo>{{HeRu::RuSpec{RuType::RU_242_TONE, 1, true}, 0, 1},
1401 {HeRu::RuSpec{RuType::RU_242_TONE, 2, true}, 0, 1}},
1402 MHz_u{40},
1403 NanoSeconds(800),
1406 1493600)) // equivalent to HE_SU for 20 MHz with 2 extra HE-SIG-B (i.e. 8 us)
1408 std::list<uint32_t>{1536, 1536},
1409 std::list<HeMuUserInfo>{{HeRu::RuSpec{RuType::RU_242_TONE, 1, true}, 1, 1},
1410 {HeRu::RuSpec{RuType::RU_242_TONE, 2, true}, 0, 1}},
1411 MHz_u{40},
1412 NanoSeconds(800),
1414 NanoSeconds(1493600)) // shouldn't change if first PSDU is shorter
1416 std::list<uint32_t>{1536, 76},
1417 std::list<HeMuUserInfo>{{HeRu::RuSpec{RuType::RU_242_TONE, 1, true}, 0, 1},
1418 {HeRu::RuSpec{RuType::RU_242_TONE, 2, true}, 0, 1}},
1419 MHz_u{40},
1420 NanoSeconds(800),
1422 NanoSeconds(1493600));
1423
1424 NS_TEST_EXPECT_MSG_EQ(retval, true, "an 802.11ax MU duration failed");
1425
1426 // 802.11be SU durations
1427 retval = CheckTxDuration(1536,
1429 MHz_u{20},
1430 NanoSeconds(800),
1432 NanoSeconds(1493600)) &&
1433 CheckTxDuration(76,
1435 MHz_u{20},
1436 NanoSeconds(800),
1438 NanoSeconds(133600)) &&
1439 CheckTxDuration(14,
1441 MHz_u{20},
1442 NanoSeconds(800),
1444 NanoSeconds(79200)) &&
1445 CheckTxDuration(1536,
1447 MHz_u{40},
1448 NanoSeconds(800),
1450 NanoSeconds(772800)) &&
1451 CheckTxDuration(76,
1453 MHz_u{40},
1454 NanoSeconds(800),
1456 NanoSeconds(92800)) &&
1457 CheckTxDuration(14,
1459 MHz_u{40},
1460 NanoSeconds(800),
1462 NanoSeconds(65600)) &&
1463 CheckTxDuration(1536,
1465 MHz_u{80},
1466 NanoSeconds(800),
1468 NanoSeconds(409600)) &&
1469 CheckTxDuration(76,
1471 MHz_u{80},
1472 NanoSeconds(800),
1474 NanoSeconds(83200)) &&
1475 CheckTxDuration(14,
1477 MHz_u{80},
1478 NanoSeconds(800),
1480 NanoSeconds(69600)) &&
1481 CheckTxDuration(1536,
1483 MHz_u{160},
1484 NanoSeconds(800),
1486 NanoSeconds(232800)) &&
1487 CheckTxDuration(76,
1489 MHz_u{160},
1490 NanoSeconds(800),
1492 NanoSeconds(69600)) &&
1493 CheckTxDuration(14,
1495 MHz_u{160},
1496 NanoSeconds(800),
1498 NanoSeconds(69600)) &&
1499 CheckTxDuration(1536,
1501 MHz_u{320},
1502 NanoSeconds(800),
1504 NanoSeconds(159200)) &&
1505 CheckTxDuration(76,
1507 MHz_u{320},
1508 NanoSeconds(800),
1510 NanoSeconds(77600)) &&
1511 CheckTxDuration(14,
1513 MHz_u{320},
1514 NanoSeconds(800),
1516 NanoSeconds(77600)) &&
1517 CheckTxDuration(1536,
1519 MHz_u{20},
1520 NanoSeconds(1600),
1522 NanoSeconds(1578400)) &&
1523 CheckTxDuration(76,
1525 MHz_u{20},
1526 NanoSeconds(1600),
1528 NanoSeconds(138400)) &&
1529 CheckTxDuration(14,
1531 MHz_u{20},
1532 NanoSeconds(1600),
1534 NanoSeconds(80800)) &&
1535 CheckTxDuration(1536,
1537 MHz_u{40},
1538 NanoSeconds(1600),
1540 NanoSeconds(815200)) &&
1541 CheckTxDuration(76,
1543 MHz_u{40},
1544 NanoSeconds(1600),
1546 NanoSeconds(95200)) &&
1547 CheckTxDuration(14,
1549 MHz_u{40},
1550 NanoSeconds(1600),
1552 NanoSeconds(66400)) &&
1553 CheckTxDuration(1536,
1555 MHz_u{80},
1556 NanoSeconds(1600),
1558 NanoSeconds(430400)) &&
1559 CheckTxDuration(76,
1561 MHz_u{80},
1562 NanoSeconds(1600),
1564 NanoSeconds(84800)) &&
1565 CheckTxDuration(14,
1567 MHz_u{80},
1568 NanoSeconds(1600),
1570 NanoSeconds(70400)) &&
1571 CheckTxDuration(1536,
1573 MHz_u{160},
1574 NanoSeconds(1600),
1576 NanoSeconds(243200)) &&
1577 CheckTxDuration(76,
1579 MHz_u{160},
1580 NanoSeconds(1600),
1582 NanoSeconds(70400)) &&
1583 CheckTxDuration(14,
1585 MHz_u{160},
1586 NanoSeconds(1600),
1588 NanoSeconds(70400)) &&
1589 CheckTxDuration(1536,
1591 MHz_u{320},
1592 NanoSeconds(1600),
1594 NanoSeconds(164800)) &&
1595 CheckTxDuration(76,
1597 MHz_u{320},
1598 NanoSeconds(1600),
1600 NanoSeconds(78400)) &&
1601 CheckTxDuration(14,
1603 MHz_u{320},
1604 NanoSeconds(1600),
1606 NanoSeconds(78400)) &&
1607 CheckTxDuration(1536,
1609 MHz_u{20},
1610 NanoSeconds(3200),
1612 MicroSeconds(1748)) &&
1613 CheckTxDuration(76,
1615 MHz_u{20},
1616 NanoSeconds(3200),
1618 MicroSeconds(148)) &&
1619 CheckTxDuration(14,
1621 MHz_u{20},
1622 NanoSeconds(3200),
1624 MicroSeconds(84)) &&
1625 CheckTxDuration(1536,
1627 MHz_u{40},
1628 NanoSeconds(3200),
1630 MicroSeconds(900)) &&
1631 CheckTxDuration(76,
1633 MHz_u{40},
1634 NanoSeconds(3200),
1636 MicroSeconds(100)) &&
1637 CheckTxDuration(14,
1639 MHz_u{40},
1640 NanoSeconds(3200),
1642 MicroSeconds(68)) &&
1643 CheckTxDuration(1536,
1645 MHz_u{80},
1646 NanoSeconds(3200),
1648 MicroSeconds(472)) &&
1649 CheckTxDuration(76,
1651 MHz_u{80},
1652 NanoSeconds(3200),
1654 MicroSeconds(88)) &&
1655 CheckTxDuration(14,
1657 MHz_u{80},
1658 NanoSeconds(3200),
1660 MicroSeconds(72)) &&
1661 CheckTxDuration(1536,
1663 MHz_u{160},
1664 NanoSeconds(3200),
1666 MicroSeconds(264)) &&
1667 CheckTxDuration(76,
1669 MHz_u{160},
1670 NanoSeconds(3200),
1672 MicroSeconds(72)) &&
1673 CheckTxDuration(14,
1675 MHz_u{160},
1676 NanoSeconds(3200),
1678 MicroSeconds(72)) &&
1679 CheckTxDuration(1536,
1681 MHz_u{320},
1682 NanoSeconds(3200),
1684 MicroSeconds(176)) &&
1685 CheckTxDuration(76,
1687 MHz_u{320},
1688 NanoSeconds(3200),
1690 MicroSeconds(80)) &&
1691 CheckTxDuration(14,
1693 MHz_u{320},
1694 NanoSeconds(3200),
1696 MicroSeconds(80)) &&
1697 CheckTxDuration(1536,
1699 MHz_u{20},
1700 NanoSeconds(800),
1702 NanoSeconds(129600)) &&
1703 CheckTxDuration(76,
1705 MHz_u{20},
1706 NanoSeconds(800),
1708 NanoSeconds(61600)) &&
1709 CheckTxDuration(14,
1711 MHz_u{20},
1712 NanoSeconds(800),
1714 NanoSeconds(61600)) &&
1715 CheckTxDuration(1536,
1717 MHz_u{40},
1718 NanoSeconds(800),
1720 NanoSeconds(88800)) &&
1721 CheckTxDuration(76,
1723 MHz_u{40},
1724 NanoSeconds(800),
1726 NanoSeconds(61600)) &&
1727 CheckTxDuration(14,
1729 MHz_u{40},
1730 NanoSeconds(800),
1732 NanoSeconds(61600)) &&
1733 CheckTxDuration(1536,
1735 MHz_u{80},
1736 NanoSeconds(800),
1738 NanoSeconds(75200)) &&
1739 CheckTxDuration(76,
1741 MHz_u{80},
1742 NanoSeconds(800),
1744 NanoSeconds(61600)) &&
1745 CheckTxDuration(14,
1747 MHz_u{80},
1748 NanoSeconds(800),
1750 NanoSeconds(61600)) &&
1751 CheckTxDuration(1536,
1753 MHz_u{160},
1754 NanoSeconds(800),
1756 NanoSeconds(61600)) &&
1757 CheckTxDuration(76,
1759 MHz_u{160},
1760 NanoSeconds(800),
1762 NanoSeconds(61600)) &&
1763 CheckTxDuration(14,
1765 MHz_u{160},
1766 NanoSeconds(800),
1768 NanoSeconds(61600)) &&
1769 CheckTxDuration(1536,
1771 MHz_u{320},
1772 NanoSeconds(800),
1774 NanoSeconds(61600)) &&
1775 CheckTxDuration(76,
1777 MHz_u{320},
1778 NanoSeconds(800),
1780 NanoSeconds(61600)) &&
1781 CheckTxDuration(14,
1783 MHz_u{320},
1784 NanoSeconds(800),
1786 NanoSeconds(61600)) &&
1787 CheckTxDuration(1536,
1789 MHz_u{20},
1790 NanoSeconds(1600),
1792 NanoSeconds(134400)) &&
1793 CheckTxDuration(76,
1795 MHz_u{20},
1796 NanoSeconds(1600),
1798 NanoSeconds(62400)) &&
1799 CheckTxDuration(14,
1801 MHz_u{20},
1802 NanoSeconds(1600),
1804 NanoSeconds(62400)) &&
1805 CheckTxDuration(1536,
1807 MHz_u{40},
1808 NanoSeconds(1600),
1810 NanoSeconds(91200)) &&
1811 CheckTxDuration(76,
1813 MHz_u{40},
1814 NanoSeconds(1600),
1816 NanoSeconds(62400)) &&
1817 CheckTxDuration(14,
1819 MHz_u{40},
1820 NanoSeconds(1600),
1822 NanoSeconds(62400)) &&
1823 CheckTxDuration(1536,
1825 MHz_u{80},
1826 NanoSeconds(1600),
1828 NanoSeconds(76800)) &&
1829 CheckTxDuration(76,
1831 MHz_u{80},
1832 NanoSeconds(1600),
1834 NanoSeconds(62400)) &&
1835 CheckTxDuration(14,
1837 MHz_u{80},
1838 NanoSeconds(1600),
1840 NanoSeconds(62400)) &&
1841 CheckTxDuration(1536,
1843 MHz_u{160},
1844 NanoSeconds(1600),
1846 NanoSeconds(62400)) &&
1847 CheckTxDuration(76,
1849 MHz_u{160},
1850 NanoSeconds(1600),
1852 NanoSeconds(62400)) &&
1853 CheckTxDuration(14,
1855 MHz_u{160},
1856 NanoSeconds(1600),
1858 NanoSeconds(62400)) &&
1859 CheckTxDuration(1536,
1861 MHz_u{320},
1862 NanoSeconds(1600),
1864 NanoSeconds(62400)) &&
1865 CheckTxDuration(76,
1867 MHz_u{320},
1868 NanoSeconds(1600),
1870 NanoSeconds(62400)) &&
1871 CheckTxDuration(14,
1873 MHz_u{320},
1874 NanoSeconds(1600),
1876 NanoSeconds(62400)) &&
1877 CheckTxDuration(1536,
1879 MHz_u{20},
1880 NanoSeconds(3200),
1882 MicroSeconds(144)) &&
1883 CheckTxDuration(76,
1885 MHz_u{20},
1886 NanoSeconds(3200),
1888 MicroSeconds(64)) &&
1889 CheckTxDuration(14,
1891 MHz_u{20},
1892 NanoSeconds(3200),
1894 MicroSeconds(64)) &&
1895 CheckTxDuration(1536,
1897 MHz_u{40},
1898 NanoSeconds(3200),
1900 MicroSeconds(96)) &&
1901 CheckTxDuration(76,
1903 MHz_u{40},
1904 NanoSeconds(3200),
1906 MicroSeconds(64)) &&
1907 CheckTxDuration(14,
1909 MHz_u{40},
1910 NanoSeconds(3200),
1912 MicroSeconds(64)) &&
1913 CheckTxDuration(1536,
1915 MHz_u{80},
1916 NanoSeconds(3200),
1918 MicroSeconds(80)) &&
1919 CheckTxDuration(76,
1921 MHz_u{80},
1922 NanoSeconds(3200),
1924 MicroSeconds(64)) &&
1925 CheckTxDuration(14,
1927 MHz_u{80},
1928 NanoSeconds(3200),
1930 MicroSeconds(64)) &&
1931 CheckTxDuration(1536,
1933 MHz_u{160},
1934 NanoSeconds(3200),
1936 MicroSeconds(64)) &&
1937 CheckTxDuration(76,
1939 MHz_u{160},
1940 NanoSeconds(3200),
1942 MicroSeconds(64)) &&
1943 CheckTxDuration(14,
1945 MHz_u{160},
1946 NanoSeconds(3200),
1948 MicroSeconds(64)) &&
1949 CheckTxDuration(1536,
1951 MHz_u{320},
1952 NanoSeconds(3200),
1954 MicroSeconds(64)) &&
1955 CheckTxDuration(76,
1957 MHz_u{320},
1958 NanoSeconds(3200),
1960 MicroSeconds(64)) &&
1961 CheckTxDuration(14,
1963 MHz_u{320},
1964 NanoSeconds(3200),
1966 MicroSeconds(64));
1967
1968 NS_TEST_EXPECT_MSG_EQ(retval, true, "an 802.11be SU duration failed");
1969
1970 // 802.11be MU durations
1971 retval =
1972 retval &&
1974 std::list<uint32_t>{1536, 1536},
1975 std::list<HeMuUserInfo>{{EhtRu::RuSpec{RuType::RU_242_TONE, 1, true, true}, 0, 1},
1976 {EhtRu::RuSpec{RuType::RU_242_TONE, 2, true, true}, 0, 1}},
1977 MHz_u{40},
1978 NanoSeconds(800),
1980 NanoSeconds(1493600)) // equivalent to 802.11ax MU
1982 std::list<uint32_t>{1536, 1536},
1983 std::list<HeMuUserInfo>{{EhtRu::RuSpec{RuType::RU_242_TONE, 1, true, true}, 1, 1},
1984 {EhtRu::RuSpec{RuType::RU_242_TONE, 2, true, true}, 0, 1}},
1985 MHz_u{40},
1986 NanoSeconds(800),
1988 NanoSeconds(1493600)) // shouldn't change if first PSDU is shorter
1990 std::list<uint32_t>{1536, 76},
1991 std::list<HeMuUserInfo>{{EhtRu::RuSpec{RuType::RU_242_TONE, 1, true, true}, 0, 1},
1992 {EhtRu::RuSpec{RuType::RU_242_TONE, 2, true, true}, 0, 1}},
1993 MHz_u{40},
1994 NanoSeconds(800),
1996 NanoSeconds(1493600));
1997
1998 NS_TEST_EXPECT_MSG_EQ(retval, true, "an 802.11be MU duration failed");
1999
2001}
2002
2003/**
2004 * @ingroup wifi-test
2005 * @ingroup tests
2006 *
2007 * @brief HE-SIG-B/EHT-SIG duration test
2008 */
2010{
2011 public:
2012 /**
2013 * OFDMA or MU-MIMO
2014 */
2016 {
2019 };
2020
2021 /**
2022 * Constructor
2023 *
2024 * @param userInfos the HE MU specific per-user information to use for the test
2025 * @param sigBMode the mode to transmit HE-SIG-B for the test
2026 * @param channelWidth the channel width to select for the test
2027 * @param p20Index the index of the primary20 channel
2028 * @param expectedMuType the expected MU type (OFDMA or MU-MIMO)
2029 * @param expectedRuAllocation the expected RuType::RU_ALLOCATION
2030 * @param expectedNumUsersPerCc the expected number of users per content channel
2031 * @param expectedSigBDuration the expected duration of the HE-SIG-B header
2032 */
2033 MuSigDurationTest(const std::list<HeMuUserInfo>& userInfos,
2034 const WifiMode& sigBMode,
2035 MHz_u channelWidth,
2036 uint8_t p20Index,
2037 MuType expectedMuType,
2038 const RuAllocation& expectedRuAllocation,
2039 const std::pair<std::size_t, std::size_t>& expectedNumUsersPerCc,
2040 Time expectedSigBDuration);
2041
2042 private:
2043 void DoRun() override;
2044 void DoTeardown() override;
2045
2046 /**
2047 * Build a TXVECTOR for HE MU or EHT MU.
2048 *
2049 * @return the configured TXVECTOR for HE MU or EHT MU
2050 */
2052
2053 Ptr<YansWifiPhy> m_phy; ///< the PHY under test
2054
2055 std::list<HeMuUserInfo> m_userInfos; ///< HE MU specific per-user information
2056 WifiMode m_sigBMode; ///< Mode used to transmit HE-SIG-B
2057 MHz_u m_channelWidth; ///< Channel width
2058 uint8_t m_p20Index; ///< index of the primary20 channel
2059 MuType m_expectedMuType; ///< Expected MU type (OFDMA or MU-MIMO)
2060 RuAllocation m_expectedRuAllocation; ///< Expected RuType::RU_ALLOCATION
2061 std::pair<std::size_t, std::size_t>
2062 m_expectedNumUsersPerCc; ///< Expected number of users per content channel
2063 Time m_expectedSigBDuration; ///< Expected duration of the HE-SIG-B/EHT-SIG header
2064};
2065
2067 const std::list<HeMuUserInfo>& userInfos,
2068 const WifiMode& sigBMode,
2069 MHz_u channelWidth,
2070 uint8_t p20Index,
2071 MuType expectedMuType,
2072 const RuAllocation& expectedRuAllocation,
2073 const std::pair<std::size_t, std::size_t>& expectedNumUsersPerCc,
2074 Time expectedSigBDuration)
2075 : TestCase{"Check HE-SIG-B or EHT-SIG duration computation"},
2076 m_userInfos{userInfos},
2077 m_sigBMode{sigBMode},
2078 m_channelWidth{channelWidth},
2079 m_p20Index{p20Index},
2080 m_expectedMuType{expectedMuType},
2081 m_expectedRuAllocation{expectedRuAllocation},
2082 m_expectedNumUsersPerCc{expectedNumUsersPerCc},
2083 m_expectedSigBDuration{expectedSigBDuration}
2084{
2085}
2086
2089{
2090 const auto isHe = WifiRu::IsHe(m_userInfos.begin()->ru);
2091 WifiTxVector txVector;
2094 txVector.SetGuardInterval(NanoSeconds(3200));
2095 txVector.SetStbc(false);
2096 txVector.SetNess(0);
2097 std::list<uint16_t> staIds;
2098 uint16_t staId = 1;
2099 if (!isHe)
2100 {
2101 txVector.SetEhtPpduType(0);
2102 }
2103 for (const auto& userInfo : m_userInfos)
2104 {
2105 txVector.SetHeMuUserInfo(staId, userInfo);
2106 staIds.push_back(staId++);
2107 }
2108 txVector.SetSigBMode(m_sigBMode);
2109 NS_ASSERT(m_expectedMuType == OFDMA ? txVector.IsDlOfdma() : txVector.IsDlMuMimo());
2110 return txVector;
2111}
2112
2113void
2115{
2117 auto channelNum = WifiPhyOperatingChannel::FindFirst(0,
2118 MHz_u{0},
2119 MHz_u{320},
2122 ->number;
2123 m_phy->SetOperatingChannel(
2125 m_phy->ConfigureStandard(WIFI_STANDARD_80211be);
2126
2127 const auto& txVector = BuildTxVector();
2128 auto phyEntity = m_phy->GetPhyEntity(txVector.GetModulationClass());
2129
2130 // Verify mode for HE-SIG-B/EHT-SIG field
2131 NS_TEST_EXPECT_MSG_EQ(phyEntity->GetSigMode(WIFI_PPDU_FIELD_SIG_B, txVector),
2132 m_sigBMode,
2133 "Incorrect mode used to send HE-SIG-B/EHT-SIG");
2134
2135 // Verify RuType::RU_ALLOCATION in TXVECTOR
2136 NS_TEST_EXPECT_MSG_EQ((txVector.GetRuAllocation(0) == m_expectedRuAllocation),
2137 true,
2138 "Incorrect RuType::RU_ALLOCATION");
2139
2140 // Verify number of users for content channels 1 and 2
2141 const auto& numUsersPerCc = HePpdu::GetNumRusPerHeSigBContentChannel(
2142 txVector.GetChannelWidth(),
2143 txVector.GetModulationClass(),
2144 txVector.GetRuAllocation(m_p20Index),
2145 txVector.GetCenter26ToneRuIndication(),
2146 txVector.IsSigBCompression(),
2147 txVector.IsSigBCompression() ? txVector.GetHeMuUserInfoMap().size() : 0);
2148 const auto contentChannels = HePpdu::GetHeSigBContentChannels(txVector, 0);
2149 NS_TEST_EXPECT_MSG_EQ(numUsersPerCc.first,
2151 "Incorrect number of users in content channel 1");
2152 NS_TEST_EXPECT_MSG_EQ(numUsersPerCc.second,
2154 "Incorrect number of users in content channel 2");
2155 NS_TEST_EXPECT_MSG_EQ(contentChannels.at(0).size(),
2157 "Incorrect number of users in content channel 1");
2158 NS_TEST_EXPECT_MSG_EQ((contentChannels.size() > 1 ? contentChannels.at(1).size() : 0),
2160 "Incorrect number of users in content channel 2");
2161
2162 // Verify total HE-SIG-B/EHT-SIG duration
2163 if (txVector.GetModulationClass() == WIFI_MOD_CLASS_HE)
2164 {
2165 NS_TEST_EXPECT_MSG_EQ(phyEntity->GetDuration(WIFI_PPDU_FIELD_SIG_B, txVector),
2167 "Incorrect duration for HE-SIG-B");
2168 }
2169 else // EHT
2170 {
2171 NS_TEST_EXPECT_MSG_EQ(phyEntity->GetDuration(WIFI_PPDU_FIELD_EHT_SIG, txVector),
2173 "Incorrect duration for EHT-SIG");
2174 }
2175
2176 // Verify user infos in reconstructed TX vector
2177 WifiConstPsduMap psdus;
2178 Time ppduDuration;
2179 for (std::size_t i = 0; i < m_userInfos.size(); ++i)
2180 {
2181 WifiMacHeader hdr;
2182 auto psdu = Create<WifiPsdu>(Create<Packet>(1000), hdr);
2183 ppduDuration = std::max(
2184 ppduDuration,
2185 WifiPhy::CalculateTxDuration(psdu->GetSize(), txVector, m_phy->GetPhyBand(), i + 1));
2186 psdus.insert(std::make_pair(i, psdu));
2187 }
2188 auto ppdu = phyEntity->BuildPpdu(psdus, txVector, ppduDuration);
2189 ppdu->ResetTxVector();
2190 const auto& rxVector = ppdu->GetTxVector();
2191 NS_TEST_EXPECT_MSG_EQ((txVector.GetHeMuUserInfoMap() == rxVector.GetHeMuUserInfoMap()),
2192 true,
2193 "Incorrect user infos in reconstructed TXVECTOR");
2194
2196}
2197
2198void
2200{
2201 m_phy->Dispose();
2202 m_phy = nullptr;
2203}
2204
2205/**
2206 * @ingroup wifi-test
2207 * @ingroup tests
2208 *
2209 * @brief PHY header sections consistency test
2210 */
2212{
2213 public:
2215 ~PhyHeaderSectionsTest() override;
2216 void DoRun() override;
2217
2218 private:
2219 /**
2220 * Check if map of PHY header sections returned by a given PHY entity
2221 * corresponds to a known value
2222 *
2223 * @param obtained the map of PHY header sections to check
2224 * @param expected the expected map of PHY header sections
2225 */
2227};
2228
2230 : TestCase("PHY header sections consistency")
2231{
2232}
2233
2237
2238void
2240 PhyHeaderSections expected)
2241{
2242 NS_ASSERT_MSG(obtained.size() == expected.size(),
2243 "The expected map size (" << expected.size() << ") was not obtained ("
2244 << obtained.size() << ")");
2245
2246 auto itObtained = obtained.begin();
2247 auto itExpected = expected.begin();
2248 for (; itObtained != obtained.end() || itExpected != expected.end();)
2249 {
2250 WifiPpduField field = itObtained->first;
2251 auto window = itObtained->second.first;
2252 auto mode = itObtained->second.second;
2253
2254 WifiPpduField fieldRef = itExpected->first;
2255 auto windowRef = itExpected->second.first;
2256 auto modeRef = itExpected->second.second;
2257
2259 fieldRef,
2260 "The expected PPDU field (" << fieldRef << ") was not obtained ("
2261 << field << ")");
2262 NS_TEST_EXPECT_MSG_EQ(window.first,
2263 windowRef.first,
2264 "The expected start time (" << windowRef.first
2265 << ") was not obtained (" << window.first
2266 << ")");
2267 NS_TEST_EXPECT_MSG_EQ(window.second,
2268 windowRef.second,
2269 "The expected stop time (" << windowRef.second
2270 << ") was not obtained (" << window.second
2271 << ")");
2273 modeRef,
2274 "The expected mode (" << modeRef << ") was not obtained (" << mode
2275 << ")");
2276 ++itObtained;
2277 ++itExpected;
2278 }
2279}
2280
2281void
2283{
2284 Time ppduStart = Seconds(1);
2285 std::shared_ptr<PhyEntity> phyEntity;
2286 PhyHeaderSections sections;
2287 WifiTxVector txVector;
2288 WifiMode nonHtMode;
2289
2290 // ==================================================================================
2291 // 11b (HR/DSSS)
2292 phyEntity = std::make_shared<DsssPhy>();
2294 txVector.SetChannelWidth(MHz_u{22});
2295
2296 // -> long PPDU format
2298 nonHtMode = DsssPhy::GetDsssRate1Mbps();
2299 sections = {
2300 {WIFI_PPDU_FIELD_PREAMBLE, {{ppduStart, ppduStart + MicroSeconds(144)}, nonHtMode}},
2302 {{ppduStart + MicroSeconds(144), ppduStart + MicroSeconds(192)}, nonHtMode}},
2303 };
2304 CheckPhyHeaderSections(phyEntity->GetPhyHeaderSections(txVector, ppduStart), sections);
2305
2306 // -> long PPDU format if data rate is 1 Mbps (even if preamble is tagged short)
2308 CheckPhyHeaderSections(phyEntity->GetPhyHeaderSections(txVector, ppduStart), sections);
2309
2310 // -> short PPDU format
2312 nonHtMode = DsssPhy::GetDsssRate2Mbps();
2314 sections = {
2315 {WIFI_PPDU_FIELD_PREAMBLE, {{ppduStart, ppduStart + MicroSeconds(72)}, nonHtMode}},
2317 {{ppduStart + MicroSeconds(72), ppduStart + MicroSeconds(96)}, nonHtMode}},
2318 };
2319 CheckPhyHeaderSections(phyEntity->GetPhyHeaderSections(txVector, ppduStart), sections);
2320
2321 // ==================================================================================
2322 // 11a (OFDM)
2324
2325 // -> one iteration per variant: default, 10 MHz, and 5 MHz
2326 std::map<OfdmPhyVariant, std::size_t> variants{
2327 // number to use to deduce rate and BW info for each variant
2328 {OFDM_PHY_DEFAULT, 1},
2329 {OFDM_PHY_10_MHZ, 2},
2330 {OFDM_PHY_5_MHZ, 4},
2331 };
2332 for (auto variant : variants)
2333 {
2334 phyEntity = std::make_shared<OfdmPhy>(variant.first);
2335 std::size_t ratio = variant.second;
2336 const auto bw = MHz_u{20} / ratio;
2337 txVector.SetChannelWidth(bw);
2338 txVector.SetMode(OfdmPhy::GetOfdmRate(12000000 / ratio, bw));
2339 nonHtMode = OfdmPhy::GetOfdmRate(6000000 / ratio, bw);
2340 sections = {
2342 {{ppduStart, ppduStart + MicroSeconds(16 * ratio)}, nonHtMode}},
2344 {{ppduStart + MicroSeconds(16 * ratio), ppduStart + MicroSeconds(20 * ratio)},
2345 nonHtMode}},
2346 };
2347 CheckPhyHeaderSections(phyEntity->GetPhyHeaderSections(txVector, ppduStart), sections);
2348 }
2349
2350 // ==================================================================================
2351 // 11g (ERP-OFDM)
2352 phyEntity = std::make_shared<ErpOfdmPhy>();
2353 txVector.SetChannelWidth(MHz_u{20});
2354 txVector.SetMode(ErpOfdmPhy::GetErpOfdmRate(54000000));
2355 nonHtMode = ErpOfdmPhy::GetErpOfdmRate6Mbps();
2356 sections = {
2357 {WIFI_PPDU_FIELD_PREAMBLE, {{ppduStart, ppduStart + MicroSeconds(16)}, nonHtMode}},
2359 {{ppduStart + MicroSeconds(16), ppduStart + MicroSeconds(20)}, nonHtMode}},
2360 };
2361 CheckPhyHeaderSections(phyEntity->GetPhyHeaderSections(txVector, ppduStart), sections);
2362
2363 // ==================================================================================
2364 // 11n (HT)
2365 phyEntity = std::make_shared<HtPhy>(4);
2366 txVector.SetChannelWidth(MHz_u{20});
2367 txVector.SetMode(HtPhy::GetHtMcs6());
2368 nonHtMode = OfdmPhy::GetOfdmRate6Mbps();
2369 WifiMode htSigMode = nonHtMode;
2370
2371 // -> HT-mixed format for 2 SS and no ESS
2373 txVector.SetNss(2);
2374 txVector.SetNess(0);
2375 sections = {
2376 {WIFI_PPDU_FIELD_PREAMBLE, {{ppduStart, ppduStart + MicroSeconds(16)}, nonHtMode}},
2378 {{ppduStart + MicroSeconds(16), ppduStart + MicroSeconds(20)}, nonHtMode}},
2380 {{ppduStart + MicroSeconds(20), ppduStart + MicroSeconds(28)}, htSigMode}},
2382 {{ppduStart + MicroSeconds(28), ppduStart + MicroSeconds(40)}, // 1 HT-STF + 2 HT-LTFs
2383 htSigMode}},
2384 };
2385 CheckPhyHeaderSections(phyEntity->GetPhyHeaderSections(txVector, ppduStart), sections);
2386 txVector.SetChannelWidth(MHz_u{20}); // shouldn't have any impact
2387 CheckPhyHeaderSections(phyEntity->GetPhyHeaderSections(txVector, ppduStart), sections);
2388
2389 // -> HT-mixed format for 3 SS and 1 ESS
2390 txVector.SetNss(3);
2391 txVector.SetNess(1);
2392 sections[WIFI_PPDU_FIELD_TRAINING] = {
2393 {ppduStart + MicroSeconds(28),
2394 ppduStart + MicroSeconds(52)}, // 1 HT-STF + 5 HT-LTFs (4 data + 1 extension)
2395 htSigMode};
2396 CheckPhyHeaderSections(phyEntity->GetPhyHeaderSections(txVector, ppduStart), sections);
2397
2398 // ==================================================================================
2399 // 11ac (VHT)
2400 phyEntity = std::make_shared<VhtPhy>();
2401 txVector.SetChannelWidth(MHz_u{20});
2402 txVector.SetNess(0);
2403 txVector.SetMode(VhtPhy::GetVhtMcs7());
2404 WifiMode sigAMode = nonHtMode;
2405 WifiMode sigBMode = VhtPhy::GetVhtMcs0();
2406
2407 // -> VHT SU format for 5 SS
2409 txVector.SetNss(5);
2410 sections = {
2411 {WIFI_PPDU_FIELD_PREAMBLE, {{ppduStart, ppduStart + MicroSeconds(16)}, nonHtMode}},
2413 {{ppduStart + MicroSeconds(16), ppduStart + MicroSeconds(20)}, nonHtMode}},
2415 {{ppduStart + MicroSeconds(20), ppduStart + MicroSeconds(28)}, sigAMode}},
2417 {{ppduStart + MicroSeconds(28), ppduStart + MicroSeconds(56)}, // 1 VHT-STF + 6 VHT-LTFs
2418 sigAMode}},
2419 };
2420 CheckPhyHeaderSections(phyEntity->GetPhyHeaderSections(txVector, ppduStart), sections);
2421
2422 // -> VHT SU format for 7 SS
2423 txVector.SetNss(7);
2424 sections[WIFI_PPDU_FIELD_TRAINING] = {
2425 {ppduStart + MicroSeconds(28), ppduStart + MicroSeconds(64)}, // 1 VHT-STF + 8 VHT-LTFs
2426 sigAMode};
2427 CheckPhyHeaderSections(phyEntity->GetPhyHeaderSections(txVector, ppduStart), sections);
2428
2429 // -> VHT MU format for 3 SS
2431 txVector.SetNss(3);
2432 sections[WIFI_PPDU_FIELD_TRAINING] = {
2433 {ppduStart + MicroSeconds(28), ppduStart + MicroSeconds(48)}, // 1 VHT-STF + 4 VHT-LTFs
2434 sigAMode};
2435 sections[WIFI_PPDU_FIELD_SIG_B] = {{ppduStart + MicroSeconds(48), ppduStart + MicroSeconds(52)},
2436 sigBMode};
2437 CheckPhyHeaderSections(phyEntity->GetPhyHeaderSections(txVector, ppduStart), sections);
2438 txVector.SetChannelWidth(MHz_u{80}); // shouldn't have any impact
2439 CheckPhyHeaderSections(phyEntity->GetPhyHeaderSections(txVector, ppduStart), sections);
2440
2441 // ==================================================================================
2442 // 11ax (HE)
2443 phyEntity = std::make_shared<HePhy>();
2444 txVector.SetChannelWidth(MHz_u{20});
2445 txVector.SetNss(2); // HE-LTF duration assumed to be always 8 us for the time being (see note in
2446 // HePhy::GetTrainingDuration)
2447 txVector.SetMode(HePhy::GetHeMcs9());
2448 std::map<uint16_t, HeMuUserInfo> userInfoMap = {
2449 {1, {HeRu::RuSpec{RuType::RU_106_TONE, 1, true}, 4, 2}},
2450 {2, {HeRu::RuSpec{RuType::RU_106_TONE, 1, true}, 9, 1}}};
2451 sigAMode = HePhy::GetVhtMcs0();
2452 sigBMode = HePhy::GetVhtMcs4(); // because of first user info map
2453
2454 // -> HE SU format
2456 sections = {
2457 {WIFI_PPDU_FIELD_PREAMBLE, {{ppduStart, ppduStart + MicroSeconds(16)}, nonHtMode}},
2459 {{ppduStart + MicroSeconds(16), ppduStart + MicroSeconds(24)}, // L-SIG + RL-SIG
2460 nonHtMode}},
2462 {{ppduStart + MicroSeconds(24), ppduStart + MicroSeconds(32)}, sigAMode}},
2464 {{ppduStart + MicroSeconds(32),
2465 ppduStart + MicroSeconds(52)}, // 1 HE-STF (@ 4 us) + 2 HE-LTFs (@ 8 us)
2466 sigAMode}},
2467 };
2468 CheckPhyHeaderSections(phyEntity->GetPhyHeaderSections(txVector, ppduStart), sections);
2469
2470 // -> HE ER SU format
2472 sections[WIFI_PPDU_FIELD_SIG_A] = {
2473 {ppduStart + MicroSeconds(24), ppduStart + MicroSeconds(40)}, // 16 us HE-SIG-A
2474 sigAMode};
2475 sections[WIFI_PPDU_FIELD_TRAINING] = {
2476 {ppduStart + MicroSeconds(40),
2477 ppduStart + MicroSeconds(60)}, // 1 HE-STF (@ 4 us) + 2 HE-LTFs (@ 8 us)
2478 sigAMode};
2479 CheckPhyHeaderSections(phyEntity->GetPhyHeaderSections(txVector, ppduStart), sections);
2480
2481 // -> HE TB format
2483 txVector.SetHeMuUserInfo(1, userInfoMap.at(1));
2484 txVector.SetHeMuUserInfo(2, userInfoMap.at(2));
2485 sections[WIFI_PPDU_FIELD_SIG_A] = {{ppduStart + MicroSeconds(24), ppduStart + MicroSeconds(32)},
2486 sigAMode};
2487 sections[WIFI_PPDU_FIELD_TRAINING] = {
2488 {ppduStart + MicroSeconds(32),
2489 ppduStart + MicroSeconds(56)}, // 1 HE-STF (@ 8 us) + 2 HE-LTFs (@ 8 us)
2490 sigAMode};
2491 CheckPhyHeaderSections(phyEntity->GetPhyHeaderSections(txVector, ppduStart), sections);
2492
2493 // -> HE MU format
2495 txVector.SetSigBMode(sigBMode);
2496 txVector.SetRuAllocation({96}, 0);
2497 sections[WIFI_PPDU_FIELD_SIG_A] = {{ppduStart + MicroSeconds(24), ppduStart + MicroSeconds(32)},
2498 sigAMode};
2499 sections[WIFI_PPDU_FIELD_SIG_B] = {
2500 {ppduStart + MicroSeconds(32), ppduStart + MicroSeconds(36)}, // only one symbol
2501 sigBMode};
2502 sections[WIFI_PPDU_FIELD_TRAINING] = {
2503 {ppduStart + MicroSeconds(36),
2504 ppduStart + MicroSeconds(56)}, // 1 HE-STF (@ 4 us) + 2 HE-LTFs (@ 8 us)
2505 sigBMode};
2506 CheckPhyHeaderSections(phyEntity->GetPhyHeaderSections(txVector, ppduStart), sections);
2507 txVector.SetChannelWidth(MHz_u{160}); // shouldn't have any impact
2508 txVector.SetRuAllocation({96, 113, 113, 113, 113, 113, 113, 113}, 0);
2509
2510 CheckPhyHeaderSections(phyEntity->GetPhyHeaderSections(txVector, ppduStart), sections);
2511
2512 // ==================================================================================
2513 // 11be (EHT)
2514 sections.erase(WIFI_PPDU_FIELD_SIG_A); // FIXME: do we keep using separate type for 11be?
2515 sections.erase(WIFI_PPDU_FIELD_SIG_B); // FIXME: do we keep using separate type for 11be?
2516 phyEntity = std::make_shared<EhtPhy>();
2517 txVector.SetChannelWidth(MHz_u{20});
2518 txVector.SetNss(2); // EHT-LTF duration assumed to be always 8 us for the time being (see note
2519 // in HePhy::GetTrainingDuration)
2520 txVector.SetMode(EhtPhy::GetEhtMcs9());
2521 userInfoMap = {{1, {EhtRu::RuSpec{RuType::RU_52_TONE, 1, true, true}, 4, 2}},
2522 {2, {EhtRu::RuSpec{RuType::RU_52_TONE, 2, true, true}, 9, 1}},
2523 {3, {EhtRu::RuSpec{RuType::RU_52_TONE, 3, true, true}, 4, 2}},
2524 {4, {EhtRu::RuSpec{RuType::RU_52_TONE, 4, true, true}, 9, 1}}};
2525 WifiMode uSigMode = EhtPhy::GetVhtMcs0();
2526 WifiMode ehtSigMode = EhtPhy::GetVhtMcs4(); // because of first user info map
2527
2528 // -> EHT TB format
2530 txVector.SetHeMuUserInfo(1, userInfoMap.at(1));
2531 txVector.SetHeMuUserInfo(2, userInfoMap.at(2));
2532 sections[WIFI_PPDU_FIELD_U_SIG] = {{ppduStart + MicroSeconds(24), ppduStart + MicroSeconds(32)},
2533 uSigMode};
2534 sections[WIFI_PPDU_FIELD_TRAINING] = {
2535 {ppduStart + MicroSeconds(32),
2536 ppduStart + MicroSeconds(56)}, // 1 EHT-STF (@ 8 us) + 2 EHT-LTFs (@ 8 us)
2537 uSigMode};
2538 CheckPhyHeaderSections(phyEntity->GetPhyHeaderSections(txVector, ppduStart), sections);
2539
2540 // -> EHT MU format
2542 txVector.SetEhtPpduType(0); // EHT MU transmission
2543 txVector.SetRuAllocation({24}, 0);
2544 sections[WIFI_PPDU_FIELD_U_SIG] = {{ppduStart + MicroSeconds(24), ppduStart + MicroSeconds(32)},
2545 uSigMode};
2546 sections[WIFI_PPDU_FIELD_EHT_SIG] = {
2547 {ppduStart + MicroSeconds(32), ppduStart + MicroSeconds(36)}, // only one symbol
2548 ehtSigMode};
2549 sections[WIFI_PPDU_FIELD_TRAINING] = {
2550 {ppduStart + MicroSeconds(36),
2551 ppduStart + MicroSeconds(56)}, // 1 HE-STF (@ 4 us) + 2 HE-LTFs (@ 8 us)
2552 ehtSigMode};
2553 CheckPhyHeaderSections(phyEntity->GetPhyHeaderSections(txVector, ppduStart), sections);
2554 txVector.SetChannelWidth(MHz_u{160}); // shouldn't have any impact
2555 txVector.SetRuAllocation({24, 27, 27, 27, 27, 27, 27, 27}, 0);
2556
2557 CheckPhyHeaderSections(phyEntity->GetPhyHeaderSections(txVector, ppduStart), sections);
2558}
2559
2560/**
2561 * @ingroup wifi-test
2562 * @ingroup tests
2563 *
2564 * @brief Tx Duration Test Suite
2565 */
2567{
2568 public:
2570};
2571
2573 : TestSuite("wifi-devices-tx-duration", Type::UNIT)
2574{
2576
2578
2579 const auto p80OrLow80 = true;
2580 const auto s80OrHigh80 = false;
2581 for (const auto p160 :
2582 std::initializer_list<std::optional<bool>>{std::nullopt /* HE-SIG-B */,
2583 std::optional(true) /* EHT-SIG */})
2584 {
2585 // 20 MHz band, OFDMA, even number of users in content channel
2587 new MuSigDurationTest({{MakeRuSpec(RuType::RU_106_TONE, 1, p80OrLow80, p160), 11, 1},
2588 {MakeRuSpec(RuType::RU_106_TONE, 2, p80OrLow80, p160), 10, 4}},
2590 MHz_u{20},
2591 0,
2593 (p160 == std::nullopt) ? RuAllocation{96} : RuAllocation{48},
2594 std::make_pair(2, 0), // both users in content channel 1
2595 MicroSeconds(4)), // one OFDM symbol;
2597
2598 // 40 MHz band, OFDMA, even number of users per content channel
2600 {{MakeRuSpec(RuType::RU_106_TONE, 1, p80OrLow80, p160), 11, 1}, // CC1
2601 {MakeRuSpec(RuType::RU_106_TONE, 2, p80OrLow80, p160), 10, 4}, // CC1
2602 {MakeRuSpec(RuType::RU_52_TONE, 5, p80OrLow80, p160), 4, 1}, // CC2
2603 {MakeRuSpec(RuType::RU_52_TONE, 6, p80OrLow80, p160), 6, 2}, // CC2
2604 {MakeRuSpec(RuType::RU_52_TONE, 7, p80OrLow80, p160), 5, 3}, // CC2
2605 {MakeRuSpec(RuType::RU_52_TONE, 8, p80OrLow80, p160), 6, 2}}, // CC2
2607 MHz_u{40},
2608 0,
2610 (p160 == std::nullopt) ? RuAllocation{96, 112} : RuAllocation{48, 24},
2611 std::make_pair(2, 4), // two users in content channel 1 and
2612 // four users in content channel 2
2613 MicroSeconds(4)), // one OFDM symbol;
2615
2616 // 40 MHz band, OFDMA, odd number of users in second content channel
2618 {{MakeRuSpec(RuType::RU_106_TONE, 1, p80OrLow80, p160), 11, 1}, // CC1
2619 {MakeRuSpec(RuType::RU_106_TONE, 2, p80OrLow80, p160), 10, 4}, // CC1
2620 {MakeRuSpec(RuType::RU_52_TONE, 5, p80OrLow80, p160), 4, 1}, // CC2
2621 {MakeRuSpec(RuType::RU_52_TONE, 6, p80OrLow80, p160), 6, 2}, // CC2
2622 {MakeRuSpec(RuType::RU_52_TONE, 7, p80OrLow80, p160), 5, 3}, // CC2
2623 {MakeRuSpec(RuType::RU_52_TONE, 8, p80OrLow80, p160), 6, 2}, // CC2
2624 {MakeRuSpec(RuType::RU_26_TONE, 14, p80OrLow80, p160), 3, 1}}, // CC2
2626 MHz_u{40},
2627 0,
2629 (p160 == std::nullopt) ? RuAllocation{96, 15} : RuAllocation{48, 15},
2630 std::make_pair(2, 5), // two users in content channel 1 and
2631 // five users in content channel 2
2632 MicroSeconds(8)), // two OFDM symbols
2634
2635 // 80 MHz band, OFDMA
2637 {{MakeRuSpec(RuType::RU_106_TONE, 1, p80OrLow80, p160), 11, 1}, // CC1
2638 {MakeRuSpec(RuType::RU_106_TONE, 2, p80OrLow80, p160), 10, 4}, // CC1
2639 {MakeRuSpec(RuType::RU_52_TONE, 5, p80OrLow80, p160), 4, 1}, // CC2
2640 {MakeRuSpec(RuType::RU_52_TONE, 6, p80OrLow80, p160), 6, 2}, // CC2
2641 {MakeRuSpec(RuType::RU_52_TONE, 7, p80OrLow80, p160), 5, 3}, // CC2
2642 {MakeRuSpec(RuType::RU_52_TONE, 8, p80OrLow80, p160), 6, 2}, // CC2
2643 {MakeRuSpec(RuType::RU_26_TONE, 14, p80OrLow80, p160), 3, 1}, // CC2
2644 {MakeRuSpec(RuType::RU_242_TONE, 3, p80OrLow80, p160), 1, 1}, // CC1
2645 {MakeRuSpec(RuType::RU_242_TONE, 4, p80OrLow80, p160), 4, 1}}, // CC2
2647 MHz_u{80},
2648 0,
2650 (p160 == std::nullopt) ? RuAllocation{96, 15, 192, 192}
2651 : RuAllocation{48, 15, 64, 64},
2652 std::make_pair(3, 6), // three users in content channel 1
2653 // and six users in content channel 2
2654 MicroSeconds(16)), // four OFDM symbols
2656
2657 // 80 MHz band, OFDMA, no central 26-tones RU
2659 {{MakeRuSpec(RuType::RU_26_TONE, 1, p80OrLow80, p160), 8, 1}, // CC1
2660 {MakeRuSpec(RuType::RU_26_TONE, 2, p80OrLow80, p160), 8, 1}, // CC1
2661 {MakeRuSpec(RuType::RU_26_TONE, 3, p80OrLow80, p160), 8, 1}, // CC1
2662 {MakeRuSpec(RuType::RU_26_TONE, 4, p80OrLow80, p160), 8, 1}, // CC1
2663 {MakeRuSpec(RuType::RU_26_TONE, 5, p80OrLow80, p160), 8, 1}, // CC1
2664 {MakeRuSpec(RuType::RU_26_TONE, 6, p80OrLow80, p160), 8, 1}, // CC1
2665 {MakeRuSpec(RuType::RU_26_TONE, 7, p80OrLow80, p160), 8, 1}, // CC1
2666 {MakeRuSpec(RuType::RU_26_TONE, 8, p80OrLow80, p160), 8, 1}, // CC1
2667 {MakeRuSpec(RuType::RU_26_TONE, 9, p80OrLow80, p160), 8, 1}, // CC1
2668 {MakeRuSpec(RuType::RU_26_TONE, 10, p80OrLow80, p160), 8, 1}, // CC2
2669 {MakeRuSpec(RuType::RU_26_TONE, 11, p80OrLow80, p160), 8, 1}, // CC2
2670 {MakeRuSpec(RuType::RU_26_TONE, 12, p80OrLow80, p160), 8, 1}, // CC2
2671 {MakeRuSpec(RuType::RU_26_TONE, 13, p80OrLow80, p160), 8, 1}, // CC2
2672 {MakeRuSpec(RuType::RU_26_TONE, 14, p80OrLow80, p160), 8, 1}, // CC2
2673 {MakeRuSpec(RuType::RU_26_TONE, 15, p80OrLow80, p160), 8, 1}, // CC2
2674 {MakeRuSpec(RuType::RU_26_TONE, 16, p80OrLow80, p160), 8, 1}, // CC2
2675 {MakeRuSpec(RuType::RU_26_TONE, 17, p80OrLow80, p160), 8, 1}, // CC2
2676 {MakeRuSpec(RuType::RU_26_TONE, 18, p80OrLow80, p160), 8, 1}, // CC2
2677 {MakeRuSpec(RuType::RU_26_TONE, 20, p80OrLow80, p160), 8, 1}, // CC1
2678 {MakeRuSpec(RuType::RU_26_TONE, 21, p80OrLow80, p160), 8, 1}, // CC1
2679 {MakeRuSpec(RuType::RU_26_TONE, 22, p80OrLow80, p160), 8, 1}, // CC1
2680 {MakeRuSpec(RuType::RU_26_TONE, 23, p80OrLow80, p160), 8, 1}, // CC1
2681 {MakeRuSpec(RuType::RU_26_TONE, 24, p80OrLow80, p160), 8, 1}, // CC1
2682 {MakeRuSpec(RuType::RU_26_TONE, 25, p80OrLow80, p160), 8, 1}, // CC1
2683 {MakeRuSpec(RuType::RU_26_TONE, 26, p80OrLow80, p160), 8, 1}, // CC1
2684 {MakeRuSpec(RuType::RU_26_TONE, 27, p80OrLow80, p160), 8, 1}, // CC1
2685 {MakeRuSpec(RuType::RU_26_TONE, 28, p80OrLow80, p160), 8, 1}, // CC2
2686 {MakeRuSpec(RuType::RU_26_TONE, 29, p80OrLow80, p160), 8, 1}, // CC2
2687 {MakeRuSpec(RuType::RU_26_TONE, 30, p80OrLow80, p160), 8, 1}, // CC2
2688 {MakeRuSpec(RuType::RU_26_TONE, 31, p80OrLow80, p160), 8, 1}, // CC2
2689 {MakeRuSpec(RuType::RU_26_TONE, 32, p80OrLow80, p160), 8, 1}, // CC2
2690 {MakeRuSpec(RuType::RU_26_TONE, 33, p80OrLow80, p160), 8, 1}, // CC2
2691 {MakeRuSpec(RuType::RU_26_TONE, 34, p80OrLow80, p160), 8, 1}, // CC2
2692 {MakeRuSpec(RuType::RU_26_TONE, 35, p80OrLow80, p160), 8, 1}, // CC2
2693 {MakeRuSpec(RuType::RU_26_TONE, 36, p80OrLow80, p160), 8, 1}, // CC2
2694 {MakeRuSpec(RuType::RU_26_TONE, 37, p80OrLow80, p160), 8, 1}}, // CC2
2696 MHz_u{80},
2697 0,
2699 {0, 0, 0, 0},
2700 std::make_pair(18, 18), // 18 users users in each content channel
2701 MicroSeconds(12)), // three OFDM symbols
2703
2704 // 160 MHz band, OFDMA, no central 26-tones RU
2706 {{MakeRuSpec(RuType::RU_106_TONE, 1, p80OrLow80, p160), 11, 1}, // CC1
2707 {MakeRuSpec(RuType::RU_106_TONE, 2, p80OrLow80, p160), 10, 4}, // CC1
2708 {MakeRuSpec(RuType::RU_52_TONE, 5, p80OrLow80, p160), 4, 1}, // CC2
2709 {MakeRuSpec(RuType::RU_52_TONE, 6, p80OrLow80, p160), 6, 2}, // CC2
2710 {MakeRuSpec(RuType::RU_52_TONE, 7, p80OrLow80, p160), 5, 3}, // CC2
2711 {MakeRuSpec(RuType::RU_52_TONE, 8, p80OrLow80, p160), 6, 2}, // CC2
2712 {MakeRuSpec(RuType::RU_26_TONE, 14, p80OrLow80, p160), 3, 1}, // CC2
2713 {MakeRuSpec(RuType::RU_242_TONE, 3, p80OrLow80, p160), 1, 1}, // CC1
2714 {MakeRuSpec(RuType::RU_242_TONE, 4, p80OrLow80, p160), 4, 1}, // CC2
2715 {MakeRuSpec(RuType::RU_996_TONE, 1, s80OrHigh80, p160),
2716 1,
2717 1}}, // CC1 or CC2 => CC1 for better split
2719 MHz_u{160},
2720 0,
2722 (p160 == std::nullopt) ? RuAllocation{96, 15, 192, 192, 208, 115, 208, 115}
2723 : RuAllocation{48, 15, 64, 64, 80, 30, 80, 30},
2724 std::make_pair(4, 6), // four users in content channel 1 and
2725 // seven users in content channel 2
2726 MicroSeconds(16)), // four OFDM symbols
2728
2729 // 20 MHz band, OFDMA, one unallocated RU at the middle
2732 {{MakeRuSpec(RuType::RU_26_TONE, 1, p80OrLow80, p160), 11, 1}, // CC1
2733 {MakeRuSpec(RuType::RU_26_TONE, 2, p80OrLow80, p160), 11, 1}, // CC1
2734 {MakeRuSpec(RuType::RU_26_TONE, 3, p80OrLow80, p160), 11, 1}, // CC1
2735 {MakeRuSpec(RuType::RU_26_TONE, 4, p80OrLow80, p160), 11, 1}, // CC1
2736 {MakeRuSpec(RuType::RU_26_TONE, 6, p80OrLow80, p160), 11, 1}, // CC1
2737 {MakeRuSpec(RuType::RU_26_TONE, 7, p80OrLow80, p160), 11, 1}, // CC1
2738 {MakeRuSpec(RuType::RU_26_TONE, 8, p80OrLow80, p160), 11, 1}, // CC1
2739 {MakeRuSpec(RuType::RU_26_TONE, 9, p80OrLow80, p160), 11, 1}}, // CC1
2741 MHz_u{20},
2742 0,
2744 {0},
2745 std::make_pair(9, 0), // 9 users (8 users + 1 empty user) in content channel 1
2746 MicroSeconds(8)), // two OFDM symbols
2748
2749 // 40 MHz band, OFDMA, unallocated RUs at the begin and at the end of the
2750 // first 20 MHz subband and in the middle of the second 20 MHz subband
2753 {{MakeRuSpec(RuType::RU_52_TONE, 2, p80OrLow80, p160), 10, 1}, // CC1
2754 {MakeRuSpec(RuType::RU_52_TONE, 3, p80OrLow80, p160), 10, 2}, // CC1
2755 {MakeRuSpec(RuType::RU_52_TONE, 5, p80OrLow80, p160), 11, 1}, // CC2
2756 {MakeRuSpec(RuType::RU_52_TONE, 8, p80OrLow80, p160), 11, 2}}, // CC2
2758 MHz_u{40},
2759 0,
2761 (p160 == std::nullopt) ? RuAllocation{112, 112} : RuAllocation{24, 24},
2762 std::make_pair(4,
2763 4), // 4 users (2 users + 2 empty users) in each content channel
2764 MicroSeconds(4)), // one OFDM symbol
2766
2767 // 40 MHz band, OFDMA, one unallocated RUs in the first 20 MHz subband and
2768 // two unallocated RUs in second 20 MHz subband
2771 {{MakeRuSpec(RuType::RU_52_TONE, 1, p80OrLow80, p160), 10, 1}, // CC1
2772 {MakeRuSpec(RuType::RU_52_TONE, 2, p80OrLow80, p160), 10, 2}, // CC1
2773 {MakeRuSpec(RuType::RU_52_TONE, 3, p80OrLow80, p160), 11, 1}, // CC1
2774 {MakeRuSpec(RuType::RU_52_TONE, 5, p80OrLow80, p160), 11, 2}, // CC2
2775 {MakeRuSpec(RuType::RU_52_TONE, 6, p80OrLow80, p160), 11, 3}}, // CC2
2777 MHz_u{40},
2778 0,
2780 (p160 == std::nullopt) ? RuAllocation{112, 112} : RuAllocation{24, 24},
2781 std::make_pair(4,
2782 4), // 4 users (3 users + 1 empty user) in content channel 1 and
2783 // 4 users (2 users + 2 empty users) in content channel 2
2784 MicroSeconds(4)), // one OFDM symbol
2786 }
2787
2788 // 80 MHz band, OFDMA, central 26-tones RU (11ax only)
2790 {{HeRu::RuSpec{RuType::RU_26_TONE, 1, true}, 8, 1}, // CC1
2791 {HeRu::RuSpec{RuType::RU_26_TONE, 2, true}, 8, 1}, // CC1
2792 {HeRu::RuSpec{RuType::RU_26_TONE, 3, true}, 8, 1}, // CC1
2793 {HeRu::RuSpec{RuType::RU_26_TONE, 4, true}, 8, 1}, // CC1
2794 {HeRu::RuSpec{RuType::RU_26_TONE, 5, true}, 8, 1}, // CC1
2795 {HeRu::RuSpec{RuType::RU_26_TONE, 6, true}, 8, 1}, // CC1
2796 {HeRu::RuSpec{RuType::RU_26_TONE, 7, true}, 8, 1}, // CC1
2797 {HeRu::RuSpec{RuType::RU_26_TONE, 8, true}, 8, 1}, // CC1
2798 {HeRu::RuSpec{RuType::RU_26_TONE, 9, true}, 8, 1}, // CC1
2799 {HeRu::RuSpec{RuType::RU_26_TONE, 10, true}, 8, 1}, // CC2
2800 {HeRu::RuSpec{RuType::RU_26_TONE, 11, true}, 8, 1}, // CC2
2801 {HeRu::RuSpec{RuType::RU_26_TONE, 12, true}, 8, 1}, // CC2
2802 {HeRu::RuSpec{RuType::RU_26_TONE, 13, true}, 8, 1}, // CC2
2803 {HeRu::RuSpec{RuType::RU_26_TONE, 14, true}, 8, 1}, // CC2
2804 {HeRu::RuSpec{RuType::RU_26_TONE, 15, true}, 8, 1}, // CC2
2805 {HeRu::RuSpec{RuType::RU_26_TONE, 16, true}, 8, 1}, // CC2
2806 {HeRu::RuSpec{RuType::RU_26_TONE, 17, true}, 8, 1}, // CC2
2807 {HeRu::RuSpec{RuType::RU_26_TONE, 18, true}, 8, 1}, // CC2
2808 {HeRu::RuSpec{RuType::RU_26_TONE, 19, true}, 8, 1}, // CC1
2809 {HeRu::RuSpec{RuType::RU_26_TONE, 20, true}, 8, 1}, // CC1
2810 {HeRu::RuSpec{RuType::RU_26_TONE, 21, true}, 8, 1}, // CC1
2811 {HeRu::RuSpec{RuType::RU_26_TONE, 22, true}, 8, 1}, // CC1
2812 {HeRu::RuSpec{RuType::RU_26_TONE, 23, true}, 8, 1}, // CC1
2813 {HeRu::RuSpec{RuType::RU_26_TONE, 24, true}, 8, 1}, // CC1
2814 {HeRu::RuSpec{RuType::RU_26_TONE, 25, true}, 8, 1}, // CC1
2815 {HeRu::RuSpec{RuType::RU_26_TONE, 26, true}, 8, 1}, // CC1
2816 {HeRu::RuSpec{RuType::RU_26_TONE, 27, true}, 8, 1}, // CC1
2817 {HeRu::RuSpec{RuType::RU_26_TONE, 28, true}, 8, 1}, // CC2
2818 {HeRu::RuSpec{RuType::RU_26_TONE, 29, true}, 8, 1}, // CC2
2819 {HeRu::RuSpec{RuType::RU_26_TONE, 30, true}, 8, 1}, // CC2
2820 {HeRu::RuSpec{RuType::RU_26_TONE, 31, true}, 8, 1}, // CC2
2821 {HeRu::RuSpec{RuType::RU_26_TONE, 32, true}, 8, 1}, // CC2
2822 {HeRu::RuSpec{RuType::RU_26_TONE, 33, true}, 8, 1}, // CC2
2823 {HeRu::RuSpec{RuType::RU_26_TONE, 34, true}, 8, 1}, // CC2
2824 {HeRu::RuSpec{RuType::RU_26_TONE, 35, true}, 8, 1}, // CC2
2825 {HeRu::RuSpec{RuType::RU_26_TONE, 36, true}, 8, 1}, // CC2
2826 {HeRu::RuSpec{RuType::RU_26_TONE, 37, true}, 8, 1}}, // CC2
2828 MHz_u{80},
2829 0,
2831 {0, 0, 0, 0},
2832 std::make_pair(19,
2833 18), // 19 users (18 users + 1 central tones-RU user) in content
2834 // channel 1 and 18 users user in content channel 2
2835 MicroSeconds(12)), // three OFDM symbols
2837
2838 // 160 MHz band, OFDMA, central 26-tones RU in low 80 MHz (11ax only)
2839 AddTestCase(new MuSigDurationTest({{HeRu::RuSpec{RuType::RU_106_TONE, 1, true}, 11, 1}, // CC1
2840 {HeRu::RuSpec{RuType::RU_106_TONE, 2, true}, 10, 4}, // CC1
2841 {HeRu::RuSpec{RuType::RU_52_TONE, 5, true}, 4, 1}, // CC2
2842 {HeRu::RuSpec{RuType::RU_52_TONE, 6, true}, 6, 2}, // CC2
2843 {HeRu::RuSpec{RuType::RU_52_TONE, 7, true}, 5, 3}, // CC2
2844 {HeRu::RuSpec{RuType::RU_52_TONE, 8, true}, 6, 2}, // CC2
2845 {HeRu::RuSpec{RuType::RU_26_TONE, 14, true}, 3, 1}, // CC2
2846 {HeRu::RuSpec{RuType::RU_26_TONE, 19, true}, 8, 2}, // CC1
2847 {HeRu::RuSpec{RuType::RU_242_TONE, 3, true}, 1, 1}, // CC1
2848 {HeRu::RuSpec{RuType::RU_242_TONE, 4, true}, 4, 1}, // CC2
2850 1,
2851 1}}, // CC1 or CC2 => CC1 for better split
2853 MHz_u{160},
2854 0,
2856 {96, 15, 192, 192, 208, 115, 208, 115},
2857 std::make_pair(5, 6), // five users in content channel 1 and
2858 // seven users in content channel 2
2859 MicroSeconds(16)), // four OFDM symbols
2861
2862 // 160 MHz band, OFDMA, central 26-tones RU in high 80 MHz (11ax only)
2864 new MuSigDurationTest({{HeRu::RuSpec{RuType::RU_106_TONE, 1, true}, 11, 1}, // CC1
2865 {HeRu::RuSpec{RuType::RU_106_TONE, 2, true}, 10, 4}, // CC1
2866 {HeRu::RuSpec{RuType::RU_106_TONE, 3, true}, 11, 1}, // CC2
2867 {HeRu::RuSpec{RuType::RU_106_TONE, 4, true}, 10, 4}, // CC2
2868 {HeRu::RuSpec{RuType::RU_242_TONE, 3, true}, 10, 1}, // CC1
2869 {HeRu::RuSpec{RuType::RU_242_TONE, 4, true}, 11, 1}, // CC2
2870 {HeRu::RuSpec{RuType::RU_484_TONE, 1, false}, 7, 1}, // CC1 or CC2
2871 {HeRu::RuSpec{RuType::RU_26_TONE, 19, false}, 8, 2}, // CC2
2872 {HeRu::RuSpec{RuType::RU_484_TONE, 2, false}, 9, 1}}, // CC1 or CC2
2874 MHz_u{160},
2875 0,
2877 {96, 96, 192, 192, 200, 114, 114, 200},
2878 std::make_pair(4, 5), // two users in content channel 1 and
2879 // one user in content channel 2
2880 MicroSeconds(4)), // two OFDM symbols
2882
2883 // 160 MHz band, OFDMA, central 26-tones RU in both 80 MHz (11ax only)
2885 new MuSigDurationTest({{HeRu::RuSpec{RuType::RU_106_TONE, 1, true}, 11, 1}, // CC1
2886 {HeRu::RuSpec{RuType::RU_106_TONE, 2, true}, 10, 4}, // CC1
2887 {HeRu::RuSpec{RuType::RU_106_TONE, 3, true}, 11, 1}, // CC2
2888 {HeRu::RuSpec{RuType::RU_106_TONE, 4, true}, 10, 4}, // CC2
2889 {HeRu::RuSpec{RuType::RU_26_TONE, 19, true}, 8, 2}, // CC1
2890 {HeRu::RuSpec{RuType::RU_242_TONE, 3, true}, 10, 1}, // CC1
2891 {HeRu::RuSpec{RuType::RU_242_TONE, 4, true}, 11, 1}, // CC2
2892 {HeRu::RuSpec{RuType::RU_484_TONE, 1, false}, 7, 1}, // CC1 or CC2
2893 {HeRu::RuSpec{RuType::RU_26_TONE, 19, false}, 8, 2}, // CC2
2894 {HeRu::RuSpec{RuType::RU_484_TONE, 2, false}, 9, 1}}, // CC1 or CC2
2896 MHz_u{160},
2897 0,
2899 {96, 96, 192, 192, 200, 114, 114, 200},
2900 std::make_pair(5, 5), // two users in content channel 1 and
2901 // one user in content channel 2
2902 MicroSeconds(4)), // two OFDM symbols
2904
2905 // 160 MHz band, OFDMA, 11ax maximum number of users
2906 AddTestCase(new MuSigDurationTest({{HeRu::RuSpec{RuType::RU_26_TONE, 1, true}, 8, 1}, // CC1
2907 {HeRu::RuSpec{RuType::RU_26_TONE, 2, true}, 8, 1}, // CC1
2908 {HeRu::RuSpec{RuType::RU_26_TONE, 3, true}, 8, 1}, // CC1
2909 {HeRu::RuSpec{RuType::RU_26_TONE, 4, true}, 8, 1}, // CC1
2910 {HeRu::RuSpec{RuType::RU_26_TONE, 5, true}, 8, 1}, // CC1
2911 {HeRu::RuSpec{RuType::RU_26_TONE, 6, true}, 8, 1}, // CC1
2912 {HeRu::RuSpec{RuType::RU_26_TONE, 7, true}, 8, 1}, // CC1
2913 {HeRu::RuSpec{RuType::RU_26_TONE, 8, true}, 8, 1}, // CC1
2914 {HeRu::RuSpec{RuType::RU_26_TONE, 9, true}, 8, 1}, // CC1
2915 {HeRu::RuSpec{RuType::RU_26_TONE, 10, true}, 8, 1}, // CC2
2916 {HeRu::RuSpec{RuType::RU_26_TONE, 11, true}, 8, 1}, // CC2
2917 {HeRu::RuSpec{RuType::RU_26_TONE, 12, true}, 8, 1}, // CC2
2918 {HeRu::RuSpec{RuType::RU_26_TONE, 13, true}, 8, 1}, // CC2
2919 {HeRu::RuSpec{RuType::RU_26_TONE, 14, true}, 8, 1}, // CC2
2920 {HeRu::RuSpec{RuType::RU_26_TONE, 15, true}, 8, 1}, // CC2
2921 {HeRu::RuSpec{RuType::RU_26_TONE, 16, true}, 8, 1}, // CC2
2922 {HeRu::RuSpec{RuType::RU_26_TONE, 17, true}, 8, 1}, // CC2
2923 {HeRu::RuSpec{RuType::RU_26_TONE, 18, true}, 8, 1}, // CC2
2924 {HeRu::RuSpec{RuType::RU_26_TONE, 19, true}, 8, 1}, // CC1
2925 {HeRu::RuSpec{RuType::RU_26_TONE, 20, true}, 8, 1}, // CC1
2926 {HeRu::RuSpec{RuType::RU_26_TONE, 21, true}, 8, 1}, // CC1
2927 {HeRu::RuSpec{RuType::RU_26_TONE, 22, true}, 8, 1}, // CC1
2928 {HeRu::RuSpec{RuType::RU_26_TONE, 23, true}, 8, 1}, // CC1
2929 {HeRu::RuSpec{RuType::RU_26_TONE, 24, true}, 8, 1}, // CC1
2930 {HeRu::RuSpec{RuType::RU_26_TONE, 25, true}, 8, 1}, // CC1
2931 {HeRu::RuSpec{RuType::RU_26_TONE, 26, true}, 8, 1}, // CC1
2932 {HeRu::RuSpec{RuType::RU_26_TONE, 27, true}, 8, 1}, // CC1
2933 {HeRu::RuSpec{RuType::RU_26_TONE, 28, true}, 8, 1}, // CC2
2934 {HeRu::RuSpec{RuType::RU_26_TONE, 29, true}, 8, 1}, // CC2
2935 {HeRu::RuSpec{RuType::RU_26_TONE, 30, true}, 8, 1}, // CC2
2936 {HeRu::RuSpec{RuType::RU_26_TONE, 31, true}, 8, 1}, // CC2
2937 {HeRu::RuSpec{RuType::RU_26_TONE, 32, true}, 8, 1}, // CC2
2938 {HeRu::RuSpec{RuType::RU_26_TONE, 33, true}, 8, 1}, // CC2
2939 {HeRu::RuSpec{RuType::RU_26_TONE, 34, true}, 8, 1}, // CC2
2940 {HeRu::RuSpec{RuType::RU_26_TONE, 35, true}, 8, 1}, // CC2
2941 {HeRu::RuSpec{RuType::RU_26_TONE, 36, true}, 8, 1}, // CC2
2942 {HeRu::RuSpec{RuType::RU_26_TONE, 37, true}, 8, 1}, // CC2
2943 {HeRu::RuSpec{RuType::RU_26_TONE, 1, false}, 8, 1}, // CC1
2944 {HeRu::RuSpec{RuType::RU_26_TONE, 2, false}, 8, 1}, // CC1
2945 {HeRu::RuSpec{RuType::RU_26_TONE, 3, false}, 8, 1}, // CC1
2946 {HeRu::RuSpec{RuType::RU_26_TONE, 4, false}, 8, 1}, // CC1
2947 {HeRu::RuSpec{RuType::RU_26_TONE, 5, false}, 8, 1}, // CC1
2948 {HeRu::RuSpec{RuType::RU_26_TONE, 6, false}, 8, 1}, // CC1
2949 {HeRu::RuSpec{RuType::RU_26_TONE, 7, false}, 8, 1}, // CC1
2950 {HeRu::RuSpec{RuType::RU_26_TONE, 8, false}, 8, 1}, // CC1
2951 {HeRu::RuSpec{RuType::RU_26_TONE, 9, false}, 8, 1}, // CC1
2952 {HeRu::RuSpec{RuType::RU_26_TONE, 10, false}, 8, 1}, // CC2
2953 {HeRu::RuSpec{RuType::RU_26_TONE, 11, false}, 8, 1}, // CC2
2954 {HeRu::RuSpec{RuType::RU_26_TONE, 12, false}, 8, 1}, // CC2
2955 {HeRu::RuSpec{RuType::RU_26_TONE, 13, false}, 8, 1}, // CC2
2956 {HeRu::RuSpec{RuType::RU_26_TONE, 14, false}, 8, 1}, // CC2
2957 {HeRu::RuSpec{RuType::RU_26_TONE, 15, false}, 8, 1}, // CC2
2958 {HeRu::RuSpec{RuType::RU_26_TONE, 16, false}, 8, 1}, // CC2
2959 {HeRu::RuSpec{RuType::RU_26_TONE, 17, false}, 8, 1}, // CC2
2960 {HeRu::RuSpec{RuType::RU_26_TONE, 18, false}, 8, 1}, // CC2
2961 {HeRu::RuSpec{RuType::RU_26_TONE, 19, false}, 8, 1}, // CC1
2962 {HeRu::RuSpec{RuType::RU_26_TONE, 20, false}, 8, 1}, // CC1
2963 {HeRu::RuSpec{RuType::RU_26_TONE, 21, false}, 8, 1}, // CC1
2964 {HeRu::RuSpec{RuType::RU_26_TONE, 22, false}, 8, 1}, // CC1
2965 {HeRu::RuSpec{RuType::RU_26_TONE, 23, false}, 8, 1}, // CC1
2966 {HeRu::RuSpec{RuType::RU_26_TONE, 24, false}, 8, 1}, // CC1
2967 {HeRu::RuSpec{RuType::RU_26_TONE, 25, false}, 8, 1}, // CC1
2968 {HeRu::RuSpec{RuType::RU_26_TONE, 26, false}, 8, 1}, // CC1
2969 {HeRu::RuSpec{RuType::RU_26_TONE, 27, false}, 8, 1}, // CC1
2970 {HeRu::RuSpec{RuType::RU_26_TONE, 28, false}, 8, 1}, // CC2
2971 {HeRu::RuSpec{RuType::RU_26_TONE, 29, false}, 8, 1}, // CC2
2972 {HeRu::RuSpec{RuType::RU_26_TONE, 30, false}, 8, 1}, // CC2
2973 {HeRu::RuSpec{RuType::RU_26_TONE, 31, false}, 8, 1}, // CC2
2974 {HeRu::RuSpec{RuType::RU_26_TONE, 32, false}, 8, 1}, // CC2
2975 {HeRu::RuSpec{RuType::RU_26_TONE, 33, false}, 8, 1}, // CC2
2976 {HeRu::RuSpec{RuType::RU_26_TONE, 34, false}, 8, 1}, // CC2
2977 {HeRu::RuSpec{RuType::RU_26_TONE, 35, false}, 8, 1}, // CC2
2978 {HeRu::RuSpec{RuType::RU_26_TONE, 36, false}, 8, 1}, // CC2
2979 {HeRu::RuSpec{RuType::RU_26_TONE, 37, false}, 8, 1}}, // CC2
2981 MHz_u{160},
2982 0,
2984 {0, 0, 0, 0, 0, 0, 0, 0},
2985 std::make_pair(37,
2986 37), // 37 users (36 users + 1 central tones-RU
2987 // user) in each content channel
2988 MicroSeconds(20)), // five OFDM symbols
2990
2991 // 320 MHz band, OFDMA, 11be maximum number of users
2993 new MuSigDurationTest({{EhtRu::RuSpec{RuType::RU_26_TONE, 1, true, true}, 8, 1}, // CC1
2994 {EhtRu::RuSpec{RuType::RU_26_TONE, 2, true, true}, 8, 1}, // CC1
2995 {EhtRu::RuSpec{RuType::RU_26_TONE, 3, true, true}, 8, 1}, // CC1
2996 {EhtRu::RuSpec{RuType::RU_26_TONE, 4, true, true}, 8, 1}, // CC1
2997 {EhtRu::RuSpec{RuType::RU_26_TONE, 5, true, true}, 8, 1}, // CC1
2998 {EhtRu::RuSpec{RuType::RU_26_TONE, 6, true, true}, 8, 1}, // CC1
2999 {EhtRu::RuSpec{RuType::RU_26_TONE, 7, true, true}, 8, 1}, // CC1
3000 {EhtRu::RuSpec{RuType::RU_26_TONE, 8, true, true}, 8, 1}, // CC1
3001 {EhtRu::RuSpec{RuType::RU_26_TONE, 9, true, true}, 8, 1}, // CC1
3002 {EhtRu::RuSpec{RuType::RU_26_TONE, 10, true, true}, 8, 1}, // CC2
3003 {EhtRu::RuSpec{RuType::RU_26_TONE, 11, true, true}, 8, 1}, // CC2
3004 {EhtRu::RuSpec{RuType::RU_26_TONE, 12, true, true}, 8, 1}, // CC2
3005 {EhtRu::RuSpec{RuType::RU_26_TONE, 13, true, true}, 8, 1}, // CC2
3006 {EhtRu::RuSpec{RuType::RU_26_TONE, 14, true, true}, 8, 1}, // CC2
3007 {EhtRu::RuSpec{RuType::RU_26_TONE, 15, true, true}, 8, 1}, // CC2
3008 {EhtRu::RuSpec{RuType::RU_26_TONE, 16, true, true}, 8, 1}, // CC2
3009 {EhtRu::RuSpec{RuType::RU_26_TONE, 17, true, true}, 8, 1}, // CC2
3010 {EhtRu::RuSpec{RuType::RU_26_TONE, 18, true, true}, 8, 1}, // CC2
3011 {EhtRu::RuSpec{RuType::RU_26_TONE, 20, true, true}, 8, 1}, // CC1
3012 {EhtRu::RuSpec{RuType::RU_26_TONE, 21, true, true}, 8, 1}, // CC1
3013 {EhtRu::RuSpec{RuType::RU_26_TONE, 22, true, true}, 8, 1}, // CC1
3014 {EhtRu::RuSpec{RuType::RU_26_TONE, 23, true, true}, 8, 1}, // CC1
3015 {EhtRu::RuSpec{RuType::RU_26_TONE, 24, true, true}, 8, 1}, // CC1
3016 {EhtRu::RuSpec{RuType::RU_26_TONE, 25, true, true}, 8, 1}, // CC1
3017 {EhtRu::RuSpec{RuType::RU_26_TONE, 26, true, true}, 8, 1}, // CC1
3018 {EhtRu::RuSpec{RuType::RU_26_TONE, 27, true, true}, 8, 1}, // CC1
3019 {EhtRu::RuSpec{RuType::RU_26_TONE, 28, true, true}, 8, 1}, // CC2
3020 {EhtRu::RuSpec{RuType::RU_26_TONE, 29, true, true}, 8, 1}, // CC2
3021 {EhtRu::RuSpec{RuType::RU_26_TONE, 30, true, true}, 8, 1}, // CC2
3022 {EhtRu::RuSpec{RuType::RU_26_TONE, 31, true, true}, 8, 1}, // CC2
3023 {EhtRu::RuSpec{RuType::RU_26_TONE, 32, true, true}, 8, 1}, // CC2
3024 {EhtRu::RuSpec{RuType::RU_26_TONE, 33, true, true}, 8, 1}, // CC2
3025 {EhtRu::RuSpec{RuType::RU_26_TONE, 34, true, true}, 8, 1}, // CC2
3026 {EhtRu::RuSpec{RuType::RU_26_TONE, 35, true, true}, 8, 1}, // CC2
3027 {EhtRu::RuSpec{RuType::RU_26_TONE, 36, true, true}, 8, 1}, // CC2
3028 {EhtRu::RuSpec{RuType::RU_26_TONE, 37, true, true}, 8, 1}, // CC2
3029 {EhtRu::RuSpec{RuType::RU_26_TONE, 1, true, false}, 8, 1}, // CC1
3030 {EhtRu::RuSpec{RuType::RU_26_TONE, 2, true, false}, 8, 1}, // CC1
3031 {EhtRu::RuSpec{RuType::RU_26_TONE, 3, true, false}, 8, 1}, // CC1
3032 {EhtRu::RuSpec{RuType::RU_26_TONE, 4, true, false}, 8, 1}, // CC1
3033 {EhtRu::RuSpec{RuType::RU_26_TONE, 5, true, false}, 8, 1}, // CC1
3034 {EhtRu::RuSpec{RuType::RU_26_TONE, 6, true, false}, 8, 1}, // CC1
3035 {EhtRu::RuSpec{RuType::RU_26_TONE, 7, true, false}, 8, 1}, // CC1
3036 {EhtRu::RuSpec{RuType::RU_26_TONE, 8, true, false}, 8, 1}, // CC1
3037 {EhtRu::RuSpec{RuType::RU_26_TONE, 9, true, false}, 8, 1}, // CC1
3038 {EhtRu::RuSpec{RuType::RU_26_TONE, 10, true, false}, 8, 1}, // CC2
3039 {EhtRu::RuSpec{RuType::RU_26_TONE, 11, true, false}, 8, 1}, // CC2
3040 {EhtRu::RuSpec{RuType::RU_26_TONE, 12, true, false}, 8, 1}, // CC2
3041 {EhtRu::RuSpec{RuType::RU_26_TONE, 13, true, false}, 8, 1}, // CC2
3042 {EhtRu::RuSpec{RuType::RU_26_TONE, 14, true, false}, 8, 1}, // CC2
3043 {EhtRu::RuSpec{RuType::RU_26_TONE, 15, true, false}, 8, 1}, // CC2
3044 {EhtRu::RuSpec{RuType::RU_26_TONE, 16, true, false}, 8, 1}, // CC2
3045 {EhtRu::RuSpec{RuType::RU_26_TONE, 17, true, false}, 8, 1}, // CC2
3046 {EhtRu::RuSpec{RuType::RU_26_TONE, 18, true, false}, 8, 1}, // CC2
3047 {EhtRu::RuSpec{RuType::RU_26_TONE, 20, true, false}, 8, 1}, // CC1
3048 {EhtRu::RuSpec{RuType::RU_26_TONE, 21, true, false}, 8, 1}, // CC1
3049 {EhtRu::RuSpec{RuType::RU_26_TONE, 22, true, false}, 8, 1}, // CC1
3050 {EhtRu::RuSpec{RuType::RU_26_TONE, 23, true, false}, 8, 1}, // CC1
3051 {EhtRu::RuSpec{RuType::RU_26_TONE, 24, true, false}, 8, 1}, // CC1
3052 {EhtRu::RuSpec{RuType::RU_26_TONE, 25, true, false}, 8, 1}, // CC1
3053 {EhtRu::RuSpec{RuType::RU_26_TONE, 26, true, false}, 8, 1}, // CC1
3054 {EhtRu::RuSpec{RuType::RU_26_TONE, 27, true, false}, 8, 1}, // CC1
3055 {EhtRu::RuSpec{RuType::RU_26_TONE, 28, true, false}, 8, 1}, // CC2
3056 {EhtRu::RuSpec{RuType::RU_26_TONE, 29, true, false}, 8, 1}, // CC2
3057 {EhtRu::RuSpec{RuType::RU_26_TONE, 30, true, false}, 8, 1}, // CC2
3058 {EhtRu::RuSpec{RuType::RU_26_TONE, 31, true, false}, 8, 1}, // CC2
3059 {EhtRu::RuSpec{RuType::RU_26_TONE, 32, true, false}, 8, 1}, // CC2
3060 {EhtRu::RuSpec{RuType::RU_26_TONE, 33, true, false}, 8, 1}, // CC2
3061 {EhtRu::RuSpec{RuType::RU_26_TONE, 34, true, false}, 8, 1}, // CC2
3062 {EhtRu::RuSpec{RuType::RU_26_TONE, 35, true, false}, 8, 1}, // CC2
3063 {EhtRu::RuSpec{RuType::RU_26_TONE, 36, true, false}, 8, 1}, // CC2
3064 {EhtRu::RuSpec{RuType::RU_26_TONE, 37, true, false}, 8, 1}, // CC2
3065 {EhtRu::RuSpec{RuType::RU_26_TONE, 1, false, true}, 8, 1}, // CC1
3066 {EhtRu::RuSpec{RuType::RU_26_TONE, 2, false, true}, 8, 1}, // CC1
3067 {EhtRu::RuSpec{RuType::RU_26_TONE, 3, false, true}, 8, 1}, // CC1
3068 {EhtRu::RuSpec{RuType::RU_26_TONE, 4, false, true}, 8, 1}, // CC1
3069 {EhtRu::RuSpec{RuType::RU_26_TONE, 5, false, true}, 8, 1}, // CC1
3070 {EhtRu::RuSpec{RuType::RU_26_TONE, 6, false, true}, 8, 1}, // CC1
3071 {EhtRu::RuSpec{RuType::RU_26_TONE, 7, false, true}, 8, 1}, // CC1
3072 {EhtRu::RuSpec{RuType::RU_26_TONE, 8, false, true}, 8, 1}, // CC1
3073 {EhtRu::RuSpec{RuType::RU_26_TONE, 9, false, true}, 8, 1}, // CC1
3074 {EhtRu::RuSpec{RuType::RU_26_TONE, 10, false, true}, 8, 1}, // CC2
3075 {EhtRu::RuSpec{RuType::RU_26_TONE, 11, false, true}, 8, 1}, // CC2
3076 {EhtRu::RuSpec{RuType::RU_26_TONE, 12, false, true}, 8, 1}, // CC2
3077 {EhtRu::RuSpec{RuType::RU_26_TONE, 13, false, true}, 8, 1}, // CC2
3078 {EhtRu::RuSpec{RuType::RU_26_TONE, 14, false, true}, 8, 1}, // CC2
3079 {EhtRu::RuSpec{RuType::RU_26_TONE, 15, false, true}, 8, 1}, // CC2
3080 {EhtRu::RuSpec{RuType::RU_26_TONE, 16, false, true}, 8, 1}, // CC2
3081 {EhtRu::RuSpec{RuType::RU_26_TONE, 17, false, true}, 8, 1}, // CC2
3082 {EhtRu::RuSpec{RuType::RU_26_TONE, 18, false, true}, 8, 1}, // CC2
3083 {EhtRu::RuSpec{RuType::RU_26_TONE, 20, false, true}, 8, 1}, // CC1
3084 {EhtRu::RuSpec{RuType::RU_26_TONE, 21, false, true}, 8, 1}, // CC1
3085 {EhtRu::RuSpec{RuType::RU_26_TONE, 22, false, true}, 8, 1}, // CC1
3086 {EhtRu::RuSpec{RuType::RU_26_TONE, 23, false, true}, 8, 1}, // CC1
3087 {EhtRu::RuSpec{RuType::RU_26_TONE, 24, false, true}, 8, 1}, // CC1
3088 {EhtRu::RuSpec{RuType::RU_26_TONE, 25, false, true}, 8, 1}, // CC1
3089 {EhtRu::RuSpec{RuType::RU_26_TONE, 26, false, true}, 8, 1}, // CC1
3090 {EhtRu::RuSpec{RuType::RU_26_TONE, 27, false, true}, 8, 1}, // CC1
3091 {EhtRu::RuSpec{RuType::RU_26_TONE, 28, false, true}, 8, 1}, // CC2
3092 {EhtRu::RuSpec{RuType::RU_26_TONE, 29, false, true}, 8, 1}, // CC2
3093 {EhtRu::RuSpec{RuType::RU_26_TONE, 30, false, true}, 8, 1}, // CC2
3094 {EhtRu::RuSpec{RuType::RU_26_TONE, 31, false, true}, 8, 1}, // CC2
3095 {EhtRu::RuSpec{RuType::RU_26_TONE, 32, false, true}, 8, 1}, // CC2
3096 {EhtRu::RuSpec{RuType::RU_26_TONE, 33, false, true}, 8, 1}, // CC2
3097 {EhtRu::RuSpec{RuType::RU_26_TONE, 34, false, true}, 8, 1}, // CC2
3098 {EhtRu::RuSpec{RuType::RU_26_TONE, 35, false, true}, 8, 1}, // CC2
3099 {EhtRu::RuSpec{RuType::RU_26_TONE, 36, false, true}, 8, 1}, // CC2
3100 {EhtRu::RuSpec{RuType::RU_26_TONE, 37, false, true}, 8, 1}, // CC2
3101 {EhtRu::RuSpec{RuType::RU_26_TONE, 1, false, false}, 8, 1}, // CC1
3102 {EhtRu::RuSpec{RuType::RU_26_TONE, 2, false, false}, 8, 1}, // CC1
3103 {EhtRu::RuSpec{RuType::RU_26_TONE, 3, false, false}, 8, 1}, // CC1
3104 {EhtRu::RuSpec{RuType::RU_26_TONE, 4, false, false}, 8, 1}, // CC1
3105 {EhtRu::RuSpec{RuType::RU_26_TONE, 5, false, false}, 8, 1}, // CC1
3106 {EhtRu::RuSpec{RuType::RU_26_TONE, 6, false, false}, 8, 1}, // CC1
3107 {EhtRu::RuSpec{RuType::RU_26_TONE, 7, false, false}, 8, 1}, // CC1
3108 {EhtRu::RuSpec{RuType::RU_26_TONE, 8, false, false}, 8, 1}, // CC1
3109 {EhtRu::RuSpec{RuType::RU_26_TONE, 9, false, false}, 8, 1}, // CC1
3110 {EhtRu::RuSpec{RuType::RU_26_TONE, 10, false, false}, 8, 1}, // CC2
3111 {EhtRu::RuSpec{RuType::RU_26_TONE, 11, false, false}, 8, 1}, // CC2
3112 {EhtRu::RuSpec{RuType::RU_26_TONE, 12, false, false}, 8, 1}, // CC2
3113 {EhtRu::RuSpec{RuType::RU_26_TONE, 13, false, false}, 8, 1}, // CC2
3114 {EhtRu::RuSpec{RuType::RU_26_TONE, 14, false, false}, 8, 1}, // CC2
3115 {EhtRu::RuSpec{RuType::RU_26_TONE, 15, false, false}, 8, 1}, // CC2
3116 {EhtRu::RuSpec{RuType::RU_26_TONE, 16, false, false}, 8, 1}, // CC2
3117 {EhtRu::RuSpec{RuType::RU_26_TONE, 17, false, false}, 8, 1}, // CC2
3118 {EhtRu::RuSpec{RuType::RU_26_TONE, 18, false, false}, 8, 1}, // CC2
3119 {EhtRu::RuSpec{RuType::RU_26_TONE, 20, false, false}, 8, 1}, // CC1
3120 {EhtRu::RuSpec{RuType::RU_26_TONE, 21, false, false}, 8, 1}, // CC1
3121 {EhtRu::RuSpec{RuType::RU_26_TONE, 22, false, false}, 8, 1}, // CC1
3122 {EhtRu::RuSpec{RuType::RU_26_TONE, 23, false, false}, 8, 1}, // CC1
3123 {EhtRu::RuSpec{RuType::RU_26_TONE, 24, false, false}, 8, 1}, // CC1
3124 {EhtRu::RuSpec{RuType::RU_26_TONE, 25, false, false}, 8, 1}, // CC1
3125 {EhtRu::RuSpec{RuType::RU_26_TONE, 26, false, false}, 8, 1}, // CC1
3126 {EhtRu::RuSpec{RuType::RU_26_TONE, 27, false, false}, 8, 1}, // CC1
3127 {EhtRu::RuSpec{RuType::RU_26_TONE, 28, false, false}, 8, 1}, // CC2
3128 {EhtRu::RuSpec{RuType::RU_26_TONE, 29, false, false}, 8, 1}, // CC2
3129 {EhtRu::RuSpec{RuType::RU_26_TONE, 30, false, false}, 8, 1}, // CC2
3130 {EhtRu::RuSpec{RuType::RU_26_TONE, 31, false, false}, 8, 1}, // CC2
3131 {EhtRu::RuSpec{RuType::RU_26_TONE, 32, false, false}, 8, 1}, // CC2
3132 {EhtRu::RuSpec{RuType::RU_26_TONE, 33, false, false}, 8, 1}, // CC2
3133 {EhtRu::RuSpec{RuType::RU_26_TONE, 34, false, false}, 8, 1}, // CC2
3134 {EhtRu::RuSpec{RuType::RU_26_TONE, 35, false, false}, 8, 1}, // CC2
3135 {EhtRu::RuSpec{RuType::RU_26_TONE, 36, false, false}, 8, 1}, // CC2
3136 {EhtRu::RuSpec{RuType::RU_26_TONE, 37, false, false}, 8, 1}}, // CC2
3138 MHz_u{320},
3139 0,
3141 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3142 std::make_pair(72,
3143 72), // 72 users in each content channel
3144 MicroSeconds(40)), // ten OFDM symbols
3146
3147 // 160 MHz band, OFDMA, 11ax single-user using 2x996 tones RU
3149 new MuSigDurationTest({{HeRu::RuSpec{RuType::RU_2x996_TONE, 1, true}, 8, 1}}, // CC1
3151 MHz_u{160},
3152 0,
3154 {208, 208, 208, 208, 208, 208, 208, 208},
3155 std::make_pair(1, 0), // one user in HE-SIG-B content channel 1
3156 MicroSeconds(4)), // one OFDM symbol;
3158
3159 // 160 MHz band, OFDMA, 11ax with primary80 is in the high 80 MHz band
3161 new MuSigDurationTest({{HeRu::RuSpec{RuType::RU_996_TONE, 1, false}, 8, 1}, // CC2
3162 {HeRu::RuSpec{RuType::RU_996_TONE, 1, true}, 8, 1}}, // CC1
3164 MHz_u{160},
3165 4,
3167 {208, 115, 208, 115, 115, 208, 115, 208},
3168 std::make_pair(1, 1), // one user in each HE-SIG-B content channel
3169 MicroSeconds(4)), // one OFDM symbol;
3171
3172 // 40 MHz band, OFDMA, first 20 MHz is punctured
3174 new MuSigDurationTest({{HeRu::RuSpec{RuType::RU_242_TONE, 2, true}, 11, 1}}, // CC2
3176 MHz_u{40},
3177 1,
3179 {113, 192},
3180 std::make_pair(0, 1), // one user in HE-SIG-B content channel 1
3181 MicroSeconds(4)), // one OFDM symbol;
3183
3184 // 20 MHz band, MU-MIMO, 2 users
3185 AddTestCase(new MuSigDurationTest({{HeRu::RuSpec{RuType::RU_242_TONE, 1, true}, 11, 1}, // CC1
3186 {HeRu::RuSpec{RuType::RU_242_TONE, 1, true}, 10, 4}}, // CC1
3188 MHz_u{20},
3189 0,
3191 {192},
3192 std::make_pair(2, 0), // both users in content channel 1
3193 MicroSeconds(4)), // one OFDM symbol
3195
3196 // 20 MHz band, MU-MIMO, 3 users
3197 AddTestCase(new MuSigDurationTest({{HeRu::RuSpec{RuType::RU_242_TONE, 1, true}, 4, 3}, // CC1
3198 {HeRu::RuSpec{RuType::RU_242_TONE, 1, true}, 5, 2}, // CC1
3199 {HeRu::RuSpec{RuType::RU_242_TONE, 1, true}, 6, 1}}, // CC1
3201 MHz_u{20},
3202 0,
3204 {192},
3205 std::make_pair(3, 0), // all users in content channel 1
3206 MicroSeconds(4)), // one OFDM symbol
3208
3209 // 20 MHz band, MU-MIMO, 4 users
3210 AddTestCase(new MuSigDurationTest({{HeRu::RuSpec{RuType::RU_242_TONE, 1, true}, 4, 1}, // CC1
3211 {HeRu::RuSpec{RuType::RU_242_TONE, 1, true}, 5, 2}, // CC1
3212 {HeRu::RuSpec{RuType::RU_242_TONE, 1, true}, 6, 3}, // CC1
3213 {HeRu::RuSpec{RuType::RU_242_TONE, 1, true}, 7, 2}}, // CC1
3215 MHz_u{20},
3216 0,
3218 {192},
3219 std::make_pair(4, 0), // all users in content channel 1
3220 MicroSeconds(4)), // one OFDM symbol
3222
3223 // 20 MHz band, MU-MIMO, 6 users
3224 AddTestCase(new MuSigDurationTest({{HeRu::RuSpec{RuType::RU_242_TONE, 1, true}, 4, 1}, // CC1
3225 {HeRu::RuSpec{RuType::RU_242_TONE, 1, true}, 5, 1}, // CC1
3226 {HeRu::RuSpec{RuType::RU_242_TONE, 1, true}, 6, 2}, // CC1
3227 {HeRu::RuSpec{RuType::RU_242_TONE, 1, true}, 7, 2}, // CC1
3228 {HeRu::RuSpec{RuType::RU_242_TONE, 1, true}, 8, 1}, // CC1
3229 {HeRu::RuSpec{RuType::RU_242_TONE, 1, true}, 9, 1}}, // CC1
3231 MHz_u{20},
3232 0,
3234 {192},
3235 std::make_pair(6, 0), // all users in content channel 1
3236 MicroSeconds(4)), // one OFDM symbol
3238
3239 // 20 MHz band, MU-MIMO, 8 users
3240 AddTestCase(new MuSigDurationTest({{HeRu::RuSpec{RuType::RU_242_TONE, 1, true}, 4, 1}, // CC1
3241 {HeRu::RuSpec{RuType::RU_242_TONE, 1, true}, 5, 1}, // CC1
3242 {HeRu::RuSpec{RuType::RU_242_TONE, 1, true}, 6, 1}, // CC1
3243 {HeRu::RuSpec{RuType::RU_242_TONE, 1, true}, 7, 1}, // CC1
3244 {HeRu::RuSpec{RuType::RU_242_TONE, 1, true}, 8, 1}, // CC1
3245 {HeRu::RuSpec{RuType::RU_242_TONE, 1, true}, 9, 1}, // CC1
3246 {HeRu::RuSpec{RuType::RU_242_TONE, 1, true}, 10, 1}, // CC1
3247 {HeRu::RuSpec{RuType::RU_242_TONE, 1, true}, 11, 1}}, // CC1
3249 MHz_u{20},
3250 0,
3252 {192},
3253 std::make_pair(8, 0), // all users in content channel 1
3254 MicroSeconds(8)), // two OFDM symbols
3256
3257 // 40 MHz band, MU-MIMO, 2 users
3259 {{HeRu::RuSpec{RuType::RU_484_TONE, 1, true}, 11, 1}, // CC1
3260 {HeRu::RuSpec{RuType::RU_484_TONE, 1, true}, 10, 4}}, // CC2
3262 MHz_u{40},
3263 0,
3265 {200, 200},
3266 std::make_pair(1, 1), // users equally split between the two content channels
3267 MicroSeconds(4)), // one OFDM symbol
3269
3270 // 40 MHz band, MU-MIMO, 3 users
3273 {{HeRu::RuSpec{RuType::RU_484_TONE, 1, true}, 4, 3}, // CC1
3274 {HeRu::RuSpec{RuType::RU_484_TONE, 1, true}, 5, 2}, // CC2
3275 {HeRu::RuSpec{RuType::RU_484_TONE, 1, true}, 6, 1}}, // CC1
3277 MHz_u{40},
3278 0,
3280 {200, 200},
3281 std::make_pair(2, 1), // 2 users in content channel 1 and 1 user in content channel 2
3282 MicroSeconds(4)), // one OFDM symbol
3284
3285 // 40 MHz band, MU-MIMO, 4 users
3287 {{HeRu::RuSpec{RuType::RU_484_TONE, 1, true}, 4, 1}, // CC1
3288 {HeRu::RuSpec{RuType::RU_484_TONE, 1, true}, 5, 2}, // CC2
3289 {HeRu::RuSpec{RuType::RU_484_TONE, 1, true}, 6, 3}, // CC1
3290 {HeRu::RuSpec{RuType::RU_484_TONE, 1, true}, 7, 2}}, // CC2
3292 MHz_u{40},
3293 0,
3295 {200, 200},
3296 std::make_pair(2, 2), // users equally split between the two content channels
3297 MicroSeconds(4)), // one OFDM symbol
3299
3300 // 40 MHz band, MU-MIMO, 6 users
3302 {{HeRu::RuSpec{RuType::RU_484_TONE, 1, true}, 4, 1}, // CC1
3303 {HeRu::RuSpec{RuType::RU_484_TONE, 1, true}, 5, 1}, // CC2
3304 {HeRu::RuSpec{RuType::RU_484_TONE, 1, true}, 6, 2}, // CC1
3305 {HeRu::RuSpec{RuType::RU_484_TONE, 1, true}, 7, 2}, // CC2
3306 {HeRu::RuSpec{RuType::RU_484_TONE, 1, true}, 8, 1}, // CC1
3307 {HeRu::RuSpec{RuType::RU_484_TONE, 1, true}, 9, 1}}, // CC2
3309 MHz_u{40},
3310 0,
3312 {200, 200},
3313 std::make_pair(3, 3), // users equally split between the two content channels
3314 MicroSeconds(4)), // one OFDM symbol
3316
3317 // 40 MHz band, MU-MIMO, 8 users
3319 {{HeRu::RuSpec{RuType::RU_484_TONE, 1, true}, 4, 1}, // CC1
3320 {HeRu::RuSpec{RuType::RU_484_TONE, 1, true}, 5, 1}, // CC2
3321 {HeRu::RuSpec{RuType::RU_484_TONE, 1, true}, 6, 1}, // CC1
3322 {HeRu::RuSpec{RuType::RU_484_TONE, 1, true}, 7, 1}, // CC2
3323 {HeRu::RuSpec{RuType::RU_484_TONE, 1, true}, 8, 1}, // CC1
3324 {HeRu::RuSpec{RuType::RU_484_TONE, 1, true}, 9, 1}, // CC2
3325 {HeRu::RuSpec{RuType::RU_484_TONE, 1, true}, 10, 1}, // CC1
3326 {HeRu::RuSpec{RuType::RU_484_TONE, 1, true}, 11, 1}}, // CC2
3328 MHz_u{40},
3329 0,
3331 {200, 200},
3332 std::make_pair(4, 4), // users equally split between the two content channels
3333 MicroSeconds(4)), // one OFDM symbol
3335
3336 // 80 MHz band, MU-MIMO, 2 users
3338 {{HeRu::RuSpec{RuType::RU_996_TONE, 1, true}, 11, 1}, // CC1
3339 {HeRu::RuSpec{RuType::RU_996_TONE, 1, true}, 10, 4}}, // CC2
3341 MHz_u{80},
3342 0,
3344 {208, 208, 208, 208},
3345 std::make_pair(1, 1), // users equally split between the two content channels
3346 MicroSeconds(4)), // one OFDM symbol
3348
3349 // 80 MHz band, MU-MIMO, 3 users
3352 {{HeRu::RuSpec{RuType::RU_996_TONE, 1, true}, 4, 3}, // CC1
3353 {HeRu::RuSpec{RuType::RU_996_TONE, 1, true}, 5, 2}, // CC2
3354 {HeRu::RuSpec{RuType::RU_996_TONE, 1, true}, 6, 1}}, // CC1
3356 MHz_u{80},
3357 0,
3359 {208, 208, 208, 208},
3360 std::make_pair(2, 1), // 2 users in content channel 1 and 1 user in content channel 2
3361 MicroSeconds(4)), // one OFDM symbol
3363
3364 // 80 MHz band, MU-MIMO, 4 users
3366 {{HeRu::RuSpec{RuType::RU_996_TONE, 1, true}, 4, 1}, // CC1
3367 {HeRu::RuSpec{RuType::RU_996_TONE, 1, true}, 5, 2}, // CC2
3368 {HeRu::RuSpec{RuType::RU_996_TONE, 1, true}, 6, 3}, // CC1
3369 {HeRu::RuSpec{RuType::RU_996_TONE, 1, true}, 7, 2}}, // CC2
3371 MHz_u{80},
3372 0,
3374 {208, 208, 208, 208},
3375 std::make_pair(2, 2), // users equally split between the two content channels
3376 MicroSeconds(4)), // one OFDM symbol
3378
3379 // 80 MHz band, MU-MIMO, 6 users
3381 {{HeRu::RuSpec{RuType::RU_996_TONE, 1, true}, 4, 1}, // CC1
3382 {HeRu::RuSpec{RuType::RU_996_TONE, 1, true}, 5, 1}, // CC2
3383 {HeRu::RuSpec{RuType::RU_996_TONE, 1, true}, 6, 2}, // CC1
3384 {HeRu::RuSpec{RuType::RU_996_TONE, 1, true}, 7, 2}, // CC2
3385 {HeRu::RuSpec{RuType::RU_996_TONE, 1, true}, 8, 1}, // CC1
3386 {HeRu::RuSpec{RuType::RU_996_TONE, 1, true}, 9, 1}}, // CC2
3388 MHz_u{80},
3389 0,
3391 {208, 208, 208, 208},
3392 std::make_pair(3, 3), // users equally split between the two content channels
3393 MicroSeconds(4)), // one OFDM symbol
3395
3396 // 80 MHz band, MU-MIMO, 8 users
3398 {{HeRu::RuSpec{RuType::RU_996_TONE, 1, true}, 4, 1}, // CC1
3399 {HeRu::RuSpec{RuType::RU_996_TONE, 1, true}, 5, 1}, // CC2
3400 {HeRu::RuSpec{RuType::RU_996_TONE, 1, true}, 6, 1}, // CC1
3401 {HeRu::RuSpec{RuType::RU_996_TONE, 1, true}, 7, 1}, // CC2
3402 {HeRu::RuSpec{RuType::RU_996_TONE, 1, true}, 8, 1}, // CC1
3403 {HeRu::RuSpec{RuType::RU_996_TONE, 1, true}, 9, 1}, // CC2
3404 {HeRu::RuSpec{RuType::RU_996_TONE, 1, true}, 10, 1}, // CC1
3405 {HeRu::RuSpec{RuType::RU_996_TONE, 1, true}, 11, 1}}, // CC2
3407 MHz_u{80},
3408 0,
3410 {208, 208, 208, 208},
3411 std::make_pair(4, 4), // users equally split between the two content channels
3412 MicroSeconds(4)), // one OFDM symbol
3414
3415 // 160 MHz band, MU-MIMO, 2 users
3417 {{HeRu::RuSpec{RuType::RU_2x996_TONE, 1, true}, 11, 1}, // CC1
3418 {HeRu::RuSpec{RuType::RU_2x996_TONE, 1, true}, 10, 4}}, // CC2
3420 MHz_u{160},
3421 0,
3423 {208, 208, 208, 208, 208, 208, 208, 208},
3424 std::make_pair(1, 1), // users equally split between the two content channels
3425 MicroSeconds(4)), // one OFDM symbol
3427
3428 // 160 MHz band, MU-MIMO, 3 users
3431 {{HeRu::RuSpec{RuType::RU_2x996_TONE, 1, true}, 4, 3}, // CC1
3432 {HeRu::RuSpec{RuType::RU_2x996_TONE, 1, true}, 5, 2}, // CC2
3433 {HeRu::RuSpec{RuType::RU_2x996_TONE, 1, true}, 6, 1}}, // CC1
3435 MHz_u{160},
3436 0,
3438 {208, 208, 208, 208, 208, 208, 208, 208},
3439 std::make_pair(2, 1), // 2 users in content channel 1 and 1 user in content channel 2
3440 MicroSeconds(4)), // one OFDM symbol
3442
3443 // 160 MHz band, MU-MIMO, 4 users
3445 {{HeRu::RuSpec{RuType::RU_2x996_TONE, 1, true}, 4, 1}, // CC1
3446 {HeRu::RuSpec{RuType::RU_2x996_TONE, 1, true}, 5, 2}, // CC2
3447 {HeRu::RuSpec{RuType::RU_2x996_TONE, 1, true}, 6, 3}, // CC1
3448 {HeRu::RuSpec{RuType::RU_2x996_TONE, 1, true}, 7, 2}}, // CC2
3450 MHz_u{160},
3451 0,
3453 {208, 208, 208, 208, 208, 208, 208, 208},
3454 std::make_pair(2, 2), // users equally split between the two content channels
3455 MicroSeconds(4)), // one OFDM symbol
3457
3458 // 160 MHz band, MU-MIMO, 6 users
3460 {{HeRu::RuSpec{RuType::RU_2x996_TONE, 1, true}, 4, 1}, // CC1
3461 {HeRu::RuSpec{RuType::RU_2x996_TONE, 1, true}, 5, 1}, // CC2
3462 {HeRu::RuSpec{RuType::RU_2x996_TONE, 1, true}, 6, 2}, // CC1
3463 {HeRu::RuSpec{RuType::RU_2x996_TONE, 1, true}, 7, 2}, // CC2
3464 {HeRu::RuSpec{RuType::RU_2x996_TONE, 1, true}, 8, 1}, // CC1
3465 {HeRu::RuSpec{RuType::RU_2x996_TONE, 1, true}, 9, 1}}, // CC2
3467 MHz_u{160},
3468 0,
3470 {208, 208, 208, 208, 208, 208, 208, 208},
3471 std::make_pair(3, 3), // users equally split between the two content channels
3472 MicroSeconds(4)), // one OFDM symbol
3474
3475 // 160 MHz band, MU-MIMO, 8 users
3477 {{HeRu::RuSpec{RuType::RU_2x996_TONE, 1, true}, 4, 1}, // CC1
3478 {HeRu::RuSpec{RuType::RU_2x996_TONE, 1, true}, 5, 1}, // CC2
3479 {HeRu::RuSpec{RuType::RU_2x996_TONE, 1, true}, 6, 1}, // CC1
3480 {HeRu::RuSpec{RuType::RU_2x996_TONE, 1, true}, 7, 1}, // CC2
3481 {HeRu::RuSpec{RuType::RU_2x996_TONE, 1, true}, 8, 1}, // CC1
3482 {HeRu::RuSpec{RuType::RU_2x996_TONE, 1, true}, 9, 1}, // CC2
3483 {HeRu::RuSpec{RuType::RU_2x996_TONE, 1, true}, 10, 1}, // CC1
3484 {HeRu::RuSpec{RuType::RU_2x996_TONE, 1, true}, 11, 1}}, // CC2
3486 MHz_u{160},
3487 0,
3489 {208, 208, 208, 208, 208, 208, 208, 208},
3490 std::make_pair(4, 4), // users equally split between the two content channels
3491 MicroSeconds(4)), // one OFDM symbol
3493}
3494
HE-SIG-B/EHT-SIG duration test.
void DoTeardown() override
Implementation to do any local setup required for this TestCase.
MuType m_expectedMuType
Expected MU type (OFDMA or MU-MIMO).
WifiTxVector BuildTxVector() const
Build a TXVECTOR for HE MU or EHT MU.
WifiMode m_sigBMode
Mode used to transmit HE-SIG-B.
MuSigDurationTest(const std::list< HeMuUserInfo > &userInfos, const WifiMode &sigBMode, MHz_u channelWidth, uint8_t p20Index, MuType expectedMuType, const RuAllocation &expectedRuAllocation, const std::pair< std::size_t, std::size_t > &expectedNumUsersPerCc, Time expectedSigBDuration)
Constructor.
std::list< HeMuUserInfo > m_userInfos
HE MU specific per-user information.
MuType
OFDMA or MU-MIMO.
MHz_u m_channelWidth
Channel width.
Time m_expectedSigBDuration
Expected duration of the HE-SIG-B/EHT-SIG header.
RuAllocation m_expectedRuAllocation
Expected RuType::RU_ALLOCATION.
Ptr< YansWifiPhy > m_phy
the PHY under test
uint8_t m_p20Index
index of the primary20 channel
std::pair< std::size_t, std::size_t > m_expectedNumUsersPerCc
Expected number of users per content channel.
void DoRun() override
Implementation to actually run this TestCase.
PHY header sections consistency test.
void CheckPhyHeaderSections(PhyHeaderSections obtained, PhyHeaderSections expected)
Check if map of PHY header sections returned by a given PHY entity corresponds to a known value.
void DoRun() override
Implementation to actually run this TestCase.
Tx Duration Test.
static Time CalculateTxDurationUsingList(const std::list< uint32_t > &sizes, const std::list< uint16_t > &staIds, const WifiTxVector &txVector, WifiPhyBand band)
Calculate the overall Tx duration returned by WifiPhy for list of sizes.
~TxDurationTest() override
static bool CheckMuTxDuration(const std::list< uint32_t > &sizes, const std::list< HeMuUserInfo > &userInfos, MHz_u channelWidth, Time guardInterval, WifiPreamble preamble, Time knownDuration)
Check if the overall Tx duration returned by WifiPhy for a MU PPDU corresponds to a known value.
bool CheckTxDuration(uint32_t size, WifiMode payloadMode, MHz_u channelWidth, Time guardInterval, WifiPreamble preamble, Time knownDuration)
Check if the overall tx duration returned by the PHY corresponds to a known value.
void DoRun() override
Implementation to actually run this TestCase.
bool CheckPayloadDuration(uint32_t size, WifiMode payloadMode, MHz_u channelWidth, Time guardInterval, WifiPreamble preamble, Time knownDuration)
Check if the payload tx duration returned by the PHY corresponds to a known value.
Tx Duration Test Suite.
static WifiMode GetDsssRate5_5Mbps()
static WifiMode GetDsssRate1Mbps()
static WifiMode GetDsssRate11Mbps()
static WifiMode GetDsssRate2Mbps()
static WifiMode GetEhtMcs0()
static WifiMode GetEhtMcs13()
static WifiMode GetEhtMcs9()
RU Specification.
Definition eht-ru.h:35
static WifiMode GetErpOfdmRate(uint64_t rate)
Return a WifiMode for ERP-OFDM corresponding to the provided rate.
static WifiMode GetErpOfdmRate6Mbps()
static WifiMode GetErpOfdmRate54Mbps()
static WifiMode GetHeMcs9()
static WifiMode GetHeMcs11()
static WifiMode GetHeMcs0()
static std::pair< std::size_t, std::size_t > GetNumRusPerHeSigBContentChannel(MHz_u channelWidth, WifiModulationClass mc, const RuAllocation &ruAllocation, std::optional< Center26ToneRuIndication > center26ToneRuIndication, bool sigBCompression, uint8_t numMuMimoUsers)
Get the number of STAs per HE-SIG-B content channel.
Definition he-ppdu.cc:552
static HeSigBContentChannels GetHeSigBContentChannels(const WifiTxVector &txVector, uint8_t p20Index)
Get the HE SIG-B content channels for a given PPDU IEEE 802.11ax-2021 27.3.11.8.2 HE-SIG-B content ch...
Definition he-ppdu.cc:663
RU Specification.
Definition he-ru.h:38
static WifiMode GetHtMcs0()
static WifiMode GetHtMcs6()
static WifiMode GetHtMcs7()
static WifiMode GetOfdmRate6Mbps()
static WifiMode GetOfdmRate54Mbps()
static WifiMode GetOfdmRate(uint64_t rate, MHz_u bw=MHz_u{20})
Return a WifiMode for OFDM corresponding to the provided rate and the channel bandwidth (20,...
Definition ofdm-phy.cc:403
Smart pointer class similar to boost::intrusive_ptr.
Definition ptr.h:70
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
Definition simulator.cc:125
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
Definition test.cc:296
@ QUICK
Fast test.
Definition test.h:1057
TestCase(const TestCase &)=delete
Caller graph was not generated because of its size.
Type
Type of test.
Definition test.h:1271
TestSuite(std::string name, Type type=Type::UNIT)
Construct a new test suite.
Definition test.cc:494
Simulation virtual time values and global simulation resolution.
Definition nstime.h:95
static WifiMode GetVhtMcs0()
static WifiMode GetVhtMcs5()
static WifiMode GetVhtMcs3()
static WifiMode GetVhtMcs1()
static WifiMode GetVhtMcs4()
static WifiMode GetVhtMcs9()
static WifiMode GetVhtMcs8()
static WifiMode GetVhtMcs7()
Implements the IEEE 802.11 MAC header.
uint32_t GetSerializedSize() const override
virtual void SetType(WifiMacType type, bool resetToDsFromDs=true)
Set Type/Subtype values with the correct values depending on the given type.
represent a single transmission mode
Definition wifi-mode.h:39
WifiModulationClass GetModulationClass() const
Definition wifi-mode.cc:172
uint64_t GetDataRate(MHz_u channelWidth, Time guardInterval, uint8_t nss) const
Definition wifi-mode.cc:110
static Time GetPayloadDuration(uint32_t size, const WifiTxVector &txVector, WifiPhyBand band, MpduType mpdutype=NORMAL_MPDU, uint16_t staId=SU_STA_ID)
Definition wifi-phy.cc:1527
static Time CalculateTxDuration(uint32_t size, const WifiTxVector &txVector, WifiPhyBand band, uint16_t staId=SU_STA_ID)
Definition wifi-phy.cc:1574
WifiChannelConfig::SegmentWithoutUnits ChannelTuple
kept for backward compatibility, can be deprecated when using strong types
Definition wifi-phy.h:954
static ConstIterator FindFirst(uint8_t number, MHz_u frequency, MHz_u width, WifiStandard standard, WifiPhyBand band, ConstIterator start=GetFrequencyChannels().begin())
Find the first frequency segment matching the specified parameters.
std::variant< HeRu::RuSpec, EhtRu::RuSpec > RuSpec
variant of the RU specification
Definition wifi-ru.h:28
static bool IsHe(RuSpec ru)
Get whether a given RU variant is a HE RU.
Definition wifi-ru.cc:248
static MHz_u GetBandwidth(RuType ruType)
Get the approximate bandwidth occupied by a RU.
Definition wifi-ru.cc:78
static RuType GetRuType(RuSpec ru)
Get the type of a given RU.
Definition wifi-ru.cc:45
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
void SetRuAllocation(const RuAllocation &ruAlloc, uint8_t p20Index)
Set RU_ALLOCATION field.
void SetStbc(bool stbc)
Sets if STBC is being used.
void SetNess(uint8_t ness)
Sets the Ness number.
void SetEhtPpduType(uint8_t type)
Set the EHT_PPDU_TYPE parameter.
void SetGuardInterval(Time guardInterval)
Sets the guard interval duration.
void SetHeMuUserInfo(uint16_t staId, HeMuUserInfo userInfo)
Set the HE MU user-specific transmission information for the given STA-ID.
void SetChannelWidth(MHz_u channelWidth)
Sets the selected channelWidth.
bool IsDlOfdma() const
Return true if this TX vector is used for a downlink multi-user transmission using OFDMA.
void SetSigBMode(const WifiMode &mode)
Set the MCS used for SIG-B.
bool IsDlMuMimo() const
Return true if this TX vector is used for a downlink multi-user transmission using MU-MIMO.
void SetMode(WifiMode mode)
Sets the selected payload transmission mode.
void SetNss(uint8_t nss)
Sets the number of Nss.
void SetPreambleType(WifiPreamble preamble)
Sets the preamble type.
#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_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Definition assert.h:76
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
Definition abort.h:99
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition log.h:201
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
Definition object.h:627
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Definition ptr.h:492
#define NS_TEST_EXPECT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report if not.
Definition test.h:240
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition nstime.h:1347
Time NanoSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition nstime.h:1364
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition nstime.h:1313
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
WifiPhyBand
Identifies the PHY band.
WifiPpduField
The type of PPDU field (grouped for convenience).
@ WIFI_STANDARD_80211be
@ WIFI_PREAMBLE_LONG
@ WIFI_PREAMBLE_EHT_TB
@ WIFI_PREAMBLE_HE_ER_SU
@ WIFI_PREAMBLE_HE_TB
@ WIFI_PREAMBLE_EHT_MU
@ WIFI_PREAMBLE_HE_MU
@ WIFI_PREAMBLE_HE_SU
@ WIFI_PREAMBLE_VHT_MU
@ WIFI_PREAMBLE_VHT_SU
@ WIFI_PREAMBLE_SHORT
@ WIFI_PREAMBLE_HT_MF
@ 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.
@ WIFI_MOD_CLASS_OFDM
OFDM (Clause 17).
@ WIFI_MOD_CLASS_VHT
VHT (Clause 22).
@ WIFI_MOD_CLASS_HE
HE (Clause 27).
@ OFDM_PHY_10_MHZ
Definition ofdm-phy.h:36
@ OFDM_PHY_DEFAULT
Definition ofdm-phy.h:35
@ OFDM_PHY_5_MHZ
Definition ofdm-phy.h:37
@ WIFI_PPDU_FIELD_SIG_B
SIG-B field.
@ WIFI_PPDU_FIELD_TRAINING
STF + LTF fields (excluding those in preamble for HT-GF).
@ WIFI_PPDU_FIELD_NON_HT_HEADER
PHY header field for DSSS or ERP, short PHY header field for HR/DSSS or ERP, field not present for HT...
@ WIFI_PPDU_FIELD_EHT_SIG
EHT-SIG field.
@ WIFI_PPDU_FIELD_HT_SIG
HT-SIG field.
@ WIFI_PPDU_FIELD_PREAMBLE
SYNC + SFD fields for DSSS or ERP, shortSYNC + shortSFD fields for HR/DSSS or ERP,...
@ WIFI_PPDU_FIELD_U_SIG
U-SIG field.
@ WIFI_PPDU_FIELD_SIG_A
SIG-A field.
WifiRu::RuSpec MakeRuSpec(RuType ruType, std::size_t index, bool primaryOrLow80MHz, std::optional< bool > primary160MHz=std::nullopt)
Create an HE or an EHT RU Specification.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
RuType
The different Resource Unit (RU) types.
Definition wifi-types.h:286
std::map< WifiPpduField, PhyHeaderChunkInfo > PhyHeaderSections
A map of PhyHeaderChunkInfo elements per PPDU field.
double MHz_u
MHz weak type.
Definition wifi-units.h:31
@ WIFI_MAC_CTL_ACK
std::unordered_map< uint16_t, Ptr< const WifiPsdu > > WifiConstPsduMap
Map of const PSDUs indexed by STA-ID.
Definition wifi-ppdu.h:39
static constexpr uint16_t SU_STA_ID
STA_ID to identify a single user (SU).
bool IsEht(WifiPreamble preamble)
Return true if a preamble corresponds to an EHT transmission.
std::vector< uint16_t > RuAllocation
9 bits RU_ALLOCATION per 20 MHz
HE MU specific user transmission parameters.
static TxDurationTestSuite g_txDurationTestSuite
the test suite