9#include "ns3/ap-wifi-mac.h"
10#include "ns3/attribute-container.h"
11#include "ns3/boolean.h"
12#include "ns3/config.h"
13#include "ns3/ctrl-headers.h"
14#include "ns3/double.h"
15#include "ns3/frame-exchange-manager.h"
16#include "ns3/mac-rx-middle.h"
17#include "ns3/mobility-helper.h"
18#include "ns3/multi-model-spectrum-channel.h"
19#include "ns3/originator-block-ack-agreement.h"
20#include "ns3/packet-socket-client.h"
21#include "ns3/packet-socket-helper.h"
22#include "ns3/packet-socket-server.h"
23#include "ns3/packet.h"
24#include "ns3/pointer.h"
25#include "ns3/qos-txop.h"
26#include "ns3/qos-utils.h"
27#include "ns3/recipient-block-ack-agreement.h"
28#include "ns3/spectrum-wifi-helper.h"
29#include "ns3/string.h"
31#include "ns3/wifi-default-ack-manager.h"
32#include "ns3/wifi-mac-header.h"
33#include "ns3/wifi-mac-queue.h"
34#include "ns3/wifi-mpdu.h"
35#include "ns3/wifi-net-device.h"
36#include "ns3/wifi-phy.h"
37#include "ns3/yans-wifi-helper.h"
89 void DoRun()
override;
94 :
TestCase(
"Check correct order of buffering when startSequence < endSeq")
110 std::list<uint16_t> m_buffer;
111 std::list<uint16_t>::iterator
i;
112 std::list<uint16_t>::iterator
j;
113 m_buffer.push_back(0);
114 m_buffer.push_back(16);
115 m_buffer.push_back(56000);
122 for (
i = m_buffer.begin();
i != m_buffer.end();
i++)
135 for (
i = m_buffer.begin();
i != m_buffer.end();
i++)
187 void DoRun()
override;
192 :
TestCase(
"Check correct order of buffering when startSequence > endSeq")
209 std::list<uint16_t> m_buffer;
210 std::list<uint16_t>::iterator
i;
211 std::list<uint16_t>::iterator
j;
212 m_buffer.push_back(256);
213 m_buffer.push_back(64000);
214 m_buffer.push_back(16);
221 for (
i = m_buffer.begin();
i != m_buffer.end();
i++)
234 for (
i = m_buffer.begin();
i != m_buffer.end();
i++)
247 for (
i = m_buffer.begin();
i != m_buffer.end();
i++)
275 void DoRun()
override;
279 :
TestCase(
"Check the correctness of the originator block ack window")
301 "Not all flags are cleared after initialization");
309 mpdu->GetHeader().SetSequenceNumber(
seqNumber);
334 "Incorrect starting sequence after 5 acknowledgments");
339 "Not all flags are cleared after 5 acknowledgments");
366 "Incorrect starting sequence after 1 unacknowledged MPDU");
369 "Incorrect flag after 1 unacknowledged MPDU");
372 "Incorrect flag after 1 unacknowledged MPDU");
375 "Incorrect flag after 1 unacknowledged MPDU");
378 "Incorrect flag after 1 unacknowledged MPDU");
381 "Incorrect flag after 1 unacknowledged MPDU");
386 "Incorrect flag after 1 unacknowledged MPDU");
404 "Incorrect starting sequence after acknowledgment of missing MPDU");
409 "Not all flags are cleared after acknowledgment of missing MPDU");
415 mpdu->GetHeader().SetSequenceNumber(
seqNumber);
428 mpdu->GetHeader().SetSequenceNumber(
seqNumber);
446 "Incorrect starting sequence after 3 unacknowledged MPDUs");
449 "Incorrect flag after 3 unacknowledged MPDUs");
452 "Incorrect flag after 3 unacknowledged MPDUs");
455 "Incorrect flag after 3 unacknowledged MPDUs");
458 "Incorrect flag after 3 unacknowledged MPDUs");
461 "Incorrect flag after 3 unacknowledged MPDUs");
464 "Incorrect flag after 3 unacknowledged MPDUs");
467 "Incorrect flag after 3 unacknowledged MPDUs");
470 "Incorrect flag after 3 unacknowledged MPDUs");
473 "Incorrect flag after 3 unacknowledged MPDUs");
476 "Incorrect flag after 3 unacknowledged MPDUs");
479 "Incorrect flag after 3 unacknowledged MPDUs");
482 "Incorrect flag after 3 unacknowledged MPDUs");
487 "Incorrect flag after 3 unacknowledged MPDUs");
493 mpdu->GetHeader().SetSequenceNumber(
seqNumber);
507 "Incorrect starting sequence after transmitting an MPDU beyond the current window");
510 "Incorrect flag after transmitting an MPDU beyond the current window");
513 "Incorrect flag after transmitting an MPDU beyond the current window");
516 "Incorrect flag after transmitting an MPDU beyond the current window");
519 "Incorrect flag after transmitting an MPDU beyond the current window");
522 "Incorrect flag after transmitting an MPDU beyond the current window");
525 "Incorrect flag after transmitting an MPDU beyond the current window");
528 "Incorrect flag after transmitting an MPDU beyond the current window");
531 "Incorrect flag after transmitting an MPDU beyond the current window");
534 "Incorrect flag after transmitting an MPDU beyond the current window");
537 "Incorrect flag after transmitting an MPDU beyond the current window");
543 "Incorrect flag after transmitting an MPDU beyond the current window");
549 mpdu->GetHeader().SetSequenceNumber(
seqNumber);
563 "Incorrect starting sequence after transmitting another MPDU beyond the current window");
567 "Incorrect flag after transmitting another MPDU beyond the current window");
571 "Incorrect flag after transmitting another MPDU beyond the current window");
575 "Incorrect flag after transmitting another MPDU beyond the current window");
579 "Incorrect flag after transmitting another MPDU beyond the current window");
583 "Incorrect flag after transmitting another MPDU beyond the current window");
589 "Incorrect flag after transmitting another MPDU beyond the current window");
595 mpdu->GetHeader().SetSequenceNumber(
seqNumber);
608 "Incorrect starting sequence after discarding an MPDU");
613 "Incorrect flag after discarding an MPDU");
633 "Incorrect starting sequence after acknowledging all but the first MPDU");
636 "Incorrect flag after acknowledging all but the first MPDU");
641 "Incorrect flag after acknowledging all but the first MPDU");
658 "Incorrect starting sequence after acknowledging the first MPDU");
663 "Incorrect flag after acknowledging the first MPDU");
679 void DoRun()
override;
684 :
TestCase(
"Check the correctness of block ack compressed bitmap")
696 for (uint16_t
i = 179;
i < 220;
i++)
700 for (uint16_t
i = 225;
i <= 242;
i++)
725 "error in compressed bitmap");
732 for (uint16_t
i = 4090;
i != 10;
i = (
i + 1) % 4096)
736 for (uint16_t
i = 22;
i < 25;
i++)
780 void DoRun()
override;
796 :
TestCase(
"Test case for Block Ack recipient reordering buffer operations"),
839 "The MPDU forwarded up is not the expected one");
891 "The MPDU forwarded up is not the expected one");
896 "The MPDU forwarded up is not the expected one");
899 "The MPDU forwarded up is not the expected one");
904 "The MPDU forwarded up is not the expected one");
909 "The MPDU forwarded up is not the expected one");
914 "The MPDU forwarded up is not the expected one");
932 "The MPDU forwarded up is not the expected one");
974 "The MPDU forwarded up is not the expected one");
979 "The MPDU forwarded up is not the expected one");
984 "The MPDU forwarded up is not the expected one");
1003 void DoRun()
override;
1007 :
TestCase(
"Check the correctness of Multi-STA block ack")
1021 uint16_t
aid1 = 100;
1025 blockAck.SetAid11(
aid1, 0);
1027 blockAck.SetTidInfo(
tid1, 0);
1030 uint16_t
aid2 = 200;
1035 blockAck.SetAid11(
aid2, 1);
1037 blockAck.SetTidInfo(
tid2, 1);
1038 blockAck.SetStartingSequence(
startSeq2, 1);
1042 blockAck.SetReceivedPacket(
i, 1);
1047 blockAck.SetReceivedPacket(
i, 1);
1053 blockAck.SetReceivedPacket(
i, 1);
1057 uint16_t
aid3 = 300;
1062 blockAck.SetAid11(
aid3, 2);
1064 blockAck.SetTidInfo(
tid3, 2);
1065 blockAck.SetStartingSequence(
startSeq3, 2);
1069 blockAck.SetReceivedPacket(
i, 2);
1074 blockAck.SetReceivedPacket(
i, 2);
1080 blockAck.SetReceivedPacket(
i, 2);
1085 blockAck.SetReceivedPacket(
i, 2);
1090 blockAck.SetReceivedPacket(
i, 2);
1096 blockAck.SetReceivedPacket(
i, 2);
1100 uint16_t
aid4 = 400;
1105 blockAck.SetAid11(
aid4, 3);
1107 blockAck.SetTidInfo(
tid4, 3);
1108 blockAck.SetStartingSequence(
startSeq4, 3);
1112 blockAck.SetReceivedPacket(
i, 3);
1117 blockAck.SetReceivedPacket(
i, 3);
1123 blockAck.SetReceivedPacket(
i, 3);
1128 blockAck.SetReceivedPacket(
i, 3);
1133 blockAck.SetReceivedPacket(
i, 3);
1139 blockAck.SetReceivedPacket(
i, 3);
1145 blockAck.SetReceivedPacket(
i, 3);
1151 blockAck.SetReceivedPacket(
i, 3);
1157 blockAck.SetReceivedPacket(
i, 3);
1163 blockAck.SetReceivedPacket(
i, 3);
1167 uint16_t
aid5 = 500;
1172 blockAck.SetAid11(
aid5, 4);
1174 blockAck.SetTidInfo(
tid5, 4);
1175 blockAck.SetStartingSequence(
startSeq5, 4);
1179 blockAck.SetReceivedPacket(
i, 4);
1184 blockAck.SetReceivedPacket(
i, 4);
1190 blockAck.SetReceivedPacket(
i, 4);
1195 blockAck.SetReceivedPacket(
i, 4);
1200 blockAck.SetReceivedPacket(
i, 4);
1206 blockAck.SetReceivedPacket(
i, 4);
1212 blockAck.SetReceivedPacket(
i, 4);
1218 blockAck.SetReceivedPacket(
i, 4);
1224 blockAck.SetReceivedPacket(
i, 4);
1230 blockAck.SetReceivedPacket(
i, 4);
1236 blockAck.SetReceivedPacket(
i, 4);
1242 blockAck.SetReceivedPacket(
i, 4);
1248 blockAck.SetReceivedPacket(
i, 4);
1254 blockAck.SetReceivedPacket(
i, 4);
1260 blockAck.SetReceivedPacket(
i, 4);
1266 blockAck.SetReceivedPacket(
i, 4);
1272 blockAck.SetReceivedPacket(
i, 4);
1278 blockAck.SetReceivedPacket(
i, 4);
1282 uint16_t
aid6 = 2045;
1287 blockAck.SetAid11(
aid6, 5);
1289 blockAck.SetTidInfo(
tid6, 5);
1290 blockAck.SetUnassociatedStaAddress(
address6, 5);
1294 packet->AddHeader(blockAck);
1305 "Different block ack variant");
1317 "Different AID for the first Per AID TID Info subfield");
1320 "Different Ack Type for the first Per AID TID Info subfield");
1323 "Different TID for the first Per AID TID Info subfield");
1328 "Different AID for the second Per AID TID Info subfield");
1331 "Different Ack Type for the second Per AID TID Info subfield");
1334 "Different TID for the second Per AID TID Info subfield");
1338 "Different starting sequence number for the second Per AID TID Info subfield");
1343 "Different bitmap length for the second Per AID TID Info subfield");
1347 "Error in the 1st byte of the bitmap for the second Per AID TID Info subfield");
1351 "Error in the 2nd byte of the bitmap for the second Per AID TID Info subfield");
1355 "Error in the 3rd byte of the bitmap for the second Per AID TID Info subfield");
1359 "Error in the 4th byte of the bitmap for the second Per AID TID Info subfield");
1364 "Different AID for the third Per AID TID Info subfield");
1367 "Different Ack Type for the third Per AID TID Info subfield");
1370 "Different TID for the third Per AID TID Info subfield");
1374 "Different starting sequence number for the third Per AID TID Info subfield");
1379 "Different bitmap length for the third Per AID TID Info subfield");
1383 "Error in the 1st byte of the bitmap for the third Per AID TID Info subfield");
1387 "Error in the 2nd byte of the bitmap for the third Per AID TID Info subfield");
1391 "Error in the 3rd byte of the bitmap for the third Per AID TID Info subfield");
1395 "Error in the 4th byte of the bitmap for the third Per AID TID Info subfield");
1399 "Error in the 5th byte of the bitmap for the third Per AID TID Info subfield");
1403 "Error in the 6th byte of the bitmap for the third Per AID TID Info subfield");
1407 "Error in the 7th byte of the bitmap for the third Per AID TID Info subfield");
1411 "Error in the 8th byte of the bitmap for the third Per AID TID Info subfield");
1416 "Different AID for the fourth Per AID TID Info subfield");
1419 "Different Ack Type for the fourth Per AID TID Info subfield");
1422 "Different TID for the fourth Per AID TID Info subfield");
1426 "Different starting sequence number for the fourth Per AID TID Info subfield");
1431 "Different bitmap length for the fourth Per AID TID Info subfield");
1435 "Error in the 1st byte of the bitmap for the fourth Per AID TID Info subfield");
1439 "Error in the 2nd byte of the bitmap for the fourth Per AID TID Info subfield");
1443 "Error in the 3rd byte of the bitmap for the fourth Per AID TID Info subfield");
1447 "Error in the 4th byte of the bitmap for the fourth Per AID TID Info subfield");
1451 "Error in the 5th byte of the bitmap for the fourth Per AID TID Info subfield");
1455 "Error in the 6th byte of the bitmap for the fourth Per AID TID Info subfield");
1459 "Error in the 7th byte of the bitmap for the fourth Per AID TID Info subfield");
1463 "Error in the 8th byte of the bitmap for the fourth Per AID TID Info subfield");
1467 "Error in the 9th byte of the bitmap for the fourth Per AID TID Info subfield");
1471 "Error in the 10th byte of the bitmap for the fourth Per AID TID Info subfield");
1475 "Error in the 11th byte of the bitmap for the fourth Per AID TID Info subfield");
1479 "Error in the 12th byte of the bitmap for the fourth Per AID TID Info subfield");
1483 "Error in the 13th byte of the bitmap for the fourth Per AID TID Info subfield");
1487 "Error in the 14th byte of the bitmap for the fourth Per AID TID Info subfield");
1491 "Error in the 15th byte of the bitmap for the fourth Per AID TID Info subfield");
1495 "Error in the 16th byte of the bitmap for the fourth Per AID TID Info subfield");
1500 "Different AID for the fifth Per AID TID Info subfield");
1503 "Different Ack Type for the fifth Per AID TID Info subfield");
1506 "Different TID for the fifth Per AID TID Info subfield");
1510 "Different starting sequence number for the fifth Per AID TID Info subfield");
1515 "Different bitmap length for the fifth Per AID TID Info subfield");
1519 "Error in the 1st byte of the bitmap for the fifth Per AID TID Info subfield");
1523 "Error in the 2nd byte of the bitmap for the fifth Per AID TID Info subfield");
1527 "Error in the 3rd byte of the bitmap for the fifth Per AID TID Info subfield");
1531 "Error in the 4th byte of the bitmap for the fifth Per AID TID Info subfield");
1535 "Error in the 5th byte of the bitmap for the fifth Per AID TID Info subfield");
1539 "Error in the 6th byte of the bitmap for the fifth Per AID TID Info subfield");
1543 "Error in the 7th byte of the bitmap for the fifth Per AID TID Info subfield");
1547 "Error in the 8th byte of the bitmap for the fifth Per AID TID Info subfield");
1551 "Error in the 9th byte of the bitmap for the fifth Per AID TID Info subfield");
1555 "Error in the 10th byte of the bitmap for the fifth Per AID TID Info subfield");
1559 "Error in the 11th byte of the bitmap for the fifth Per AID TID Info subfield");
1563 "Error in the 12th byte of the bitmap for the fifth Per AID TID Info subfield");
1567 "Error in the 13th byte of the bitmap for the fifth Per AID TID Info subfield");
1571 "Error in the 14th byte of the bitmap for the fifth Per AID TID Info subfield");
1575 "Error in the 15th byte of the bitmap for the fifth Per AID TID Info subfield");
1579 "Error in the 16th byte of the bitmap for the fifth Per AID TID Info subfield");
1583 "Error in the 17th byte of the bitmap for the fifth Per AID TID Info subfield");
1587 "Error in the 18th byte of the bitmap for the fifth Per AID TID Info subfield");
1591 "Error in the 19th byte of the bitmap for the fifth Per AID TID Info subfield");
1595 "Error in the 20th byte of the bitmap for the fifth Per AID TID Info subfield");
1599 "Error in the 21th byte of the bitmap for the fifth Per AID TID Info subfield");
1603 "Error in the 22th byte of the bitmap for the fifth Per AID TID Info subfield");
1607 "Error in the 23th byte of the bitmap for the fifth Per AID TID Info subfield");
1611 "Error in the 24th byte of the bitmap for the fifth Per AID TID Info subfield");
1615 "Error in the 25th byte of the bitmap for the fifth Per AID TID Info subfield");
1619 "Error in the 26th byte of the bitmap for the fifth Per AID TID Info subfield");
1623 "Error in the 27th byte of the bitmap for the fifth Per AID TID Info subfield");
1627 "Error in the 28th byte of the bitmap for the fifth Per AID TID Info subfield");
1631 "Error in the 29th byte of the bitmap for the fifth Per AID TID Info subfield");
1635 "Error in the 30th byte of the bitmap for the fifth Per AID TID Info subfield");
1639 "Error in the 31th byte of the bitmap for the fifth Per AID TID Info subfield");
1643 "Error in the 32th byte of the bitmap for the fifth Per AID TID Info subfield");
1648 "Different AID for the sixth Per AID TID Info subfield");
1651 "Different Ack Type for the sixth Per AID TID Info subfield");
1654 "Different TID for the sixth Per AID TID Info subfield");
1658 "Different starting sequence number for the sixth Per AID TID Info subfield");
1730 void DoRun()
override;
1769 if (duration >
m_max)
1776 :
TestCase(
"Test case for Block Ack Policy with aggregation disabled"),
1795 if (p->GetSize() == 1400)
1816 if (
hdr.IsQosData())
1819 if (
hdr.IsQosBlockAck())
1828 "Unexpected QoS ack policy");
1834 "Unexpected QoS ack policy");
1837 else if (
hdr.IsBlockAckReq())
1852 if (
hdr.IsBlockAck())
1865 wifiApNode.Create(1);
1869 phy.SetChannel(channel.Create());
1874 wifi.SetRemoteStationManager(
"ns3::IdealWifiManager");
1878 mac.SetType(
"ns3::StaWifiMac",
1886 "BE_BlockAckThreshold",
1894 mac.SetType(
"ns3::ApWifiMac",
1913 apDevices = wifi.Install(phy, mac, wifiApNode);
1922 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
1923 mobility.Install(wifiApNode);
1936 sta_device->GetMac()->GetAttribute(
"BE_Txop", ptr);
1937 ptr.
Get<
QosTxop>()->TraceConnectWithoutContext(
1977 server->SetLocal(socket);
1978 wifiApNode.Get(0)->AddApplication(server);
1979 server->SetStartTime(
Seconds(0));
1980 server->SetStopTime(
Seconds(4));
1982 Config::Connect(
"/NodeList/*/ApplicationList/0/$ns3::PacketSocketServer/Rx",
2006 "The maximum TXOP duration is too short!");
2048 void DoRun()
override;
2060 :
TestCase(
"Test case for originator Block Ack window stalled"),
2061 m_nLinks(
mld ? 2 : 1)
2070 for (
const auto& [aid, psdu] : psduMap)
2072 std::stringstream
ss;
2073 ss <<
" #MPDUs " << psdu->GetNMpdus();
2076 ss <<
"\n" << *mpdu;
2079 if (
const auto&
hdr = (*psdu->begin())->GetHeader();
hdr.IsQosData())
2083 std::size_t count{0};
2104 "Unexpected number of MPDUs in A-MPDU #" <<
m_qosCount);
2110 "Unexpected SeqN in A-MPDU #" <<
m_qosCount);
2113 "Unexpected SeqN in A-MPDU #" <<
m_qosCount);
2122 auto mpduIt = psdu->begin();
2123 std::list<uint64_t>
uids;
2124 ss <<
"\nCORRUPTED";
2125 for (std::size_t
i = 0;
i < 5; ++
i, ++
mpduIt)
2127 uids.push_back((*mpduIt)->GetPacket()->GetUid());
2128 ss <<
" " << (*mpduIt)->GetHeader().GetSequenceNumber();
2133 else if (
hdr.IsBlockAck())
2151 phy.Set(0,
"ChannelSettings",
StringValue(
"{36, 0, BAND_5GHZ, 0}"));
2154 phy.Set(1,
"ChannelSettings",
StringValue(
"{100, 0, BAND_5GHZ, 0}"));
2156 phy.SetChannel(channel);
2160 wifi.SetRemoteStationManager(
"ns3::ConstantRateWifiManager",
2168 mac.SetType(
"ns3::StaWifiMac",
"MpduBufferSize",
UintegerValue(64));
2170 auto staDevices = wifi.Install(phy, mac,
wifiStaNode);
2172 mac.SetType(
"ns3::ApWifiMac");
2174 auto apDevices = wifi.Install(phy, mac, wifiApNode);
2182 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
2183 mobility.Install(wifiApNode);
2190 "/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phys/*/PhyTxPsduBegin",
2215 client->SetRemote(socket);
2217 client->SetStartTime(
Seconds(0.5));
2218 client->SetStopTime(
Seconds(3));
2221 server->SetLocal(socket);
2222 wifiApNode.Get(0)->AddApplication(server);
2223 server->SetStartTime(
Seconds(0));
2224 server->SetStopTime(
Seconds(4));
2238 "Expected no packet in STA queue");
static BlockAckTestSuite g_blockAckTestSuite
the test suite
Test for Block Ack Policy with aggregation disabled.
uint16_t m_nBa
received BlockAck frames
uint16_t m_txTotal
transmitted data packets
void L7Receive(std::string context, Ptr< const Packet > p, const Address &adr)
Function to trace packets received by the server application.
BlockAckAggregationDisabledTest(bool txop)
Constructor.
~BlockAckAggregationDisabledTest() override
uint16_t m_nBar
transmitted BlockAckReq frames
void Receive(std::string context, Ptr< const Packet > p, RxPowerWattPerChannelBand rxPowersW)
Callback invoked when PHY receives a packet.
void Transmit(std::string context, Ptr< const Packet > p, double power)
Callback invoked when PHY transmits a packet.
uint16_t m_txSinceBar
packets transmitted since the agreement was established or the last block ack was received
uint32_t m_received
received packets
void DoRun() override
Implementation to actually run this TestCase.
bool m_txop
true for non-null TXOP limit
Test for recipient reordering buffer operations.
void DoRun() override
Implementation to actually run this TestCase.
uint16_t m_ssn
the Starting Sequence Number used to initialize WinStartB
BlockAckRecipientBufferTest(uint16_t ssn)
Constructor.
std::list< Ptr< const WifiMpdu > > m_fwup
list of MPDUs that have been forwarded up
void ForwardUp(Ptr< const WifiMpdu > mpdu, uint8_t linkId)
Keep track of MPDUs received on the given link that are forwarded up.
~BlockAckRecipientBufferTest() override
Test for Block Ack Policy with non-null BA threshold and TX window blocked.
std::size_t m_baCount
counter for transmitted BlockAck frames
const std::size_t m_nPkts
number of generated packets
const uint8_t m_nLinks
number of links
Ptr< WifiNetDevice > m_staDevice
station WifiNetDevice
std::size_t m_qosCount
counter for transmitted QoS data frames
Ptr< ListErrorModel > m_errorModel
error rate model to corrupt packets
void DoRun() override
Implementation to actually run this TestCase.
void DoSetup() override
Implementation to do any local setup required for this TestCase.
OrigBlockAckWindowStalled(bool mld)
const double m_baThreshold
BA threshold used by ack manager.
void Transmit(WifiConstPsduMap psduMap, WifiTxVector txVector, double txPowerW)
Callback invoked when a FEM passes PSDUs to the PHY.
Test for the originator block ack window.
void DoRun() override
Implementation to actually run this TestCase.
OriginatorBlockAckWindowTest()
std::list< uint16_t > m_expectedBuffer
expected test buffer
void DoRun() override
Implementation to actually run this TestCase.
~PacketBufferingCaseA() override
std::list< uint16_t > m_expectedBuffer
expected test buffer
~PacketBufferingCaseB() override
void DoRun() override
Implementation to actually run this TestCase.
a polymophic address class
A container for one type of attribute.
AttributeValue implementation for Boolean.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
void SetList(const std::list< uint64_t > &packetlist)
static Mac48Address Allocate()
Allocate a new Mac48Address.
Helper class used to assign positions and mobility models to nodes.
holds a vector of ns3::NetDevice pointers
keep track of a set of node pointers.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
Maintains the state and information about transmitted MPDUs with Ack Policy set to Block Ack for an o...
an address for a packet socket
void SetProtocol(uint16_t protocol)
Set the protocol.
void SetPhysicalAddress(const Address address)
Set the destination address.
void SetSingleDevice(uint32_t device)
Set the address to match only a specified NetDevice.
Give ns3::PacketSocket powers to ns3::Node.
void Install(Ptr< Node > node) const
Aggregate an instance of a ns3::PacketSocketFactory onto the provided node.
AttributeValue implementation for Pointer.
Smart pointer class similar to boost::intrusive_ptr.
Handles the packet queue and stores DCF/EDCA access parameters (one Txop per AC).
Maintains the scoreboard and the receive reordering buffer used by a recipient of a Block Ack agreeme...
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
static void Run()
Run the simulation.
static void Stop()
Tell the Simulator the calling event should be the last one executed.
Make it easy to create and manage PHY objects for the spectrum model.
The IEEE 802.11 SSID Information Element.
AttributeValue implementation for Ssid.
Hold variables of type string.
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
Simulation virtual time values and global simulation resolution.
AttributeValue implementation for Time.
Hold an unsigned integer type.
helps to create WifiNetDevice objects
create MAC layers for a ns3::WifiNetDevice.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
manage and create wifi channel objects for the YANS model.
static YansWifiChannelHelper Default()
Create a channel helper in a default working state.
Make it easy to create and manage PHY objects for the YANS model.
void SetDefault(std::string name, const AttributeValue &value)
void Connect(std::string path, const CallbackBase &cb)
void ConnectWithoutContext(std::string path, const CallbackBase &cb)
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
#define NS_TEST_EXPECT_MSG_GT_OR_EQ(actual, limit, msg)
Test that an actual value is greater than or equal to limit and report if not.
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
#define NS_TEST_EXPECT_MSG_LT(actual, limit, msg)
Test that an actual value is less than a limit and report if not.
#define NS_TEST_EXPECT_MSG_GT(actual, limit, msg)
Test that an actual value is greater than a limit and report if not.
#define NS_TEST_EXPECT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report if not.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Time Seconds(double value)
Construct a Time in the indicated unit.
uint32_t QosUtilsMapSeqControlToUniqueInteger(uint16_t seqControl, uint16_t endSequence)
Next function is useful to correctly sort buffered packets under block ack.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
U * PeekPointer(const Ptr< U > &p)
std::unordered_map< uint16_t, Ptr< const WifiPsdu > > WifiConstPsduMap
Map of const PSDUs indexed by STA-ID.
Callback< R, Args... > MakeCallback(R(T::*memPtr)(Args...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
static constexpr uint16_t SEQNO_SPACE_SIZE
Size of the space of sequence numbers.
std::map< WifiSpectrumBandInfo, Watt_u > RxPowerWattPerChannelBand
A map of the received power for each band.
Keeps the maximum duration among all TXOPs.
Time m_max
max TXOP duration
void Trace(Time startTime, Time duration, uint8_t linkId)
Callback for the TxopTrace trace.
The different BlockAck variants.