807 "Expected a Trigger Frame");
812 "Expected one User Info field per station");
815 "Expected the MU-RTS to occupy the entire channel width");
816 for (
const auto& userInfo : trigger)
820 "Unexpected RU Allocation value in MU-RTS");
827 m_txPsdus[1].psduMap.begin()->second->GetNMpdus() == 1 &&
830 "Expected a CTS frame");
833 "Expected the CTS to occupy the entire channel width");
843 "Duration/ID in CTS frame is too long");
849 m_txPsdus[2].psduMap.begin()->second->GetNMpdus() == 1 &&
852 "Expected a CTS frame");
855 "Expected the CTS to occupy the entire channel width");
865 "Duration/ID in CTS frame is too long");
871 m_txPsdus[3].psduMap.begin()->second->GetNMpdus() == 1 &&
874 "Expected a CTS frame");
877 "Expected the CTS to occupy the entire channel width");
887 "Duration/ID in CTS frame is too long");
893 m_txPsdus[4].psduMap.begin()->second->GetNMpdus() == 1 &&
896 "Expected a CTS frame");
899 "Expected the CTS to occupy the entire channel width");
909 "Duration/ID in CTS frame is too long");
924 "Expected a Trigger Frame");
929 "Expected one User Info field per station");
950 m_txPsdus[6].psduMap.begin()->second->GetNMpdus() == 1),
952 "Expected a QoS Null frame in a TB PPDU");
965 uint8_t tid = staId * 2;
972 tEnd + sifs + tolerance,
973 "QoS Null frame in HE TB PPDU sent too late");
980 "Expected null Duration/ID for QoS Null frame in HE TB PPDU");
989 m_txPsdus[7].psduMap.begin()->second->GetNMpdus() == 1),
991 "Expected a QoS Null frame in a TB PPDU");
1004 uint8_t tid = staId * 2;
1010 tEnd + sifs + tolerance,
1011 "QoS Null frame in HE TB PPDU sent too late");
1012 qosNullNavEnd =
m_txPsdus[7].endTx +
m_txPsdus[7].psduMap.begin()->second->GetDuration();
1018 "Expected null Duration/ID for QoS Null frame in HE TB PPDU");
1027 m_txPsdus[8].psduMap.begin()->second->GetNMpdus() == 1),
1029 "Expected a QoS Null frame in an HE TB PPDU");
1042 uint8_t tid = staId * 2;
1048 tEnd + sifs + tolerance,
1049 "QoS Null frame in HE TB PPDU sent too late");
1050 qosNullNavEnd =
m_txPsdus[8].endTx +
m_txPsdus[8].psduMap.begin()->second->GetDuration();
1056 "Expected null Duration/ID for QoS Null frame in HE TB PPDU");
1065 m_txPsdus[9].psduMap.begin()->second->GetNMpdus() == 1),
1067 "Expected a QoS Null frame in an HE TB PPDU");
1080 uint8_t tid = staId * 2;
1086 tEnd + sifs + tolerance,
1087 "QoS Null frame in HE TB PPDU sent too late");
1088 qosNullNavEnd =
m_txPsdus[9].endTx +
m_txPsdus[9].psduMap.begin()->second->GetDuration();
1094 "Expected null Duration/ID for QoS Null frame in HE TB PPDU");
1110 (secondMuRts ?
"MU-RTS" :
"Basic Trigger Frame") <<
" sent too early");
1115 tEnd + sifs + tolerance,
1116 (secondMuRts ?
"MU-RTS" :
"Basic Trigger Frame") <<
" sent too late");
1127 "Duration/ID in MU-RTS is too long");
1140 "Expected at least 15 transmitted packet");
1146 "Expected a Trigger Frame");
1151 "Expected one User Info field per station");
1154 "Expected the MU-RTS to occupy the entire channel width");
1155 for (
const auto& userInfo : trigger)
1159 "Unexpected RU Allocation value in MU-RTS");
1170 m_txPsdus[11].psduMap.begin()->second->GetNMpdus() == 1 &&
1173 "Expected a CTS frame");
1176 "Expected the CTS to occupy the entire channel width");
1186 "Duration/ID in CTS frame is too long");
1192 m_txPsdus[12].psduMap.begin()->second->GetNMpdus() == 1 &&
1195 "Expected a CTS frame");
1198 "Expected the CTS to occupy the entire channel width");
1208 "Duration/ID in CTS frame is too long");
1214 m_txPsdus[13].psduMap.begin()->second->GetNMpdus() == 1 &&
1217 "Expected a CTS frame");
1220 "Expected the CTS to occupy the entire channel width");
1230 "Duration/ID in CTS frame is too long");
1236 m_txPsdus[14].psduMap.begin()->second->GetNMpdus() == 1 &&
1239 "Expected a CTS frame");
1242 "Expected the CTS to occupy the entire channel width");
1252 "Duration/ID in CTS frame is too long");
1270 "Expected a Trigger Frame");
1275 "Expected one User Info field per station");
1287 m_txPsdus[16].psduMap.begin()->second->GetNMpdus() == 2 &&
1288 m_txPsdus[16].psduMap.begin()->second->GetHeader(0).IsQosData() &&
1289 m_txPsdus[16].psduMap.begin()->second->GetHeader(1).IsQosData()),
1291 "Expected 2 QoS data frames in an HE TB PPDU");
1296 tEnd + sifs + tolerance,
1297 "QoS data frames in HE TB PPDU sent too late");
1306 m_txPsdus[17].psduMap.begin()->second->GetNMpdus() == 2 &&
1307 m_txPsdus[17].psduMap.begin()->second->GetHeader(0).IsQosData() &&
1308 m_txPsdus[17].psduMap.begin()->second->GetHeader(1).IsQosData()),
1310 "Expected 2 QoS data frames in an HE TB PPDU");
1314 tEnd + sifs + tolerance,
1315 "QoS data frames in HE TB PPDU sent too late");
1316 qosDataNavEnd =
m_txPsdus[17].endTx +
m_txPsdus[17].psduMap.begin()->second->GetDuration();
1324 m_txPsdus[18].psduMap.begin()->second->GetNMpdus() == 2 &&
1325 m_txPsdus[18].psduMap.begin()->second->GetHeader(0).IsQosData() &&
1326 m_txPsdus[18].psduMap.begin()->second->GetHeader(1).IsQosData()),
1328 "Expected 2 QoS data frames in an HE TB PPDU");
1332 tEnd + sifs + tolerance,
1333 "QoS data frames in HE TB PPDU sent too late");
1334 qosDataNavEnd =
m_txPsdus[18].endTx +
m_txPsdus[18].psduMap.begin()->second->GetDuration();
1342 m_txPsdus[19].psduMap.begin()->second->GetNMpdus() == 2 &&
1343 m_txPsdus[19].psduMap.begin()->second->GetHeader(0).IsQosData() &&
1344 m_txPsdus[19].psduMap.begin()->second->GetHeader(1).IsQosData()),
1346 "Expected 2 QoS data frames in an HE TB PPDU");
1350 tEnd + sifs + tolerance,
1351 "QoS data frames in HE TB PPDU sent too late");
1352 qosDataNavEnd =
m_txPsdus[19].endTx +
m_txPsdus[19].psduMap.begin()->second->GetDuration();
1362 "Expected a Block Ack");
1367 "Expected one Per AID TID Info subfield per station");
1368 for (uint8_t i = 0; i < 4; i++)
1381 "Duration/ID in Multi-STA BlockAck is too short");
1384 "Duration/ID in Multi-STA BlockAck is too long");
1393 "Expected at least 26 transmitted packet");
1399 "Expected a Trigger Frame");
1404 "Expected one User Info field per station");
1407 "Expected the MU-RTS to occupy the entire channel width");
1408 for (
const auto& userInfo : trigger)
1412 "Unexpected RU Allocation value in MU-RTS");
1424 m_txPsdus[22].psduMap.begin()->second->GetNMpdus() == 1 &&
1427 "Expected a CTS frame");
1430 "Expected the CTS to occupy the entire channel width");
1440 "Duration/ID in CTS frame is too long");
1446 m_txPsdus[23].psduMap.begin()->second->GetNMpdus() == 1 &&
1449 "Expected a CTS frame");
1452 "Expected the CTS to occupy the entire channel width");
1462 "Duration/ID in CTS frame is too long");
1468 m_txPsdus[24].psduMap.begin()->second->GetNMpdus() == 1 &&
1471 "Expected a CTS frame");
1474 "Expected the CTS to occupy the entire channel width");
1484 "Duration/ID in CTS frame is too long");
1490 m_txPsdus[25].psduMap.begin()->second->GetNMpdus() == 1 &&
1493 "Expected a CTS frame");
1496 "Expected the CTS to occupy the entire channel width");
1506 "Duration/ID in CTS frame is too long");
1522 "Expected a DL MU PPDU");
1525 "Expected 4 PSDUs within the DL MU PPDU");
1529 "TX duration cannot exceed max PPDU duration");
1530 for (
auto& psdu :
m_txPsdus[26].psduMap)
1534 "Max A-MPDU size exceeded");
1542 for (
auto& psdu :
m_txPsdus[26].psduMap)
1546 dlMuNavEnd += psdu.second->GetDuration();
1552 "Duration/ID must be the same for all PSDUs");
1559 std::size_t nTxPsdus = 0;
1591 "Expected a Block Ack");
1602 "Duration/ID in 1st BlockAck frame is too short");
1605 "Duration/ID in 1st BlockAck is too long");
1611 "Expected a Block Ack Request");
1616 tEnd + sifs + tolerance,
1617 "First 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");
1669 "Expected a Block Ack Request");
1674 tEnd + sifs + tolerance,
1675 "Second Block Ack Request sent too late");
1685 "Duration/ID in BlockAckReq is too short");
1688 "Duration/ID in BlockAckReq is too long");
1695 "Expected a Block Ack");
1707 "Duration/ID in BlockAck is too long");
1714 "Duration/ID in BlockAck is too short");
1716 barNavEnd + tolerance,
1717 "Duration/ID in BlockAck is too long");
1720 "Expected null Duration/ID for BlockAck");
1727 "Expected a Block Ack Request");
1732 tEnd + sifs + tolerance,
1733 "Third Block Ack Request sent too late");
1743 "Duration/ID in BlockAckReq is too short");
1746 "Duration/ID in BlockAckReq is too long");
1753 "Expected a Block Ack");
1765 "Duration/ID in BlockAck is too long");
1772 "Duration/ID in BlockAck is too short");
1774 barNavEnd + tolerance,
1775 "Duration/ID in BlockAck is too long");
1778 "Expected null Duration/ID for BlockAck");
1808 "Expected a MU-BAR Trigger Frame");
1816 "Duration/ID in MU-BAR Trigger Frame is too short");
1819 "Duration/ID in MU-BAR Trigger Frame is too long");
1824 m_txPsdus[28].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
1826 "Expected a Block Ack");
1831 tEnd + sifs + tolerance,
1832 "Block Ack in HE TB PPDU sent too late");
1841 "Expected null Duration/ID for BlockAck");
1847 m_txPsdus[29].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
1849 "Expected a Block Ack");
1853 tEnd + sifs + tolerance,
1854 "Block Ack in HE TB PPDU sent too late");
1855 baNavEnd =
m_txPsdus[29].endTx +
m_txPsdus[29].psduMap.begin()->second->GetDuration();
1860 "Duration/ID in 1st BlockAck is too long");
1865 "Expected null Duration/ID for BlockAck");
1871 m_txPsdus[30].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
1873 "Expected a Block Ack");
1877 tEnd + sifs + tolerance,
1878 "Block Ack in HE TB PPDU sent too late");
1879 baNavEnd =
m_txPsdus[30].endTx +
m_txPsdus[30].psduMap.begin()->second->GetDuration();
1884 "Duration/ID in 1st BlockAck is too long");
1889 "Expected null Duration/ID for BlockAck");
1895 m_txPsdus[31].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
1897 "Expected a Block Ack");
1901 tEnd + sifs + tolerance,
1902 "Block Ack in HE TB PPDU sent too late");
1903 baNavEnd =
m_txPsdus[31].endTx +
m_txPsdus[31].psduMap.begin()->second->GetDuration();
1908 "Duration/ID in 1st BlockAck is too long");
1913 "Expected null Duration/ID for BlockAck");
1939 for (
auto& psdu :
m_txPsdus[26].psduMap)
1943 "Expected an aggregated MU-BAR Trigger Frame");
1949 m_txPsdus[27].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
1951 "Expected a Block Ack");
1956 tEnd + sifs + tolerance,
1957 "Block Ack in HE TB PPDU sent too late");
1966 "Expected null Duration/ID for BlockAck");
1972 m_txPsdus[28].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
1974 "Expected a Block Ack");
1978 tEnd + sifs + tolerance,
1979 "Block Ack in HE TB PPDU sent too late");
1980 baNavEnd =
m_txPsdus[28].endTx +
m_txPsdus[28].psduMap.begin()->second->GetDuration();
1988 "Expected null Duration/ID for BlockAck");
1994 m_txPsdus[29].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
1996 "Expected a Block Ack");
2000 tEnd + sifs + tolerance,
2001 "Block Ack in HE TB PPDU sent too late");
2002 baNavEnd =
m_txPsdus[29].endTx +
m_txPsdus[29].psduMap.begin()->second->GetDuration();
2010 "Expected null Duration/ID for BlockAck");
2016 m_txPsdus[30].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
2018 "Expected a Block Ack");
2022 tEnd + sifs + tolerance,
2023 "Block Ack in HE TB PPDU sent too late");
2024 baNavEnd =
m_txPsdus[30].endTx +
m_txPsdus[30].psduMap.begin()->second->GetDuration();
2032 "Expected null Duration/ID for BlockAck");
2040 "Not all DL packets have been received");
2047 for (std::size_t i = nTxPsdus; i <
m_txPsdus.size(); ++i)
2050 !
m_txPsdus[i].psduMap.begin()->second->GetHeader(0).IsCts() &&
2051 m_txPsdus[i].psduMap.begin()->second->GetHeader(0).GetAddr2() !=
2059 "A station transmitted before the MU EDCA timer expired");
2071 "A station did not set the correct MU CW min");