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 uint32_t m_rngSeed{1}; ///< RNG seed value
197 uint64_t m_rngRun{1}; ///< RNG run value
198 int64_t m_streamNo{100}; ///< RNG stream number
199 GcrParameters m_params; ///< parameters for the test to run
200 bool m_expectGcrUsed; ///< flag whether GCR is expected to be used during the test
201 uint16_t m_expectedMaxNumMpdusInPsdu; ///< expected maximum number of MPDUs in PSDUs
202
203 Ptr<ApWifiMac> m_apWifiMac; ///< AP wifi MAC
204 std::vector<Ptr<StaWifiMac>> m_stasWifiMac; ///< STAs wifi MAC
205 Ptr<ListErrorModel> m_apErrorModel; ///< error rate model to corrupt frames sent to the AP
206 std::vector<Ptr<ListErrorModel>>
207 m_errorModels; ///< error rate models to corrupt packets (per STA)
208 Ptr<PacketSocketClient> m_groupcastClient; ///< the packet socket client
209
210 uint16_t m_packets; ///< Number of generated groupcast packets by the application
211 std::vector<uint16_t>
212 m_phyRxPerSta; ///< count number of PSDUs successfully received by PHY of each STA
213 uint8_t m_nTxApRts; ///< number of RTS frames sent by the AP
214 uint8_t m_nTxApCts; ///< number of CTS-to-self frames sent by the AP
215 std::vector<uint8_t> m_txCtsPerSta; ///< count number of CTS responses frames sent by each STA
216 uint8_t m_totalTx; ///< total number of groupcast frames transmitted by the AP
217 std::vector<std::vector<uint16_t>>
218 m_rxGroupcastPerSta; ///< count groupcast packets received by the packet socket server of
219 ///< each STA and store TX attempt number for each received packet
220 std::vector<uint16_t> m_rxUnicastPerSta; ///< count unicast packets received by the packet
221 ///< socket server of each STA
222
223 uint8_t m_nTxGroupcastInCurrentTxop; ///< number of groupcast frames transmitted by the AP
224 ///< (including retries) in the current TXOP
225 uint8_t
226 m_nTxRtsInCurrentTxop; ///< number of RTS frames transmitted by the AP in the current TXOP
227 uint8_t m_nTxCtsInCurrentTxop; ///< number of CTS-to-self frames transmitted by the AP in the
228 ///< current TXOP
229
230 uint8_t m_nTxAddbaReq; ///< number of transmitted ADDBA Request frames
231 uint8_t m_nTxAddbaResp; ///< number of transmitted ADDBA Response frames
232 uint8_t m_nTxDelba; ///< number of transmitted DELBA frames
233 uint8_t m_nTxGcrAddbaReq; ///< number of transmitted GCR ADDBA Request frames
234 uint8_t m_nTxGcrAddbaResp; ///< number of transmitted GCR ADDBA Response frames
235 uint8_t m_nTxGcrDelba; ///< number of transmitted GCR DELBA frames
236};
237
238/**
239 * @ingroup wifi-test
240 * @ingroup tests
241 *
242 * @brief Test the implementation of GCR-UR.
243 *
244 * GCR-UR tests consider an AP and multiple STAs (with different capabilities) using GCR-UR with up
245 * to 7 retries. Besides what is verified in the base class, it is checked that:
246 *
247 * - When the GCR-UR service is used, each groupcast packet is retransmitted 7 times, in different
248 * TXOPs
249 * - When the GCR-UR service is used, all retransmissions of an MPDU have the Retry field in their
250 * Frame Control fields set to 1
251 * - When the GCR-UR service is used, either the initial packet or one of its retransmission is
252 * successfully received, unless all packets are corrupted
253 * - When the GCR-UR service is used and MPDU aggregation is enabled, it is checked each STA
254 * receives the expected amount of MPDUs
255 * - When the GCR-UR service is used and MPDU aggregation is enabled, it is checked received MPDUs
256 * are forwarded up in the expected order and the recipient window is correctly flushed
257 */
258class GcrUrTest : public GcrTestBase
259{
260 public:
261 /// Parameters for GCR-UR tests
263 {
264 uint8_t nGcrRetries{7}; ///< number of solicited retries to use for GCR-UR
266 0}; ///< the number of skipped retries because of lifetime expiry
267 std::optional<uint16_t>
268 packetsPauzeAggregation{}; ///< the amount of generated packets after which MPDU
269 ///< aggregation should not be used by limiting the queue to
270 ///< a single packet. If not specified, MPDU aggregation is
271 ///< not paused
272 std::optional<uint16_t>
273 packetsResumeAggregation{}; ///< the amount of generated packets after which MPDU
274 ///< aggregation should be used again by refilling the queue
275 ///< with more packets. If not specified, MPDU aggregation
276 ///< is not resumed
277 };
278
279 /**
280 * Constructor
281 *
282 * @param testName the name of the test
283 * @param commonParams the common GCR parameters for the test to run
284 * @param gcrUrParams the GCR-UR parameters for the test to run
285 */
286 GcrUrTest(const std::string& testName,
287 const GcrParameters& commonParams,
288 const GcrUrParameters& gcrUrParams);
289 ~GcrUrTest() override = default;
290
291 private:
292 void ConfigureGcrManager(WifiMacHelper& macHelper) override;
293 void CheckResults() override;
294 void PacketGenerated(std::string context, Ptr<const Packet> p, const Address& adr) override;
295 void Transmit(std::string context,
296 WifiConstPsduMap psduMap,
297 WifiTxVector txVector,
298 double txPowerW) override;
299 void Receive(std::string context, Ptr<const Packet> p, const Address& adr) override;
300 bool IsUsingAmpduOrSmpdu() const override;
301
302 GcrUrParameters m_gcrUrParams; ///< GCR-UR parameters for the test to run
303
304 std::vector<uint8_t>
305 m_totalTxGroupcasts; ///< total number of groupcast frames transmitted by the AP
306 ///< (including retries) per original groupcast frame
307
308 Ptr<WifiMpdu> m_currentMpdu; ///< current MPDU
309 uint64_t m_currentUid; ///< current UID
310};
311
312/**
313 * @ingroup wifi-test
314 * @ingroup tests
315 *
316 * @brief Test the implementation of GCR Block Ack.
317 *
318 * GCR-BA tests consider an AP and multiple STAs (with different capabilities) using GCR-BA.
319 * During tests, besides frames that can be corrupted by the base class, transmitted MPDUs
320 * can be corrupted, either for all STAs or for a particular STA. These tests eventually corrupt
321 * Block Ack Requests and Block Acks frames.
322 *
323 * Besides what is verified in the base class, it is checked that:
324 * - The expected amount of packets has been forwarded up to upper layer
325 * - When the GCR-BA service is used, the expected amount of Block Ack request and Block Acks frames
326 * have been received and they all contain the GCR group address
327 * - MPDUs are properly discarded when their lifetime expires, and TX window as well as receiver
328 * scoreboard are properly advanced if this occurs
329 * - When the GCR-BA service is used, the exchange of GCR Block Ack Request and GCR Block Acks
330 * frames might be spread over multiple TXOPs
331 * - A-MPDU is only used if TXOP limit duration permits it
332 */
333class GcrBaTest : public GcrTestBase
334{
335 public:
336 /// Parameters for GCR-BA tests
338 {
339 std::set<uint8_t> barsToCorrupt{}; ///< list of GCR BARs (starting from 1) to corrupt
340 std::set<uint8_t>
341 blockAcksToCorrupt{}; ///< list of GCR Block ACKs (starting from 1) to corrupt
342 std::vector<uint8_t>
343 expectedNTxBarsPerTxop{}; ///< the expected number of BAR frames transmitted by the AP
344 ///< per TXOP (only takes into account TXOPs with BARs
345 ///< transmitted)
346 };
347
348 /**
349 * Constructor
350 *
351 * @param testName the name of the test
352 * @param commonParams the common GCR parameters for the test to run
353 * @param gcrBaParams the GCR-BA parameters for the test to run
354 */
355 GcrBaTest(const std::string& testName,
356 const GcrParameters& commonParams,
357 const GcrBaParameters& gcrBaParams);
358 ~GcrBaTest() override = default;
359
360 private:
361 void ConfigureGcrManager(WifiMacHelper& macHelper) override;
362 void CheckResults() override;
363 void PacketGenerated(std::string context, Ptr<const Packet> p, const Address& adr) override;
364 void Transmit(std::string context,
365 WifiConstPsduMap psduMap,
366 WifiTxVector txVector,
367 double txPowerW) override;
368 void Receive(std::string context, Ptr<const Packet> p, const Address& adr) override;
369 void NotifyTxopTerminated(Time startTime, Time duration, uint8_t linkId) override;
370
371 GcrBaParameters m_gcrBaParams; ///< GCR-BA parameters for the test to run
372
373 uint8_t m_nTxGcrBar; ///< number of GCR Block Ack Request frames sent by the AP
374 uint8_t m_nTxGcrBlockAck; ///< number of GCR Block Ack Response frames sent to the AP
375 uint8_t m_nTxBlockAck; ///< number of Block Ack Response frames sent to the AP
376 uint16_t m_firstTxSeq; ///< sequence number of the first in-flight groupcast MPDU
377 int m_lastTxSeq; ///< sequence number of the last in-flight groupcast MPDU
378
379 std::vector<uint8_t>
380 m_nTxGcrBarsPerTxop; ///< number of GCR BAR frames transmitted by the AP per TXOP (only
381 ///< takes into account TXOPs with BARs transmitted)
382 uint8_t m_nTxGcrBarsInCurrentTxop; ///< number of GCR BAR frames transmitted by the AP in the
383 ///< current TXOP
384};
385
386/**
387 * @ingroup wifi-test
388 * @ingroup tests
389 *
390 * @brief wifi GCR Test Suite
391 */
393{
394 public:
396};
397
398#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.
int64_t m_streamNo
RNG stream number.
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
uint64_t m_rngRun
RNG run value.
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
uint32_t m_rngSeed
RNG seed value.
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:1381
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition nstime.h:1345
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition nstime.h:1357
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...