9#include "ns3/ap-wifi-mac.h"
10#include "ns3/boolean.h"
11#include "ns3/config.h"
12#include "ns3/he-phy.h"
14#include "ns3/mobility-helper.h"
15#include "ns3/multi-model-spectrum-channel.h"
16#include "ns3/node-list.h"
17#include "ns3/packet-socket-client.h"
18#include "ns3/packet-socket-helper.h"
19#include "ns3/packet-socket-server.h"
20#include "ns3/packet.h"
21#include "ns3/pointer.h"
22#include "ns3/qos-txop.h"
23#include "ns3/qos-utils.h"
24#include "ns3/rng-seed-manager.h"
25#include "ns3/spectrum-wifi-helper.h"
26#include "ns3/string.h"
28#include "ns3/wifi-mac-header.h"
29#include "ns3/wifi-net-device.h"
30#include "ns3/wifi-ppdu.h"
31#include "ns3/wifi-psdu.h"
108 void DoRun()
override;
168 :
TestCase(
"Check correct operation within TXOPs"),
176 m_nonHt(params.nonHt),
177 m_payloadSizeRtsOn(m_nonHt ? 2000 : 540),
178 m_payloadSizeRtsOff(500),
180 m_mode(m_nonHt ?
OfdmPhy::GetOfdmRate12Mbps() :
HePhy::GetHeMcs0()),
181 m_pifsRecovery(params.pifsRecovery),
182 m_singleRtsPerTxop(params.singleRtsPerTxop),
183 m_lengthBasedRtsCtsThresh(params.lengthBasedRtsCtsThresh),
184 m_protectedIfResponded(params.protectedIfResponded),
187 m_apCorrupted(false),
188 m_staCorrupted(false)
207 bool corrupted{
false};
211 if (
const auto& hdr = psduMap.begin()->second->GetHeader(0);
221 if (
const auto& hdr = psduMap.begin()->second->GetHeader(0);
243 if (
const auto& hdr = psduMap.begin()->second->GetHeader(0);
244 hdr.IsQosData() && hdr.GetAddr1() ==
m_staDevices.
Get(2)->GetAddress() &&
245 hdr.GetSequenceNumber() == (
m_nonHt ? 0 : 1))
263 NS_LOG_INFO(psduMap.begin()->second->GetHeader(0).GetTypeString()
264 <<
" seq " << psduMap.begin()->second->GetHeader(0).GetSequenceNumber() <<
" to "
265 << psduMap.begin()->second->GetAddr1() <<
" TX duration "
267 <<
" duration/ID " << psduMap.begin()->second->GetHeader(0).GetDuration()
268 << (corrupted ?
" CORRUPTED" :
"") << std::endl);
276 int64_t streamNumber = 100;
279 wifiApNode.Create(1);
286 spectrumChannel->AddPropagationLossModel(lossModel);
288 spectrumChannel->SetPropagationDelayModel(delayModel);
291 phy.SetChannel(spectrumChannel);
293 phy.Set(
"ChannelSettings",
StringValue(
"{0, 20, BAND_5GHZ, 0}"));
314 wifi.SetRemoteStationManager(
"ns3::ConstantRateWifiManager",
321 mac.SetType(
"ns3::StaWifiMac",
327 m_staDevices = wifi.Install(phy, mac, wifiStaNodes);
337 "EnableBeaconJitter",
340 StringValue(std::string(
"BE ") + std::to_string(m_staAifsn)),
345 StringValue(std::string(
"BE ") + std::to_string(m_staCwMax)),
347 StringValue(std::string(
"BE ") + std::to_string(m_staTxopLimit.GetMicroSeconds()) +
"us"));
351 m_apDevices =
wifi.Install(phy, mac, wifiApNode);
357 dev->GetMac()->SetSsid(
Ssid(
"wifi-txop-ssid"));
359 for (uint16_t i = 1; i < m_nStations; i++)
365 Ssid(
"wifi-txop-ssid"));
374 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
375 positionAlloc->Add(Vector(1.0, 0.0, 0.0));
376 positionAlloc->Add(Vector(0.0, 1.0, 0.0));
377 positionAlloc->Add(Vector(-1.0, 0.0, 0.0));
378 mobility.SetPositionAllocator(positionAlloc);
380 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
385 packetSocket.
Install(wifiApNode);
386 packetSocket.
Install(wifiStaNodes);
398 server->SetLocal(srvAddr);
399 (*nodeIt)->AddApplication(server);
405 for (uint16_t i = 0; i < m_nStations; ++i)
407 m_dlSockets.emplace_back();
408 m_dlSockets.back().SetSingleDevice(m_apDevices.Get(0)->GetIfIndex());
409 m_dlSockets.back().SetPhysicalAddress(m_staDevices.Get(i)->GetAddress());
410 m_dlSockets.back().SetProtocol(1);
412 m_ulSockets.emplace_back();
413 m_ulSockets.back().SetSingleDevice(m_staDevices.Get(i)->GetIfIndex());
414 m_ulSockets.back().SetPhysicalAddress(m_apDevices.Get(0)->GetAddress());
415 m_ulSockets.back().SetProtocol(1);
419 for (uint16_t i = 0; i < m_nStations; i++)
428 GetApplication(
DOWNLINK, i, 1, m_payloadSizeRtsOff - 1));
435 GetApplication(
DOWNLINK, i, 1, m_payloadSizeRtsOff));
441 GetApplication(
DOWNLINK, i, m_nonHt ? 1 : 2, m_payloadSizeRtsOn));
446 dev->GetMac()->GetWifiPhy()->SetPostReceptionErrorModel(m_apErrorModel);
450 dev->GetMac()->GetWifiPhy()->SetPostReceptionErrorModel(m_staErrorModel);
461 GetApplication(
UPLINK, 0, 1, m_payloadSizeRtsOff - 1));
467 GetApplication(
UPLINK, 0, 1, m_payloadSizeRtsOff));
470 Config::Connect(
"/NodeList/*/ApplicationList/*/$ns3::PacketSocketServer/Rx",
473 Config::Connect(
"/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phy/PhyTxPsduBegin",
495 client->SetStartTime(
Time{0});
496 client->SetStopTime(
Seconds(1));
510 "Unexpected AIFSN for STA " << i);
513 "Unexpected CWmin for STA " << i);
516 "Unexpected CWmax for STA " << i);
519 "Unexpected TXOP limit for STA " << i);
526 "Unexpected TXOP limit for AP");
534 Time sifs = apDev->GetPhy()->GetSifs();
535 Time slot = apDev->GetPhy()->GetSlot();
544 auto RoundDurationId = [](
Time t) {
545 return MicroSeconds(ceil(
static_cast<double>(t.GetNanoSeconds()) / 1000));
579 "Unexpected number of transmitted frames");
587 "Expected a frame sent by the AP to the first station");
592 "PSDU size expected not to exceed length based RTS/CTS threshold");
598 rtsCtsTxDurationThresh,
599 "PSDU duration expected not to exceed duration based RTS/CTS threshold");
603 "Duration/ID of the first frame must cover the whole TXOP");
611 tEnd + sifs + tolerance,
612 "Ack in response to the first frame sent too late");
615 apDev->GetMac()->GetAddress(),
616 "Expected a Normal Ack sent to the AP");
620 "Duration/ID of the Ack must be derived from that of the first frame");
631 auto eifsNoDifs = apPhy->GetSifs() + apPhy->GetAckTxTime();
635 eifsNoDifs + sifs + aifsn * slot,
636 "Less than AIFS elapsed between AckTimeout and the next TXOP start");
639 eifsNoDifs + sifs + aifsn * slot + (2 * (cwMin + 1) - 1) * slot,
640 "More than AIFS+BO elapsed between AckTimeout and the next TXOP start");
643 "Expected to retransmit a QoS data frame");
646 "Expected to retransmit a frame to the first station");
651 "PSDU size expected not to exceed length based RTS/CTS threshold");
657 rtsCtsTxDurationThresh,
658 "PSDU duration expected not to exceed duration based RTS/CTS threshold");
662 "Duration/ID of the retransmitted frame must cover the whole TXOP");
670 tEnd + sifs + tolerance,
671 "Ack in response to the first frame sent too late");
674 apDev->GetMac()->GetAddress(),
675 "Expected a Normal Ack sent to the AP");
679 "Duration/ID of the Ack must be derived from that of the previous frame");
690 "Expected a frame sent by the AP to the second station");
695 "PSDU size expected not to exceed length based RTS/CTS threshold");
701 rtsCtsTxDurationThresh,
702 "PSDU duration expected not to exceed duration based RTS/CTS threshold");
707 "Duration/ID of the second frame does not cover the remaining TXOP");
714 auto ackTxVector = apStationManager->GetAckTxVector(staAddress,
m_txPsdus[4].txVector);
723 "Second frame must have been sent after a PIFS");
730 "Less than AIFS elapsed between AckTimeout and the next transmission");
733 sifs + aifsn * slot + (2 * (cwMin + 1) - 1) * slot,
734 "More than AIFS+BO elapsed between AckTimeout and the next TXOP start");
739 "Expected a frame sent by the AP to the second station");
744 "PSDU size expected not to exceed length based RTS/CTS threshold");
750 rtsCtsTxDurationThresh,
751 "PSDU duration expected not to exceed duration based RTS/CTS threshold");
756 "Duration/ID of the second frame does not cover the remaining TXOP");
764 "Ack in response to the second frame sent too early");
766 tEnd + sifs + tolerance,
767 "Ack in response to the second frame sent too late");
770 apDev->GetMac()->GetAddress(),
771 "Expected a Normal Ack sent to the AP");
775 "Duration/ID of the Ack must be derived from that of the previous frame");
786 "Expected a frame sent by the AP to the third station");
791 "PSDU size expected not to exceed length based RTS/CTS threshold");
797 rtsCtsTxDurationThresh,
798 "PSDU duration expected not to exceed duration based RTS/CTS threshold");
803 "Duration/ID of the third frame does not cover the remaining TXOP");
811 tEnd + sifs + tolerance,
812 "Ack in response to the third frame sent too late");
815 apDev->GetMac()->GetAddress(),
816 "Expected a Normal Ack sent to the AP");
820 "Duration/ID of the Ack must be derived from that of the previous frame");
832 tEnd + sifs + tolerance,
833 "RTS before fourth frame sent too late");
838 "Expected an RTS frame sent by the AP to the second station");
843 "Duration/ID of the RTS before the fourth frame does not cover the remaining TXOP");
851 "CTS in response to RTS before the fourth frame sent too early");
853 tEnd + sifs + tolerance,
854 "CTS in response to RTS before the fourth frame sent too late");
857 apDev->GetMac()->GetAddress(),
858 "Expected a CTS frame sent to the AP");
862 "Duration/ID of the CTS frame must be derived from that of the RTS frame");
883 "Expected a frame sent by the AP to the second station");
888 "PSDU size expected to exceed length based RTS/CTS threshold");
893 rtsCtsTxDurationThresh,
894 "PSDU duration expected to exceed duration based RTS/CTS threshold");
899 "Duration/ID of the fourth frame does not cover the remaining TXOP");
901 std::string ack(
m_nonHt ?
"Normal Ack" :
"Block Ack");
909 ack <<
" in response to the fourth QoS data frame sent too early");
911 tEnd + sifs + tolerance,
912 ack <<
" in response to the fourth QoS data frame sent too late");
916 "Expected a " << ack);
918 apDev->GetMac()->GetAddress(),
919 "Expected a " << ack <<
" sent to the AP");
923 "Duration/ID of the " << ack <<
" must be derived from that of the previous frame");
934 "Duration/ID must be set to 0 for CF-End frames");
942 "Less than AIFS elapsed between two TXOPs");
945 "More than AIFS+BO elapsed between two TXOPs");
948 apDev->GetMac()->GetAddress(),
949 "Expected a frame sent by the first station to the AP");
954 "PSDU size expected not to exceed length based RTS/CTS threshold");
960 rtsCtsTxDurationThresh,
961 "PSDU duration expected not to exceed duration based RTS/CTS threshold");
966 "Duration/ID of the frame sent by the first station does not cover the remaining TXOP");
977 "Expected a Normal Ack sent to the first station");
980 RoundDurationId(
m_txPsdus[12].header.GetDuration() - sifs -
m_txPsdus[13].txDuration),
981 "Duration/ID of the Ack must be derived from that of the previous frame");
992 "Duration/ID must be set to 0 for CF-End frames");
1024 "Expected an RTS frame sent by the AP to the first station");
1027 "Duration/ID of the first RTS frame must cover the whole TXOP");
1035 "CTS in response to the first RTS frame sent too early");
1037 tEnd + sifs + tolerance,
1038 "CTS in response to the first RTS frame sent too late");
1041 apDev->GetMac()->GetAddress(),
1042 "Expected a CTS frame sent to the AP");
1045 RoundDurationId(
m_txPsdus[15].header.GetDuration() - sifs -
m_txPsdus[16].txDuration),
1046 "Duration/ID of the CTS frame must be derived from that of the RTS frame");
1057 "Expected a frame sent by the AP to the first station");
1062 "PSDU size expected to exceed length based RTS/CTS threshold");
1067 rtsCtsTxDurationThresh,
1068 "PSDU duration expected to exceed duration based RTS/CTS threshold");
1074 "Duration/ID of the first QoS data frame does not cover the remaining TXOP");
1082 ack <<
" in response to the first QoS data frame sent too early");
1084 tEnd + sifs + tolerance,
1085 ack <<
" in response to the first QoS data frame sent too late");
1089 "Expected a " << ack);
1091 apDev->GetMac()->GetAddress(),
1092 "Expected a " << ack <<
" sent to the AP");
1095 RoundDurationId(
m_txPsdus[17].header.GetDuration() - sifs -
m_txPsdus[18].txDuration),
1096 "Duration/ID of the " << ack <<
" must be derived from that of the previous frame");
1098 std::size_t idx = 18;
1113 "Expected an RTS frame sent by the AP to the second station");
1117 "Duration/ID of the second RTS frame must cover the whole TXOP");
1125 "CTS in response to the second RTS frame sent too early");
1127 tEnd + sifs + tolerance,
1128 "CTS in response to the second RTS frame sent too late");
1131 apDev->GetMac()->GetAddress(),
1132 "Expected a CTS frame sent to the AP");
1134 m_txPsdus[idx + 1].header.GetDuration(),
1135 RoundDurationId(
m_txPsdus[idx].header.GetDuration() - sifs -
1137 "Duration/ID of the CTS frame must be derived from that of the RTS frame");
1152 "Expected a frame sent by the AP to the second station");
1157 "PSDU size expected to exceed length based RTS/CTS threshold");
1162 rtsCtsTxDurationThresh,
1163 "PSDU duration expected to exceed duration based RTS/CTS threshold");
1169 "Duration/ID of the second QoS data frame does not cover the remaining TXOP");
1177 ack <<
" in response to the second QoS data frame sent too early");
1179 tEnd + sifs + tolerance,
1180 ack <<
" in response to the second QoS data frame sent too late");
1184 "Expected a " << ack);
1186 apDev->GetMac()->GetAddress(),
1187 "Expected a " << ack <<
" sent to the AP");
1189 m_txPsdus[idx + 1].header.GetDuration(),
1190 RoundDurationId(
m_txPsdus[idx].header.GetDuration() - sifs -
m_txPsdus[idx + 1].txDuration),
1191 "Duration/ID of the " << ack <<
" must be derived from that of the previous frame");
1207 "Expected an RTS frame sent by the AP to the third station");
1211 "Duration/ID of the third RTS frame must cover the whole TXOP");
1219 "CTS in response to the third RTS frame sent too early");
1221 tEnd + sifs + tolerance,
1222 "CTS in response to the third RTS frame sent too late");
1225 apDev->GetMac()->GetAddress(),
1226 "Expected a CTS frame sent to the AP");
1228 m_txPsdus[idx + 1].header.GetDuration(),
1229 RoundDurationId(
m_txPsdus[idx].header.GetDuration() - sifs -
1231 "Duration/ID of the CTS frame must be derived from that of the RTS frame");
1245 "Expected a frame sent by the AP to the third station");
1250 "PSDU size expected to exceed length based RTS/CTS threshold");
1255 rtsCtsTxDurationThresh,
1256 "PSDU duration expected to exceed duration based RTS/CTS threshold");
1262 "Duration/ID of the third QoS data frame does not cover the remaining TXOP");
1270 ack <<
" in response to the third QoS data frame sent too early");
1272 tEnd + sifs + tolerance,
1273 ack <<
" in response to the third QoS data frame sent too late");
1277 "Expected a " << ack);
1279 apDev->GetMac()->GetAddress(),
1280 "Expected a " << ack <<
" sent to the AP");
1282 m_txPsdus[idx + 1].header.GetDuration(),
1283 RoundDurationId(
m_txPsdus[idx].header.GetDuration() - sifs -
m_txPsdus[idx + 1].txDuration),
1284 "Duration/ID of the " << ack <<
" must be derived from that of the previous frame");
1300 "Duration/ID must be set to 0 for CF-End frames");
1325 for (
const auto nonHt : {
true,
false})
1328 .pifsRecovery =
true,
1329 .singleRtsPerTxop =
false,
1330 .lengthBasedRtsCtsThresh =
false,
1331 .protectedIfResponded =
true}),
1332 TestCase::Duration::QUICK);
1334 .pifsRecovery =
false,
1335 .singleRtsPerTxop =
true,
1336 .lengthBasedRtsCtsThresh =
false,
1337 .protectedIfResponded =
false}),
1338 TestCase::Duration::QUICK);
1340 .pifsRecovery =
true,
1341 .singleRtsPerTxop =
true,
1342 .lengthBasedRtsCtsThresh =
true,
1343 .protectedIfResponded =
true}),
1344 TestCase::Duration::QUICK);
void L7Receive(std::string context, Ptr< const Packet > p, const Address &addr)
Function to trace packets received by the server application.
bool m_pifsRecovery
whether to use PIFS recovery
std::vector< PacketSocketAddress > m_dlSockets
packet socket address for DL traffic
NetDeviceContainer m_apDevices
container for AP's NetDevice
WifiTxopTest(const Params ¶ms)
Constructor.
uint8_t m_staAifsn
AIFSN for STAs (AC BE)
void DoRun() override
Implementation to actually run this TestCase.
uint16_t m_received
number of packets received by the stations
TrafficDirection
Enumeration for traffic directions.
uint16_t m_nStations
number of stations
Ptr< ListErrorModel > m_apErrorModel
error model to install on the AP
uint32_t m_staCwMin
CWmin for STAs (AC BE)
bool m_nonHt
whether to use 802.11a or 802.11ax
std::size_t m_payloadSizeRtsOff
size in bytes of packets not protected by RTS
WifiMode m_mode
wifi mode used to transmit data frames
Time m_apTxopLimit
TXOP limit for AP (AC BE)
std::vector< FrameInfo > m_txPsdus
transmitted PSDUs
Time m_startTime
time when data frame exchanges start
std::vector< PacketSocketAddress > m_ulSockets
packet socket address for UL traffic
bool m_staCorrupted
whether the frame to be corrupted by the STA has been corrupted
Ptr< PacketSocketClient > GetApplication(TrafficDirection dir, std::size_t staId, std::size_t count, std::size_t pktSize) const
void Transmit(std::string context, WifiConstPsduMap psduMap, WifiTxVector txVector, double txPowerW)
Callback invoked when PHY receives a PSDU to transmit.
bool m_singleRtsPerTxop
whether to use single RTS per TXOP
bool m_protectedIfResponded
whether a STA is protected if it responds to the AP
NetDeviceContainer m_staDevices
container for stations' NetDevices
bool m_apCorrupted
whether the frame to be corrupted by the AP has been corrupted
std::size_t m_payloadSizeRtsOn
size in bytes of packets protected by RTS
uint32_t m_staCwMax
CWmax for STAs (AC BE)
bool m_lengthBasedRtsCtsThresh
whether to use length based RTS/CTS threshold
Time m_staTxopLimit
TXOP limit for STAs (AC BE)
Ptr< ListErrorModel > m_staErrorModel
error model to install on a STA
void CheckResults()
Check correctness of transmitted frames.
a polymophic address class
std::map< AcIndex, std::vector< uint64_t > > UintAccessParamsMap
ACI-indexed map of access parameters of type unsigned integer (CWmin, CWmax and AIFSN)
A container for one type of attribute.
AttributeValue implementation for Boolean.
Provide a list of Packet uids to corrupt.
void SetList(const std::list< uint64_t > &packetlist)
Helper class used to assign positions and mobility models to nodes.
holds a vector of ns3::NetDevice pointers
uint32_t GetN() const
Get the number of Ptr<NetDevice> stored in this container.
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
keep track of a set of node pointers.
uint32_t AddApplication(Ptr< Application > application)
Associate an Application to this Node.
PHY entity for OFDM (11a)
an address for a packet socket
void SetProtocol(uint16_t protocol)
Set the protocol.
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.
Smart pointer class similar to boost::intrusive_ptr.
static void SetRun(uint64_t run)
Set the run number of simulation.
static void SetSeed(uint32_t seed)
Set the seed.
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
static Time Now()
Return the current simulation virtual time.
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.
bool LookupAttributeByName(std::string name, AttributeInformation *info, bool permissive=false) const
Find an Attribute by name, retrieving the associated AttributeInformation.
Hold an unsigned integer type.
helps to create WifiNetDevice objects
static int64_t AssignStreams(NetDeviceContainer c, int64_t stream)
Assign a fixed random variable stream number to the random variables used by the PHY and MAC aspects ...
create MAC layers for a ns3::WifiNetDevice.
represent a single transmission mode
uint64_t GetDataRate(MHz_u channelWidth, Time guardInterval, uint8_t nss) const
AttributeValue implementation for WifiMode.
static Time CalculateTxDuration(uint32_t size, const WifiTxVector &txVector, WifiPhyBand band, uint16_t staId=SU_STA_ID)
static Time CalculatePhyPreambleAndHeaderDuration(const WifiTxVector &txVector)
static TypeId GetTypeId()
Get the type ID.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
void SetDefault(std::string name, const AttributeValue &value)
void Connect(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 > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
#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_OR_EQ(actual, limit, msg)
Test that an actual value is less than or equal to a limit and report 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.
#define NS_TEST_ASSERT_MSG_NE(actual, limit, msg)
Test that an actual and expected (limit) value are not equal and report and abort if not.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Time NanoSeconds(uint64_t value)
Construct a Time in the indicated unit.
Time Seconds(double value)
Construct a Time in the indicated unit.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
@ WIFI_PHY_BAND_5GHZ
The 5 GHz band.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
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...
Ptr< T1 > DynamicCast(const Ptr< T2 > &p)
Cast a Ptr.
static constexpr uint8_t SINGLE_LINK_OP_ID
Link ID for single link operations (helps tracking places where correct link ID is to be used to supp...
std::unordered_map< uint16_t, Ptr< const WifiPsdu > > WifiConstPsduMap
Map of const PSDUs indexed by STA-ID.
static constexpr uint16_t SU_STA_ID
STA_ID to identify a single user (SU)
Information about transmitted frames.
WifiMacHeader header
Frame MAC header.
WifiTxVector txVector
TX vector used to transmit the frame.
Time txStart
Frame start TX time.
Time txDuration
Frame TX duration.
uint32_t size
PSDU size in bytes.
Parameters for this test.
bool lengthBasedRtsCtsThresh
if true, use length based RTS/CTS threshold; if false, use TX duration based RTS/CTS threshold
bool protectedIfResponded
whether a station is assumed to be protected if replied to a frame requiring acknowledgment
bool singleRtsPerTxop
whether protection mechanism is used no more than once per TXOP
bool nonHt
use 802.11a standard if true, 802.11ax standard otherwise
bool pifsRecovery
whether PIFS recovery is used after failure of a non-initial frame
uint32_t pktSize
packet size used for the simulation (in bytes)
static WifiTxopTestSuite g_wifiTxopTestSuite
the test suite