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