A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
qos-txop.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2006, 2009 INRIA
3 * Copyright (c) 2009 MIRKO BANCHI
4 *
5 * SPDX-License-Identifier: GPL-2.0-only
6 *
7 * Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
8 * Mirko Banchi <mk.banchi@gmail.com>
9 */
10
11#ifndef QOS_TXOP_H
12#define QOS_TXOP_H
13
14#include "block-ack-manager.h"
15#include "qos-utils.h"
16#include "txop.h"
17
18#include "ns3/traced-value.h"
19
20#include <optional>
21
22namespace ns3
23{
24
25class MgtAddBaResponseHeader;
26class MgtDelBaHeader;
27class AggregationCapableTransmissionListener;
28class WifiTxVector;
29class QosFrameExchangeManager;
30class WifiTxParameters;
31
32/**
33 * @brief Handles the packet queue and stores DCF/EDCA access parameters
34 * (one Txop per AC).
35 * @ingroup wifi
36 *
37 * This class handles the packet queue and stores DCF/EDCA access
38 * parameters (one Txop per AC). It generates backoff values and stores the channel access status
39 * (not requested, requested, granted) for the corresponding DCF/EDCA and for each link.
40 *
41 * This queue contains packets for a particular access class.
42 * Possibles access classes are:
43 * - AC_VO : voice, TID = 6,7
44 * - AC_VI : video, TID = 4,5
45 * - AC_BE : best-effort, TID = 0,3
46 * - AC_BK : background, TID = 1,2
47 *
48 * This class also implements block ack sessions and MSDU aggregation (A-MSDU).
49 */
50
51class QosTxop : public Txop
52{
53 public:
54 /**
55 * @brief Get the type ID.
56 * @return the object TypeId
57 */
58 static TypeId GetTypeId();
59
60 QosTxop();
61 ~QosTxop() override;
62
63 bool IsQosTxop() const override;
64 bool HasFramesToTransmit(uint8_t linkId) override;
65 void NotifyChannelAccessed(uint8_t linkId, Time txopDuration) override;
66 void NotifyChannelReleased(uint8_t linkId) override;
67 void SetDroppedMpduCallback(DroppedMpdu callback) override;
68
69 /**
70 * Get the access category of this object.
71 *
72 * @return the access category.
73 */
75
76 /**
77 * Return true if an explicit BlockAckRequest is sent after a missed BlockAck
78 *
79 * @return true if an explicit BlockAckRequest is sent after a missed BlockAck
80 */
82
83 /**
84 * Get the Block Ack Manager associated with this QosTxop.
85 *
86 * @returns the Block Ack Manager
87 */
89 /**
90 * @param address recipient address of the peer station or the group address for GCR.
91 * @param tid traffic ID.
92 * @param isGcr flag to indicate whether this function is called for GCR.
93 *
94 * @return the negotiated buffer size during ADDBA handshake.
95 *
96 * Returns the negotiated buffer size during ADDBA handshake with station addressed by
97 * <i>recipient</i> for TID <i>tid</i>.
98 */
99 uint16_t GetBaBufferSize(Mac48Address address, uint8_t tid, bool isGcr = false) const;
100 /**
101 * @param address recipient address of the peer station or the group address for GCR.
102 * @param tid traffic ID.
103 * @param isGcr flag to indicate whether this function is called for GCR.
104 *
105 * @return the starting sequence number of the transmit window.
106 *
107 * Returns the current starting sequence number of the transmit window on the
108 * originator (WinStartO) of the block ack agreement established with the given
109 * recipient for the given TID.
110 */
111 uint16_t GetBaStartingSequence(Mac48Address address, uint8_t tid, bool isGcr = false) const;
112 /**
113 * @param recipient Address of recipient.
114 * @param tid traffic ID.
115 * @param gcrGroupAddr the GCR Group Address (only if the Block Ack Request is being used for
116 * the GCR service).
117 * @return the BlockAckRequest header and the MAC header for the BlockAckReq
118 *
119 * Prepare a BlockAckRequest to be sent to <i>recipient</i> for Traffic ID
120 * <i>tid</i>. The header for the BlockAckRequest is requested to the QosTxop
121 * corresponding to the given TID. A block ack agreement with the given recipient
122 * for the given TID must have been established by such QosTxop.
123 */
124 std::pair<CtrlBAckRequestHeader, WifiMacHeader> PrepareBlockAckRequest(
125 Mac48Address recipient,
126 uint8_t tid,
127 std::optional<Mac48Address> gcrGroupAddr = std::nullopt) const;
128
129 /* Event handlers */
130 /**
131 * Event handler when an ADDBA response is received.
132 *
133 * @param respHdr ADDBA response header.
134 * @param recipient address of the recipient.
135 */
136 void GotAddBaResponse(const MgtAddBaResponseHeader& respHdr, Mac48Address recipient);
137 /**
138 * Event handler when a DELBA frame is received.
139 *
140 * @param delBaHdr DELBA header.
141 * @param recipient address of the recipient.
142 */
143 void GotDelBaFrame(const MgtDelBaHeader* delBaHdr, Mac48Address recipient);
144 /**
145 * Take action upon notification of ADDBA_REQUEST frame being discarded
146 * (likely due to exceeded max retry limit).
147 *
148 * @param recipient the intended recipient of the ADDBA_REQUEST frame
149 * @param tid the TID
150 * @param gcrGroupAddr the GCR Group Address (only if it a GCR Block Ack agreement)
151 */
153 uint8_t tid,
154 std::optional<Mac48Address> gcrGroupAddr);
155 /**
156 * Callback when ADDBA response is not received after timeout.
157 *
158 * @param recipient MAC address of recipient
159 * @param tid traffic ID
160 * @param gcrGroupAddr the GCR Group Address (only if it a GCR Block Ack agreement)
161 */
162 void AddBaResponseTimeout(Mac48Address recipient,
163 uint8_t tid,
164 std::optional<Mac48Address> gcrGroupAddr);
165 /**
166 * Reset BA agreement after BA negotiation failed.
167 *
168 * @param recipient MAC address of recipient
169 * @param tid traffic ID
170 * @param gcrGroupAddr the GCR Group Address (only if it a GCR Block Ack agreement)
171 */
172 void ResetBa(Mac48Address recipient, uint8_t tid, std::optional<Mac48Address> gcrGroupAddr);
173
174 /**
175 * Set threshold for block ack mechanism. If number of packets in the
176 * queue reaches the threshold, block ack mechanism is used.
177 *
178 * @param threshold block ack threshold value.
179 */
180 void SetBlockAckThreshold(uint8_t threshold);
181 /**
182 * Return the current threshold for block ack mechanism.
183 *
184 * @return the current threshold for block ack mechanism.
185 */
186 uint8_t GetBlockAckThreshold() const;
187
188 /**
189 * Set the BlockAck inactivity timeout.
190 *
191 * @param timeout the BlockAck inactivity timeout.
192 */
194 /**
195 * Get the BlockAck inactivity timeout.
196 *
197 * @return the BlockAck inactivity timeout.
198 */
199 uint16_t GetBlockAckInactivityTimeout() const;
200 /**
201 * Stores an MPDU (part of an A-MPDU) in block ack agreement (i.e. the sender is waiting
202 * for a BlockAck containing the sequence number of this MPDU).
203 *
204 * @param mpdu received MPDU.
205 */
206 void CompleteMpduTx(Ptr<WifiMpdu> mpdu);
207 /**
208 * Set the timeout to wait for ADDBA response.
209 *
210 * @param addBaResponseTimeout the timeout to wait for ADDBA response
211 */
212 void SetAddBaResponseTimeout(Time addBaResponseTimeout);
213 /**
214 * Get the timeout for ADDBA response.
215 *
216 * @returns the timeout to wait for ADDBA response
217 */
219 /**
220 * Set the timeout for failed BA agreement. During the timeout period,
221 * all packets will be transmitted using normal MPDU.
222 *
223 * @param failedAddBaTimeout the timeout for failed BA agreement
224 */
225 void SetFailedAddBaTimeout(Time failedAddBaTimeout);
226 /**
227 * Get the timeout for failed BA agreement.
228 *
229 * @returns the timeout for failed BA agreement
230 */
232
233 /**
234 * Return the next sequence number for the given header.
235 *
236 * @param hdr Wi-Fi header.
237 *
238 * @return the next sequence number.
239 */
240 uint16_t GetNextSequenceNumberFor(const WifiMacHeader* hdr);
241 /**
242 * Return the next sequence number for the Traffic ID and destination, but do not pick it (i.e.
243 * the current sequence number remains unchanged).
244 *
245 * @param hdr Wi-Fi header.
246 *
247 * @return the next sequence number.
248 */
249 uint16_t PeekNextSequenceNumberFor(const WifiMacHeader* hdr);
250 /**
251 * Peek the next frame to transmit on the given link to the given receiver and of the given TID
252 * from the EDCA queue. If <i>tid</i> is equal to 8 (invalid value) and <i>recipient</i>
253 * is the broadcast address, the first available frame is returned. If <i>mpdu</i>
254 * is not a null pointer, the search starts from the MPDU following <i>mpdu</i>
255 * in the queue; otherwise, the search starts from the head of the queue.
256 * Note that A-MSDU aggregation is never attempted. If the frame has never been
257 * transmitted, it is assigned a sequence number peeked from MacTxMiddle.
258 * Also note that multiple links are only available since 802.11be.
259 *
260 * @param linkId the ID of the given link
261 * @param tid traffic ID.
262 * @param recipient the receiver station address.
263 * @param mpdu the MPDU after which the search starts from
264 * @returns the peeked frame.
265 */
266 Ptr<WifiMpdu> PeekNextMpdu(uint8_t linkId,
267 uint8_t tid = 8,
269 Ptr<const WifiMpdu> mpdu = nullptr);
270 /**
271 * Prepare the frame to transmit on the given link starting from the MPDU that has been
272 * previously peeked by calling PeekNextMpdu. A frame is only returned if it meets the
273 * constraint on the maximum A-MPDU size (by assuming that the frame has to be
274 * aggregated to an existing A-MPDU as specified by the TX parameters) and its
275 * transmission time does not exceed the given PPDU duration limit (if distinct from
276 * Time::Min ()). If the peeked MPDU is a unicast QoS Data frame stored in the EDCA queue,
277 * attempt to perform A-MSDU aggregation (while meeting the constraints mentioned
278 * above) and assign a sequence number to the dequeued frame.
279 *
280 * @param linkId the ID of the given link
281 * @param peekedItem the peeked frame.
282 * @param txParams the TX parameters for the frame
283 * @param availableTime the time available for the transmission of the frame
284 (including protection and acknowledgment); a value of
285 * Time::Min() indicates no time constraint
286 * @param initialFrame true if the frame is the initial PPDU of a TXOP
287 * @return the frame to transmit or a null pointer if no frame meets the time constraints
288 */
289 Ptr<WifiMpdu> GetNextMpdu(uint8_t linkId,
290 Ptr<WifiMpdu> peekedItem,
291 WifiTxParameters& txParams,
292 Time availableTime,
293 bool initialFrame);
294
295 /**
296 * Assign a sequence number to the given MPDU, if it is not a fragment
297 * and it is not a retransmitted frame.
298 *
299 * @param mpdu the MPDU
300 */
301 void AssignSequenceNumber(Ptr<WifiMpdu> mpdu) const;
302
303 /**
304 * Get the value for the Queue Size subfield of the QoS Control field of a
305 * QoS data frame of the given TID and addressed to the given receiver.
306 *
307 * @param tid the Traffic ID
308 * @param receiver the address of the given receiver
309 * @return the value for the Queue Size subfield
310 */
311 uint8_t GetQosQueueSize(uint8_t tid, Mac48Address receiver) const;
312
313 /**
314 * @param linkId the ID of the given link
315 * @return the TXOP start time, if a TXOP is ongoing on the given link
316 */
317 virtual std::optional<Time> GetTxopStartTime(uint8_t linkId) const;
318 /**
319 * Return the remaining duration in the current TXOP on the given link.
320 *
321 * @param linkId the ID of the given link
322 * @return the remaining duration in the current TXOP.
323 */
324 virtual Time GetRemainingTxop(uint8_t linkId) const;
325
326 /**
327 * Set the minimum contention window size to use while the MU EDCA Timer
328 * is running for the given link.
329 *
330 * @param cwMin the minimum contention window size.
331 * @param linkId the ID of the given link
332 */
333 void SetMuCwMin(uint16_t cwMin, uint8_t linkId);
334 /**
335 * Set the maximum contention window size to use while the MU EDCA Timer
336 * is running for the given link.
337 *
338 * @param cwMax the maximum contention window size.
339 * @param linkId the ID of the given link
340 */
341 void SetMuCwMax(uint16_t cwMax, uint8_t linkId);
342 /**
343 * Set the number of slots that make up an AIFS while the MU EDCA Timer
344 * is running for the given link.
345 *
346 * @param aifsn the number of slots that make up an AIFS.
347 * @param linkId the ID of the given link
348 */
349 void SetMuAifsn(uint8_t aifsn, uint8_t linkId);
350 /**
351 * Set the MU EDCA Timer for the given link.
352 *
353 * @param timer the timer duration.
354 * @param linkId the ID of the given link
355 */
356 void SetMuEdcaTimer(Time timer, uint8_t linkId);
357 /**
358 * Start the MU EDCA Timer for the given link.
359 *
360 * @param linkId the ID of the given link
361 */
362 void StartMuEdcaTimerNow(uint8_t linkId);
363 /**
364 * Return true if the MU EDCA Timer is running for the given link, false otherwise.
365 *
366 * @param linkId the ID of the given link
367 * @return whether the MU EDCA Timer is running
368 */
369 bool MuEdcaTimerRunning(uint8_t linkId) const;
370 /**
371 * Return true if the EDCA is disabled (the MU EDCA Timer is running and the
372 * MU AIFSN is zero) for the given link, false otherwise.
373 *
374 * @param linkId the ID of the given link
375 * @return whether the EDCA is disabled
376 */
377 bool EdcaDisabled(uint8_t linkId) const;
378 /**
379 * For the given link, return the minimum contention window size from the
380 * EDCA Parameter Set or the MU EDCA Parameter Set, depending on whether the
381 * MU EDCA Timer is running or not.
382 *
383 * @param linkId the ID of the given link
384 * @return the currently used minimum contention window size.
385 */
386 uint32_t GetMinCw(uint8_t linkId) const override;
387 /**
388 * For the given link, return the maximum contention window size from the
389 * EDCA Parameter Set or the MU EDCA Parameter Set, depending on whether the
390 * MU EDCA Timer is running or not.
391 *
392 * @param linkId the ID of the given link
393 * @return the currently used maximum contention window size.
394 */
395 uint32_t GetMaxCw(uint8_t linkId) const override;
396 /**
397 * For the given link, return the number of slots that make up an AIFS according
398 * to the EDCA Parameter Set or the MU EDCA Parameter Set, depending on whether
399 * the MU EDCA Timer is running or not.
400 *
401 * @param linkId the ID of the given link
402 * @return the number of slots that currently make up an AIFS.
403 */
404 uint8_t GetAifsn(uint8_t linkId) const override;
405
406 protected:
407 /**
408 * Structure holding information specific to a single link. Here, the meaning of
409 * "link" is that of the 11be amendment which introduced multi-link devices. For
410 * previous amendments, only one link can be created.
411 */
413 {
414 /// Destructor (a virtual method is needed to make this struct polymorphic)
415 ~QosLinkEntity() override = default;
416
417 std::optional<Time> startTxop; //!< the start TXOP time
418 Time txopDuration{0}; //!< the duration of a TXOP
419 uint32_t muCwMin{0}; //!< the MU CW minimum
420 uint32_t muCwMax{0}; //!< the MU CW maximum
421 uint8_t muAifsn{0}; //!< the MU AIFSN
422 Time muEdcaTimer{0}; //!< the MU EDCA Timer
423 Time muEdcaTimerStartTime{0}; //!< last start time of the MU EDCA Timer
424 };
425
426 void DoDispose() override;
427 void CreateQueue(AcIndex aci) override;
428
429 /**
430 * Get a reference to the link associated with the given ID.
431 *
432 * @param linkId the given link ID
433 * @return a reference to the link associated with the given ID
434 */
435 QosLinkEntity& GetLink(uint8_t linkId) const;
436
437 private:
438 /// allow AggregationCapableTransmissionListener class access
440
441 std::unique_ptr<LinkEntity> CreateLinkEntity() const override;
442
443 /**
444 * Check if the given MPDU is to be considered old according to the current
445 * starting sequence number of the transmit window, provided that a block ack
446 * agreement has been established with the recipient for the given TID.
447 *
448 * @param mpdu the given MPDU
449 * @return true if the MPDU is to be considered old, false otherwise
450 */
452
453 AcIndex m_ac; //!< the access category
454 Ptr<BlockAckManager> m_baManager; //!< the block ack manager
455 uint8_t m_blockAckThreshold; /**< the block ack threshold (use BA mechanism if number of packets
456 in queue reaches this value. If this value is 0, block ack is
457 never used. When A-MPDU is enabled, block ack mechanism is used
458 regardless of this value) */
459 uint16_t m_blockAckInactivityTimeout; //!< the BlockAck inactivity timeout value (in TUs, i.e.
460 //!< blocks of 1024 microseconds)
461 Time m_addBaResponseTimeout; //!< timeout for ADDBA response
462 Time m_failedAddBaTimeout; //!< timeout after failed BA agreement
463 bool m_useExplicitBarAfterMissedBlockAck; //!< flag whether explicit BlockAckRequest should be
464 //!< sent upon missed BlockAck Response
465 uint8_t m_nMaxInflights; //!< the maximum number of links on which
466 //!< an MPDU can be in-flight at the same
467 //!< time
468
469 /// TracedCallback for TXOP trace typedef
470 typedef TracedCallback<Time /* start time */, Time /* duration */, uint8_t /* link ID*/>
472
473 TxopTracedCallback m_txopTrace; //!< TXOP trace callback
474
475 /**
476 * TracedCallback signature for block ack agreement established events.
477 *
478 * @param recipient the MAC address of the recipient
479 * @param tid the TID for which block ack agreement is established
480 * @param gcrGroup the GCR group address (if any)
481 */
482 typedef void (*BaEstablishedCallback)(Mac48Address recipient,
483 uint8_t tid,
484 std::optional<Mac48Address> gcrGroup);
485
486 /// TracedCallback for block ack agreement established events typedef
489
491 m_baEstablishedCallback; //!< traced callback for block ack agreement established events
492};
493
494} // namespace ns3
495
496#endif /* QOS_TXOP_H */
an EUI-48 address
static Mac48Address GetBroadcast()
Implement the header for management frames of type Add Block Ack response.
Implement the header for management frames of type Delete Block Ack.
Smart pointer class similar to boost::intrusive_ptr.
Handles the packet queue and stores DCF/EDCA access parameters (one Txop per AC).
Definition qos-txop.h:52
TracedCallback< Time, Time, uint8_t > TxopTracedCallback
TracedCallback for TXOP trace typedef.
Definition qos-txop.h:471
std::unique_ptr< LinkEntity > CreateLinkEntity() const override
Create a LinkEntity object.
Definition qos-txop.cc:166
~QosTxop() override
Definition qos-txop.cc:148
uint8_t m_blockAckThreshold
the block ack threshold (use BA mechanism if number of packets in queue reaches this value.
Definition qos-txop.h:455
Ptr< BlockAckManager > GetBaManager()
Get the Block Ack Manager associated with this QosTxop.
Definition qos-txop.cc:285
Time m_failedAddBaTimeout
timeout after failed BA agreement
Definition qos-txop.h:462
Ptr< WifiMpdu > PeekNextMpdu(uint8_t linkId, uint8_t tid=8, Mac48Address recipient=Mac48Address::GetBroadcast(), Ptr< const WifiMpdu > mpdu=nullptr)
Peek the next frame to transmit on the given link to the given receiver and of the given TID from the...
Definition qos-txop.cc:385
uint16_t PeekNextSequenceNumberFor(const WifiMacHeader *hdr)
Return the next sequence number for the Traffic ID and destination, but do not pick it (i....
Definition qos-txop.cc:357
uint16_t GetBaBufferSize(Mac48Address address, uint8_t tid, bool isGcr=false) const
Definition qos-txop.cc:291
void SetMuCwMin(uint16_t cwMin, uint8_t linkId)
Set the minimum contention window size to use while the MU EDCA Timer is running for the given link.
Definition qos-txop.cc:197
bool UseExplicitBarAfterMissedBlockAck() const
Return true if an explicit BlockAckRequest is sent after a missed BlockAck.
Definition qos-txop.cc:330
bool EdcaDisabled(uint8_t linkId) const
Return true if the EDCA is disabled (the MU EDCA Timer is running and the MU AIFSN is zero) for the g...
Definition qos-txop.cc:247
Time GetAddBaResponseTimeout() const
Get the timeout for ADDBA response.
Definition qos-txop.cc:838
AcIndex GetAccessCategory() const
Get the access category of this object.
Definition qos-txop.cc:863
void AddBaResponseTimeout(Mac48Address recipient, uint8_t tid, std::optional< Mac48Address > gcrGroupAddr)
Callback when ADDBA response is not received after timeout.
Definition qos-txop.cc:796
BaEstablishedTracedCallback m_baEstablishedCallback
traced callback for block ack agreement established events
Definition qos-txop.h:491
void DoDispose() override
Destructor implementation.
Definition qos-txop.cc:154
void SetMuCwMax(uint16_t cwMax, uint8_t linkId)
Set the maximum contention window size to use while the MU EDCA Timer is running for the given link.
Definition qos-txop.cc:204
bool MuEdcaTimerRunning(uint8_t linkId) const
Return true if the MU EDCA Timer is running for the given link, false otherwise.
Definition qos-txop.cc:238
void StartMuEdcaTimerNow(uint8_t linkId)
Start the MU EDCA Timer for the given link.
Definition qos-txop.cc:225
uint8_t GetBlockAckThreshold() const
Return the current threshold for block ack mechanism.
Definition qos-txop.cc:783
void NotifyChannelReleased(uint8_t linkId) override
Called by the FrameExchangeManager to notify the completion of the transmissions.
Definition qos-txop.cc:628
std::pair< CtrlBAckRequestHeader, WifiMacHeader > PrepareBlockAckRequest(Mac48Address recipient, uint8_t tid, std::optional< Mac48Address > gcrGroupAddr=std::nullopt) const
Definition qos-txop.cc:305
uint16_t GetNextSequenceNumberFor(const WifiMacHeader *hdr)
Return the next sequence number for the given header.
Definition qos-txop.cc:351
uint16_t GetBlockAckInactivityTimeout() const
Get the BlockAck inactivity timeout.
Definition qos-txop.cc:790
TxopTracedCallback m_txopTrace
TXOP trace callback.
Definition qos-txop.h:473
virtual Time GetRemainingTxop(uint8_t linkId) const
Return the remaining duration in the current TXOP on the given link.
Definition qos-txop.cc:665
AcIndex m_ac
the access category
Definition qos-txop.h:453
void SetDroppedMpduCallback(DroppedMpdu callback) override
Definition qos-txop.cc:189
bool m_useExplicitBarAfterMissedBlockAck
flag whether explicit BlockAckRequest should be sent upon missed BlockAck Response
Definition qos-txop.h:463
void SetMuAifsn(uint8_t aifsn, uint8_t linkId)
Set the number of slots that make up an AIFS while the MU EDCA Timer is running for the given link.
Definition qos-txop.cc:211
friend class AggregationCapableTransmissionListener
allow AggregationCapableTransmissionListener class access
Definition qos-txop.h:439
virtual std::optional< Time > GetTxopStartTime(uint8_t linkId) const
Definition qos-txop.cc:620
uint8_t GetQosQueueSize(uint8_t tid, Mac48Address receiver) const
Get the value for the Queue Size subfield of the QoS Control field of a QoS data frame of the given T...
Definition qos-txop.cc:178
void NotifyOriginatorAgreementNoReply(const Mac48Address &recipient, uint8_t tid, std::optional< Mac48Address > gcrGroupAddr)
Take action upon notification of ADDBA_REQUEST frame being discarded (likely due to exceeded max retr...
Definition qos-txop.cc:729
Time GetFailedAddBaTimeout() const
Get the timeout for failed BA agreement.
Definition qos-txop.cc:851
void ResetBa(Mac48Address recipient, uint8_t tid, std::optional< Mac48Address > gcrGroupAddr)
Reset BA agreement after BA negotiation failed.
Definition qos-txop.cc:816
void GotAddBaResponse(const MgtAddBaResponseHeader &respHdr, Mac48Address recipient)
Event handler when an ADDBA response is received.
Definition qos-txop.cc:681
void(* BaEstablishedCallback)(Mac48Address recipient, uint8_t tid, std::optional< Mac48Address > gcrGroup)
TracedCallback signature for block ack agreement established events.
Definition qos-txop.h:482
static TypeId GetTypeId()
Get the type ID.
Definition qos-txop.cc:47
void AssignSequenceNumber(Ptr< WifiMpdu > mpdu) const
Assign a sequence number to the given MPDU, if it is not a fragment and it is not a retransmitted fra...
Definition qos-txop.cc:595
void SetFailedAddBaTimeout(Time failedAddBaTimeout)
Set the timeout for failed BA agreement.
Definition qos-txop.cc:844
uint16_t m_blockAckInactivityTimeout
the BlockAck inactivity timeout value (in TUs, i.e.
Definition qos-txop.h:459
QosLinkEntity & GetLink(uint8_t linkId) const
Get a reference to the link associated with the given ID.
Definition qos-txop.cc:172
void CreateQueue(AcIndex aci) override
Create a wifi MAC queue containing packets of the given AC.
Definition qos-txop.cc:106
Ptr< WifiMpdu > GetNextMpdu(uint8_t linkId, Ptr< WifiMpdu > peekedItem, WifiTxParameters &txParams, Time availableTime, bool initialFrame)
Prepare the frame to transmit on the given link starting from the MPDU that has been previously peeke...
Definition qos-txop.cc:520
void SetBlockAckThreshold(uint8_t threshold)
Set threshold for block ack mechanism.
Definition qos-txop.cc:768
bool IsQosOldPacket(Ptr< const WifiMpdu > mpdu)
Check if the given MPDU is to be considered old according to the current starting sequence number of ...
Definition qos-txop.cc:363
void GotDelBaFrame(const MgtDelBaHeader *delBaHdr, Mac48Address recipient)
Event handler when a DELBA frame is received.
Definition qos-txop.cc:719
void SetBlockAckInactivityTimeout(uint16_t timeout)
Set the BlockAck inactivity timeout.
Definition qos-txop.cc:776
uint8_t m_nMaxInflights
the maximum number of links on which an MPDU can be in-flight at the same time
Definition qos-txop.h:465
void CompleteMpduTx(Ptr< WifiMpdu > mpdu)
Stores an MPDU (part of an A-MPDU) in block ack agreement (i.e.
Definition qos-txop.cc:738
uint16_t GetBaStartingSequence(Mac48Address address, uint8_t tid, bool isGcr=false) const
Definition qos-txop.cc:298
void SetAddBaResponseTimeout(Time addBaResponseTimeout)
Set the timeout to wait for ADDBA response.
Definition qos-txop.cc:831
bool HasFramesToTransmit(uint8_t linkId) override
Check if the Txop has frames to transmit over the given link.
Definition qos-txop.cc:336
bool IsQosTxop() const override
Check for QoS TXOP.
Definition qos-txop.cc:857
Time m_addBaResponseTimeout
timeout for ADDBA response
Definition qos-txop.h:461
void NotifyChannelAccessed(uint8_t linkId, Time txopDuration) override
Called by the FrameExchangeManager to notify that channel access has been granted on the given link f...
Definition qos-txop.cc:609
void SetMuEdcaTimer(Time timer, uint8_t linkId)
Set the MU EDCA Timer for the given link.
Definition qos-txop.cc:218
Ptr< BlockAckManager > m_baManager
the block ack manager
Definition qos-txop.h:454
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
Forward calls to a chain of Callback.
Handles the packet queue and stores DCF/EDCA access parameters (one Txop per AC).
Definition txop.h:56
uint32_t GetMinCw() const
Return the minimum contention window size.
Definition txop.cc:530
uint8_t GetAifsn() const
Return the number of slots that make up an AIFS.
Definition txop.cc:578
uint32_t GetMaxCw() const
Return the maximum contention window size.
Definition txop.cc:554
a unique identifier for an interface.
Definition type-id.h:49
Implements the IEEE 802.11 MAC header.
This class stores the TX parameters (TX vector, protection mechanism, acknowledgment mechanism,...
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
Definition qos-utils.h:62
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::Time timeout