736 "Expected a Trigger Frame");
741 "Expected one User Info field per station");
744 "Expected the MU-RTS to occupy the entire channel width");
745 for (
const auto& userInfo : trigger)
749 "Unexpected RU Allocation value in MU-RTS");
758 m_txPsdus[1].psduMap.begin()->second->GetNMpdus() == 1 &&
761 "Expected a CTS frame");
764 "Expected the CTS to occupy the entire channel width");
778 m_txPsdus[2].psduMap.begin()->second->GetNMpdus() == 1 &&
781 "Expected a CTS frame");
784 "Expected the CTS to occupy the entire channel width");
798 m_txPsdus[3].psduMap.begin()->second->GetNMpdus() == 1 &&
801 "Expected a CTS frame");
804 "Expected the CTS to occupy the entire channel width");
818 m_txPsdus[4].psduMap.begin()->second->GetNMpdus() == 1 &&
821 "Expected a CTS frame");
824 "Expected the CTS to occupy the entire channel width");
840 "Expected a Trigger Frame");
845 "Expected one User Info field per station");
858 m_txPsdus[6].psduMap.begin()->second->GetNMpdus() == 1),
860 "Expected a QoS Null frame in a TB PPDU");
873 uint8_t tid = staId * 2;
880 tEnd + sifs + tolerance,
881 "QoS Null frame in HE TB PPDU sent too late");
887 "Expected null Duration/ID for QoS Null frame in HE TB PPDU");
896 m_txPsdus[7].psduMap.begin()->second->GetNMpdus() == 1),
898 "Expected a QoS Null frame in a TB PPDU");
911 uint8_t tid = staId * 2;
917 tEnd + sifs + tolerance,
918 "QoS Null frame in HE TB PPDU sent too late");
919 qosNullNavEnd =
m_txPsdus[7].endTx +
m_txPsdus[7].psduMap.begin()->second->GetDuration();
924 "Expected null Duration/ID for QoS Null frame in HE TB PPDU");
933 m_txPsdus[8].psduMap.begin()->second->GetNMpdus() == 1),
935 "Expected a QoS Null frame in an HE TB PPDU");
948 uint8_t tid = staId * 2;
954 tEnd + sifs + tolerance,
955 "QoS Null frame in HE TB PPDU sent too late");
956 qosNullNavEnd =
m_txPsdus[8].endTx +
m_txPsdus[8].psduMap.begin()->second->GetDuration();
961 "Expected null Duration/ID for QoS Null frame in HE TB PPDU");
970 m_txPsdus[9].psduMap.begin()->second->GetNMpdus() == 1),
972 "Expected a QoS Null frame in an HE TB PPDU");
985 uint8_t tid = staId * 2;
991 tEnd + sifs + tolerance,
992 "QoS Null frame in HE TB PPDU sent too late");
993 qosNullNavEnd =
m_txPsdus[9].endTx +
m_txPsdus[9].psduMap.begin()->second->GetDuration();
998 "Expected null Duration/ID for QoS Null frame in HE TB PPDU");
1024 "Expected at least 15 transmitted packet");
1030 "Expected a Trigger Frame");
1035 "Expected one User Info field per station");
1038 "Expected the MU-RTS to occupy the entire channel width");
1039 for (
const auto& userInfo : trigger)
1043 "Unexpected RU Allocation value in MU-RTS");
1054 m_txPsdus[11].psduMap.begin()->second->GetNMpdus() == 1 &&
1057 "Expected a CTS frame");
1060 "Expected the CTS to occupy the entire channel width");
1070 "Duration/ID in CTS frame is too long");
1076 m_txPsdus[12].psduMap.begin()->second->GetNMpdus() == 1 &&
1079 "Expected a CTS frame");
1082 "Expected the CTS to occupy the entire channel width");
1092 "Duration/ID in CTS frame is too long");
1098 m_txPsdus[13].psduMap.begin()->second->GetNMpdus() == 1 &&
1101 "Expected a CTS frame");
1104 "Expected the CTS to occupy the entire channel width");
1114 "Duration/ID in CTS frame is too long");
1120 m_txPsdus[14].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");
1154 "Expected a Trigger Frame");
1159 "Expected one User Info field per station");
1171 m_txPsdus[16].psduMap.begin()->second->GetNMpdus() == 2 &&
1172 m_txPsdus[16].psduMap.begin()->second->GetHeader(0).IsQosData() &&
1173 m_txPsdus[16].psduMap.begin()->second->GetHeader(1).IsQosData()),
1175 "Expected 2 QoS data frames in an HE TB PPDU");
1180 tEnd + sifs + tolerance,
1181 "QoS data frames in HE TB PPDU sent too late");
1190 m_txPsdus[17].psduMap.begin()->second->GetNMpdus() == 2 &&
1191 m_txPsdus[17].psduMap.begin()->second->GetHeader(0).IsQosData() &&
1192 m_txPsdus[17].psduMap.begin()->second->GetHeader(1).IsQosData()),
1194 "Expected 2 QoS data frames in an HE TB PPDU");
1198 tEnd + sifs + tolerance,
1199 "QoS data frames in HE TB PPDU sent too late");
1200 qosDataNavEnd =
m_txPsdus[17].endTx +
m_txPsdus[17].psduMap.begin()->second->GetDuration();
1208 m_txPsdus[18].psduMap.begin()->second->GetNMpdus() == 2 &&
1209 m_txPsdus[18].psduMap.begin()->second->GetHeader(0).IsQosData() &&
1210 m_txPsdus[18].psduMap.begin()->second->GetHeader(1).IsQosData()),
1212 "Expected 2 QoS data frames in an HE TB PPDU");
1216 tEnd + sifs + tolerance,
1217 "QoS data frames in HE TB PPDU sent too late");
1218 qosDataNavEnd =
m_txPsdus[18].endTx +
m_txPsdus[18].psduMap.begin()->second->GetDuration();
1226 m_txPsdus[19].psduMap.begin()->second->GetNMpdus() == 2 &&
1227 m_txPsdus[19].psduMap.begin()->second->GetHeader(0).IsQosData() &&
1228 m_txPsdus[19].psduMap.begin()->second->GetHeader(1).IsQosData()),
1230 "Expected 2 QoS data frames in an HE TB PPDU");
1234 tEnd + sifs + tolerance,
1235 "QoS data frames in HE TB PPDU sent too late");
1236 qosDataNavEnd =
m_txPsdus[19].endTx +
m_txPsdus[19].psduMap.begin()->second->GetDuration();
1246 "Expected a Block Ack");
1251 "Expected one Per AID TID Info subfield per station");
1252 for (uint8_t i = 0; i < 4; i++)
1265 "Duration/ID in Multi-STA BlockAck is too short");
1268 "Duration/ID in Multi-STA BlockAck is too long");
1277 "Expected at least 26 transmitted packet");
1283 "Expected a Trigger Frame");
1288 "Expected one User Info field per station");
1291 "Expected the MU-RTS to occupy the entire channel width");
1292 for (
const auto& userInfo : trigger)
1296 "Unexpected RU Allocation value in MU-RTS");
1308 m_txPsdus[22].psduMap.begin()->second->GetNMpdus() == 1 &&
1311 "Expected a CTS frame");
1314 "Expected the CTS to occupy the entire channel width");
1324 "Duration/ID in CTS frame is too long");
1330 m_txPsdus[23].psduMap.begin()->second->GetNMpdus() == 1 &&
1333 "Expected a CTS frame");
1336 "Expected the CTS to occupy the entire channel width");
1346 "Duration/ID in CTS frame is too long");
1352 m_txPsdus[24].psduMap.begin()->second->GetNMpdus() == 1 &&
1355 "Expected a CTS frame");
1358 "Expected the CTS to occupy the entire channel width");
1368 "Duration/ID in CTS frame is too long");
1374 m_txPsdus[25].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");
1406 "Expected a DL MU PPDU");
1409 "Expected 4 PSDUs within the DL MU PPDU");
1413 "TX duration cannot exceed max PPDU duration");
1414 for (
auto& psdu :
m_txPsdus[26].psduMap)
1418 "Max A-MPDU size exceeded");
1426 for (
auto& psdu :
m_txPsdus[26].psduMap)
1430 dlMuNavEnd += psdu.second->GetDuration();
1436 "Duration/ID must be the same for all PSDUs");
1443 std::size_t nTxPsdus = 0;
1475 "Expected a Block Ack");
1486 "Duration/ID in 1st BlockAck frame is too short");
1489 "Duration/ID in 1st BlockAck is too long");
1495 "Expected a Block Ack Request");
1500 tEnd + sifs + tolerance,
1501 "First Block Ack Request sent too late");
1511 "Duration/ID in BlockAckReq is too short");
1514 "Duration/ID in BlockAckReq is too long");
1521 "Expected a Block Ack");
1533 "Duration/ID in BlockAck is too long");
1540 "Duration/ID in BlockAck is too short");
1542 barNavEnd + tolerance,
1543 "Duration/ID in BlockAck is too long");
1546 "Expected null Duration/ID for BlockAck");
1553 "Expected a Block Ack Request");
1558 tEnd + sifs + tolerance,
1559 "Second Block Ack Request sent too late");
1569 "Duration/ID in BlockAckReq is too short");
1572 "Duration/ID in BlockAckReq is too long");
1579 "Expected a Block Ack");
1591 "Duration/ID in BlockAck is too long");
1598 "Duration/ID in BlockAck is too short");
1600 barNavEnd + tolerance,
1601 "Duration/ID in BlockAck is too long");
1604 "Expected null Duration/ID for BlockAck");
1611 "Expected a Block Ack Request");
1616 tEnd + sifs + tolerance,
1617 "Third Block Ack Request sent too late");
1627 "Duration/ID in BlockAckReq is too short");
1630 "Duration/ID in BlockAckReq is too long");
1637 "Expected a Block Ack");
1649 "Duration/ID in BlockAck is too long");
1656 "Duration/ID in BlockAck is too short");
1658 barNavEnd + tolerance,
1659 "Duration/ID in BlockAck is too long");
1662 "Expected null Duration/ID for BlockAck");
1692 "Expected a MU-BAR Trigger Frame");
1700 "Duration/ID in MU-BAR Trigger Frame is too short");
1703 "Duration/ID in MU-BAR Trigger Frame is too long");
1708 m_txPsdus[28].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
1710 "Expected a Block Ack");
1715 tEnd + sifs + tolerance,
1716 "Block Ack in HE TB PPDU sent too late");
1725 "Expected null Duration/ID for BlockAck");
1731 m_txPsdus[29].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
1733 "Expected a Block Ack");
1737 tEnd + sifs + tolerance,
1738 "Block Ack in HE TB PPDU sent too late");
1739 baNavEnd =
m_txPsdus[29].endTx +
m_txPsdus[29].psduMap.begin()->second->GetDuration();
1744 "Duration/ID in 1st BlockAck is too long");
1749 "Expected null Duration/ID for BlockAck");
1755 m_txPsdus[30].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
1757 "Expected a Block Ack");
1761 tEnd + sifs + tolerance,
1762 "Block Ack in HE TB PPDU sent too late");
1763 baNavEnd =
m_txPsdus[30].endTx +
m_txPsdus[30].psduMap.begin()->second->GetDuration();
1768 "Duration/ID in 1st BlockAck is too long");
1773 "Expected null Duration/ID for BlockAck");
1779 m_txPsdus[31].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
1781 "Expected a Block Ack");
1785 tEnd + sifs + tolerance,
1786 "Block Ack in HE TB PPDU sent too late");
1787 baNavEnd =
m_txPsdus[31].endTx +
m_txPsdus[31].psduMap.begin()->second->GetDuration();
1792 "Duration/ID in 1st BlockAck is too long");
1797 "Expected null Duration/ID for BlockAck");
1823 for (
auto& psdu :
m_txPsdus[26].psduMap)
1827 "Expected an aggregated MU-BAR Trigger Frame");
1833 m_txPsdus[27].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
1835 "Expected a Block Ack");
1840 tEnd + sifs + tolerance,
1841 "Block Ack in HE TB PPDU sent too late");
1850 "Expected null Duration/ID for BlockAck");
1856 m_txPsdus[28].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
1858 "Expected a Block Ack");
1862 tEnd + sifs + tolerance,
1863 "Block Ack in HE TB PPDU sent too late");
1864 baNavEnd =
m_txPsdus[28].endTx +
m_txPsdus[28].psduMap.begin()->second->GetDuration();
1872 "Expected null Duration/ID for BlockAck");
1878 m_txPsdus[29].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
1880 "Expected a Block Ack");
1884 tEnd + sifs + tolerance,
1885 "Block Ack in HE TB PPDU sent too late");
1886 baNavEnd =
m_txPsdus[29].endTx +
m_txPsdus[29].psduMap.begin()->second->GetDuration();
1894 "Expected null Duration/ID for BlockAck");
1900 m_txPsdus[30].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
1902 "Expected a Block Ack");
1906 tEnd + sifs + tolerance,
1907 "Block Ack in HE TB PPDU sent too late");
1908 baNavEnd =
m_txPsdus[30].endTx +
m_txPsdus[30].psduMap.begin()->second->GetDuration();
1916 "Expected null Duration/ID for BlockAck");
1924 "Not all DL packets have been received");
1931 for (std::size_t i = nTxPsdus; i <
m_txPsdus.size(); ++i)
1934 !
m_txPsdus[i].psduMap.begin()->second->GetHeader(0).IsCts() &&
1935 m_txPsdus[i].psduMap.begin()->second->GetHeader(0).GetAddr2() !=
1943 "A station transmitted before the MU EDCA timer expired");
1955 "A station did not set the correct MU CW min");