758 "Expected a Trigger Frame");
763 "Expected one User Info field per station");
766 "Expected the MU-RTS to occupy the entire channel width");
767 for (
const auto& userInfo : trigger)
771 "Unexpected RU Allocation value in MU-RTS");
778 m_txPsdus[1].psduMap.begin()->second->GetNMpdus() == 1 &&
781 "Expected a CTS frame");
784 "Expected the CTS to occupy the entire channel width");
794 "Duration/ID in CTS frame is too long");
800 m_txPsdus[2].psduMap.begin()->second->GetNMpdus() == 1 &&
803 "Expected a CTS frame");
806 "Expected the CTS to occupy the entire channel width");
816 "Duration/ID in CTS frame is too long");
822 m_txPsdus[3].psduMap.begin()->second->GetNMpdus() == 1 &&
825 "Expected a CTS frame");
828 "Expected the CTS to occupy the entire channel width");
838 "Duration/ID in CTS frame is too long");
844 m_txPsdus[4].psduMap.begin()->second->GetNMpdus() == 1 &&
847 "Expected a CTS frame");
850 "Expected the CTS to occupy the entire channel width");
860 "Duration/ID in CTS frame is too long");
875 "Expected a Trigger Frame");
880 "Expected one User Info field per station");
901 m_txPsdus[6].psduMap.begin()->second->GetNMpdus() == 1),
903 "Expected a QoS Null frame in a TB PPDU");
916 uint8_t tid = staId * 2;
923 tEnd + sifs + tolerance,
924 "QoS Null frame in HE TB PPDU sent too late");
931 "Expected null Duration/ID for QoS Null frame in HE TB PPDU");
940 m_txPsdus[7].psduMap.begin()->second->GetNMpdus() == 1),
942 "Expected a QoS Null frame in a TB PPDU");
955 uint8_t tid = staId * 2;
961 tEnd + sifs + tolerance,
962 "QoS Null frame in HE TB PPDU sent too late");
963 qosNullNavEnd =
m_txPsdus[7].endTx +
m_txPsdus[7].psduMap.begin()->second->GetDuration();
969 "Expected null Duration/ID for QoS Null frame in HE TB PPDU");
978 m_txPsdus[8].psduMap.begin()->second->GetNMpdus() == 1),
980 "Expected a QoS Null frame in an HE TB PPDU");
993 uint8_t tid = staId * 2;
999 tEnd + sifs + tolerance,
1000 "QoS Null frame in HE TB PPDU sent too late");
1001 qosNullNavEnd =
m_txPsdus[8].endTx +
m_txPsdus[8].psduMap.begin()->second->GetDuration();
1007 "Expected null Duration/ID for QoS Null frame in HE TB PPDU");
1016 m_txPsdus[9].psduMap.begin()->second->GetNMpdus() == 1),
1018 "Expected a QoS Null frame in an HE TB PPDU");
1031 uint8_t tid = staId * 2;
1037 tEnd + sifs + tolerance,
1038 "QoS Null frame in HE TB PPDU sent too late");
1039 qosNullNavEnd =
m_txPsdus[9].endTx +
m_txPsdus[9].psduMap.begin()->second->GetDuration();
1045 "Expected null Duration/ID for QoS Null frame in HE TB PPDU");
1061 (secondMuRts ?
"MU-RTS" :
"Basic Trigger Frame") <<
" sent too early");
1066 tEnd + sifs + tolerance,
1067 (secondMuRts ?
"MU-RTS" :
"Basic Trigger Frame") <<
" sent too late");
1078 "Duration/ID in MU-RTS is too long");
1091 "Expected at least 15 transmitted packet");
1097 "Expected a Trigger Frame");
1102 "Expected one User Info field per station");
1105 "Expected the MU-RTS to occupy the entire channel width");
1106 for (
const auto& userInfo : trigger)
1110 "Unexpected RU Allocation value in MU-RTS");
1121 m_txPsdus[11].psduMap.begin()->second->GetNMpdus() == 1 &&
1124 "Expected a CTS frame");
1127 "Expected the CTS to occupy the entire channel width");
1137 "Duration/ID in CTS frame is too long");
1143 m_txPsdus[12].psduMap.begin()->second->GetNMpdus() == 1 &&
1146 "Expected a CTS frame");
1149 "Expected the CTS to occupy the entire channel width");
1159 "Duration/ID in CTS frame is too long");
1165 m_txPsdus[13].psduMap.begin()->second->GetNMpdus() == 1 &&
1168 "Expected a CTS frame");
1171 "Expected the CTS to occupy the entire channel width");
1181 "Duration/ID in CTS frame is too long");
1187 m_txPsdus[14].psduMap.begin()->second->GetNMpdus() == 1 &&
1190 "Expected a CTS frame");
1193 "Expected the CTS to occupy the entire channel width");
1203 "Duration/ID in CTS frame is too long");
1221 "Expected a Trigger Frame");
1226 "Expected one User Info field per station");
1238 m_txPsdus[16].psduMap.begin()->second->GetNMpdus() == 2 &&
1239 m_txPsdus[16].psduMap.begin()->second->GetHeader(0).IsQosData() &&
1240 m_txPsdus[16].psduMap.begin()->second->GetHeader(1).IsQosData()),
1242 "Expected 2 QoS data frames in an HE TB PPDU");
1247 tEnd + sifs + tolerance,
1248 "QoS data frames in HE TB PPDU sent too late");
1257 m_txPsdus[17].psduMap.begin()->second->GetNMpdus() == 2 &&
1258 m_txPsdus[17].psduMap.begin()->second->GetHeader(0).IsQosData() &&
1259 m_txPsdus[17].psduMap.begin()->second->GetHeader(1).IsQosData()),
1261 "Expected 2 QoS data frames in an HE TB PPDU");
1265 tEnd + sifs + tolerance,
1266 "QoS data frames in HE TB PPDU sent too late");
1267 qosDataNavEnd =
m_txPsdus[17].endTx +
m_txPsdus[17].psduMap.begin()->second->GetDuration();
1275 m_txPsdus[18].psduMap.begin()->second->GetNMpdus() == 2 &&
1276 m_txPsdus[18].psduMap.begin()->second->GetHeader(0).IsQosData() &&
1277 m_txPsdus[18].psduMap.begin()->second->GetHeader(1).IsQosData()),
1279 "Expected 2 QoS data frames in an HE TB PPDU");
1283 tEnd + sifs + tolerance,
1284 "QoS data frames in HE TB PPDU sent too late");
1285 qosDataNavEnd =
m_txPsdus[18].endTx +
m_txPsdus[18].psduMap.begin()->second->GetDuration();
1293 m_txPsdus[19].psduMap.begin()->second->GetNMpdus() == 2 &&
1294 m_txPsdus[19].psduMap.begin()->second->GetHeader(0).IsQosData() &&
1295 m_txPsdus[19].psduMap.begin()->second->GetHeader(1).IsQosData()),
1297 "Expected 2 QoS data frames in an HE TB PPDU");
1301 tEnd + sifs + tolerance,
1302 "QoS data frames in HE TB PPDU sent too late");
1303 qosDataNavEnd =
m_txPsdus[19].endTx +
m_txPsdus[19].psduMap.begin()->second->GetDuration();
1313 "Expected a Block Ack");
1318 "Expected one Per AID TID Info subfield per station");
1319 for (uint8_t i = 0; i < 4; i++)
1332 "Duration/ID in Multi-STA BlockAck is too short");
1335 "Duration/ID in Multi-STA BlockAck is too long");
1344 "Expected at least 26 transmitted packet");
1350 "Expected a Trigger Frame");
1355 "Expected one User Info field per station");
1358 "Expected the MU-RTS to occupy the entire channel width");
1359 for (
const auto& userInfo : trigger)
1363 "Unexpected RU Allocation value in MU-RTS");
1375 m_txPsdus[22].psduMap.begin()->second->GetNMpdus() == 1 &&
1378 "Expected a CTS frame");
1381 "Expected the CTS to occupy the entire channel width");
1391 "Duration/ID in CTS frame is too long");
1397 m_txPsdus[23].psduMap.begin()->second->GetNMpdus() == 1 &&
1400 "Expected a CTS frame");
1403 "Expected the CTS to occupy the entire channel width");
1413 "Duration/ID in CTS frame is too long");
1419 m_txPsdus[24].psduMap.begin()->second->GetNMpdus() == 1 &&
1422 "Expected a CTS frame");
1425 "Expected the CTS to occupy the entire channel width");
1435 "Duration/ID in CTS frame is too long");
1441 m_txPsdus[25].psduMap.begin()->second->GetNMpdus() == 1 &&
1444 "Expected a CTS frame");
1447 "Expected the CTS to occupy the entire channel width");
1457 "Duration/ID in CTS frame is too long");
1473 "Expected a DL MU PPDU");
1476 "Expected 4 PSDUs within the DL MU PPDU");
1480 "TX duration cannot exceed max PPDU duration");
1481 for (
auto& psdu :
m_txPsdus[26].psduMap)
1485 "Max A-MPDU size exceeded");
1493 for (
auto& psdu :
m_txPsdus[26].psduMap)
1497 dlMuNavEnd += psdu.second->GetDuration();
1503 "Duration/ID must be the same for all PSDUs");
1510 std::size_t nTxPsdus = 0;
1542 "Expected a Block Ack");
1553 "Duration/ID in 1st BlockAck frame is too short");
1556 "Duration/ID in 1st BlockAck is too long");
1562 "Expected a Block Ack Request");
1567 tEnd + sifs + tolerance,
1568 "First Block Ack Request sent too late");
1578 "Duration/ID in BlockAckReq is too short");
1581 "Duration/ID in BlockAckReq is too long");
1588 "Expected a Block Ack");
1600 "Duration/ID in BlockAck is too long");
1607 "Duration/ID in BlockAck is too short");
1609 barNavEnd + tolerance,
1610 "Duration/ID in BlockAck is too long");
1613 "Expected null Duration/ID for BlockAck");
1620 "Expected a Block Ack Request");
1625 tEnd + sifs + tolerance,
1626 "Second Block Ack Request sent too late");
1636 "Duration/ID in BlockAckReq is too short");
1639 "Duration/ID in BlockAckReq is too long");
1646 "Expected a Block Ack");
1658 "Duration/ID in BlockAck is too long");
1665 "Duration/ID in BlockAck is too short");
1667 barNavEnd + tolerance,
1668 "Duration/ID in BlockAck is too long");
1671 "Expected null Duration/ID for BlockAck");
1678 "Expected a Block Ack Request");
1683 tEnd + sifs + tolerance,
1684 "Third Block Ack Request sent too late");
1694 "Duration/ID in BlockAckReq is too short");
1697 "Duration/ID in BlockAckReq is too long");
1704 "Expected a Block Ack");
1716 "Duration/ID in BlockAck is too long");
1723 "Duration/ID in BlockAck is too short");
1725 barNavEnd + tolerance,
1726 "Duration/ID in BlockAck is too long");
1729 "Expected null Duration/ID for BlockAck");
1759 "Expected a MU-BAR Trigger Frame");
1767 "Duration/ID in MU-BAR Trigger Frame is too short");
1770 "Duration/ID in MU-BAR Trigger Frame is too long");
1775 m_txPsdus[28].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
1777 "Expected a Block Ack");
1782 tEnd + sifs + tolerance,
1783 "Block Ack in HE TB PPDU sent too late");
1792 "Expected null Duration/ID for BlockAck");
1798 m_txPsdus[29].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
1800 "Expected a Block Ack");
1804 tEnd + sifs + tolerance,
1805 "Block Ack in HE TB PPDU sent too late");
1806 baNavEnd =
m_txPsdus[29].endTx +
m_txPsdus[29].psduMap.begin()->second->GetDuration();
1811 "Duration/ID in 1st BlockAck is too long");
1816 "Expected null Duration/ID for BlockAck");
1822 m_txPsdus[30].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
1824 "Expected a Block Ack");
1828 tEnd + sifs + tolerance,
1829 "Block Ack in HE TB PPDU sent too late");
1830 baNavEnd =
m_txPsdus[30].endTx +
m_txPsdus[30].psduMap.begin()->second->GetDuration();
1835 "Duration/ID in 1st BlockAck is too long");
1840 "Expected null Duration/ID for BlockAck");
1846 m_txPsdus[31].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
1848 "Expected a Block Ack");
1852 tEnd + sifs + tolerance,
1853 "Block Ack in HE TB PPDU sent too late");
1854 baNavEnd =
m_txPsdus[31].endTx +
m_txPsdus[31].psduMap.begin()->second->GetDuration();
1859 "Duration/ID in 1st BlockAck is too long");
1864 "Expected null Duration/ID for BlockAck");
1890 for (
auto& psdu :
m_txPsdus[26].psduMap)
1894 "Expected an aggregated MU-BAR Trigger Frame");
1900 m_txPsdus[27].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
1902 "Expected a Block Ack");
1907 tEnd + sifs + tolerance,
1908 "Block Ack in HE TB PPDU sent too late");
1917 "Expected null Duration/ID for BlockAck");
1923 m_txPsdus[28].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
1925 "Expected a Block Ack");
1929 tEnd + sifs + tolerance,
1930 "Block Ack in HE TB PPDU sent too late");
1931 baNavEnd =
m_txPsdus[28].endTx +
m_txPsdus[28].psduMap.begin()->second->GetDuration();
1939 "Expected null Duration/ID for BlockAck");
1945 m_txPsdus[29].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
1947 "Expected a Block Ack");
1951 tEnd + sifs + tolerance,
1952 "Block Ack in HE TB PPDU sent too late");
1953 baNavEnd =
m_txPsdus[29].endTx +
m_txPsdus[29].psduMap.begin()->second->GetDuration();
1961 "Expected null Duration/ID for BlockAck");
1967 m_txPsdus[30].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
1969 "Expected a Block Ack");
1973 tEnd + sifs + tolerance,
1974 "Block Ack in HE TB PPDU sent too late");
1975 baNavEnd =
m_txPsdus[30].endTx +
m_txPsdus[30].psduMap.begin()->second->GetDuration();
1983 "Expected null Duration/ID for BlockAck");
1991 "Not all DL packets have been received");
1998 for (std::size_t i = nTxPsdus; i <
m_txPsdus.size(); ++i)
2001 !
m_txPsdus[i].psduMap.begin()->second->GetHeader(0).IsCts() &&
2002 m_txPsdus[i].psduMap.begin()->second->GetHeader(0).GetAddr2() !=
2010 "A station transmitted before the MU EDCA timer expired");
2022 "A station did not set the correct MU CW min");