A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
wifi-emlsr-basic-exchanges-test.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 Universita' degli Studi di Napoli Federico II
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Stefano Avallone <stavallo@unina.it>
7 */
8
9#ifndef WIFI_EMLSR_BASIC_EXCHANGES_TEST_H
10#define WIFI_EMLSR_BASIC_EXCHANGES_TEST_H
11
13
14/**
15 * @ingroup wifi-test
16 * @ingroup tests
17 *
18 * @brief Test the transmission of DL frames to EMLSR clients.
19 *
20 * This test considers an AP MLD and a configurable number of non-AP MLDs that support EMLSR
21 * and a configurable number of non-AP MLDs that do not support EMLSR. All MLDs have three
22 * setup links, while the set of EMLSR links for the EMLSR clients is configurable.
23 * Block ack agreements (for TID 0, with the AP MLD as originator) are established with all
24 * the non-AP MLDs before that EMLSR clients send the EML Operating Mode Notification frame
25 * to enable the EMLSR mode on their EMLSR links.
26 *
27 * Before enabling EMLSR mode, it is checked that:
28 *
29 * - all EMLSR links (but the link used for ML setup) of the EMLSR clients are considered to
30 * be in power save mode and are blocked by the AP MLD; all the other links have transitioned
31 * to active mode and are not blocked
32 * - no MU-RTS Trigger Frame is sent as Initial control frame
33 * - In case of EMLSR clients having no link that is not an EMLSR link and is different than
34 * the link used for ML setup, the two A-MPDUs used to trigger BA establishment are
35 * transmitted one after another on the link used for ML setup. Otherwise, the two A-MPDUs
36 * are sent concurrently on two distinct links
37 *
38 * After enabling EMLSR mode, it is checked that:
39 *
40 * - all EMLSR links of the EMLSR clients are considered to be in active mode and are not
41 * blocked by the AP MLD
42 * - If all setup links are EMLSR links, the first two frame exchanges are both protected by
43 * MU-RTS TF and occur one after another. Otherwise, one frame exchange occurs on the
44 * non-EMLSR link and is not protected by MU-RTS TF; the other frame exchange occurs on an
45 * EMLSR link and is protected by MU-RTS TF
46 * - the AP MLD blocks transmission on all other EMLSR links when sending an ICF to an EMLSR client
47 * - After completing a frame exchange with an EMLSR client, the AP MLD can start another frame
48 * exchange with that EMLSR client within the same TXOP (after a SIFS) without sending an ICF
49 * - During the transition delay, all EMLSR links are not used for DL transmissions
50 * - The padding added to Initial Control frames is the largest among all the EMLSR clients
51 * solicited by the ICF
52 *
53 * After disabling EMLSR mode, it is checked that:
54 *
55 * - all EMLSR links (but the link used to exchange EML Notification frames) of the EMLSR clients
56 * are considered to be in power save mode and are blocked by the AP MLD
57 * - an MU-RTS Trigger Frame is sent by the AP MLD as ICF for sending the EML Notification
58 * response, unless the link used to exchange EML Notification frames is a non-EMLSR link
59 * - no MU-RTS Trigger Frame is used as ICF for QoS data frames
60 * - In case of EMLSR clients having no link that is not an EMLSR link and is different than
61 * the link used to exchange EML Notification frames, the two A-MPDUs are transmitted one
62 * after another on the link used to exchange EML Notification frames. Otherwise, the two
63 * A-MPDUs are sent concurrently on two distinct links
64 *
65 * Also, if the PutAuxPhyToSleep attribute is set to true, it is checked that aux PHYs are in
66 * sleep mode after receiving an ICF and are resumed from sleep after receiving the CF-End frame.
67 */
69{
70 public:
71 /**
72 * Parameters for the EMLSR DL TXOP test
73 */
74 struct Params
75 {
76 std::size_t nEmlsrStations; //!< number of non-AP MLDs that support EMLSR
77 std::size_t nNonEmlsrStations; //!< number of non-AP MLDs that do not support EMLSR
78 std::set<uint8_t>
79 linksToEnableEmlsrOn; //!< IDs of links on which EMLSR mode should be enabled
80 std::vector<Time> paddingDelay; //!< vector (whose size equals <i>nEmlsrStations</i>) of the
81 //!< padding delay values advertised by non-AP MLDs
82 std::vector<Time>
83 transitionDelay; //!< vector (whose size equals <i>nEmlsrStations</i>) of
84 //!< transition the delay values advertised by non-AP MLDs
85 Time transitionTimeout; //!< the Transition Timeout advertised by the AP MLD
86 bool putAuxPhyToSleep; //!< whether aux PHYs are put to sleep during DL/UL TXOPs
87 };
88
89 /**
90 * Constructor
91 *
92 * @param params parameters for the EMLSR DL TXOP test
93 */
94 EmlsrDlTxopTest(const Params& params);
95 ~EmlsrDlTxopTest() override = default;
96
97 protected:
98 void DoSetup() override;
99 void DoRun() override;
100 void Transmit(Ptr<WifiMac> mac,
101 uint8_t phyId,
102 WifiConstPsduMap psduMap,
103 WifiTxVector txVector,
104 double txPowerW) override;
105
106 /**
107 * Check that the simulation produced the expected results.
108 */
109 void CheckResults();
110
111 /**
112 * Check that the AP MLD considers the correct Power Management mode for the links setup
113 * with the given non-AP MLD. This method is intended to be called shortly after ML setup.
114 *
115 * @param address a link address of the given non-AP MLD
116 */
117 void CheckPmModeAfterAssociation(const Mac48Address& address);
118
119 /**
120 * Check that appropriate actions are taken when the AP MLD transmits an EML Operating Mode
121 * Notification response frame to an EMLSR client on the given link.
122 *
123 * @param mpdu the MPDU carrying the EML Operating Mode Notification frame
124 * @param txVector the TXVECTOR used to send the PPDU
125 * @param linkId the ID of the given link
126 */
128 const WifiTxVector& txVector,
129 uint8_t linkId);
130
131 /**
132 * Check that appropriate actions are taken when an EMLSR client transmits an EML Operating
133 * Mode Notification frame to the AP MLD on the given link.
134 *
135 * @param mpdu the MPDU carrying the EML Operating Mode Notification frame
136 * @param txVector the TXVECTOR used to send the PPDU
137 * @param linkId the ID of the given link
138 */
140 const WifiTxVector& txVector,
141 uint8_t linkId);
142
143 /**
144 * Check that appropriate actions are taken by the AP MLD transmitting an initial
145 * Control frame to an EMLSR client on the given link.
146 *
147 * @param mpdu the MPDU carrying the MU-RTS TF
148 * @param txVector the TXVECTOR used to send the PPDU
149 * @param linkId the ID of the given link
150 */
152 const WifiTxVector& txVector,
153 uint8_t linkId);
154
155 /**
156 * Check that appropriate actions are taken by the AP MLD transmitting a PPDU containing
157 * QoS data frames to EMLSR clients on the given link.
158 *
159 * @param psduMap the PSDU(s) carrying QoS data frames
160 * @param txVector the TXVECTOR used to send the PPDU
161 * @param linkId the ID of the given link
162 */
163 void CheckQosFrames(const WifiConstPsduMap& psduMap,
164 const WifiTxVector& txVector,
165 uint8_t linkId);
166
167 /**
168 * Check that appropriate actions are taken by the AP MLD receiving a PPDU containing
169 * BlockAck frames from EMLSR clients on the given link.
170 *
171 * @param psduMap the PSDU carrying BlockAck frames
172 * @param txVector the TXVECTOR used to send the PPDU
173 * @param phyId the ID of the PHY transmitting the PSDU(s)
174 */
175 void CheckBlockAck(const WifiConstPsduMap& psduMap,
176 const WifiTxVector& txVector,
177 uint8_t phyId);
178
179 private:
180 void StartTraffic() override;
181
182 /**
183 * Enable EMLSR mode on the next EMLSR client
184 */
185 void EnableEmlsrMode();
186
187 std::set<uint8_t> m_emlsrLinks; /**< IDs of the links on which EMLSR mode has to be enabled */
188 Time m_emlsrEnabledTime; //!< when EMLSR mode has been enabled on all EMLSR clients
189 const Time m_fe2to3delay; /**< time interval between 2nd and 3rd frame exchange sequences
190 after the enablement of EMLSR mode */
191 std::size_t m_countQoSframes; //!< counter for QoS frames (transition delay test)
192 std::size_t m_countBlockAck; //!< counter for BlockAck frames (transition delay test)
193 Ptr<ListErrorModel> m_errorModel; ///< error rate model to corrupt BlockAck at AP MLD
194};
195
196/**
197 * @ingroup wifi-test
198 * @ingroup tests
199 *
200 * @brief Test the transmission of UL frames from EMLSR clients.
201 *
202 * This test considers an AP MLD and a non-AP MLD that support EMLSR. The non-AP MLD setups three
203 * links, while the set of EMLSR links is configurable. Block ack agreements (for TID 0) for both
204 * DL and UL directions are established after that the EML Operating Mode Notification frames are
205 * exchanged to enable the EMLSR mode on the EMLSR links. Aux PHYs on the EMLSR client do not
206 * switch link, hence the main PHY will switch link (if needed) when terminating a TXOP.
207 *
208 * It is checked that:
209 *
210 * - Initially, aux PHYs are configured so that they are unable to transmit frames. Before
211 * generating the packets for the first UL data frame, transmissions on the link where the
212 * main PHY is operating and on the non-EMLSR link (if any) are blocked. Thus, the first UL data
213 * frame is held until transmissions on the link where the main PHY is operating are unblocked.
214 * The first UL data frame is sent by the main PHY without RTS protection. When the data frame
215 * exchange terminates, the MediumSyncDelay timer is started on the other EMLSR links and the
216 * CCA ED threshold is set as expected
217 * - If there is a non-EMLSR link, another data frame can be sent concurrently (without protection)
218 * on the non-EMLSR link
219 * - When the first UL data frame is transmitted, we make the aux PHYs on the EMLSR client capable
220 * of transmitting, we block transmissions on the link where the main PHY is operating and
221 * generate new UL packets, which will then be transmitted on a link where an aux PHY is
222 * operating. Thus, the aux PHY transmits an RTS frame and the main PHY will take over and
223 * transmit the second UL data frame. We check that, while the link on which the main PHY was
224 * operating is blocked because another EMLSR link is being used, new backoff values for that
225 * link are generated if and only if the QosTxop::GenerateBackoffIfTxopWithoutTx attribute is
226 * true; otherwise, a new backoff value is generated when the link is unblocked.
227 * - When the exchange of the second UL data frame terminates, we make the aux PHY unable to
228 * transmit, block transmissions on the non-EMLSR link (if any) and generate some more UL
229 * packets, which will then be transmitted by the main PHY. However, a MediumSyncDelay timer
230 * is now running on the link where the main PHY is operating, hence transmissions are protected
231 * by an RTS frame. We install a post reception error model on the AP MLD so that all RTS frames
232 * sent by the EMLSR client are not received by the AP MLD. We check that the EMLSR client makes
233 * at most the configured max number of transmission attempts and that another UL data frame is
234 * sent once the MediumSyncDelay timer is expired. We also check that the TX width of the RTS
235 * frames and the UL data frame equal the channel width used by the main PHY.
236 * - We check that no issue arises in case an aux PHY sends an RTS frame but the CTS response is
237 * not transmitted successfully. Specifically, we check that the main PHY is completing the
238 * channel switch when the (unsuccessful) reception of the CTS ends and that a new RTS/CTS
239 * exchange is carried out to protect the transmission of the last data frame.
240 * - While the main PHY is operating on the same link as an aux PHY (which does not switch
241 * channel), the aux PHY is put in sleep mode as soon as the main PHY starts operating on the
242 * link, stays in sleep mode until the TXOP ends and is resumed from sleep mode right after the
243 * end of the DL/UL TXOP.
244 *
245 * Also, if the PutAuxPhyToSleep attribute is set to true, it is checked that aux PHYs are in
246 * sleep mode a SIFS after receiving the ICF and are still in sleep mode right before receiving
247 * a Block Ack frame, and they are resumed from sleep after receiving the Block Ack frame.
248 */
250{
251 public:
252 /**
253 * Parameters for the EMLSR UL TXOP test
254 */
255 struct Params
256 {
257 std::set<uint8_t>
258 linksToEnableEmlsrOn; //!< IDs of links on which EMLSR mode should be enabled
259 MHz_u channelWidth; //!< width of the channels used by MLDs
260 MHz_u auxPhyChannelWidth; //!< max width supported by aux PHYs
261 Time mediumSyncDuration; //!< duration of the MediumSyncDelay timer
262 uint8_t msdMaxNTxops; //!< Max number of TXOPs that an EMLSR client is allowed
263 //!< to attempt to initiate while the MediumSyncDelay
264 //!< timer is running (zero indicates no limit)
265 bool genBackoffIfTxopWithoutTx; //!< whether the backoff should be invoked when the AC gains
266 //!< a TXOP but it does not transmit any frame
267 bool putAuxPhyToSleep; //!< whether aux PHYs are put to sleep during DL/UL TXOPs
268 bool switchMainPhyBackDelayTimeout; //!< whether a SwitchMainPhyBackDelay timer expires
269 //!< after that the main PHY moved to an aux PHY link
270 };
271
272 /**
273 * Constructor
274 *
275 * @param params parameters for the EMLSR UL TXOP test
276 */
277 EmlsrUlTxopTest(const Params& params);
278 ~EmlsrUlTxopTest() override = default;
279
280 protected:
281 void DoSetup() override;
282 void DoRun() override;
283 void Transmit(Ptr<WifiMac> mac,
284 uint8_t phyId,
285 WifiConstPsduMap psduMap,
286 WifiTxVector txVector,
287 double txPowerW) override;
288
289 /**
290 * Check that the simulation produced the expected results.
291 */
292 void CheckResults();
293
294 /**
295 * Check that appropriate actions are taken by the EMLSR client when transmitting an RTS
296 * frame on the given link.
297 *
298 * @param mpdu the MPDU carrying the RTS frame
299 * @param txVector the TXVECTOR used to send the PPDU
300 * @param linkId the ID of the given link
301 */
302 void CheckRtsFrames(Ptr<const WifiMpdu> mpdu, const WifiTxVector& txVector, uint8_t linkId);
303
304 /**
305 * Check that appropriate actions are taken by the EMLSR client when receiving a CTS
306 * frame on the given link.
307 *
308 * @param mpdu the MPDU carrying the CTS frame
309 * @param txVector the TXVECTOR used to send the PPDU
310 * @param linkId the ID of the given link
311 */
312 void CheckCtsFrames(Ptr<const WifiMpdu> mpdu, const WifiTxVector& txVector, uint8_t linkId);
313
314 /**
315 * Check that appropriate actions are taken when an MLD transmits a PPDU containing
316 * QoS data frames on the given link.
317 *
318 * @param psduMap the PSDU(s) carrying QoS data frames
319 * @param txVector the TXVECTOR used to send the PPDU
320 * @param linkId the ID of the given link
321 */
322 void CheckQosFrames(const WifiConstPsduMap& psduMap,
323 const WifiTxVector& txVector,
324 uint8_t linkId);
325
326 /**
327 * Check that appropriate actions are taken when an MLD transmits a PPDU containing
328 * BlockAck frames on the given link.
329 *
330 * @param psduMap the PSDU carrying BlockAck frames
331 * @param txVector the TXVECTOR used to send the PPDU
332 * @param linkId the ID of the given link
333 */
334 void CheckBlockAck(const WifiConstPsduMap& psduMap,
335 const WifiTxVector& txVector,
336 uint8_t linkId);
337
338 private:
339 void StartTraffic() override;
340
341 /**
342 * Callback invoked when a new backoff value is generated by the EMLSR client.
343 *
344 * @param backoff the generated backoff value
345 * @param linkId the ID of the link for which the backoff value has been generated
346 */
347 void BackoffGenerated(uint32_t backoff, uint8_t linkId);
348
349 std::set<uint8_t> m_emlsrLinks; /**< IDs of the links on which EMLSR mode has to be enabled */
350 MHz_u m_channelWidth; //!< width of the channels used by MLDs
351 MHz_u m_auxPhyChannelWidth; //!< max width supported by aux PHYs
352 Time m_mediumSyncDuration; //!< duration of the MediumSyncDelay timer
353 uint8_t m_msdMaxNTxops; //!< Max number of TXOPs that an EMLSR client is allowed
354 //!< to attempt to initiate while the MediumSyncDelay
355 //!< timer is running (zero indicates no limit)
356 std::optional<uint8_t> m_nonEmlsrLink; //!< ID of the non-EMLSR link (if any)
357 Time m_emlsrEnabledTime; //!< when EMLSR mode has been enabled on all EMLSR clients
358 Time m_firstUlPktsGenTime; //!< generation time of the first two UL packets
359 const Time m_unblockMainPhyLinkDelay; //!< delay between the time the first two UL packets are
360 //!< generated and the time transmissions are unblocked
361 //!< on the link where the main PHY is operating on
362 Time m_lastMsdExpiryTime; //!< expiry time of the last MediumSyncDelay timer
363 bool m_checkBackoffStarted; //!< whether we are checking the generated backoff values
364 std::optional<Time> m_backoffEndTime; //!< expected backoff end time on main PHY link
365 Ptr<ListErrorModel> m_errorModel; ///< error rate model to corrupt packets
366 std::size_t m_countQoSframes; //!< counter for QoS frames
367 std::size_t m_countBlockAck; //!< counter for BlockAck frames
368 std::size_t m_countRtsframes; //!< counter for RTS frames
369 bool m_genBackoffIfTxopWithoutTx; //!< whether the backoff should be invoked when the AC
370 //!< gains the right to start a TXOP but it does not
371 //!< transmit any frame
372 std::optional<bool> m_corruptCts; //!< whether the transmitted CTS must be corrupted
373};
374
375/**
376 * @ingroup wifi-test
377 * @ingroup tests
378 *
379 * @brief Check UL OFDMA operations with EMLSR clients.
380 *
381 * This test considers an AP MLD and an EMLSR client and a non-AP MLD that setup three links with
382 * the AP MLD. Once block ack agreements (for TID 0) are established for the UL direction, the
383 * AP MLD starts requesting channel access (on all the links) through the Multi-User scheduler.
384 * Given that links are idle, AP MLD accesses the channel on all the links and concurrently sends
385 * Trigger Frames. When the transmission of the first Trigger Frame is over, a client application
386 * on the EMLSR client generates two packets addressed to the AP MLD.
387 *
388 * It is checked that:
389 * - when sending BSRP TF is disabled, the first Trigger Frame sent is an MU-RTS; otherwise, it is
390 * a BSRP Trigger Frame. In both cases, such Trigger Frame acts as an ICF for the EMLSR client
391 * - the other Trigger Frames sent concurrently with the ICF only solicit the non-EMLSR client
392 * (AP MLD has blocked transmissions to the EMLSR client upon preparing the first Trigger Frame)
393 * - the buffer status reported in QoS Null frames is as expected
394 * - the EMLSR client sends a QoS Data frame in a TB PPDU
395 */
397{
398 public:
399 /**
400 * Constructor
401 *
402 * @param enableBsrp whether MU scheduler sends BSRP TFs
403 */
404 EmlsrUlOfdmaTest(bool enableBsrp);
405
406 protected:
407 void DoSetup() override;
408 void DoRun() override;
409 void Transmit(Ptr<WifiMac> mac,
410 uint8_t phyId,
411 WifiConstPsduMap psduMap,
412 WifiTxVector txVector,
413 double txPowerW) override;
414
415 /**
416 * Check that the simulation produced the expected results.
417 */
418 void CheckResults();
419
420 private:
421 void StartTraffic() override;
422
423 bool m_enableBsrp; //!< whether MU scheduler sends BSRP TFs
424 std::size_t m_txPsdusPos; //!< position in the vector of TX PSDUs of the first ICF
425 Time m_startAccessReq; //!< start time of the first AP MLD access request via MU scheduler
426};
427
428/**
429 * @ingroup wifi-test
430 * @ingroup tests
431 *
432 * @brief wifi EMLSR suite to test basic frame exchanges.
433 */
439
440#endif /* WIFI_EMLSR_BASIC_EXCHANGES_TEST_H */
Test the transmission of DL frames to EMLSR clients.
void CheckInitialControlFrame(Ptr< const WifiMpdu > mpdu, const WifiTxVector &txVector, uint8_t linkId)
Check that appropriate actions are taken by the AP MLD transmitting an initial Control frame to an EM...
const Time m_fe2to3delay
time interval between 2nd and 3rd frame exchange sequences after the enablement of EMLSR mode
void CheckResults()
Check that the simulation produced the expected results.
void CheckPmModeAfterAssociation(const Mac48Address &address)
Check that the AP MLD considers the correct Power Management mode for the links setup with the given ...
EmlsrDlTxopTest(const Params &params)
Constructor.
void StartTraffic() override
Start the generation of traffic (needs to be overridden)
Ptr< ListErrorModel > m_errorModel
error rate model to corrupt BlockAck at AP MLD
void CheckStaEmlNotificationFrame(Ptr< const WifiMpdu > mpdu, const WifiTxVector &txVector, uint8_t linkId)
Check that appropriate actions are taken when an EMLSR client transmits an EML Operating Mode Notific...
std::size_t m_countQoSframes
counter for QoS frames (transition delay test)
void CheckApEmlNotificationFrame(Ptr< const WifiMpdu > mpdu, const WifiTxVector &txVector, uint8_t linkId)
Check that appropriate actions are taken when the AP MLD transmits an EML Operating Mode Notification...
~EmlsrDlTxopTest() override=default
Time m_emlsrEnabledTime
when EMLSR mode has been enabled on all EMLSR clients
std::set< uint8_t > m_emlsrLinks
IDs of the links on which EMLSR mode has to be enabled.
void DoSetup() override
Implementation to do any local setup required for this TestCase.
void CheckQosFrames(const WifiConstPsduMap &psduMap, const WifiTxVector &txVector, uint8_t linkId)
Check that appropriate actions are taken by the AP MLD transmitting a PPDU containing QoS data frames...
void Transmit(Ptr< WifiMac > mac, uint8_t phyId, WifiConstPsduMap psduMap, WifiTxVector txVector, double txPowerW) override
Callback invoked when a FEM passes PSDUs to the PHY.
void EnableEmlsrMode()
Enable EMLSR mode on the next EMLSR client.
void CheckBlockAck(const WifiConstPsduMap &psduMap, const WifiTxVector &txVector, uint8_t phyId)
Check that appropriate actions are taken by the AP MLD receiving a PPDU containing BlockAck frames fr...
void DoRun() override
Implementation to actually run this TestCase.
std::size_t m_countBlockAck
counter for BlockAck frames (transition delay test)
Base class for EMLSR Operations tests.
Check UL OFDMA operations with EMLSR clients.
Time m_startAccessReq
start time of the first AP MLD access request via MU scheduler
void DoRun() override
Implementation to actually run this TestCase.
void CheckResults()
Check that the simulation produced the expected results.
EmlsrUlOfdmaTest(bool enableBsrp)
Constructor.
void StartTraffic() override
Start the generation of traffic (needs to be overridden)
void Transmit(Ptr< WifiMac > mac, uint8_t phyId, WifiConstPsduMap psduMap, WifiTxVector txVector, double txPowerW) override
Callback invoked when a FEM passes PSDUs to the PHY.
void DoSetup() override
Implementation to do any local setup required for this TestCase.
bool m_enableBsrp
whether MU scheduler sends BSRP TFs
std::size_t m_txPsdusPos
position in the vector of TX PSDUs of the first ICF
Test the transmission of UL frames from EMLSR clients.
std::size_t m_countQoSframes
counter for QoS frames
Time m_emlsrEnabledTime
when EMLSR mode has been enabled on all EMLSR clients
const Time m_unblockMainPhyLinkDelay
delay between the time the first two UL packets are generated and the time transmissions are unblocke...
Ptr< ListErrorModel > m_errorModel
error rate model to corrupt packets
MHz_u m_auxPhyChannelWidth
max width supported by aux PHYs
void BackoffGenerated(uint32_t backoff, uint8_t linkId)
Callback invoked when a new backoff value is generated by the EMLSR client.
std::optional< uint8_t > m_nonEmlsrLink
ID of the non-EMLSR link (if any)
Time m_lastMsdExpiryTime
expiry time of the last MediumSyncDelay timer
void DoSetup() override
Implementation to do any local setup required for this TestCase.
std::size_t m_countRtsframes
counter for RTS frames
void CheckCtsFrames(Ptr< const WifiMpdu > mpdu, const WifiTxVector &txVector, uint8_t linkId)
Check that appropriate actions are taken by the EMLSR client when receiving a CTS frame on the given ...
void DoRun() override
Implementation to actually run this TestCase.
Time m_firstUlPktsGenTime
generation time of the first two UL packets
std::optional< bool > m_corruptCts
whether the transmitted CTS must be corrupted
~EmlsrUlTxopTest() override=default
void CheckBlockAck(const WifiConstPsduMap &psduMap, const WifiTxVector &txVector, uint8_t linkId)
Check that appropriate actions are taken when an MLD transmits a PPDU containing BlockAck frames on t...
void StartTraffic() override
Start the generation of traffic (needs to be overridden)
std::optional< Time > m_backoffEndTime
expected backoff end time on main PHY link
MHz_u m_channelWidth
width of the channels used by MLDs
std::set< uint8_t > m_emlsrLinks
IDs of the links on which EMLSR mode has to be enabled.
Time m_mediumSyncDuration
duration of the MediumSyncDelay timer
void CheckRtsFrames(Ptr< const WifiMpdu > mpdu, const WifiTxVector &txVector, uint8_t linkId)
Check that appropriate actions are taken by the EMLSR client when transmitting an RTS frame on the gi...
void CheckQosFrames(const WifiConstPsduMap &psduMap, const WifiTxVector &txVector, uint8_t linkId)
Check that appropriate actions are taken when an MLD transmits a PPDU containing QoS data frames on t...
bool m_genBackoffIfTxopWithoutTx
whether the backoff should be invoked when the AC gains the right to start a TXOP but it does not tra...
void Transmit(Ptr< WifiMac > mac, uint8_t phyId, WifiConstPsduMap psduMap, WifiTxVector txVector, double txPowerW) override
Callback invoked when a FEM passes PSDUs to the PHY.
bool m_checkBackoffStarted
whether we are checking the generated backoff values
std::size_t m_countBlockAck
counter for BlockAck frames
void CheckResults()
Check that the simulation produced the expected results.
uint8_t m_msdMaxNTxops
Max number of TXOPs that an EMLSR client is allowed to attempt to initiate while the MediumSyncDelay ...
EmlsrUlTxopTest(const Params &params)
Constructor.
wifi EMLSR suite to test basic frame exchanges.
an EUI-48 address
Smart pointer class similar to boost::intrusive_ptr.
A suite of tests to run.
Definition test.h:1267
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
std::unordered_map< uint16_t, Ptr< const WifiPsdu > > WifiConstPsduMap
Map of const PSDUs indexed by STA-ID.
Definition wifi-ppdu.h:38
Parameters for the EMLSR DL TXOP test.
std::vector< Time > paddingDelay
vector (whose size equals nEmlsrStations) of the padding delay values advertised by non-AP MLDs
std::size_t nNonEmlsrStations
number of non-AP MLDs that do not support EMLSR
std::set< uint8_t > linksToEnableEmlsrOn
IDs of links on which EMLSR mode should be enabled.
Time transitionTimeout
the Transition Timeout advertised by the AP MLD
bool putAuxPhyToSleep
whether aux PHYs are put to sleep during DL/UL TXOPs
std::vector< Time > transitionDelay
vector (whose size equals nEmlsrStations) of transition the delay values advertised by non-AP MLDs
std::size_t nEmlsrStations
number of non-AP MLDs that support EMLSR
Parameters for the EMLSR UL TXOP test.
bool switchMainPhyBackDelayTimeout
whether a SwitchMainPhyBackDelay timer expires after that the main PHY moved to an aux PHY link
MHz_u auxPhyChannelWidth
max width supported by aux PHYs
bool genBackoffIfTxopWithoutTx
whether the backoff should be invoked when the AC gains a TXOP but it does not transmit any frame
uint8_t msdMaxNTxops
Max number of TXOPs that an EMLSR client is allowed to attempt to initiate while the MediumSyncDelay ...
bool putAuxPhyToSleep
whether aux PHYs are put to sleep during DL/UL TXOPs
Time mediumSyncDuration
duration of the MediumSyncDelay timer
std::set< uint8_t > linksToEnableEmlsrOn
IDs of links on which EMLSR mode should be enabled.
MHz_u channelWidth
width of the channels used by MLDs