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