A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
block-ack-manager.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2009, 2010 MIRKO BANCHI
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Mirko Banchi <mk.banchi@gmail.com>
7 */
8
9#ifndef BLOCK_ACK_MANAGER_H
10#define BLOCK_ACK_MANAGER_H
11
12#include "block-ack-type.h"
15#include "wifi-mac-header.h"
16#include "wifi-mpdu.h"
17#include "wifi-tx-vector.h"
18
19#include "ns3/nstime.h"
20#include "ns3/object.h"
21#include "ns3/traced-callback.h"
22
23#include <map>
24#include <optional>
25
26namespace ns3
27{
28
29class MgtAddBaResponseHeader;
30class MgtAddBaRequestHeader;
31class CtrlBAckResponseHeader;
32class CtrlBAckRequestHeader;
33class WifiMacQueue;
34class MacRxMiddle;
35
36/**
37 * \brief Manages all block ack agreements for an originator station.
38 * \ingroup wifi
39 */
40class BlockAckManager : public Object
41{
42 private:
43 /**
44 * Enumeration for the statuses of a buffered MPDU
45 */
52
53 public:
54 /**
55 * \brief Get the type ID.
56 * \return the object TypeId
57 */
58 static TypeId GetTypeId();
59
61 ~BlockAckManager() override;
62
63 // Delete copy constructor and assignment operator to avoid misuse
66
67 /// optional const reference to OriginatorBlockAckAgreement
69 std::optional<std::reference_wrapper<const OriginatorBlockAckAgreement>>;
70 /// optional const reference to RecipientBlockAckAgreement
72 std::optional<std::reference_wrapper<const RecipientBlockAckAgreement>>;
73
74 /**
75 * \param recipient MAC address of the recipient
76 * \param tid Traffic ID
77 *
78 * \return a const reference to the block ack agreement with the given recipient, if it exists
79 *
80 * Check if we are the originator of an existing block ack agreement with the given recipient.
81 */
83 uint8_t tid) const;
84 /**
85 * \param originator MAC address of the originator
86 * \param tid Traffic ID
87 *
88 * \return a const reference to the block ack agreement with the given originator, if it exists
89 *
90 * Check if we are the recipient of an existing block ack agreement with the given originator.
91 */
93 uint8_t tid) const;
94
95 /**
96 * \param reqHdr Relative Add block ack request (action frame).
97 * \param recipient Address of peer station involved in block ack mechanism.
98 *
99 * Creates a new originator block ack agreement in pending state. When a ADDBA response
100 * with a successful status code is received, the relative agreement becomes established.
101 */
103 const Mac48Address& recipient);
104 /**
105 * \param recipient Address of peer station involved in block ack mechanism.
106 * \param tid traffic ID of transmitted packet.
107 *
108 * Invoked when a recipient reject a block ack agreement or when a DELBA frame
109 * is Received/Transmitted.
110 */
111 void DestroyOriginatorAgreement(const Mac48Address& recipient, uint8_t tid);
112 /**
113 * \param respHdr Relative Add block ack response (action frame).
114 * \param recipient Address of peer station involved in block ack mechanism.
115 * \param startingSeq the updated starting sequence number
116 *
117 * Invoked upon receipt of a ADDBA response frame from <i>recipient</i>.
118 */
120 const Mac48Address& recipient,
121 uint16_t startingSeq);
122
123 /**
124 * \param respHdr Add block ack response from originator (action
125 * frame).
126 * \param originator Address of peer station involved in block ack
127 * mechanism.
128 * \param startingSeq Sequence number of the first MPDU of all
129 * packets for which block ack was negotiated.
130 * \param rxMiddle the MAC RX Middle on this station
131 *
132 * This function is typically invoked only by ns3::WifiMac
133 * when the STA (which may be non-AP in ESS, or in an IBSS) has
134 * received an ADDBA Request frame and is transmitting an ADDBA
135 * Response frame. At this point the frame exchange manager must
136 * allocate buffers to collect all correctly received packets belonging
137 * to the category for which block ack was negotiated.
138 */
140 const Mac48Address& originator,
141 uint16_t startingSeq,
142 Ptr<MacRxMiddle> rxMiddle);
143 /**
144 * Destroy a recipient Block Ack agreement.
145 *
146 * \param originator the originator MAC address
147 * \param tid the TID associated with the Block Ack agreement
148 */
149 void DestroyRecipientAgreement(const Mac48Address& originator, uint8_t tid);
150
151 /**
152 * \param mpdu MPDU to store.
153 *
154 * Stores <i>mpdu</i> for a possible future retransmission. Retransmission occurs
155 * if the packet, in a BlockAck frame, is indicated by recipient as not received.
156 */
157 void StorePacket(Ptr<WifiMpdu> mpdu);
158 /**
159 * Invoked upon receipt of an Ack frame on the given link after the transmission of a
160 * QoS data frame sent under an established block ack agreement. Remove the acknowledged
161 * frame from the outstanding packets and update the starting sequence number of the
162 * transmit window, if needed.
163 *
164 * \param linkId the ID of the given link
165 * \param mpdu The acknowledged MPDU.
166 */
167 void NotifyGotAck(uint8_t linkId, Ptr<const WifiMpdu> mpdu);
168 /**
169 * Invoked upon missed reception of an Ack frame on the given link after the
170 * transmission of a QoS data frame sent under an established block ack agreement.
171 * Remove the acknowledged frame from the outstanding packets and insert it in the
172 * retransmission queue.
173 *
174 * \param linkId the ID of the given link
175 * \param mpdu The unacknowledged MPDU.
176 */
177 void NotifyMissedAck(uint8_t linkId, Ptr<WifiMpdu> mpdu);
178 /**
179 * \param linkId the ID of the given link
180 * \param blockAck The received BlockAck frame.
181 * \param recipient Sender of BlockAck frame.
182 * \param tids the set of TIDs the acknowledged MPDUs belong to
183 * \param index the index of the Per AID TID Info subfield, in case of Multi-STA
184 * Block Ack, or 0, otherwise
185 * \return a pair of values indicating the number of successfully received MPDUs
186 * and the number of failed MPDUs
187 *
188 * Invoked upon receipt of a BlockAck frame on the given link. Typically, this function
189 * is called by ns3::QosTxop object. Performs a check on which MPDUs, previously sent
190 * with Ack Policy set to Block Ack, were correctly received by the recipient.
191 * An acknowledged MPDU is removed from the buffer, retransmitted otherwise.
192 * Note that <i>tids</i> is only used if <i>blockAck</i> is a Multi-STA Block Ack
193 * using All-ack context.
194 */
195 std::pair<uint16_t, uint16_t> NotifyGotBlockAck(uint8_t linkId,
196 const CtrlBAckResponseHeader& blockAck,
197 const Mac48Address& recipient,
198 const std::set<uint8_t>& tids,
199 size_t index = 0);
200 /**
201 * \param linkId the ID of the given link
202 * \param recipient Sender of the expected BlockAck frame.
203 * \param tid Traffic ID.
204 *
205 * Invoked upon missed reception of a block ack frame on the given link. Typically, this
206 * function is called by ns3::QosTxop object. Performs a check on which MPDUs, previously
207 * sent with ack policy set to Block Ack, should be placed in the retransmission queue.
208 */
209 void NotifyMissedBlockAck(uint8_t linkId, const Mac48Address& recipient, uint8_t tid);
210 /**
211 * \param originator MAC address of the sender of the Block Ack Request
212 * \param tid Traffic ID
213 * \param startingSeq the starting sequence number in the Block Ack Request
214 *
215 * Perform required actions upon receiving a Block Ack Request frame.
216 */
217 void NotifyGotBlockAckRequest(const Mac48Address& originator,
218 uint8_t tid,
219 uint16_t startingSeq);
220 /**
221 * \param mpdu the received MPDU
222 *
223 * Perform required actions upon receiving an MPDU.
224 */
226 /**
227 * \param recipient Address of peer station involved in block ack mechanism.
228 * \param tid Traffic ID.
229 *
230 * \return the number of packets buffered for a specified agreement
231 *
232 * Returns the number of packets buffered for a specified agreement. This methods doesn't return
233 * the number of buffered MPDUs but the number of buffered MSDUs.
234 */
235 uint32_t GetNBufferedPackets(const Mac48Address& recipient, uint8_t tid) const;
236 /**
237 * \param recipient Address of peer station involved in block ack mechanism.
238 * \param tid Traffic ID of transmitted packet.
239 * \param startingSeq starting sequence field
240 *
241 * Puts corresponding originator agreement in established state and updates number of packets
242 * and starting sequence field. Invoked typically after a block ack refresh.
243 */
245 uint8_t tid,
246 uint16_t startingSeq);
247 /**
248 * \param recipient Address of peer station involved in block ack mechanism.
249 * \param tid Traffic ID of transmitted packet.
250 *
251 * Marks an originator agreement as rejected. This happens if <i>recipient</i> station reject
252 * block ack setup by an ADDBA Response frame with a failure status code. For now we assume
253 * that every QoS station accepts a block ack setup.
254 */
255 void NotifyOriginatorAgreementRejected(const Mac48Address& recipient, uint8_t tid);
256 /**
257 * \param recipient Address of peer station involved in block ack mechanism.
258 * \param tid Traffic ID of transmitted packet.
259 *
260 * Marks an originator agreement after not receiving response to ADDBA request. During this
261 * state any packets in queue will be transmitted using normal MPDU. This also unblocks
262 * recipient address.
263 */
264 void NotifyOriginatorAgreementNoReply(const Mac48Address& recipient, uint8_t tid);
265 /**
266 * \param recipient Address of peer station involved in block ack mechanism.
267 * \param tid Traffic ID of transmitted packet.
268 *
269 * Set Originator BA agreement to a transitory state to reset it after not receiving response
270 * to ADDBA request.
271 */
272 void NotifyOriginatorAgreementReset(const Mac48Address& recipient, uint8_t tid);
273 /**
274 * \param nPackets Minimum number of packets for use of block ack.
275 *
276 * Upon receipt of a BlockAck frame, if total number of packets (packets in WifiMacQueue
277 * and buffered packets) is greater of <i>nPackets</i>, they are transmitted using block ack
278 * mechanism.
279 */
280 void SetBlockAckThreshold(uint8_t nPackets);
281
282 /**
283 * \param queue The WifiMacQueue object.
284 */
285 void SetQueue(const Ptr<WifiMacQueue> queue);
286
287 /**
288 * Set block ack inactivity callback
289 * \param callback the block ack inactivity callback function
290 */
292 /**
293 * Set block destination callback
294 * \param callback the block destination callback
295 */
297 /**
298 * Set unblock destination callback
299 * \param callback the unblock destination callback
300 */
302
303 /**
304 * This function returns true if a block ack agreement is established with the
305 * given recipient for the given TID and there is at least an outstanding MPDU
306 * for such agreement whose lifetime is not expired.
307 *
308 * \param tid Traffic ID
309 * \param recipient MAC address of the recipient
310 *
311 * \returns true if BAR retransmission needed
312 */
313 bool NeedBarRetransmission(uint8_t tid, const Mac48Address& recipient);
314 /**
315 * This function returns the buffer size negotiated with the recipient.
316 *
317 * \param tid Traffic ID
318 * \param recipient MAC address of the recipient
319 *
320 * \returns the buffer size negotiated with the recipient
321 */
322 uint16_t GetRecipientBufferSize(const Mac48Address& recipient, uint8_t tid) const;
323 /**
324 * This function returns the starting sequence number of the transmit window.
325 *
326 * \param tid Traffic ID
327 * \param recipient MAC address of the recipient
328 *
329 * \returns the starting sequence number of the transmit window (WinStartO)
330 */
331 uint16_t GetOriginatorStartingSequence(const Mac48Address& recipient, uint8_t tid) const;
332
333 /**
334 * typedef for a callback to invoke when an MPDU is successfully ack'ed.
335 */
337 /**
338 * typedef for a callback to invoke when an MPDU is negatively ack'ed.
339 */
341 /**
342 * typedef for a callback to invoke when an MPDU is dropped.
343 */
345
346 /**
347 * \param callback the callback to invoke when a
348 * packet transmission was completed successfully.
349 */
350 void SetTxOkCallback(TxOk callback);
351 /**
352 * \param callback the callback to invoke when a
353 * packet transmission was completed unsuccessfuly.
354 */
355 void SetTxFailedCallback(TxFailed callback);
356 /**
357 * \param callback the callback to invoke when an old MPDU is dropped
358 */
360
361 /**
362 * TracedCallback signature for state changes.
363 *
364 * \param [in] now Time when the \pname{state} changed.
365 * \param [in] recipient MAC address of the recipient.
366 * \param [in] tid the TID.
367 * \param [in] state The state.
368 */
370 const Mac48Address& recipient,
371 uint8_t tid,
373
374 /**
375 * \param mpdu the discarded frame
376 *
377 * Notify the block ack manager that an MPDU has been discarded, e.g., because
378 * the MSDU lifetime expired. If there is an established block ack agreement,
379 * make the transmit window advance beyond the discarded frame. This also
380 * involves (i) the removal of frames that consequently become old from the
381 * retransmit queue and from the queue of the block ack agreement, and (ii) the
382 * scheduling of a BlockAckRequest.
383 */
385
386 /**
387 * \param recipient the recipient
388 * \param tid the TID
389 * \return the BlockAckRequest header for the established BA agreement
390 *
391 * Get the BlockAckRequest header for the established BA agreement
392 * (<i>recipient</i>,<i>tid</i>).
393 */
394 CtrlBAckRequestHeader GetBlockAckReqHeader(const Mac48Address& recipient, uint8_t tid) const;
395
396 /**
397 * \param reqHdr the BlockAckRequest header
398 * \param hdr the 802.11 MAC header
399 *
400 * Enqueue the given BlockAckRequest into the queue storing the next BAR
401 * frames to transmit. If a BAR for the same recipient and TID is already present
402 * in the queue, it is replaced by the new one. If the given BAR is retransmitted,
403 * it is placed at the head of the queue, otherwise at the tail.
404 */
405 void ScheduleBar(const CtrlBAckRequestHeader& reqHdr, const WifiMacHeader& hdr);
406
407 /// agreement key typedef (MAC address and TID)
408 using AgreementKey = std::pair<Mac48Address, uint8_t>;
409
410 /**
411 * \return the list of BA agreements (identified by the recipient and TID pair) for which a BAR
412 * shall only be sent if there are queued data frames belonging to those agreements
413 */
414 const std::list<AgreementKey>& GetSendBarIfDataQueuedList() const;
415 /**
416 * Add the given (recipient, TID) pair to the list of BA agreements for which a BAR
417 * shall only be sent if there are queued data frames belonging to those agreements
418 *
419 * \param recipient the recipient
420 * \param tid the TID
421 */
422 void AddToSendBarIfDataQueuedList(const Mac48Address& recipient, uint8_t tid);
423 /**
424 * Remove the given (recipient, TID) pair from the list of BA agreements for which a BAR
425 * shall only be sent if there are queued data frames belonging to those agreements
426 *
427 * \param recipient the recipient
428 * \param tid the TID
429 */
430 void RemoveFromSendBarIfDataQueuedList(const Mac48Address& recipient, uint8_t tid);
431
432 protected:
433 void DoDispose() override;
434
435 private:
436 /**
437 * Inactivity timeout function
438 * \param recipient the recipient MAC address
439 * \param tid Traffic ID
440 */
441 void InactivityTimeout(const Mac48Address& recipient, uint8_t tid);
442
443 /**
444 * typedef for a list of WifiMpdu.
445 */
446 typedef std::list<Ptr<WifiMpdu>> PacketQueue;
447 /**
448 * typedef for an iterator for PacketQueue.
449 */
450 typedef std::list<Ptr<WifiMpdu>>::iterator PacketQueueI;
451
452 /// AgreementKey-indexed map of originator block ack agreements
454 std::map<AgreementKey, std::pair<OriginatorBlockAckAgreement, PacketQueue>>;
455 /// typedef for an iterator for Agreements
456 using OriginatorAgreementsI = OriginatorAgreements::iterator;
457
458 /// AgreementKey-indexed map of recipient block ack agreements
459 using RecipientAgreements = std::map<AgreementKey, RecipientBlockAckAgreement>;
460
461 /**
462 * Handle the given in flight MPDU based on its given status. If the status is
463 * ACKNOWLEDGED, the MPDU is removed from both the EDCA queue and the queue of
464 * in flight MPDUs. If the status is TO_RETRANSMIT, the MPDU is only removed
465 * from the queue of in flight MPDUs. Note that the MPDU is removed from both
466 * queues (independently of the status) if the MPDU is not stored in the EDCA
467 * queue, is an old packet or its lifetime expired.
468 *
469 * \param linkId the ID of the link on which the MPDU has been transmitted
470 * \param mpduIt an iterator pointing to the MPDU in the queue of in flight MPDUs
471 * \param status the status of the in flight MPDU
472 * \param it iterator pointing to the Block Ack agreement
473 * \param now the current time
474 * \return an iterator pointing to the next MPDU in the queue of in flight MPDUs
475 */
476 PacketQueueI HandleInFlightMpdu(uint8_t linkId,
477 PacketQueueI mpduIt,
478 MpduStatus status,
479 const OriginatorAgreementsI& it,
480 const Time& now);
481
482 /**
483 * This data structure contains, for each originator block ack agreement (recipient, TID),
484 * a set of packets for which an ack by block ack is requested.
485 * Every packet or fragment indicated as correctly received in BlockAck frame is
486 * erased from this data structure. Pushed back in retransmission queue otherwise.
487 */
489 RecipientAgreements m_recipientAgreements; //!< Recipient Block Ack agreements
490
491 std::list<AgreementKey> m_sendBarIfDataQueued; ///< list of BA agreements for which a BAR shall
492 ///< only be sent if data is queued
493
494 uint8_t m_blockAckThreshold; ///< block ack threshold
497 m_blockAckInactivityTimeout; ///< BlockAck inactivity timeout callback
500 TxOk m_txOkCallback; ///< transmit OK callback
501 TxFailed m_txFailedCallback; ///< transmit failed callback
502 DroppedOldMpdu m_droppedOldMpduCallback; ///< the dropped MPDU callback
503
504 /**
505 * The trace source fired when a state transition occurred.
506 */
509};
510
511} // namespace ns3
512
513#endif /* BLOCK_ACK_MANAGER_H */
Manages all block ack agreements for an originator station.
void SetTxFailedCallback(TxFailed callback)
RecipientAgreementOptConstRef GetAgreementAsRecipient(const Mac48Address &originator, uint8_t tid) const
std::map< AgreementKey, std::pair< OriginatorBlockAckAgreement, PacketQueue > > OriginatorAgreements
AgreementKey-indexed map of originator block ack agreements.
void NotifyOriginatorAgreementEstablished(const Mac48Address &recipient, uint8_t tid, uint16_t startingSeq)
std::pair< Mac48Address, uint8_t > AgreementKey
agreement key typedef (MAC address and TID)
void UpdateOriginatorAgreement(const MgtAddBaResponseHeader &respHdr, const Mac48Address &recipient, uint16_t startingSeq)
Callback< void, Mac48Address, uint8_t > m_unblockPackets
unblock packets callback
OriginatorAgreements::iterator OriginatorAgreementsI
typedef for an iterator for Agreements
void SetQueue(const Ptr< WifiMacQueue > queue)
void DestroyRecipientAgreement(const Mac48Address &originator, uint8_t tid)
Destroy a recipient Block Ack agreement.
void SetTxOkCallback(TxOk callback)
void InactivityTimeout(const Mac48Address &recipient, uint8_t tid)
Inactivity timeout function.
uint8_t m_blockAckThreshold
block ack threshold
std::list< Ptr< WifiMpdu > > PacketQueue
typedef for a list of WifiMpdu.
RecipientAgreements m_recipientAgreements
Recipient Block Ack agreements.
static TypeId GetTypeId()
Get the type ID.
TracedCallback< Time, Mac48Address, uint8_t, OriginatorBlockAckAgreement::State > m_originatorAgreementState
The trace source fired when a state transition occurred.
void SetBlockAckThreshold(uint8_t nPackets)
DroppedOldMpdu m_droppedOldMpduCallback
the dropped MPDU callback
std::map< AgreementKey, RecipientBlockAckAgreement > RecipientAgreements
AgreementKey-indexed map of recipient block ack agreements.
void SetDroppedOldMpduCallback(DroppedOldMpdu callback)
TxFailed m_txFailedCallback
transmit failed callback
void SetUnblockDestinationCallback(Callback< void, Mac48Address, uint8_t > callback)
Set unblock destination callback.
std::optional< std::reference_wrapper< const OriginatorBlockAckAgreement > > OriginatorAgreementOptConstRef
optional const reference to OriginatorBlockAckAgreement
void NotifyOriginatorAgreementRejected(const Mac48Address &recipient, uint8_t tid)
Ptr< WifiMacQueue > m_queue
queue
uint16_t GetRecipientBufferSize(const Mac48Address &recipient, uint8_t tid) const
This function returns the buffer size negotiated with the recipient.
void CreateOriginatorAgreement(const MgtAddBaRequestHeader &reqHdr, const Mac48Address &recipient)
void CreateRecipientAgreement(const MgtAddBaResponseHeader &respHdr, const Mac48Address &originator, uint16_t startingSeq, Ptr< MacRxMiddle > rxMiddle)
void NotifyOriginatorAgreementNoReply(const Mac48Address &recipient, uint8_t tid)
void NotifyMissedBlockAck(uint8_t linkId, const Mac48Address &recipient, uint8_t tid)
OriginatorAgreements m_originatorAgreements
This data structure contains, for each originator block ack agreement (recipient, TID),...
void StorePacket(Ptr< WifiMpdu > mpdu)
void NotifyOriginatorAgreementReset(const Mac48Address &recipient, uint8_t tid)
void RemoveFromSendBarIfDataQueuedList(const Mac48Address &recipient, uint8_t tid)
Remove the given (recipient, TID) pair from the list of BA agreements for which a BAR shall only be s...
BlockAckManager & operator=(const BlockAckManager &)=delete
void NotifyGotAck(uint8_t linkId, Ptr< const WifiMpdu > mpdu)
Invoked upon receipt of an Ack frame on the given link after the transmission of a QoS data frame sen...
void AddToSendBarIfDataQueuedList(const Mac48Address &recipient, uint8_t tid)
Add the given (recipient, TID) pair to the list of BA agreements for which a BAR shall only be sent i...
void NotifyDiscardedMpdu(Ptr< const WifiMpdu > mpdu)
void NotifyGotMpdu(Ptr< const WifiMpdu > mpdu)
Callback< void, Ptr< const WifiMpdu > > TxFailed
typedef for a callback to invoke when an MPDU is negatively ack'ed.
bool NeedBarRetransmission(uint8_t tid, const Mac48Address &recipient)
This function returns true if a block ack agreement is established with the given recipient for the g...
Callback< void, Ptr< const WifiMpdu > > TxOk
typedef for a callback to invoke when an MPDU is successfully ack'ed.
void SetBlockDestinationCallback(Callback< void, Mac48Address, uint8_t > callback)
Set block destination callback.
std::list< Ptr< WifiMpdu > >::iterator PacketQueueI
typedef for an iterator for PacketQueue.
std::list< AgreementKey > m_sendBarIfDataQueued
list of BA agreements for which a BAR shall only be sent if data is queued
uint32_t GetNBufferedPackets(const Mac48Address &recipient, uint8_t tid) const
PacketQueueI HandleInFlightMpdu(uint8_t linkId, PacketQueueI mpduIt, MpduStatus status, const OriginatorAgreementsI &it, const Time &now)
Handle the given in flight MPDU based on its given status.
void SetBlockAckInactivityCallback(Callback< void, Mac48Address, uint8_t, bool > callback)
Set block ack inactivity callback.
uint16_t GetOriginatorStartingSequence(const Mac48Address &recipient, uint8_t tid) const
This function returns the starting sequence number of the transmit window.
BlockAckManager(const BlockAckManager &)=delete
Callback< void, Mac48Address, uint8_t, bool > m_blockAckInactivityTimeout
BlockAck inactivity timeout callback.
Callback< void, Ptr< const WifiMpdu > > DroppedOldMpdu
typedef for a callback to invoke when an MPDU is dropped.
TxOk m_txOkCallback
transmit OK callback
MpduStatus
Enumeration for the statuses of a buffered MPDU.
void(* AgreementStateTracedCallback)(Time now, const Mac48Address &recipient, uint8_t tid, OriginatorBlockAckAgreement::State state)
TracedCallback signature for state changes.
std::pair< uint16_t, uint16_t > NotifyGotBlockAck(uint8_t linkId, const CtrlBAckResponseHeader &blockAck, const Mac48Address &recipient, const std::set< uint8_t > &tids, size_t index=0)
void DoDispose() override
Destructor implementation.
std::optional< std::reference_wrapper< const RecipientBlockAckAgreement > > RecipientAgreementOptConstRef
optional const reference to RecipientBlockAckAgreement
void ScheduleBar(const CtrlBAckRequestHeader &reqHdr, const WifiMacHeader &hdr)
Callback< void, Mac48Address, uint8_t > m_blockPackets
block packets callback
void DestroyOriginatorAgreement(const Mac48Address &recipient, uint8_t tid)
OriginatorAgreementOptConstRef GetAgreementAsOriginator(const Mac48Address &recipient, uint8_t tid) const
CtrlBAckRequestHeader GetBlockAckReqHeader(const Mac48Address &recipient, uint8_t tid) const
const std::list< AgreementKey > & GetSendBarIfDataQueuedList() const
void NotifyGotBlockAckRequest(const Mac48Address &originator, uint8_t tid, uint16_t startingSeq)
void NotifyMissedAck(uint8_t linkId, Ptr< WifiMpdu > mpdu)
Invoked upon missed reception of an Ack frame on the given link after the transmission of a QoS data ...
Callback template class.
Definition callback.h:422
Headers for BlockAckRequest.
Headers for BlockAck response.
an EUI-48 address
Implement the header for management frames of type Add Block Ack request.
Implement the header for management frames of type Add Block Ack response.
A base class which provides memory management and object aggregation.
Definition object.h:78
State
Represents the state for this agreement.
Smart pointer class similar to boost::intrusive_ptr.
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
Forward calls to a chain of Callback.
a unique identifier for an interface.
Definition type-id.h:48
Implements the IEEE 802.11 MAC header.
Every class exported by the ns3 library is enclosed in the ns3 namespace.