757 "Expected a Trigger Frame");
762 "Expected one User Info field per station");
765 "Expected the MU-RTS to occupy the entire channel width");
766 for (
const auto& userInfo : trigger)
770 "Unexpected RU Allocation value in MU-RTS");
777 m_txPsdus[1].psduMap.begin()->second->GetNMpdus() == 1 &&
780 "Expected a CTS frame");
783 "Expected the CTS to occupy the entire channel width");
793 "Duration/ID in CTS frame is too long");
799 m_txPsdus[2].psduMap.begin()->second->GetNMpdus() == 1 &&
802 "Expected a CTS frame");
805 "Expected the CTS to occupy the entire channel width");
815 "Duration/ID in CTS frame is too long");
821 m_txPsdus[3].psduMap.begin()->second->GetNMpdus() == 1 &&
824 "Expected a CTS frame");
827 "Expected the CTS to occupy the entire channel width");
837 "Duration/ID in CTS frame is too long");
843 m_txPsdus[4].psduMap.begin()->second->GetNMpdus() == 1 &&
846 "Expected a CTS frame");
849 "Expected the CTS to occupy the entire channel width");
859 "Duration/ID in CTS frame is too long");
874 "Expected a Trigger Frame");
879 "Expected one User Info field per station");
900 m_txPsdus[6].psduMap.begin()->second->GetNMpdus() == 1),
902 "Expected a QoS Null frame in a TB PPDU");
915 uint8_t tid = staId * 2;
922 tEnd + sifs + tolerance,
923 "QoS Null frame in HE TB PPDU sent too late");
930 "Expected null Duration/ID for QoS Null frame in HE TB PPDU");
939 m_txPsdus[7].psduMap.begin()->second->GetNMpdus() == 1),
941 "Expected a QoS Null frame in a TB PPDU");
954 uint8_t tid = staId * 2;
960 tEnd + sifs + tolerance,
961 "QoS Null frame in HE TB PPDU sent too late");
962 qosNullNavEnd =
m_txPsdus[7].endTx +
m_txPsdus[7].psduMap.begin()->second->GetDuration();
968 "Expected null Duration/ID for QoS Null frame in HE TB PPDU");
977 m_txPsdus[8].psduMap.begin()->second->GetNMpdus() == 1),
979 "Expected a QoS Null frame in an HE TB PPDU");
992 uint8_t tid = staId * 2;
998 tEnd + sifs + tolerance,
999 "QoS Null frame in HE TB PPDU sent too late");
1000 qosNullNavEnd =
m_txPsdus[8].endTx +
m_txPsdus[8].psduMap.begin()->second->GetDuration();
1006 "Expected null Duration/ID for QoS Null frame in HE TB PPDU");
1015 m_txPsdus[9].psduMap.begin()->second->GetNMpdus() == 1),
1017 "Expected a QoS Null frame in an HE TB PPDU");
1030 uint8_t tid = staId * 2;
1036 tEnd + sifs + tolerance,
1037 "QoS Null frame in HE TB PPDU sent too late");
1038 qosNullNavEnd =
m_txPsdus[9].endTx +
m_txPsdus[9].psduMap.begin()->second->GetDuration();
1044 "Expected null Duration/ID for QoS Null frame in HE TB PPDU");
1060 (secondMuRts ?
"MU-RTS" :
"Basic Trigger Frame") <<
" sent too early");
1065 tEnd + sifs + tolerance,
1066 (secondMuRts ?
"MU-RTS" :
"Basic Trigger Frame") <<
" sent too late");
1077 "Duration/ID in MU-RTS is too long");
1090 "Expected at least 15 transmitted packet");
1096 "Expected a Trigger Frame");
1101 "Expected one User Info field per station");
1104 "Expected the MU-RTS to occupy the entire channel width");
1105 for (
const auto& userInfo : trigger)
1109 "Unexpected RU Allocation value in MU-RTS");
1120 m_txPsdus[11].psduMap.begin()->second->GetNMpdus() == 1 &&
1123 "Expected a CTS frame");
1126 "Expected the CTS to occupy the entire channel width");
1136 "Duration/ID in CTS frame is too long");
1142 m_txPsdus[12].psduMap.begin()->second->GetNMpdus() == 1 &&
1145 "Expected a CTS frame");
1148 "Expected the CTS to occupy the entire channel width");
1158 "Duration/ID in CTS frame is too long");
1164 m_txPsdus[13].psduMap.begin()->second->GetNMpdus() == 1 &&
1167 "Expected a CTS frame");
1170 "Expected the CTS to occupy the entire channel width");
1180 "Duration/ID in CTS frame is too long");
1186 m_txPsdus[14].psduMap.begin()->second->GetNMpdus() == 1 &&
1189 "Expected a CTS frame");
1192 "Expected the CTS to occupy the entire channel width");
1202 "Duration/ID in CTS frame is too long");
1220 "Expected a Trigger Frame");
1225 "Expected one User Info field per station");
1237 m_txPsdus[16].psduMap.begin()->second->GetNMpdus() == 2 &&
1238 m_txPsdus[16].psduMap.begin()->second->GetHeader(0).IsQosData() &&
1239 m_txPsdus[16].psduMap.begin()->second->GetHeader(1).IsQosData()),
1241 "Expected 2 QoS data frames in an HE TB PPDU");
1246 tEnd + sifs + tolerance,
1247 "QoS data frames in HE TB PPDU sent too late");
1256 m_txPsdus[17].psduMap.begin()->second->GetNMpdus() == 2 &&
1257 m_txPsdus[17].psduMap.begin()->second->GetHeader(0).IsQosData() &&
1258 m_txPsdus[17].psduMap.begin()->second->GetHeader(1).IsQosData()),
1260 "Expected 2 QoS data frames in an HE TB PPDU");
1264 tEnd + sifs + tolerance,
1265 "QoS data frames in HE TB PPDU sent too late");
1266 qosDataNavEnd =
m_txPsdus[17].endTx +
m_txPsdus[17].psduMap.begin()->second->GetDuration();
1274 m_txPsdus[18].psduMap.begin()->second->GetNMpdus() == 2 &&
1275 m_txPsdus[18].psduMap.begin()->second->GetHeader(0).IsQosData() &&
1276 m_txPsdus[18].psduMap.begin()->second->GetHeader(1).IsQosData()),
1278 "Expected 2 QoS data frames in an HE TB PPDU");
1282 tEnd + sifs + tolerance,
1283 "QoS data frames in HE TB PPDU sent too late");
1284 qosDataNavEnd =
m_txPsdus[18].endTx +
m_txPsdus[18].psduMap.begin()->second->GetDuration();
1292 m_txPsdus[19].psduMap.begin()->second->GetNMpdus() == 2 &&
1293 m_txPsdus[19].psduMap.begin()->second->GetHeader(0).IsQosData() &&
1294 m_txPsdus[19].psduMap.begin()->second->GetHeader(1).IsQosData()),
1296 "Expected 2 QoS data frames in an HE TB PPDU");
1300 tEnd + sifs + tolerance,
1301 "QoS data frames in HE TB PPDU sent too late");
1302 qosDataNavEnd =
m_txPsdus[19].endTx +
m_txPsdus[19].psduMap.begin()->second->GetDuration();
1312 "Expected a Block Ack");
1317 "Expected one Per AID TID Info subfield per station");
1318 for (uint8_t i = 0; i < 4; i++)
1331 "Duration/ID in Multi-STA BlockAck is too short");
1334 "Duration/ID in Multi-STA BlockAck is too long");
1343 "Expected at least 26 transmitted packet");
1349 "Expected a Trigger Frame");
1354 "Expected one User Info field per station");
1357 "Expected the MU-RTS to occupy the entire channel width");
1358 for (
const auto& userInfo : trigger)
1362 "Unexpected RU Allocation value in MU-RTS");
1374 m_txPsdus[22].psduMap.begin()->second->GetNMpdus() == 1 &&
1377 "Expected a CTS frame");
1380 "Expected the CTS to occupy the entire channel width");
1390 "Duration/ID in CTS frame is too long");
1396 m_txPsdus[23].psduMap.begin()->second->GetNMpdus() == 1 &&
1399 "Expected a CTS frame");
1402 "Expected the CTS to occupy the entire channel width");
1412 "Duration/ID in CTS frame is too long");
1418 m_txPsdus[24].psduMap.begin()->second->GetNMpdus() == 1 &&
1421 "Expected a CTS frame");
1424 "Expected the CTS to occupy the entire channel width");
1434 "Duration/ID in CTS frame is too long");
1440 m_txPsdus[25].psduMap.begin()->second->GetNMpdus() == 1 &&
1443 "Expected a CTS frame");
1446 "Expected the CTS to occupy the entire channel width");
1456 "Duration/ID in CTS frame is too long");
1472 "Expected a DL MU PPDU");
1475 "Expected 4 PSDUs within the DL MU PPDU");
1479 "TX duration cannot exceed max PPDU duration");
1480 for (
auto& psdu :
m_txPsdus[26].psduMap)
1484 "Max A-MPDU size exceeded");
1492 for (
auto& psdu :
m_txPsdus[26].psduMap)
1496 dlMuNavEnd += psdu.second->GetDuration();
1502 "Duration/ID must be the same for all PSDUs");
1509 std::size_t nTxPsdus = 0;
1541 "Expected a Block Ack");
1552 "Duration/ID in 1st BlockAck frame is too short");
1555 "Duration/ID in 1st BlockAck is too long");
1561 "Expected a Block Ack Request");
1566 tEnd + sifs + tolerance,
1567 "First Block Ack Request sent too late");
1577 "Duration/ID in BlockAckReq is too short");
1580 "Duration/ID in BlockAckReq is too long");
1587 "Expected a Block Ack");
1599 "Duration/ID in BlockAck is too long");
1606 "Duration/ID in BlockAck is too short");
1608 barNavEnd + tolerance,
1609 "Duration/ID in BlockAck is too long");
1612 "Expected null Duration/ID for BlockAck");
1619 "Expected a Block Ack Request");
1624 tEnd + sifs + tolerance,
1625 "Second Block Ack Request sent too late");
1635 "Duration/ID in BlockAckReq is too short");
1638 "Duration/ID in BlockAckReq is too long");
1645 "Expected a Block Ack");
1657 "Duration/ID in BlockAck is too long");
1664 "Duration/ID in BlockAck is too short");
1666 barNavEnd + tolerance,
1667 "Duration/ID in BlockAck is too long");
1670 "Expected null Duration/ID for BlockAck");
1677 "Expected a Block Ack Request");
1682 tEnd + sifs + tolerance,
1683 "Third Block Ack Request sent too late");
1693 "Duration/ID in BlockAckReq is too short");
1696 "Duration/ID in BlockAckReq is too long");
1703 "Expected a Block Ack");
1715 "Duration/ID in BlockAck is too long");
1722 "Duration/ID in BlockAck is too short");
1724 barNavEnd + tolerance,
1725 "Duration/ID in BlockAck is too long");
1728 "Expected null Duration/ID for BlockAck");
1758 "Expected a MU-BAR Trigger Frame");
1766 "Duration/ID in MU-BAR Trigger Frame is too short");
1769 "Duration/ID in MU-BAR Trigger Frame is too long");
1774 m_txPsdus[28].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
1776 "Expected a Block Ack");
1781 tEnd + sifs + tolerance,
1782 "Block Ack in HE TB PPDU sent too late");
1791 "Expected null Duration/ID for BlockAck");
1797 m_txPsdus[29].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
1799 "Expected a Block Ack");
1803 tEnd + sifs + tolerance,
1804 "Block Ack in HE TB PPDU sent too late");
1805 baNavEnd =
m_txPsdus[29].endTx +
m_txPsdus[29].psduMap.begin()->second->GetDuration();
1810 "Duration/ID in 1st BlockAck is too long");
1815 "Expected null Duration/ID for BlockAck");
1821 m_txPsdus[30].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
1823 "Expected a Block Ack");
1827 tEnd + sifs + tolerance,
1828 "Block Ack in HE TB PPDU sent too late");
1829 baNavEnd =
m_txPsdus[30].endTx +
m_txPsdus[30].psduMap.begin()->second->GetDuration();
1834 "Duration/ID in 1st BlockAck is too long");
1839 "Expected null Duration/ID for BlockAck");
1845 m_txPsdus[31].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
1847 "Expected a Block Ack");
1851 tEnd + sifs + tolerance,
1852 "Block Ack in HE TB PPDU sent too late");
1853 baNavEnd =
m_txPsdus[31].endTx +
m_txPsdus[31].psduMap.begin()->second->GetDuration();
1858 "Duration/ID in 1st BlockAck is too long");
1863 "Expected null Duration/ID for BlockAck");
1889 for (
auto& psdu :
m_txPsdus[26].psduMap)
1893 "Expected an aggregated MU-BAR Trigger Frame");
1899 m_txPsdus[27].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
1901 "Expected a Block Ack");
1906 tEnd + sifs + tolerance,
1907 "Block Ack in HE TB PPDU sent too late");
1916 "Expected null Duration/ID for BlockAck");
1922 m_txPsdus[28].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
1924 "Expected a Block Ack");
1928 tEnd + sifs + tolerance,
1929 "Block Ack in HE TB PPDU sent too late");
1930 baNavEnd =
m_txPsdus[28].endTx +
m_txPsdus[28].psduMap.begin()->second->GetDuration();
1938 "Expected null Duration/ID for BlockAck");
1944 m_txPsdus[29].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
1946 "Expected a Block Ack");
1950 tEnd + sifs + tolerance,
1951 "Block Ack in HE TB PPDU sent too late");
1952 baNavEnd =
m_txPsdus[29].endTx +
m_txPsdus[29].psduMap.begin()->second->GetDuration();
1960 "Expected null Duration/ID for BlockAck");
1966 m_txPsdus[30].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
1968 "Expected a Block Ack");
1972 tEnd + sifs + tolerance,
1973 "Block Ack in HE TB PPDU sent too late");
1974 baNavEnd =
m_txPsdus[30].endTx +
m_txPsdus[30].psduMap.begin()->second->GetDuration();
1982 "Expected null Duration/ID for BlockAck");
1990 "Not all DL packets have been received");
1997 for (std::size_t i = nTxPsdus; i <
m_txPsdus.size(); ++i)
2000 !
m_txPsdus[i].psduMap.begin()->second->GetHeader(0).IsCts() &&
2001 m_txPsdus[i].psduMap.begin()->second->GetHeader(0).GetAddr2() !=
2009 "A station transmitted before the MU EDCA timer expired");
2021 "A station did not set the correct MU CW min");