806            "Expected a Trigger Frame");
 
  811                              "Expected one User Info field per station");
 
  814                              "Expected the MU-RTS to occupy the entire channel width");
 
  815        for (
const auto& userInfo : trigger)
 
  819                                  "Unexpected RU Allocation value in MU-RTS");
 
  826             m_txPsdus[1].psduMap.begin()->second->GetNMpdus() == 1 &&
 
  829            "Expected a CTS frame");
 
  832                              "Expected the CTS to occupy the entire channel width");
 
  842                              "Duration/ID in CTS frame is too long");
 
  848             m_txPsdus[2].psduMap.begin()->second->GetNMpdus() == 1 &&
 
  851            "Expected a CTS frame");
 
  854                              "Expected the CTS to occupy the entire channel width");
 
  864                              "Duration/ID in CTS frame is too long");
 
  870             m_txPsdus[3].psduMap.begin()->second->GetNMpdus() == 1 &&
 
  873            "Expected a CTS frame");
 
  876                              "Expected the CTS to occupy the entire channel width");
 
  886                              "Duration/ID in CTS frame is too long");
 
  892             m_txPsdus[4].psduMap.begin()->second->GetNMpdus() == 1 &&
 
  895            "Expected a CTS frame");
 
  898                              "Expected the CTS to occupy the entire channel width");
 
  908                              "Duration/ID in CTS frame is too long");
 
  923                          "Expected a Trigger Frame");
 
  928                          "Expected one User Info field per station");
 
  949                           m_txPsdus[6].psduMap.begin()->second->GetNMpdus() == 1),
 
  951                          "Expected a QoS Null frame in a TB PPDU");
 
  964        uint8_t tid = staId * 2;
 
  971                          tEnd + sifs + tolerance,
 
  972                          "QoS Null frame in HE TB PPDU sent too late");
 
  979                              "Expected null Duration/ID for QoS Null frame in HE TB PPDU");
 
  988                           m_txPsdus[7].psduMap.begin()->second->GetNMpdus() == 1),
 
  990                          "Expected a QoS Null frame in a TB PPDU");
 
 1003        uint8_t tid = staId * 2;
 
 1009                          tEnd + sifs + tolerance,
 
 1010                          "QoS Null frame in HE TB PPDU sent too late");
 
 1011    qosNullNavEnd = 
m_txPsdus[7].endTx + 
m_txPsdus[7].psduMap.begin()->second->GetDuration();
 
 1017                              "Expected null Duration/ID for QoS Null frame in HE TB PPDU");
 
 1026                           m_txPsdus[8].psduMap.begin()->second->GetNMpdus() == 1),
 
 1028                          "Expected a QoS Null frame in an HE TB PPDU");
 
 1041        uint8_t tid = staId * 2;
 
 1047                          tEnd + sifs + tolerance,
 
 1048                          "QoS Null frame in HE TB PPDU sent too late");
 
 1049    qosNullNavEnd = 
m_txPsdus[8].endTx + 
m_txPsdus[8].psduMap.begin()->second->GetDuration();
 
 1055                              "Expected null Duration/ID for QoS Null frame in HE TB PPDU");
 
 1064                           m_txPsdus[9].psduMap.begin()->second->GetNMpdus() == 1),
 
 1066                          "Expected a QoS Null frame in an HE TB PPDU");
 
 1079        uint8_t tid = staId * 2;
 
 1085                          tEnd + sifs + tolerance,
 
 1086                          "QoS Null frame in HE TB PPDU sent too late");
 
 1087    qosNullNavEnd = 
m_txPsdus[9].endTx + 
m_txPsdus[9].psduMap.begin()->second->GetDuration();
 
 1093                              "Expected null Duration/ID for QoS Null frame in HE TB PPDU");
 
 1109                          (secondMuRts ? 
"MU-RTS" : 
"Basic Trigger Frame") << 
" sent too early");
 
 1114                              tEnd + sifs + tolerance,
 
 1115                              (secondMuRts ? 
"MU-RTS" : 
"Basic Trigger Frame") << 
" sent too late");
 
 1126                              "Duration/ID in MU-RTS is too long");
 
 1139                                    "Expected at least 15 transmitted packet");
 
 1145            "Expected a Trigger Frame");
 
 1150                              "Expected one User Info field per station");
 
 1153                              "Expected the MU-RTS to occupy the entire channel width");
 
 1154        for (
const auto& userInfo : trigger)
 
 1158                                  "Unexpected RU Allocation value in MU-RTS");
 
 1169             m_txPsdus[11].psduMap.begin()->second->GetNMpdus() == 1 &&
 
 1172            "Expected a CTS frame");
 
 1175                              "Expected the CTS to occupy the entire channel width");
 
 1185                              "Duration/ID in CTS frame is too long");
 
 1191             m_txPsdus[12].psduMap.begin()->second->GetNMpdus() == 1 &&
 
 1194            "Expected a CTS frame");
 
 1197                              "Expected the CTS to occupy the entire channel width");
 
 1207                              "Duration/ID in CTS frame is too long");
 
 1213             m_txPsdus[13].psduMap.begin()->second->GetNMpdus() == 1 &&
 
 1216            "Expected a CTS frame");
 
 1219                              "Expected the CTS to occupy the entire channel width");
 
 1229                              "Duration/ID in CTS frame is too long");
 
 1235             m_txPsdus[14].psduMap.begin()->second->GetNMpdus() == 1 &&
 
 1238            "Expected a CTS frame");
 
 1241                              "Expected the CTS to occupy the entire channel width");
 
 1251                              "Duration/ID in CTS frame is too long");
 
 1269                          "Expected a Trigger Frame");
 
 1274                          "Expected one User Info field per station");
 
 1286                           m_txPsdus[16].psduMap.begin()->second->GetNMpdus() == 2 &&
 
 1287                           m_txPsdus[16].psduMap.begin()->second->GetHeader(0).IsQosData() &&
 
 1288                           m_txPsdus[16].psduMap.begin()->second->GetHeader(1).IsQosData()),
 
 1290                          "Expected 2 QoS data frames in an HE TB PPDU");
 
 1295                          tEnd + sifs + tolerance,
 
 1296                          "QoS data frames in HE TB PPDU sent too late");
 
 1305                           m_txPsdus[17].psduMap.begin()->second->GetNMpdus() == 2 &&
 
 1306                           m_txPsdus[17].psduMap.begin()->second->GetHeader(0).IsQosData() &&
 
 1307                           m_txPsdus[17].psduMap.begin()->second->GetHeader(1).IsQosData()),
 
 1309                          "Expected 2 QoS data frames in an HE TB PPDU");
 
 1313                          tEnd + sifs + tolerance,
 
 1314                          "QoS data frames in HE TB PPDU sent too late");
 
 1315    qosDataNavEnd = 
m_txPsdus[17].endTx + 
m_txPsdus[17].psduMap.begin()->second->GetDuration();
 
 1323                           m_txPsdus[18].psduMap.begin()->second->GetNMpdus() == 2 &&
 
 1324                           m_txPsdus[18].psduMap.begin()->second->GetHeader(0).IsQosData() &&
 
 1325                           m_txPsdus[18].psduMap.begin()->second->GetHeader(1).IsQosData()),
 
 1327                          "Expected 2 QoS data frames in an HE TB PPDU");
 
 1331                          tEnd + sifs + tolerance,
 
 1332                          "QoS data frames in HE TB PPDU sent too late");
 
 1333    qosDataNavEnd = 
m_txPsdus[18].endTx + 
m_txPsdus[18].psduMap.begin()->second->GetDuration();
 
 1341                           m_txPsdus[19].psduMap.begin()->second->GetNMpdus() == 2 &&
 
 1342                           m_txPsdus[19].psduMap.begin()->second->GetHeader(0).IsQosData() &&
 
 1343                           m_txPsdus[19].psduMap.begin()->second->GetHeader(1).IsQosData()),
 
 1345                          "Expected 2 QoS data frames in an HE TB PPDU");
 
 1349                          tEnd + sifs + tolerance,
 
 1350                          "QoS data frames in HE TB PPDU sent too late");
 
 1351    qosDataNavEnd = 
m_txPsdus[19].endTx + 
m_txPsdus[19].psduMap.begin()->second->GetDuration();
 
 1361                          "Expected a Block Ack");
 
 1366                          "Expected one Per AID TID Info subfield per station");
 
 1367    for (uint8_t i = 0; i < 4; i++)
 
 1380                                "Duration/ID in Multi-STA BlockAck is too short");
 
 1383                          "Duration/ID in Multi-STA BlockAck is too long");
 
 1392                                    "Expected at least 26 transmitted packet");
 
 1398            "Expected a Trigger Frame");
 
 1403                              "Expected one User Info field per station");
 
 1406                              "Expected the MU-RTS to occupy the entire channel width");
 
 1407        for (
const auto& userInfo : trigger)
 
 1411                                  "Unexpected RU Allocation value in MU-RTS");
 
 1423             m_txPsdus[22].psduMap.begin()->second->GetNMpdus() == 1 &&
 
 1426            "Expected a CTS frame");
 
 1429                              "Expected the CTS to occupy the entire channel width");
 
 1439                              "Duration/ID in CTS frame is too long");
 
 1445             m_txPsdus[23].psduMap.begin()->second->GetNMpdus() == 1 &&
 
 1448            "Expected a CTS frame");
 
 1451                              "Expected the CTS to occupy the entire channel width");
 
 1461                              "Duration/ID in CTS frame is too long");
 
 1467             m_txPsdus[24].psduMap.begin()->second->GetNMpdus() == 1 &&
 
 1470            "Expected a CTS frame");
 
 1473                              "Expected the CTS to occupy the entire channel width");
 
 1483                              "Duration/ID in CTS frame is too long");
 
 1489             m_txPsdus[25].psduMap.begin()->second->GetNMpdus() == 1 &&
 
 1492            "Expected a CTS frame");
 
 1495                              "Expected the CTS to occupy the entire channel width");
 
 1505                              "Duration/ID in CTS frame is too long");
 
 1521                          "Expected a DL MU PPDU");
 
 1524                          "Expected 4 PSDUs within the DL MU PPDU");
 
 1528                                "TX duration cannot exceed max PPDU duration");
 
 1529    for (
auto& psdu : 
m_txPsdus[26].psduMap)
 
 1533                                    "Max A-MPDU size exceeded");
 
 1541    for (
auto& psdu : 
m_txPsdus[26].psduMap)
 
 1545            dlMuNavEnd += psdu.second->GetDuration();
 
 1551                                  "Duration/ID must be the same for all PSDUs");
 
 1558    std::size_t nTxPsdus = 0;
 
 1590                              "Expected a Block Ack");
 
 1601                                    "Duration/ID in 1st BlockAck frame is too short");
 
 1604                              "Duration/ID in 1st BlockAck is too long");
 
 1610                              "Expected a Block Ack Request");
 
 1615                              tEnd + sifs + tolerance,
 
 1616                              "First Block Ack Request sent too late");
 
 1626                                        "Duration/ID in BlockAckReq is too short");
 
 1629                                  "Duration/ID in BlockAckReq is too long");
 
 1636                              "Expected a Block Ack");
 
 1648                                  "Duration/ID in BlockAck is too long");
 
 1655                                        "Duration/ID in BlockAck is too short");
 
 1657                                  barNavEnd + tolerance,
 
 1658                                  "Duration/ID in BlockAck is too long");
 
 1661                                  "Expected null Duration/ID for BlockAck");
 
 1668                              "Expected a Block Ack Request");
 
 1673                              tEnd + sifs + tolerance,
 
 1674                              "Second Block Ack Request sent too late");
 
 1684                                        "Duration/ID in BlockAckReq is too short");
 
 1687                                  "Duration/ID in BlockAckReq is too long");
 
 1694                              "Expected a Block Ack");
 
 1706                                  "Duration/ID in BlockAck is too long");
 
 1713                                        "Duration/ID in BlockAck is too short");
 
 1715                                  barNavEnd + tolerance,
 
 1716                                  "Duration/ID in BlockAck is too long");
 
 1719                                  "Expected null Duration/ID for BlockAck");
 
 1726                              "Expected a Block Ack Request");
 
 1731                              tEnd + sifs + tolerance,
 
 1732                              "Third Block Ack Request sent too late");
 
 1742                                        "Duration/ID in BlockAckReq is too short");
 
 1745                                  "Duration/ID in BlockAckReq is too long");
 
 1752                              "Expected a Block Ack");
 
 1764                                  "Duration/ID in BlockAck is too long");
 
 1771                                        "Duration/ID in BlockAck is too short");
 
 1773                                  barNavEnd + tolerance,
 
 1774                                  "Duration/ID in BlockAck is too long");
 
 1777                                  "Expected null Duration/ID for BlockAck");
 
 1807                              "Expected a MU-BAR Trigger Frame");
 
 1815                                    "Duration/ID in MU-BAR Trigger Frame is too short");
 
 1818                              "Duration/ID in MU-BAR Trigger Frame is too long");
 
 1823                               m_txPsdus[28].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
 
 1825                              "Expected a Block Ack");
 
 1830                              tEnd + sifs + tolerance,
 
 1831                              "Block Ack in HE TB PPDU sent too late");
 
 1840                                  "Expected null Duration/ID for BlockAck");
 
 1846                               m_txPsdus[29].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[29].endTx + 
m_txPsdus[29].psduMap.begin()->second->GetDuration();
 
 1859                              "Duration/ID in 1st BlockAck is too long");
 
 1864                                  "Expected null Duration/ID for BlockAck");
 
 1870                               m_txPsdus[30].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
 
 1872                              "Expected a Block Ack");
 
 1876                              tEnd + sifs + tolerance,
 
 1877                              "Block Ack in HE TB PPDU sent too late");
 
 1878        baNavEnd = 
m_txPsdus[30].endTx + 
m_txPsdus[30].psduMap.begin()->second->GetDuration();
 
 1883                              "Duration/ID in 1st BlockAck is too long");
 
 1888                                  "Expected null Duration/ID for BlockAck");
 
 1894                               m_txPsdus[31].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
 
 1896                              "Expected a Block Ack");
 
 1900                              tEnd + sifs + tolerance,
 
 1901                              "Block Ack in HE TB PPDU sent too late");
 
 1902        baNavEnd = 
m_txPsdus[31].endTx + 
m_txPsdus[31].psduMap.begin()->second->GetDuration();
 
 1907                              "Duration/ID in 1st BlockAck is too long");
 
 1912                                  "Expected null Duration/ID for BlockAck");
 
 1938        for (
auto& psdu : 
m_txPsdus[26].psduMap)
 
 1942                                  "Expected an aggregated MU-BAR Trigger Frame");
 
 1948                               m_txPsdus[27].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
 
 1950                              "Expected a Block Ack");
 
 1955                              tEnd + sifs + tolerance,
 
 1956                              "Block Ack in HE TB PPDU sent too late");
 
 1965                                  "Expected null Duration/ID for BlockAck");
 
 1971                               m_txPsdus[28].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
 
 1973                              "Expected a Block Ack");
 
 1977                              tEnd + sifs + tolerance,
 
 1978                              "Block Ack in HE TB PPDU sent too late");
 
 1979        baNavEnd = 
m_txPsdus[28].endTx + 
m_txPsdus[28].psduMap.begin()->second->GetDuration();
 
 1987                                  "Expected null Duration/ID for BlockAck");
 
 1993                               m_txPsdus[29].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
 
 1995                              "Expected a Block Ack");
 
 1999                              tEnd + sifs + tolerance,
 
 2000                              "Block Ack in HE TB PPDU sent too late");
 
 2001        baNavEnd = 
m_txPsdus[29].endTx + 
m_txPsdus[29].psduMap.begin()->second->GetDuration();
 
 2009                                  "Expected null Duration/ID for BlockAck");
 
 2015                               m_txPsdus[30].psduMap.begin()->second->GetHeader(0).IsBlockAck()),
 
 2017                              "Expected a Block Ack");
 
 2021                              tEnd + sifs + tolerance,
 
 2022                              "Block Ack in HE TB PPDU sent too late");
 
 2023        baNavEnd = 
m_txPsdus[30].endTx + 
m_txPsdus[30].psduMap.begin()->second->GetDuration();
 
 2031                                  "Expected null Duration/ID for BlockAck");
 
 2039                          "Not all DL packets have been received");
 
 2046        for (std::size_t i = nTxPsdus; i < 
m_txPsdus.size(); ++i)
 
 2049                !
m_txPsdus[i].psduMap.begin()->second->GetHeader(0).IsCts() &&
 
 2050                m_txPsdus[i].psduMap.begin()->second->GetHeader(0).GetAddr2() !=
 
 2058                    "A station transmitted before the MU EDCA timer expired");
 
 2070                                  "A station did not set the correct MU CW min");