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 /**
83 * Constructor
84 *
85 * \param ac the Access Category
86 */
88
89 ~QosTxop() override;
90
91 bool IsQosTxop() const override;
92 bool HasFramesToTransmit(uint8_t linkId) override;
93 void NotifyChannelAccessed(uint8_t linkId, Time txopDuration) override;
94 void NotifyChannelReleased(uint8_t linkId) override;
95 void SetDroppedMpduCallback(DroppedMpdu callback) override;
96
97 /**
98 * Get the access category of this object.
99 *
100 * \return the access category.
101 */
103
104 /**
105 * Return true if an explicit BlockAckRequest is sent after a missed BlockAck
106 *
107 * \return true if an explicit BlockAckRequest is sent after a missed BlockAck
108 */
110
111 /**
112 * Get the Block Ack Manager associated with this QosTxop.
113 *
114 * \returns the Block Ack Manager
115 */
117 /**
118 * \param address recipient address of the peer station
119 * \param tid traffic ID.
120 *
121 * \return the negotiated buffer size during ADDBA handshake.
122 *
123 * Returns the negotiated buffer size during ADDBA handshake with station addressed by
124 * <i>recipient</i> for TID <i>tid</i>.
125 */
126 uint16_t GetBaBufferSize(Mac48Address address, uint8_t tid) const;
127 /**
128 * \param address recipient address of the peer station
129 * \param tid traffic ID.
130 *
131 * \return the starting sequence number of the originator transmit window.
132 *
133 * Returns the current starting sequence number of the transmit window on the
134 * originator (WinStartO) of the block ack agreement established with the given
135 * recipient for the given TID.
136 */
137 uint16_t GetBaStartingSequence(Mac48Address address, uint8_t tid) const;
138 /**
139 * \param recipient Address of recipient.
140 * \param tid traffic ID.
141 * \return the BlockAckRequest header and the MAC header for the BlockAckReq
142 *
143 * Prepare a BlockAckRequest to be sent to <i>recipient</i> for Traffic ID
144 * <i>tid</i>. The header for the BlockAckRequest is requested to the QosTxop
145 * corresponding to the given TID. A block ack agreement with the given recipient
146 * for the given TID must have been established by such QosTxop.
147 */
148 std::pair<CtrlBAckRequestHeader, WifiMacHeader> PrepareBlockAckRequest(Mac48Address recipient,
149 uint8_t tid) const;
150
151 /* Event handlers */
152 /**
153 * Event handler when an ADDBA response is received.
154 *
155 * \param respHdr ADDBA response header.
156 * \param recipient address of the recipient.
157 */
158 void GotAddBaResponse(const MgtAddBaResponseHeader& respHdr, Mac48Address recipient);
159 /**
160 * Event handler when a DELBA frame is received.
161 *
162 * \param delBaHdr DELBA header.
163 * \param recipient address of the recipient.
164 */
165 void GotDelBaFrame(const MgtDelBaHeader* delBaHdr, Mac48Address recipient);
166 /**
167 * Take action upon notification of ADDBA_REQUEST frame being discarded
168 * (likely due to exceeded max retry limit).
169 *
170 * \param recipient the intended recipient of the ADDBA_REQUEST frame
171 * \param tid the TID
172 */
173 void NotifyOriginatorAgreementNoReply(const Mac48Address& recipient, uint8_t tid);
174 /**
175 * Callback when ADDBA response is not received after timeout.
176 *
177 * \param recipient MAC address of recipient
178 * \param tid traffic ID
179 */
180 void AddBaResponseTimeout(Mac48Address recipient, uint8_t tid);
181 /**
182 * Reset BA agreement after BA negotiation failed.
183 *
184 * \param recipient MAC address of recipient
185 * \param tid traffic ID
186 */
187 void ResetBa(Mac48Address recipient, uint8_t tid);
188
189 /**
190 * Set threshold for block ack mechanism. If number of packets in the
191 * queue reaches the threshold, block ack mechanism is used.
192 *
193 * \param threshold block ack threshold value.
194 */
195 void SetBlockAckThreshold(uint8_t threshold);
196 /**
197 * Return the current threshold for block ack mechanism.
198 *
199 * \return the current threshold for block ack mechanism.
200 */
201 uint8_t GetBlockAckThreshold() const;
202
203 /**
204 * Set the BlockAck inactivity timeout.
205 *
206 * \param timeout the BlockAck inactivity timeout.
207 */
209 /**
210 * Get the BlockAck inactivity timeout.
211 *
212 * \return the BlockAck inactivity timeout.
213 */
214 uint16_t GetBlockAckInactivityTimeout() const;
215 /**
216 * Stores an MPDU (part of an A-MPDU) in block ack agreement (i.e. the sender is waiting
217 * for a BlockAck containing the sequence number of this MPDU).
218 *
219 * \param mpdu received MPDU.
220 */
221 void CompleteMpduTx(Ptr<WifiMpdu> mpdu);
222 /**
223 * Set the timeout to wait for ADDBA response.
224 *
225 * \param addBaResponseTimeout the timeout to wait for ADDBA response
226 */
227 void SetAddBaResponseTimeout(Time addBaResponseTimeout);
228 /**
229 * Get the timeout for ADDBA response.
230 *
231 * \returns the timeout to wait for ADDBA response
232 */
234 /**
235 * Set the timeout for failed BA agreement. During the timeout period,
236 * all packets will be transmitted using normal MPDU.
237 *
238 * \param failedAddBaTimeout the timeout for failed BA agreement
239 */
240 void SetFailedAddBaTimeout(Time failedAddBaTimeout);
241 /**
242 * Get the timeout for failed BA agreement.
243 *
244 * \returns the timeout for failed BA agreement
245 */
247
248 /**
249 * Return the next sequence number for the given header.
250 *
251 * \param hdr Wi-Fi header.
252 *
253 * \return the next sequence number.
254 */
255 uint16_t GetNextSequenceNumberFor(const WifiMacHeader* hdr);
256 /**
257 * Return the next sequence number for the Traffic ID and destination, but do not pick it (i.e.
258 * the current sequence number remains unchanged).
259 *
260 * \param hdr Wi-Fi header.
261 *
262 * \return the next sequence number.
263 */
264 uint16_t PeekNextSequenceNumberFor(const WifiMacHeader* hdr);
265 /**
266 * Peek the next frame to transmit on the given link to the given receiver and of the given TID
267 * from the EDCA queue. If <i>tid</i> is equal to 8 (invalid value) and <i>recipient</i>
268 * is the broadcast address, the first available frame is returned. If <i>mpdu</i>
269 * is not a null pointer, the search starts from the MPDU following <i>mpdu</i>
270 * in the queue; otherwise, the search starts from the head of the queue.
271 * Note that A-MSDU aggregation is never attempted. If the frame has never been
272 * transmitted, it is assigned a sequence number peeked from MacTxMiddle.
273 * Also note that multiple links are only available since 802.11be.
274 *
275 * \param linkId the ID of the given link
276 * \param tid traffic ID.
277 * \param recipient the receiver station address.
278 * \param mpdu the MPDU after which the search starts from
279 * \returns the peeked frame.
280 */
281 Ptr<WifiMpdu> PeekNextMpdu(uint8_t linkId,
282 uint8_t tid = 8,
284 Ptr<const WifiMpdu> mpdu = nullptr);
285 /**
286 * Prepare the frame to transmit on the given link starting from the MPDU that has been
287 * previously peeked by calling PeekNextMpdu. A frame is only returned if it meets the
288 * constraint on the maximum A-MPDU size (by assuming that the frame has to be
289 * aggregated to an existing A-MPDU as specified by the TX parameters) and its
290 * transmission time does not exceed the given PPDU duration limit (if distinct from
291 * Time::Min ()). If the peeked MPDU is a unicast QoS Data frame stored in the EDCA queue,
292 * attempt to perform A-MSDU aggregation (while meeting the constraints mentioned
293 * above) and assign a sequence number to the dequeued frame.
294 *
295 * \param linkId the ID of the given link
296 * \param peekedItem the peeked frame.
297 * \param txParams the TX parameters for the frame
298 * \param availableTime the time available for the transmission of the frame
299 (including protection and acknowledgment); a value of
300 * Time::Min() indicates no time constraint
301 * \param initialFrame true if the frame is the initial PPDU of a TXOP
302 * \return the frame to transmit or a null pointer if no frame meets the time constraints
303 */
304 Ptr<WifiMpdu> GetNextMpdu(uint8_t linkId,
305 Ptr<WifiMpdu> peekedItem,
306 WifiTxParameters& txParams,
307 Time availableTime,
308 bool initialFrame);
309
310 /**
311 * Assign a sequence number to the given MPDU, if it is not a fragment
312 * and it is not a retransmitted frame.
313 *
314 * \param mpdu the MPDU
315 */
316 void AssignSequenceNumber(Ptr<WifiMpdu> mpdu) const;
317
318 /**
319 * Get the value for the Queue Size subfield of the QoS Control field of a
320 * QoS data frame of the given TID and addressed to the given receiver.
321 *
322 * \param tid the Traffic ID
323 * \param receiver the address of the given receiver
324 * \return the value for the Queue Size subfield
325 */
326 uint8_t GetQosQueueSize(uint8_t tid, Mac48Address receiver) const;
327
328 /**
329 * \param linkId the ID of the given link
330 * \return the TXOP start time, if a TXOP is ongoing on the given link
331 */
332 virtual std::optional<Time> GetTxopStartTime(uint8_t linkId) const;
333 /**
334 * Return the remaining duration in the current TXOP on the given link.
335 *
336 * \param linkId the ID of the given link
337 * \return the remaining duration in the current TXOP.
338 */
339 virtual Time GetRemainingTxop(uint8_t linkId) const;
340
341 /**
342 * Set the minimum contention window size to use while the MU EDCA Timer
343 * is running for the given link.
344 *
345 * \param cwMin the minimum contention window size.
346 * \param linkId the ID of the given link
347 */
348 void SetMuCwMin(uint16_t cwMin, uint8_t linkId);
349 /**
350 * Set the maximum contention window size to use while the MU EDCA Timer
351 * is running for the given link.
352 *
353 * \param cwMax the maximum contention window size.
354 * \param linkId the ID of the given link
355 */
356 void SetMuCwMax(uint16_t cwMax, uint8_t linkId);
357 /**
358 * Set the number of slots that make up an AIFS while the MU EDCA Timer
359 * is running for the given link.
360 *
361 * \param aifsn the number of slots that make up an AIFS.
362 * \param linkId the ID of the given link
363 */
364 void SetMuAifsn(uint8_t aifsn, uint8_t linkId);
365 /**
366 * Set the MU EDCA Timer for the given link.
367 *
368 * \param timer the timer duration.
369 * \param linkId the ID of the given link
370 */
371 void SetMuEdcaTimer(Time timer, uint8_t linkId);
372 /**
373 * Start the MU EDCA Timer for the given link.
374 *
375 * \param linkId the ID of the given link
376 */
377 void StartMuEdcaTimerNow(uint8_t linkId);
378 /**
379 * Return true if the MU EDCA Timer is running for the given link, false otherwise.
380 *
381 * \param linkId the ID of the given link
382 * \return whether the MU EDCA Timer is running
383 */
384 bool MuEdcaTimerRunning(uint8_t linkId) const;
385 /**
386 * Return true if the EDCA is disabled (the MU EDCA Timer is running and the
387 * MU AIFSN is zero) for the given link, false otherwise.
388 *
389 * \param linkId the ID of the given link
390 * \return whether the EDCA is disabled
391 */
392 bool EdcaDisabled(uint8_t linkId) const;
393 /**
394 * For the given link, return the minimum contention window size from the
395 * EDCA Parameter Set or the MU EDCA Parameter Set, depending on whether the
396 * MU EDCA Timer is running or not.
397 *
398 * \param linkId the ID of the given link
399 * \return the currently used minimum contention window size.
400 */
401 uint32_t GetMinCw(uint8_t linkId) const override;
402 /**
403 * For the given link, return the maximum contention window size from the
404 * EDCA Parameter Set or the MU EDCA Parameter Set, depending on whether the
405 * MU EDCA Timer is running or not.
406 *
407 * \param linkId the ID of the given link
408 * \return the currently used maximum contention window size.
409 */
410 uint32_t GetMaxCw(uint8_t linkId) const override;
411 /**
412 * For the given link, return the number of slots that make up an AIFS according
413 * to the EDCA Parameter Set or the MU EDCA Parameter Set, depending on whether
414 * the MU EDCA Timer is running or not.
415 *
416 * \param linkId the ID of the given link
417 * \return the number of slots that currently make up an AIFS.
418 */
419 uint8_t GetAifsn(uint8_t linkId) const override;
420
421 protected:
422 /**
423 * Structure holding information specific to a single link. Here, the meaning of
424 * "link" is that of the 11be amendment which introduced multi-link devices. For
425 * previous amendments, only one link can be created.
426 */
428 {
429 /// Destructor (a virtual method is needed to make this struct polymorphic)
430 ~QosLinkEntity() override = default;
431
432 std::optional<Time> startTxop; //!< the start TXOP time
433 Time txopDuration{0}; //!< the duration of a TXOP
434 uint32_t muCwMin{0}; //!< the MU CW minimum
435 uint32_t muCwMax{0}; //!< the MU CW maximum
436 uint8_t muAifsn{0}; //!< the MU AIFSN
437 Time muEdcaTimer{0}; //!< the MU EDCA Timer
438 Time muEdcaTimerStartTime{0}; //!< last start time of the MU EDCA Timer
439 };
440
441 void DoDispose() override;
442
443 /**
444 * Get a reference to the link associated with the given ID.
445 *
446 * \param linkId the given link ID
447 * \return a reference to the link associated with the given ID
448 */
449 QosLinkEntity& GetLink(uint8_t linkId) const;
450
451 private:
452 /// allow AggregationCapableTransmissionListener class access
454
455 std::unique_ptr<LinkEntity> CreateLinkEntity() const override;
456
457 /**
458 * Check if the given MPDU is to be considered old according to the current
459 * starting sequence number of the transmit window, provided that a block ack
460 * agreement has been established with the recipient for the given TID.
461 *
462 * \param mpdu the given MPDU
463 * \return true if the MPDU is to be considered old, false otherwise
464 */
466
467 AcIndex m_ac; //!< the access category
468 Ptr<BlockAckManager> m_baManager; //!< the block ack manager
469 uint8_t m_blockAckThreshold; /**< the block ack threshold (use BA mechanism if number of packets
470 in queue reaches this value. If this value is 0, block ack is
471 never used. When A-MPDU is enabled, block ack mechanism is used
472 regardless of this value) */
473 uint16_t m_blockAckInactivityTimeout; //!< the BlockAck inactivity timeout value (in TUs, i.e.
474 //!< blocks of 1024 microseconds)
475 Time m_addBaResponseTimeout; //!< timeout for ADDBA response
476 Time m_failedAddBaTimeout; //!< timeout after failed BA agreement
477 bool m_useExplicitBarAfterMissedBlockAck; //!< flag whether explicit BlockAckRequest should be
478 //!< sent upon missed BlockAck Response
479 uint8_t m_nMaxInflights; //!< the maximum number of links on which
480 //!< an MPDU can be in-flight at the same
481 //!< time
482
483 /// TracedCallback for TXOP trace typedef
484 typedef TracedCallback<Time /* start time */, Time /* duration */, uint8_t /* link ID*/>
486
487 TxopTracedCallback m_txopTrace; //!< TXOP trace callback
488};
489
490} // namespace ns3
491
492#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:485
std::unique_ptr< LinkEntity > CreateLinkEntity() const override
Create a LinkEntity object.
Definition: qos-txop.cc:163
~QosTxop() override
Definition: qos-txop.cc:145
uint8_t m_blockAckThreshold
the block ack threshold (use BA mechanism if number of packets in queue reaches this value.
Definition: qos-txop.h:469
Ptr< BlockAckManager > GetBaManager()
Get the Block Ack Manager associated with this QosTxop.
Definition: qos-txop.cc:282
Time m_failedAddBaTimeout
timeout after failed BA agreement
Definition: qos-txop.h:476
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:378
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:350
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:194
bool UseExplicitBarAfterMissedBlockAck() const
Return true if an explicit BlockAckRequest is sent after a missed BlockAck.
Definition: qos-txop.cc:323
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:244
Time GetAddBaResponseTimeout() const
Get the timeout for ADDBA response.
Definition: qos-txop.cc:775
AcIndex GetAccessCategory() const
Get the access category of this object.
Definition: qos-txop.cc:800
void AddBaResponseTimeout(Mac48Address recipient, uint8_t tid)
Callback when ADDBA response is not received after timeout.
Definition: qos-txop.cc:740
uint16_t GetBaBufferSize(Mac48Address address, uint8_t tid) const
Definition: qos-txop.cc:288
void DoDispose() override
Destructor implementation.
Definition: qos-txop.cc:151
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:201
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:235
void StartMuEdcaTimerNow(uint8_t linkId)
Start the MU EDCA Timer for the given link.
Definition: qos-txop.cc:222
uint8_t GetBlockAckThreshold() const
Return the current threshold for block ack mechanism.
Definition: qos-txop.cc:727
void NotifyChannelReleased(uint8_t linkId) override
Called by the FrameExchangeManager to notify the completion of the transmissions.
Definition: qos-txop.cc:599
uint16_t GetNextSequenceNumberFor(const WifiMacHeader *hdr)
Return the next sequence number for the given header.
Definition: qos-txop.cc:344
uint16_t GetBlockAckInactivityTimeout() const
Get the BlockAck inactivity timeout.
Definition: qos-txop.cc:734
TxopTracedCallback m_txopTrace
TXOP trace callback.
Definition: qos-txop.h:487
virtual Time GetRemainingTxop(uint8_t linkId) const
Return the remaining duration in the current TXOP on the given link.
Definition: qos-txop.cc:636
AcIndex m_ac
the access category
Definition: qos-txop.h:467
void SetDroppedMpduCallback(DroppedMpdu callback) override
Definition: qos-txop.cc:186
bool m_useExplicitBarAfterMissedBlockAck
flag whether explicit BlockAckRequest should be sent upon missed BlockAck Response
Definition: qos-txop.h:477
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:208
friend class AggregationCapableTransmissionListener
allow AggregationCapableTransmissionListener class access
Definition: qos-txop.h:453
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:691
virtual std::optional< Time > GetTxopStartTime(uint8_t linkId) const
Definition: qos-txop.cc:591
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:175
void ResetBa(Mac48Address recipient, uint8_t tid)
Reset BA agreement after BA negotiation failed.
Definition: qos-txop.cc:753
Time GetFailedAddBaTimeout() const
Get the timeout for failed BA agreement.
Definition: qos-txop.cc:788
void GotAddBaResponse(const MgtAddBaResponseHeader &respHdr, Mac48Address recipient)
Event handler when an ADDBA response is received.
Definition: qos-txop.cc:652
static TypeId GetTypeId()
Get the type ID.
Definition: qos-txop.cc:55
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:566
void SetFailedAddBaTimeout(Time failedAddBaTimeout)
Set the timeout for failed BA agreement.
Definition: qos-txop.cc:781
uint16_t m_blockAckInactivityTimeout
the BlockAck inactivity timeout value (in TUs, i.e.
Definition: qos-txop.h:473
QosLinkEntity & GetLink(uint8_t linkId) const
Get a reference to the link associated with the given ID.
Definition: qos-txop.cc:169
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:495
void SetBlockAckThreshold(uint8_t threshold)
Set threshold for block ack mechanism.
Definition: qos-txop.cc:712
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:356
void GotDelBaFrame(const MgtDelBaHeader *delBaHdr, Mac48Address recipient)
Event handler when a DELBA frame is received.
Definition: qos-txop.cc:683
void SetBlockAckInactivityTimeout(uint16_t timeout)
Set the BlockAck inactivity timeout.
Definition: qos-txop.cc:720
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:479
void CompleteMpduTx(Ptr< WifiMpdu > mpdu)
Stores an MPDU (part of an A-MPDU) in block ack agreement (i.e.
Definition: qos-txop.cc:698
void SetAddBaResponseTimeout(Time addBaResponseTimeout)
Set the timeout to wait for ADDBA response.
Definition: qos-txop.cc:768
std::pair< CtrlBAckRequestHeader, WifiMacHeader > PrepareBlockAckRequest(Mac48Address recipient, uint8_t tid) const
Definition: qos-txop.cc:300
bool HasFramesToTransmit(uint8_t linkId) override
Check if the Txop has frames to transmit over the given link.
Definition: qos-txop.cc:329
uint16_t GetBaStartingSequence(Mac48Address address, uint8_t tid) const
Definition: qos-txop.cc:294
bool IsQosTxop() const override
Check for QoS TXOP.
Definition: qos-txop.cc:794
Time m_addBaResponseTimeout
timeout for ADDBA response
Definition: qos-txop.h:475
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:580
void SetMuEdcaTimer(Time timer, uint8_t linkId)
Set the MU EDCA Timer for the given link.
Definition: qos-txop.cc:215
Ptr< BlockAckManager > m_baManager
the block ack manager
Definition: qos-txop.h:468
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:81
uint32_t GetMinCw() const
Return the minimum contention window size.
Definition: txop.cc:417
uint8_t GetAifsn() const
Return the number of slots that make up an AIFS.
Definition: txop.cc:465
uint32_t GetMaxCw() const
Return the maximum contention window size.
Definition: txop.cc:441
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
@ AC_UNDEF
Total number of ACs.
Definition: qos-utils.h:87
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::Time timeout