A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
wifi-gcr-test.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 DERONNE SOFTWARE ENGINEERING
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Sébastien Deronne <sebastien.deronne@gmail.com>
7 */
8
9#ifndef WIFI_GCR_TEST_H
10#define WIFI_GCR_TEST_H
11
12#include "ns3/ap-wifi-mac.h"
13#include "ns3/error-model.h"
14#include "ns3/ht-phy.h"
15#include "ns3/packet-socket-client.h"
16#include "ns3/sta-wifi-mac.h"
17#include "ns3/test.h"
18#include "ns3/wifi-default-gcr-manager.h"
19#include "ns3/wifi-mac-helper.h"
20
21#include <map>
22#include <optional>
23#include <set>
24#include <string>
25#include <vector>
26
27using namespace ns3;
28
29/**
30 * @ingroup wifi-test
31 * @ingroup tests
32 *
33 * @brief Base class for GCR tests
34 *
35 * It considers an AP and multiple STAs (with different capabilities) using either GCR-UR or GCR-BA.
36 * The AP generates either multicast packets only or alternatively multicast and unicast packets.
37 *
38 * The test eventually corrupts some MPDUs based on a provided list of groupcast MPDUs in a given
39 * PSDU (indices are starting from 1) that should not be successfully received by a given STA or by
40 * all STA (s). It may also corrupts specific frames, such as RTS/CTS or action frames that are used
41 * to establish or teardown Block Ack agreements. The latter is needed is needed for GCR-BA or for
42 * GCR-UR when A-MPDU is used.
43 *
44 * It is checked that:
45 *
46 * - When no GCR-capable STA is present, GCR service is not used
47 * - When the GCR service is used, groupcast frames are transmitted using HT, VHT or HE modulation
48 * class, depending on the supported modulations by member STAs
49 * - When the GCR is used, groupcast MPDUs carry an A-MSDU made of a single A-MSDU subframe,
50 * regardless of the A-MSDU size settings
51 * - When the GCR service is used, the expected protection mechanism is being used prior to the
52 * transmission of the groupcast packet
53 * - When the GCR service is used and RTS/CTS protection is selected, the receiver address of RTS
54 * frames corresponds to the MAC address of one of the STA of the group
55 * - When GCR-BA or GCR-UR with agreement is used, the expected amount of ADDBA request and response
56 * frames has been received and they all contain the GCR group address
57 * - when Block Ack agreement timeout is used, the expected amount of DELBA frames has been received
58 * and they all contain the GCR group address
59 * - The expected buffer size is being selected for the GCR Block Ack agreement, depending on what
60 * is supported by each member
61 */
62class GcrTestBase : public TestCase
63{
64 public:
65 /// Information about GCR STAs
66 struct StaInfo
67 {
68 bool gcrCapable{false}; ///< flag whether the STA is GCR capable
69 WifiStandard standard{WIFI_STANDARD_UNSPECIFIED}; ///< standard configured for the STA
70 MHz_u maxChannelWidth{20}; ///< maximum channel width supported by the STA
71 uint8_t maxNumStreams{1}; ///< maximum number of spatial streams supported by the STA
72 Time minGi{NanoSeconds(800)}; ///< minimum guard interval duration supported by the STA
73 };
74
75 /// Common parameters for GCR tests
77 {
78 std::vector<StaInfo> stas{}; ///< information about STAs
79 uint16_t numGroupcastPackets{0}; ///< number of groupcast packets to generate
80 uint16_t numUnicastPackets{0}; ///< number of unicast packets to generate
81 uint32_t packetSize{1000}; ///< the size in bytes of the packets to generate
82 uint16_t maxNumMpdusInPsdu{0}; ///< maximum number of MPDUs in PSDUs
83 Time startGroupcast{Seconds(1.0)}; ///< time to start groupcast packets generation
84 Time startUnicast{}; ///< time to start unicast packets generation
85 Time maxLifetime{MilliSeconds(500)}; ///< the maximum MSDU lifetime
86 uint32_t rtsThreshold{}; ///< the RTS threshold in bytes
88 GroupcastProtectionMode::RTS_CTS}; ///< the protection mode to use
89 std::map<uint8_t, std::map<uint8_t, std::set<uint8_t>>>
90 mpdusToCorruptPerPsdu{}; ///< list of MPDUs (starting from 1) to corrupt per PSDU
91 ///< (starting from 1)
92 std::set<uint8_t> rtsFramesToCorrupt{}; ///< list of RTS frames (starting from 1) to corrupt
93 std::set<uint8_t> ctsFramesToCorrupt{}; ///< list of CTS frames (starting from 1) to corrupt
94 std::set<uint8_t>
95 addbaReqsToCorrupt{}; ///< list of GCR ADDBA requests (starting from 1) to corrupt
96 std::set<uint8_t>
97 addbaRespsToCorrupt{}; ///< list of GCR ADDBA responses (starting from 1) to corrupt
98 std::set<uint8_t> expectedDroppedGroupcastMpdus{}; ///< list of groupcast MPDUs that are
99 ///< expected to be dropped because of
100 ///< lifetime expiry (starting from 1)
101 uint16_t baInactivityTimeout{0}; ///< max time (blocks of 1024 microseconds) allowed for
102 ///< block ack inactivity
103 Time txopLimit{}; ///< the TXOP limit duration
105 Seconds(2)}; ///< the duration of the simulation for the test run (2 seconds by default)
106 };
107
108 /**
109 * Constructor
110 *
111 * @param testName the name of the test
112 * @param params the common GCR parameters for the test to run
113 */
114 GcrTestBase(const std::string& testName, const GcrParameters& params);
115 ~GcrTestBase() override = default;
116
117 protected:
118 void DoSetup() override;
119 void DoRun() override;
120
121 /**
122 * Check results at the end of the test run.
123 */
124 virtual void CheckResults();
125
126 /**
127 * Configure the GCR manager for the test.
128 *
129 * @param macHelper the wifi mac helper
130 */
131 virtual void ConfigureGcrManager(WifiMacHelper& macHelper) = 0;
132
133 /**
134 * Callback invoked when a packet is generated by the packet socket client.
135 *
136 * @param context the context
137 * @param p the packet
138 * @param adr the address
139 */
140 virtual void PacketGenerated(std::string context, Ptr<const Packet> p, const Address& adr);
141
142 /**
143 * Callback invoked when a FEM passes PSDUs to the PHY.
144 *
145 * @param context the context
146 * @param psduMap the PSDU map
147 * @param txVector the TX vector
148 * @param txPowerW the tx power in Watts
149 */
150 virtual void Transmit(std::string context,
151 WifiConstPsduMap psduMap,
152 WifiTxVector txVector,
153 double txPowerW);
154
155 /**
156 * Callback invoked when a packet is successfully received by the PHY.
157 *
158 * @param context the context
159 * @param p the packet
160 * @param snr the SNR (in linear scale)
161 * @param mode the WiFi mode
162 * @param preamble the preamble
163 */
164 virtual void PhyRx(std::string context,
166 double snr,
167 WifiMode mode,
168 WifiPreamble preamble);
169
170 /**
171 * Callback invoked when packet is received by the packet socket server.
172 *
173 * @param context the context
174 * @param p the packet
175 * @param adr the address
176 */
177 virtual void Receive(std::string context, Ptr<const Packet> p, const Address& adr) = 0;
178
179 /**
180 * Callback invoked when a TXOP is terminated.
181 *
182 * @param startTime the time TXOP started
183 * @param duration the duration of the TXOP
184 * @param linkId the ID of the link that gained TXOP
185 */
186 virtual void NotifyTxopTerminated(Time startTime, Time duration, uint8_t linkId);
187
188 /**
189 * Function to indicate whether A-MPDU or S-MPDU is currently being used.
190 *
191 * @return true if A-MPDU or S-MPDU is currently being used, false otherwise
192 */
193 virtual bool IsUsingAmpduOrSmpdu() const;
194
195 std::string m_testName; ///< name of the test
196 GcrParameters m_params; ///< parameters for the test to run
197 bool m_expectGcrUsed; ///< flag whether GCR is expected to be used during the test
198 uint16_t m_expectedMaxNumMpdusInPsdu; ///< expected maximum number of MPDUs in PSDUs
199
200 Ptr<ApWifiMac> m_apWifiMac; ///< AP wifi MAC
201 std::vector<Ptr<StaWifiMac>> m_stasWifiMac; ///< STAs wifi MAC
202 Ptr<ListErrorModel> m_apErrorModel; ///< error rate model to corrupt frames sent to the AP
203 std::vector<Ptr<ListErrorModel>>
204 m_errorModels; ///< error rate models to corrupt packets (per STA)
205 Ptr<PacketSocketClient> m_groupcastClient; ///< the packet socket client
206
207 uint16_t m_packets; ///< Number of generated groupcast packets by the application
208 std::vector<uint16_t>
209 m_phyRxPerSta; ///< count number of PSDUs successfully received by PHY of each STA
210 uint8_t m_nTxApRts; ///< number of RTS frames sent by the AP
211 uint8_t m_nTxApCts; ///< number of CTS-to-self frames sent by the AP
212 std::vector<uint8_t> m_txCtsPerSta; ///< count number of CTS responses frames sent by each STA
213 uint8_t m_totalTx; ///< total number of groupcast frames transmitted by the AP
214 std::vector<std::vector<uint16_t>>
215 m_rxGroupcastPerSta; ///< count groupcast packets received by the packet socket server of
216 ///< each STA and store TX attempt number for each received packet
217 std::vector<uint16_t> m_rxUnicastPerSta; ///< count unicast packets received by the packet
218 ///< socket server of each STA
219
220 uint8_t m_nTxGroupcastInCurrentTxop; ///< number of groupcast frames transmitted by the AP
221 ///< (including retries) in the current TXOP
222 uint8_t
223 m_nTxRtsInCurrentTxop; ///< number of RTS frames transmitted by the AP in the current TXOP
224 uint8_t m_nTxCtsInCurrentTxop; ///< number of CTS-to-self frames transmitted by the AP in the
225 ///< current TXOP
226
227 uint8_t m_nTxAddbaReq; ///< number of transmitted ADDBA Request frames
228 uint8_t m_nTxAddbaResp; ///< number of transmitted ADDBA Response frames
229 uint8_t m_nTxDelba; ///< number of transmitted DELBA frames
230 uint8_t m_nTxGcrAddbaReq; ///< number of transmitted GCR ADDBA Request frames
231 uint8_t m_nTxGcrAddbaResp; ///< number of transmitted GCR ADDBA Response frames
232 uint8_t m_nTxGcrDelba; ///< number of transmitted GCR DELBA frames
233};
234
235/**
236 * @ingroup wifi-test
237 * @ingroup tests
238 *
239 * @brief Test the implementation of GCR-UR.
240 *
241 * GCR-UR tests consider an AP and multiple STAs (with different capabilities) using GCR-UR with up
242 * to 7 retries. Besides what is verified in the base class, it is checked that:
243 *
244 * - When the GCR-UR service is used, each groupcast packet is retransmitted 7 times, in different
245 * TXOPs
246 * - When the GCR-UR service is used, all retransmissions of an MPDU have the Retry field in their
247 * Frame Control fields set to 1
248 * - When the GCR-UR service is used, either the initial packet or one of its retransmission is
249 * successfully received, unless all packets are corrupted
250 * - When the GCR-UR service is used and MPDU aggregation is enabled, it is checked each STA
251 * receives the expected amount of MPDUs
252 * - When the GCR-UR service is used and MPDU aggregation is enabled, it is checked received MPDUs
253 * are forwarded up in the expected order and the recipient window is correctly flushed
254 */
255class GcrUrTest : public GcrTestBase
256{
257 public:
258 /// Parameters for GCR-UR tests
260 {
261 uint8_t nGcrRetries{7}; ///< number of solicited retries to use for GCR-UR
263 0}; ///< the number of skipped retries because of lifetime expiry
264 std::optional<uint16_t>
265 packetsPauzeAggregation{}; ///< the amount of generated packets after which MPDU
266 ///< aggregation should not be used by limiting the queue to
267 ///< a single packet. If not specified, MPDU aggregation is
268 ///< not paused
269 std::optional<uint16_t>
270 packetsResumeAggregation{}; ///< the amount of generated packets after which MPDU
271 ///< aggregation should be used again by refilling the queue
272 ///< with more packets. If not specified, MPDU aggregation
273 ///< is not resumed
274 };
275
276 /**
277 * Constructor
278 *
279 * @param testName the name of the test
280 * @param commonParams the common GCR parameters for the test to run
281 * @param gcrUrParams the GCR-UR parameters for the test to run
282 */
283 GcrUrTest(const std::string& testName,
284 const GcrParameters& commonParams,
285 const GcrUrParameters& gcrUrParams);
286 ~GcrUrTest() override = default;
287
288 private:
289 void ConfigureGcrManager(WifiMacHelper& macHelper) override;
290 void CheckResults() override;
291 void PacketGenerated(std::string context, Ptr<const Packet> p, const Address& adr) override;
292 void Transmit(std::string context,
293 WifiConstPsduMap psduMap,
294 WifiTxVector txVector,
295 double txPowerW) override;
296 void Receive(std::string context, Ptr<const Packet> p, const Address& adr) override;
297 bool IsUsingAmpduOrSmpdu() const override;
298
299 GcrUrParameters m_gcrUrParams; ///< GCR-UR parameters for the test to run
300
301 std::vector<uint8_t>
302 m_totalTxGroupcasts; ///< total number of groupcast frames transmitted by the AP
303 ///< (including retries) per original groupcast frame
304
305 Ptr<WifiMpdu> m_currentMpdu; ///< current MPDU
306 uint64_t m_currentUid; ///< current UID
307};
308
309/**
310 * @ingroup wifi-test
311 * @ingroup tests
312 *
313 * @brief Test the implementation of GCR Block Ack.
314 *
315 * GCR-BA tests consider an AP and multiple STAs (with different capabilities) using GCR-BA.
316 * During tests, besides frames that can be corrupted by the base class, transmitted MPDUs
317 * can be corrupted, either for all STAs or for a particular STA. These tests eventually corrupt
318 * Block Ack Requests and Block Acks frames.
319 *
320 * Besides what is verified in the base class, it is checked that:
321 * - The expected amount of packets has been forwarded up to upper layer
322 * - When the GCR-BA service is used, the expected amount of Block Ack request and Block Acks frames
323 * have been received and they all contain the GCR group address
324 * - MPDUs are properly discarded when their lifetime expires, and TX window as well as receiver
325 * scoreboard are properly advanced if this occurs
326 * - When the GCR-BA service is used, the exchange of GCR Block Ack Request and GCR Block Acks
327 * frames might be spread over multiple TXOPs
328 * - A-MPDU is only used if TXOP limit duration permits it
329 */
330class GcrBaTest : public GcrTestBase
331{
332 public:
333 /// Parameters for GCR-BA tests
335 {
336 std::set<uint8_t> barsToCorrupt{}; ///< list of GCR BARs (starting from 1) to corrupt
337 std::set<uint8_t>
338 blockAcksToCorrupt{}; ///< list of GCR Block ACKs (starting from 1) to corrupt
339 std::vector<uint8_t>
340 expectedNTxBarsPerTxop{}; ///< the expected number of BAR frames transmitted by the AP
341 ///< per TXOP (only takes into account TXOPs with BARs
342 ///< transmitted)
343 };
344
345 /**
346 * Constructor
347 *
348 * @param testName the name of the test
349 * @param commonParams the common GCR parameters for the test to run
350 * @param gcrBaParams the GCR-BA parameters for the test to run
351 */
352 GcrBaTest(const std::string& testName,
353 const GcrParameters& commonParams,
354 const GcrBaParameters& gcrBaParams);
355 ~GcrBaTest() override = default;
356
357 private:
358 void ConfigureGcrManager(WifiMacHelper& macHelper) override;
359 void CheckResults() override;
360 void PacketGenerated(std::string context, Ptr<const Packet> p, const Address& adr) override;
361 void Transmit(std::string context,
362 WifiConstPsduMap psduMap,
363 WifiTxVector txVector,
364 double txPowerW) override;
365 void Receive(std::string context, Ptr<const Packet> p, const Address& adr) override;
366 void NotifyTxopTerminated(Time startTime, Time duration, uint8_t linkId) override;
367
368 GcrBaParameters m_gcrBaParams; ///< GCR-BA parameters for the test to run
369
370 uint8_t m_nTxGcrBar; ///< number of GCR Block Ack Request frames sent by the AP
371 uint8_t m_nTxGcrBlockAck; ///< number of GCR Block Ack Response frames sent to the AP
372 uint8_t m_nTxBlockAck; ///< number of Block Ack Response frames sent to the AP
373 uint16_t m_firstTxSeq; ///< sequence number of the first in-flight groupcast MPDU
374 int m_lastTxSeq; ///< sequence number of the last in-flight groupcast MPDU
375
376 std::vector<uint8_t>
377 m_nTxGcrBarsPerTxop; ///< number of GCR BAR frames transmitted by the AP per TXOP (only
378 ///< takes into account TXOPs with BARs transmitted)
379 uint8_t m_nTxGcrBarsInCurrentTxop; ///< number of GCR BAR frames transmitted by the AP in the
380 ///< current TXOP
381};
382
383/**
384 * @ingroup wifi-test
385 * @ingroup tests
386 *
387 * @brief wifi GCR Test Suite
388 */
390{
391 public:
393};
394
395#endif /* WIFI_GCR_TEST_H */
Test the implementation of GCR Block Ack.
void Receive(std::string context, Ptr< const Packet > p, const Address &adr) override
Callback invoked when packet is received by the packet socket server.
void Transmit(std::string context, WifiConstPsduMap psduMap, WifiTxVector txVector, double txPowerW) override
Callback invoked when a FEM passes PSDUs to the PHY.
void NotifyTxopTerminated(Time startTime, Time duration, uint8_t linkId) override
Callback invoked when a TXOP is terminated.
void ConfigureGcrManager(WifiMacHelper &macHelper) override
Configure the GCR manager for the test.
int m_lastTxSeq
sequence number of the last in-flight groupcast MPDU
uint8_t m_nTxGcrBarsInCurrentTxop
number of GCR BAR frames transmitted by the AP in the current TXOP
GcrBaTest(const std::string &testName, const GcrParameters &commonParams, const GcrBaParameters &gcrBaParams)
Constructor.
uint8_t m_nTxGcrBlockAck
number of GCR Block Ack Response frames sent to the AP
void PacketGenerated(std::string context, Ptr< const Packet > p, const Address &adr) override
Callback invoked when a packet is generated by the packet socket client.
~GcrBaTest() override=default
std::vector< uint8_t > m_nTxGcrBarsPerTxop
number of GCR BAR frames transmitted by the AP per TXOP (only takes into account TXOPs with BARs tran...
uint8_t m_nTxBlockAck
number of Block Ack Response frames sent to the AP
uint16_t m_firstTxSeq
sequence number of the first in-flight groupcast MPDU
GcrBaParameters m_gcrBaParams
GCR-BA parameters for the test to run.
void CheckResults() override
Check results at the end of the test run.
uint8_t m_nTxGcrBar
number of GCR Block Ack Request frames sent by the AP
Base class for GCR tests.
std::vector< std::vector< uint16_t > > m_rxGroupcastPerSta
count groupcast packets received by the packet socket server of each STA and store TX attempt number ...
uint8_t m_nTxDelba
number of transmitted DELBA frames
uint8_t m_nTxGcrAddbaResp
number of transmitted GCR ADDBA Response frames
uint8_t m_nTxGroupcastInCurrentTxop
number of groupcast frames transmitted by the AP (including retries) in the current TXOP
std::vector< Ptr< ListErrorModel > > m_errorModels
error rate models to corrupt packets (per STA)
GcrParameters m_params
parameters for the test to run
GcrTestBase(const std::string &testName, const GcrParameters &params)
Constructor.
virtual void Transmit(std::string context, WifiConstPsduMap psduMap, WifiTxVector txVector, double txPowerW)
Callback invoked when a FEM passes PSDUs to the PHY.
uint8_t m_nTxApRts
number of RTS frames sent by the AP
Ptr< PacketSocketClient > m_groupcastClient
the packet socket client
bool m_expectGcrUsed
flag whether GCR is expected to be used during the test
std::vector< Ptr< StaWifiMac > > m_stasWifiMac
STAs wifi MAC.
uint16_t m_expectedMaxNumMpdusInPsdu
expected maximum number of MPDUs in PSDUs
~GcrTestBase() override=default
std::string m_testName
name of the test
virtual void PhyRx(std::string context, Ptr< const Packet > p, double snr, WifiMode mode, WifiPreamble preamble)
Callback invoked when a packet is successfully received by the PHY.
virtual void NotifyTxopTerminated(Time startTime, Time duration, uint8_t linkId)
Callback invoked when a TXOP is terminated.
uint8_t m_nTxCtsInCurrentTxop
number of CTS-to-self frames transmitted by the AP in the current TXOP
uint8_t m_nTxAddbaReq
number of transmitted ADDBA Request frames
uint8_t m_nTxGcrAddbaReq
number of transmitted GCR ADDBA Request frames
uint16_t m_packets
Number of generated groupcast packets by the application.
virtual void ConfigureGcrManager(WifiMacHelper &macHelper)=0
Configure the GCR manager for the test.
uint8_t m_nTxApCts
number of CTS-to-self frames sent by the AP
std::vector< uint16_t > m_rxUnicastPerSta
count unicast packets received by the packet socket server of each STA
virtual void CheckResults()
Check results at the end of the test run.
Ptr< ListErrorModel > m_apErrorModel
error rate model to corrupt frames sent to the AP
uint8_t m_nTxGcrDelba
number of transmitted GCR DELBA frames
void DoSetup() override
Implementation to do any local setup required for this TestCase.
virtual void PacketGenerated(std::string context, Ptr< const Packet > p, const Address &adr)
Callback invoked when a packet is generated by the packet socket client.
virtual bool IsUsingAmpduOrSmpdu() const
Function to indicate whether A-MPDU or S-MPDU is currently being used.
Ptr< ApWifiMac > m_apWifiMac
AP wifi MAC.
uint8_t m_nTxRtsInCurrentTxop
number of RTS frames transmitted by the AP in the current TXOP
virtual void Receive(std::string context, Ptr< const Packet > p, const Address &adr)=0
Callback invoked when packet is received by the packet socket server.
std::vector< uint16_t > m_phyRxPerSta
count number of PSDUs successfully received by PHY of each STA
uint8_t m_nTxAddbaResp
number of transmitted ADDBA Response frames
void DoRun() override
Implementation to actually run this TestCase.
uint8_t m_totalTx
total number of groupcast frames transmitted by the AP
std::vector< uint8_t > m_txCtsPerSta
count number of CTS responses frames sent by each STA
Test the implementation of GCR-UR.
std::vector< uint8_t > m_totalTxGroupcasts
total number of groupcast frames transmitted by the AP (including retries) per original groupcast fra...
void PacketGenerated(std::string context, Ptr< const Packet > p, const Address &adr) override
Callback invoked when a packet is generated by the packet socket client.
void ConfigureGcrManager(WifiMacHelper &macHelper) override
Configure the GCR manager for the test.
GcrUrTest(const std::string &testName, const GcrParameters &commonParams, const GcrUrParameters &gcrUrParams)
Constructor.
Ptr< WifiMpdu > m_currentMpdu
current MPDU
void CheckResults() override
Check results at the end of the test run.
uint64_t m_currentUid
current UID
GcrUrParameters m_gcrUrParams
GCR-UR parameters for the test to run.
~GcrUrTest() override=default
bool IsUsingAmpduOrSmpdu() const override
Function to indicate whether A-MPDU or S-MPDU is currently being used.
void Transmit(std::string context, WifiConstPsduMap psduMap, WifiTxVector txVector, double txPowerW) override
Callback invoked when a FEM passes PSDUs to the PHY.
void Receive(std::string context, Ptr< const Packet > p, const Address &adr) override
Callback invoked when packet is received by the packet socket server.
wifi GCR Test Suite
a polymophic address class
Definition address.h:90
Smart pointer class similar to boost::intrusive_ptr.
encapsulates test code
Definition test.h:1050
A suite of tests to run.
Definition test.h:1267
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
create MAC layers for a ns3::WifiNetDevice.
represent a single transmission mode
Definition wifi-mode.h:40
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
Time NanoSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition nstime.h:1380
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition nstime.h:1344
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition nstime.h:1356
WifiStandard
Identifies the IEEE 802.11 specifications that a Wifi device can be configured to use.
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
@ WIFI_STANDARD_UNSPECIFIED
Every class exported by the ns3 library is enclosed in the ns3 namespace.
GroupcastProtectionMode
Groupcast protection mode enumeration.
Definition gcr-manager.h:38
std::unordered_map< uint16_t, Ptr< const WifiPsdu > > WifiConstPsduMap
Map of const PSDUs indexed by STA-ID.
Definition wifi-ppdu.h:38
Parameters for GCR-BA tests.
std::set< uint8_t > blockAcksToCorrupt
list of GCR Block ACKs (starting from 1) to corrupt
std::set< uint8_t > barsToCorrupt
list of GCR BARs (starting from 1) to corrupt
std::vector< uint8_t > expectedNTxBarsPerTxop
the expected number of BAR frames transmitted by the AP per TXOP (only takes into account TXOPs with ...
Common parameters for GCR tests.
uint16_t maxNumMpdusInPsdu
maximum number of MPDUs in PSDUs
std::set< uint8_t > addbaRespsToCorrupt
list of GCR ADDBA responses (starting from 1) to corrupt
std::set< uint8_t > rtsFramesToCorrupt
list of RTS frames (starting from 1) to corrupt
Time duration
the duration of the simulation for the test run (2 seconds by default)
std::vector< StaInfo > stas
information about STAs
uint16_t numUnicastPackets
number of unicast packets to generate
std::set< uint8_t > expectedDroppedGroupcastMpdus
list of groupcast MPDUs that are expected to be dropped because of lifetime expiry (starting from 1)
Time txopLimit
the TXOP limit duration
uint16_t baInactivityTimeout
max time (blocks of 1024 microseconds) allowed for block ack inactivity
std::set< uint8_t > ctsFramesToCorrupt
list of CTS frames (starting from 1) to corrupt
uint16_t numGroupcastPackets
number of groupcast packets to generate
uint32_t rtsThreshold
the RTS threshold in bytes
std::set< uint8_t > addbaReqsToCorrupt
list of GCR ADDBA requests (starting from 1) to corrupt
uint32_t packetSize
the size in bytes of the packets to generate
Time startGroupcast
time to start groupcast packets generation
Time startUnicast
time to start unicast packets generation
Time maxLifetime
the maximum MSDU lifetime
GroupcastProtectionMode gcrProtectionMode
the protection mode to use
std::map< uint8_t, std::map< uint8_t, std::set< uint8_t > > > mpdusToCorruptPerPsdu
list of MPDUs (starting from 1) to corrupt per PSDU (starting from 1)
Information about GCR STAs.
bool gcrCapable
flag whether the STA is GCR capable
MHz_u maxChannelWidth
maximum channel width supported by the STA
WifiStandard standard
standard configured for the STA
uint8_t maxNumStreams
maximum number of spatial streams supported by the STA
Time minGi
minimum guard interval duration supported by the STA
Parameters for GCR-UR tests.
uint8_t expectedSkippedRetries
the number of skipped retries because of lifetime expiry
std::optional< uint16_t > packetsResumeAggregation
the amount of generated packets after which MPDU aggregation should be used again by refilling the qu...
uint8_t nGcrRetries
number of solicited retries to use for GCR-UR
std::optional< uint16_t > packetsPauzeAggregation
the amount of generated packets after which MPDU aggregation should not be used by limiting the queue...