A Discrete-Event Network Simulator
API
qos-txop.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2006, 2009 INRIA
4  * Copyright (c) 2009 MIRKO BANCHI
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation;
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
20  * Mirko Banchi <mk.banchi@gmail.com>
21  * Stefano Avallone <stavalli@unina.it>
22  */
23 
24 #include "ns3/log.h"
25 #include "ns3/pointer.h"
26 #include "ns3/simulator.h"
27 #include "ns3/random-variable-stream.h"
28 #include "qos-txop.h"
29 #include "channel-access-manager.h"
30 #include "mac-tx-middle.h"
31 #include "mgt-headers.h"
32 #include "wifi-mac-trailer.h"
33 #include "wifi-mac-queue.h"
35 #include "msdu-aggregator.h"
36 #include "mpdu-aggregator.h"
37 #include "ctrl-headers.h"
38 #include "wifi-phy.h"
39 #include "wifi-psdu.h"
40 #include "ns3/ht-frame-exchange-manager.h"
41 #include "wifi-tx-parameters.h"
42 
43 #undef NS_LOG_APPEND_CONTEXT
44 #define NS_LOG_APPEND_CONTEXT if (m_mac != 0) { std::clog << "[mac=" << m_mac->GetAddress () << "] "; }
45 
46 namespace ns3 {
47 
48 NS_LOG_COMPONENT_DEFINE ("QosTxop");
49 
51 
52 TypeId
54 {
55  static TypeId tid = TypeId ("ns3::QosTxop")
56  .SetParent<ns3::Txop> ()
57  .SetGroupName ("Wifi")
58  .AddConstructor<QosTxop> ()
59  .AddAttribute ("UseExplicitBarAfterMissedBlockAck",
60  "Specify whether explicit BlockAckRequest should be sent upon missed BlockAck Response.",
61  BooleanValue (true),
64  .AddAttribute ("AddBaResponseTimeout",
65  "The timeout to wait for ADDBA response after the Ack to "
66  "ADDBA request is received.",
67  TimeValue (MilliSeconds (1)),
70  MakeTimeChecker ())
71  .AddAttribute ("FailedAddBaTimeout",
72  "The timeout after a failed BA agreement. During this "
73  "timeout, the originator resumes sending packets using normal "
74  "MPDU. After that, BA agreement is reset and the originator "
75  "will retry BA negotiation.",
76  TimeValue (MilliSeconds (200)),
79  MakeTimeChecker ())
80  .AddAttribute ("BlockAckManager",
81  "The BlockAckManager object.",
82  PointerValue (),
84  MakePointerChecker<BlockAckManager> ())
85  .AddTraceSource ("TxopTrace",
86  "Trace source for TXOP start and duration times",
88  "ns3::TracedValueCallback::Time")
89  ;
90  return tid;
91 }
92 
94  : Txop (CreateObject<WifiMacQueue> (ac)),
95  m_ac (ac),
96  m_startTxop (Seconds (0)),
97  m_txopDuration (Seconds (0)),
98  m_muCwMin (0),
99  m_muCwMax (0),
100  m_muAifsn (0),
101  m_muEdcaTimer (Seconds (0)),
102  m_muEdcaTimerStartTime (Seconds (0))
103 {
104  NS_LOG_FUNCTION (this);
105  m_qosBlockedDestinations = Create<QosBlockedDestinations> ();
106  m_baManager = CreateObject<BlockAckManager> ();
107  m_baManager->SetQueue (m_queue);
110  m_queue->TraceConnectWithoutContext ("Expired", MakeCallback (&BlockAckManager::NotifyDiscardedMpdu, m_baManager));
111 }
112 
114 {
115  NS_LOG_FUNCTION (this);
116 }
117 
118 void
120 {
121  NS_LOG_FUNCTION (this);
122  if (m_baManager != 0)
123  {
124  m_baManager->Dispose ();
125  }
126  m_baManager = 0;
128  m_qosFem = 0;
129  Txop::DoDispose ();
130 }
131 
132 uint8_t
133 QosTxop::GetQosQueueSize (uint8_t tid, Mac48Address receiver) const
134 {
135  uint32_t bufferSize = m_queue->GetNBytes (tid, receiver);
136  // A queue size value of 254 is used for all sizes greater than 64 768 octets.
137  uint8_t queueSize = static_cast<uint8_t> (std::ceil (std::min (bufferSize, 64769u) / 256.0));
138  NS_LOG_DEBUG ("Buffer size=" << bufferSize << " Queue Size=" << +queueSize);
139  return queueSize;
140 }
141 
142 void
144 {
145  NS_LOG_FUNCTION (this << qosFem);
146  m_qosFem = qosFem;
147 }
148 
149 void
151 {
152  NS_LOG_FUNCTION (this << &callback);
153  Txop::SetDroppedMpduCallback (callback);
154  m_baManager->SetDroppedOldMpduCallback (callback.Bind (WIFI_MAC_DROP_QOS_OLD_PACKET));
155 }
156 
157 void
158 QosTxop::SetMuCwMin (uint16_t cwMin)
159 {
160  NS_LOG_FUNCTION (this << cwMin);
161  m_muCwMin = cwMin;
162 }
163 
164 void
165 QosTxop::SetMuCwMax (uint16_t cwMax)
166 {
167  NS_LOG_FUNCTION (this << cwMax);
168  m_muCwMax = cwMax;
169 }
170 
171 void
172 QosTxop::SetMuAifsn (uint8_t aifsn)
173 {
174  NS_LOG_FUNCTION (this << +aifsn);
175  m_muAifsn = aifsn;
176 }
177 
178 void
180 {
181  NS_LOG_FUNCTION (this << timer);
182  m_muEdcaTimer = timer;
183 }
184 
185 void
187 {
188  NS_LOG_FUNCTION (this);
190  if (EdcaDisabled ())
191  {
192  NS_LOG_DEBUG ("Disable EDCA for " << m_muEdcaTimer.As (Time::MS));
193  m_channelAccessManager->DisableEdcaFor (this, m_muEdcaTimer);
194  }
195 }
196 
197 bool
199 {
202 }
203 
204 bool
206 {
207  return (MuEdcaTimerRunning () && m_muAifsn == 0);
208 }
209 
210 uint32_t
211 QosTxop::GetMinCw (void) const
212 {
213  if (!MuEdcaTimerRunning ())
214  {
215  return m_cwMin;
216  }
217  NS_ASSERT (!EdcaDisabled ());
218  return m_muCwMin;
219 }
220 
221 uint32_t
222 QosTxop::GetMaxCw (void) const
223 {
224  if (!MuEdcaTimerRunning ())
225  {
226  return m_cwMax;
227  }
228  NS_ASSERT (!EdcaDisabled ());
229  return m_muCwMax;
230 }
231 
232 uint8_t
233 QosTxop::GetAifsn (void) const
234 {
235  if (!MuEdcaTimerRunning ())
236  {
237  return m_aifsn;
238  }
239  return m_muAifsn;
240 }
241 
244 {
245  return m_baManager;
246 }
247 
248 bool
250 {
251  return m_baManager->ExistsAgreementInState (address, tid, OriginatorBlockAckAgreement::ESTABLISHED);
252 }
253 
254 uint16_t
256 {
257  return m_baManager->GetRecipientBufferSize (address, tid);
258 }
259 
260 uint16_t
262 {
263  return m_baManager->GetOriginatorStartingSequence (address, tid);
264 }
265 
267 QosTxop::PrepareBlockAckRequest (Mac48Address recipient, uint8_t tid) const
268 {
269  NS_LOG_FUNCTION (this << recipient << +tid);
270  NS_ASSERT (QosUtilsMapTidToAc (tid) == m_ac);
271 
272  CtrlBAckRequestHeader reqHdr = m_baManager->GetBlockAckReqHeader (recipient, tid);
273  Ptr<Packet> bar = Create<Packet> ();
274  bar->AddHeader (reqHdr);
275 
276  WifiMacHeader hdr;
278  hdr.SetAddr1 (recipient);
279  hdr.SetAddr2 (m_mac->GetAddress ());
280  hdr.SetDsNotTo ();
281  hdr.SetDsNotFrom ();
282  hdr.SetNoRetry ();
283  hdr.SetNoMoreFragments ();
284 
285  return Create<const WifiMacQueueItem> (bar, hdr);
286 }
287 
288 void
289 QosTxop::ScheduleBar (Ptr<const WifiMacQueueItem> bar, bool skipIfNoDataQueued)
290 {
291  m_baManager->ScheduleBar (bar, skipIfNoDataQueued);
292 }
293 
294 bool
296 {
298 }
299 
300 bool
302 {
303  // check if the BA manager has anything to send, so that expired
304  // frames (if any) are removed and a BlockAckRequest is scheduled to advance
305  // the starting sequence number of the transmit (and receiver) window
306  bool baManagerHasPackets = (m_baManager->GetBar (false) != 0);
307  // remove MSDUs with expired lifetime starting from the head of the queue
308  // TODO Add a WifiMacQueue method that serves this purpose; IsEmpty () can
309  // then reuse such method.
310  m_queue->IsEmpty ();
311  bool queueIsNotEmpty = (m_queue->PeekFirstAvailable (m_qosBlockedDestinations) != m_queue->end ());
312 
313  bool ret = (baManagerHasPackets || queueIsNotEmpty);
314  NS_LOG_FUNCTION (this << baManagerHasPackets << queueIsNotEmpty);
315  return ret;
316 }
317 
318 uint16_t
320 {
321  return m_txMiddle->GetNextSequenceNumberFor (hdr);
322 }
323 
324 uint16_t
326 {
327  return m_txMiddle->PeekNextSequenceNumberFor (hdr);
328 }
329 
330 bool
332 {
333  NS_LOG_FUNCTION (this << *mpdu);
334 
335  if (!mpdu->GetHeader ().IsQosData ())
336  {
337  return false;
338  }
339 
340  Mac48Address recipient = mpdu->GetHeader ().GetAddr1 ();
341  uint8_t tid = mpdu->GetHeader ().GetQosTid ();
342 
343  if (!GetBaAgreementEstablished (recipient, tid))
344  {
345  return false;
346  }
347 
348  if (QosUtilsIsOldPacket (GetBaStartingSequence (recipient, tid),
349  mpdu->GetHeader ().GetSequenceNumber ()))
350  {
351  return true;
352  }
353  return false;
354 }
355 
357 QosTxop::PeekNextMpdu (uint8_t tid, Mac48Address recipient)
358 {
359  return PeekNextMpdu (WifiMacQueue::EMPTY, tid, recipient);
360 }
361 
364 {
365  NS_LOG_FUNCTION (this << +tid << recipient);
366 
367  // lambda to peek the next frame
368  auto peek = [this, &tid, &recipient, &queueIt] () -> WifiMacQueue::ConstIterator
369  {
370  if (tid == 8 && recipient.IsBroadcast ()) // undefined TID and recipient
371  {
372  return m_queue->PeekFirstAvailable (m_qosBlockedDestinations, queueIt);
373  }
374  if (m_qosBlockedDestinations->IsBlocked (recipient, tid))
375  {
376  return m_queue->end ();
377  }
378  return m_queue->PeekByTidAndAddress (tid, recipient, queueIt);
379  };
380 
381  queueIt = peek ();
382  // remove old packets (must be retransmissions or in flight, otherwise they did
383  // not get a sequence number assigned)
384  while (queueIt != m_queue->end () && !(*queueIt)->IsFragment ())
385  {
386  if (((*queueIt)->GetHeader ().IsRetry () || (*queueIt)->IsInFlight ())
387  && IsQosOldPacket (*queueIt))
388  {
389  NS_LOG_DEBUG ("Removing an old packet from EDCA queue: " << **queueIt);
391  {
393  }
394  queueIt = m_queue->Remove (queueIt);
395  queueIt = peek ();
396  }
397  else if ((*queueIt)->IsInFlight ())
398  {
399  NS_LOG_DEBUG ("Skipping in flight MPDU: " << **queueIt);
400  ++queueIt;
401  queueIt = peek ();
402  }
403  else
404  {
405  break;
406  }
407  }
408  if (queueIt != m_queue->end ())
409  {
410  NS_ASSERT (!(*queueIt)->IsInFlight ());
411  WifiMacHeader& hdr = (*queueIt)->GetHeader ();
412 
413  // peek the next sequence number and check if it is within the transmit window
414  // in case of QoS data frame
415  uint16_t sequence = (hdr.IsRetry () ? hdr.GetSequenceNumber ()
416  : m_txMiddle->PeekNextSequenceNumberFor (&hdr));
417  if (hdr.IsQosData ())
418  {
419  Mac48Address recipient = hdr.GetAddr1 ();
420  uint8_t tid = hdr.GetQosTid ();
421 
422  if (GetBaAgreementEstablished (recipient, tid)
423  && !IsInWindow (sequence, GetBaStartingSequence (recipient, tid), GetBaBufferSize (recipient, tid)))
424  {
425  NS_LOG_DEBUG ("Packet beyond the end of the current transmit window");
426  return 0;
427  }
428  }
429 
430  // Assign a sequence number if this is not a fragment nor a retransmission
431  if (!(*queueIt)->IsFragment () && !hdr.IsRetry ())
432  {
433  hdr.SetSequenceNumber (sequence);
434  }
435  NS_LOG_DEBUG ("Packet peeked from EDCA queue: " << **queueIt);
436  return *queueIt;
437  }
438 
439  return 0;
440 }
441 
444  Time availableTime, bool initialFrame, WifiMacQueueItem::ConstIterator& queueIt)
445 {
446  NS_ASSERT (peekedItem != 0);
447  NS_ASSERT (m_qosFem != 0);
448  NS_LOG_FUNCTION (this << *peekedItem << &txParams << availableTime << initialFrame);
449 
450  Mac48Address recipient = peekedItem->GetHeader ().GetAddr1 ();
451 
452  // The TXOP limit can be exceeded by the TXOP holder if it does not transmit more
453  // than one Data or Management frame in the TXOP and the frame is not in an A-MPDU
454  // consisting of more than one MPDU (Sec. 10.22.2.8 of 802.11-2016)
455  Time actualAvailableTime = (initialFrame && txParams.GetSize (recipient) == 0
456  ? Time::Min () : availableTime);
457 
458  if (!m_qosFem->TryAddMpdu (peekedItem, txParams, actualAvailableTime))
459  {
460  return nullptr;
461  }
462 
463  NS_ASSERT (peekedItem->IsQueued ());
464  WifiMacQueueItem::ConstIterator peekedIt = peekedItem->GetQueueIterator ();
465  NS_ASSERT ((*peekedIt)->GetPacket () == peekedItem->GetPacket ());
466  NS_ASSERT ((*peekedIt)->GetQueueAc () == m_ac);
468 
469  // If it is a non-broadcast QoS Data frame and it is not a retransmission nor a fragment,
470  // attempt A-MSDU aggregation
471  if (peekedItem->GetHeader ().IsQosData ())
472  {
473  uint8_t tid = peekedItem->GetHeader ().GetQosTid ();
474 
475  // we should not be asked to dequeue an MPDU that is beyond the transmit window.
476  // Note that PeekNextMpdu() temporarily assigns the next available sequence number
477  // to the peeked frame
478  NS_ASSERT (!GetBaAgreementEstablished (recipient, tid)
479  || IsInWindow (peekedItem->GetHeader ().GetSequenceNumber (),
480  GetBaStartingSequence (recipient, tid),
481  GetBaBufferSize (recipient, tid)));
482 
483  // try A-MSDU aggregation
484  if (m_mac->GetHtSupported () && !recipient.IsBroadcast ()
485  && !peekedItem->GetHeader ().IsRetry () && !peekedItem->IsFragment ()
486  && !peekedItem->IsInFlight ())
487  {
488  Ptr<HtFrameExchangeManager> htFem = StaticCast<HtFrameExchangeManager> (m_qosFem);
489  mpdu = htFem->GetMsduAggregator ()->GetNextAmsdu (peekedItem, txParams, availableTime, peekedIt);
490  }
491 
492  if (mpdu != 0)
493  {
494  NS_LOG_DEBUG ("Prepared an MPDU containing an A-MSDU");
495  }
496  // else aggregation was not attempted or failed
497  }
498 
499  if (mpdu == 0)
500  {
501  mpdu = *peekedIt;
502  peekedIt++;
503  }
504 
505  // Assign a sequence number if this is not a fragment nor a retransmission
506  AssignSequenceNumber (mpdu);
507  NS_LOG_DEBUG ("Got MPDU from EDCA queue: " << *mpdu);
508  queueIt = peekedIt;
509 
510  return mpdu;
511 }
512 
513 void
515 {
516  NS_LOG_FUNCTION (this << *mpdu);
517 
518  if (!mpdu->IsFragment () && !mpdu->GetHeader ().IsRetry () && !mpdu->IsInFlight ())
519  {
520  uint16_t sequence = m_txMiddle->GetNextSequenceNumberFor (&mpdu->GetHeader ());
521  mpdu->GetHeader ().SetSequenceNumber (sequence);
522  }
523 }
524 
526 QosTxop::GetBlockAckReqType (Mac48Address recipient, uint8_t tid) const
527 {
528  return m_baManager->GetBlockAckReqType (recipient, tid);
529 }
530 
532 QosTxop::GetBlockAckType (Mac48Address recipient, uint8_t tid) const
533 {
534  return m_baManager->GetBlockAckType (recipient, tid);
535 }
536 
537 void
539 {
540  NS_LOG_FUNCTION (this << txopDuration);
541 
542  NS_ASSERT (txopDuration != Time::Min ());
544  m_txopDuration = txopDuration;
546 }
547 
548 bool
550 {
551  NS_LOG_FUNCTION (this << !m_startTxop.IsZero ());
552  return (!m_startTxop.IsZero ());
553 }
554 
555 void
557 {
558  NS_LOG_FUNCTION (this);
559 
561  {
562  NS_LOG_DEBUG ("Terminating TXOP. Duration = " << Simulator::Now () - m_startTxop);
564  }
565  m_startTxop = Seconds (0);
567 }
568 
569 Time
571 {
573  Time remainingTxop = m_txopDuration;
574  remainingTxop -= (Simulator::Now () - m_startTxop);
575  if (remainingTxop.IsStrictlyNegative ())
576  {
577  remainingTxop = Seconds (0);
578  }
579  NS_LOG_FUNCTION (this << remainingTxop);
580  return remainingTxop;
581 }
582 
583 void
585 {
586  NS_LOG_FUNCTION (this << packet << &hdr);
587  WifiMacTrailer fcs;
588  m_queue->PushFront (Create<WifiMacQueueItem> (packet, hdr));
590  {
591  m_channelAccessManager->RequestAccess (this);
592  }
593 }
594 
595 void
597 {
598  NS_LOG_FUNCTION (this << respHdr << recipient);
599  uint8_t tid = respHdr->GetTid ();
600  if (respHdr->GetStatusCode ().IsSuccess ())
601  {
602  NS_LOG_DEBUG ("block ack agreement established with " << recipient << " tid " << +tid);
603  // A (destination, TID) pair is "blocked" (i.e., no more packets are sent)
604  // when an Add BA Request is sent to the destination. However, when the
605  // Add BA Request timer expires, the (destination, TID) pair is "unblocked"
606  // and packets to the destination are sent again (under normal ack policy).
607  // Thus, there may be a packet needing to be retransmitted when the
608  // Add BA Response is received. In this case, the starting sequence number
609  // shall be set equal to the sequence number of such packet.
610  uint16_t startingSeq = m_txMiddle->GetNextSeqNumberByTidAndAddress (tid, recipient);
611  WifiMacQueue::ConstIterator peekedIt = m_queue->PeekByTidAndAddress (tid, recipient);
612  if (peekedIt != m_queue->end () && (*peekedIt)->GetHeader ().IsRetry ())
613  {
614  startingSeq = (*peekedIt)->GetHeader ().GetSequenceNumber ();
615  }
616  m_baManager->UpdateAgreement (respHdr, recipient, startingSeq);
617  }
618  else
619  {
620  NS_LOG_DEBUG ("discard ADDBA response" << recipient);
621  m_baManager->NotifyAgreementRejected (recipient, tid);
622  }
623 
625  {
626  m_channelAccessManager->RequestAccess (this);
627  }
628 }
629 
630 void
632 {
633  NS_LOG_FUNCTION (this << delBaHdr << recipient);
634  NS_LOG_DEBUG ("received DELBA frame from=" << recipient);
635  m_baManager->DestroyAgreement (recipient, delBaHdr->GetTid ());
636 }
637 
638 void
640 {
641  NS_ASSERT (mpdu->GetHeader ().IsQosData ());
642  // If there is an established BA agreement, store the packet in the queue of outstanding packets
643  if (GetBaAgreementEstablished (mpdu->GetHeader ().GetAddr1 (), mpdu->GetHeader ().GetQosTid ()))
644  {
645  m_baManager->StorePacket (mpdu);
646  }
647 }
648 
649 void
650 QosTxop::SetBlockAckThreshold (uint8_t threshold)
651 {
652  NS_LOG_FUNCTION (this << +threshold);
653  m_blockAckThreshold = threshold;
654  m_baManager->SetBlockAckThreshold (threshold);
655 }
656 
657 void
659 {
660  NS_LOG_FUNCTION (this << timeout);
662 }
663 
664 uint8_t
666 {
667  NS_LOG_FUNCTION (this);
668  return m_blockAckThreshold;
669 }
670 
671 uint16_t
673 {
675 }
676 
677 void
679 {
680  NS_LOG_FUNCTION (this);
681  ResetCw ();
682  GenerateBackoff ();
683 }
684 
685 void
687 {
688  NS_LOG_FUNCTION (this << recipient << +tid);
689  // If agreement is still pending, ADDBA response is not received
690  if (m_baManager->ExistsAgreementInState (recipient, tid, OriginatorBlockAckAgreement::PENDING))
691  {
692  m_baManager->NotifyAgreementNoReply (recipient, tid);
694  GenerateBackoff ();
696  {
697  m_channelAccessManager->RequestAccess (this);
698  }
699  }
700 }
701 
702 void
703 QosTxop::ResetBa (Mac48Address recipient, uint8_t tid)
704 {
705  NS_LOG_FUNCTION (this << recipient << +tid);
706  // This function is scheduled when waiting for an ADDBA response. However,
707  // before this function is called, a DELBA request may arrive, which causes
708  // the agreement to be deleted. Hence, check if an agreement exists before
709  // notifying that the agreement has to be reset.
710  if (m_baManager->ExistsAgreement (recipient, tid)
711  && !m_baManager->ExistsAgreementInState (recipient, tid, OriginatorBlockAckAgreement::ESTABLISHED))
712  {
713  m_baManager->NotifyAgreementReset (recipient, tid);
714  }
715 }
716 
717 void
719 {
720  NS_LOG_FUNCTION (this << addBaResponseTimeout);
721  m_addBaResponseTimeout = addBaResponseTimeout;
722 }
723 
724 Time
726 {
727  return m_addBaResponseTimeout;
728 }
729 
730 void
732 {
733  NS_LOG_FUNCTION (this << failedAddBaTimeout);
734  m_failedAddBaTimeout = failedAddBaTimeout;
735 }
736 
737 Time
739 {
740  return m_failedAddBaTimeout;
741 }
742 
743 bool
744 QosTxop::IsQosTxop (void) const
745 {
746  return true;
747 }
748 
749 AcIndex
751 {
752  return m_ac;
753 }
754 
755 } //namespace ns3
ns3::Txop::SetDroppedMpduCallback
virtual void SetDroppedMpduCallback(DroppedMpdu callback)
Definition: txop.cc:143
ns3::TypeId
a unique identifier for an interface.
Definition: type-id.h:59
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:205
ns3::Txop::m_txMiddle
Ptr< MacTxMiddle > m_txMiddle
the MacTxMiddle
Definition: txop.h:328
ns3::QosTxop::QosTxop
QosTxop(AcIndex ac=AC_UNDEF)
Constructor.
Definition: qos-txop.cc:93
mac-tx-middle.h
ns3::QosTxop::m_baManager
Ptr< BlockAckManager > m_baManager
the block ack manager
Definition: qos-txop.h:485
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:45
NS_ASSERT
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Definition: assert.h:67
ns3::WifiMacHeader::SetNoMoreFragments
void SetNoMoreFragments(void)
Un-set the More Fragment bit in the Frame Control Field.
Definition: wifi-mac-header.cc:322
ns3::MakeTimeChecker
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
Definition: time.cc:533
ns3::BooleanValue
AttributeValue implementation for Boolean.
Definition: boolean.h:37
ns3::QosTxop::DoDispose
void DoDispose(void) override
Destructor implementation.
Definition: qos-txop.cc:119
min
#define min(a, b)
Definition: 80211b.c:42
ns3::WifiMacQueue
This queue implements the timeout procedure described in (Section 9.19.2.6 "Retransmit procedures" pa...
Definition: wifi-mac-queue.h:60
ns3::Txop::NotifyChannelReleased
virtual void NotifyChannelReleased(void)
Called by the FrameExchangeManager to notify the completion of the transmissions.
Definition: txop.cc:355
ns3::Packet::AddHeader
void AddHeader(const Header &header)
Add header to this packet.
Definition: packet.cc:256
ns3::Callback< void, WifiMacDropReason, Ptr< const WifiMacQueueItem > >
wifi-tx-parameters.h
ns3::QosTxop::GetBaBufferSize
uint16_t GetBaBufferSize(Mac48Address address, uint8_t tid) const
Definition: qos-txop.cc:255
ns3::Simulator::Now
static Time Now(void)
Return the current simulation virtual time.
Definition: simulator.cc:195
ns3::WifiMacHeader::IsRetry
bool IsRetry(void) const
Return if the Retry bit is set.
Definition: wifi-mac-header.cc:789
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::QosTxop::m_useExplicitBarAfterMissedBlockAck
bool m_useExplicitBarAfterMissedBlockAck
flag whether explicit BlockAckRequest should be sent upon missed BlockAck Response
Definition: qos-txop.h:495
ns3::WifiMacTrailer
Implements the IEEE 802.11 MAC trailer.
Definition: wifi-mac-trailer.h:39
ns3::WifiMacHeader::SetSequenceNumber
void SetSequenceNumber(uint16_t seq)
Set the sequence number of the header.
Definition: wifi-mac-header.cc:312
ns3::Callback::IsNull
bool IsNull(void) const
Check for null implementation.
Definition: callback.h:1386
ns3::QosTxop::m_qosBlockedDestinations
Ptr< QosBlockedDestinations > m_qosBlockedDestinations
the QoS blocked destinations
Definition: qos-txop.h:484
ns3::QosTxop::GetBlockAckThreshold
uint8_t GetBlockAckThreshold(void) const
Return the current threshold for block ack mechanism.
Definition: qos-txop.cc:665
ns3::QosTxop::m_muCwMax
uint32_t m_muCwMax
the MU CW maximum
Definition: qos-txop.h:498
ns3::QosTxop::~QosTxop
virtual ~QosTxop()
Definition: qos-txop.cc:113
ns3::QosTxop::GetBaAgreementEstablished
bool GetBaAgreementEstablished(Mac48Address address, uint8_t tid) const
Definition: qos-txop.cc:249
ns3::CtrlBAckRequestHeader
Headers for BlockAckRequest.
Definition: ctrl-headers.h:49
ns3::MgtDelBaHeader::GetTid
uint8_t GetTid(void) const
Return the Traffic ID (TID).
Definition: mgt-headers.cc:1872
qos-txop.h
ns3::Txop::m_channelAccessManager
Ptr< ChannelAccessManager > m_channelAccessManager
the channel access manager
Definition: txop.h:325
ns3::QosBlockedDestinations::Unblock
void Unblock(Mac48Address dest, uint8_t tid)
Un-block the given destination address and TID (e.g.
Definition: qos-blocked-destinations.cc:48
ns3::QosTxop::GotAddBaResponse
void GotAddBaResponse(const MgtAddBaResponseHeader *respHdr, Mac48Address recipient)
Event handler when an ADDBA response is received.
Definition: qos-txop.cc:596
ns3::WifiMacHeader::SetDsNotFrom
void SetDsNotFrom(void)
Un-set the From DS bit in the Frame Control field.
Definition: wifi-mac-header.cc:90
ns3::WifiTxParameters::GetSize
uint32_t GetSize(Mac48Address receiver) const
Get the size in bytes of the (A-)MPDU addressed to the given receiver.
Definition: wifi-tx-parameters.cc:227
ns3::QosTxop::GetBaManager
Ptr< BlockAckManager > GetBaManager(void)
Get the Block Ack Manager associated with this QosTxop.
Definition: qos-txop.cc:243
ns3::QosTxop::GotDelBaFrame
void GotDelBaFrame(const MgtDelBaHeader *delBaHdr, Mac48Address recipient)
Event handler when a DELBA frame is received.
Definition: qos-txop.cc:631
ns3::QosTxop::SetBlockAckInactivityTimeout
void SetBlockAckInactivityTimeout(uint16_t timeout)
Set the BlockAck inactivity timeout.
Definition: qos-txop.cc:658
ns3::Time::IsStrictlyPositive
bool IsStrictlyPositive(void) const
Exactly equivalent to t > 0.
Definition: nstime.h:333
ns3::QosTxop::PeekNextSequenceNumberFor
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:325
ns3::Txop::ResetCw
void ResetCw(void)
Update the value of the CW variable to take into account a transmission success or a transmission abo...
Definition: txop.cc:191
ns3::QosTxop::UseExplicitBarAfterMissedBlockAck
bool UseExplicitBarAfterMissedBlockAck(void) const
Return true if an explicit BlockAckRequest is sent after a missed BlockAck.
Definition: qos-txop.cc:295
ns3::PointerValue
Hold objects of type Ptr<T>.
Definition: pointer.h:37
ns3::Mac48Address
an EUI-48 address
Definition: mac48-address.h:44
ns3::Txop::m_cwMin
uint32_t m_cwMin
the minimum contention window
Definition: txop.h:332
ns3::QosTxop::m_muAifsn
uint8_t m_muAifsn
the MU AIFSN
Definition: qos-txop.h:499
ns3::QosTxop::GetNextSequenceNumberFor
uint16_t GetNextSequenceNumberFor(const WifiMacHeader *hdr)
Return the next sequence number for the given header.
Definition: qos-txop.cc:319
ns3::QosTxop::PeekNextMpdu
Ptr< const WifiMacQueueItem > PeekNextMpdu(uint8_t tid=8, Mac48Address recipient=Mac48Address::GetBroadcast())
Peek the next frame to transmit to the given receiver and of the given TID from the block ack manager...
Definition: qos-txop.cc:357
ns3::Txop::m_cwMax
uint32_t m_cwMax
the maximum contention window
Definition: txop.h:333
ns3::WifiMacHeader::SetNoRetry
void SetNoRetry(void)
Un-set the Retry bit in the Frame Control field.
Definition: wifi-mac-header.cc:347
wifi-phy.h
ns3::WifiMacHeader::GetAddr1
Mac48Address GetAddr1(void) const
Return the address in the Address 1 field.
Definition: wifi-mac-header.cc:424
ns3::Time::As
TimeWithUnit As(const enum Unit unit=Time::AUTO) const
Attach a unit to a Time, to facilitate output in a specific unit.
Definition: time.cc:429
ns3::OriginatorBlockAckAgreement::PENDING
@ PENDING
Definition: originator-block-ack-agreement.h:103
ns3::QosTxop::GetQosQueueSize
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:133
ns3::WifiTxParameters
This class stores the TX parameters (TX vector, protection mechanism, acknowledgment mechanism,...
Definition: wifi-tx-parameters.h:45
ns3::Simulator::Schedule
static EventId Schedule(Time const &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
Definition: simulator.h:557
ns3::MakeBooleanAccessor
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition: boolean.h:85
mpdu-aggregator.h
ns3::WifiMacQueueItem::GetHeader
const WifiMacHeader & GetHeader(void) const
Get the header stored in this item.
Definition: wifi-mac-queue-item.cc:65
ns3::QosTxop::AddBaResponseTimeout
void AddBaResponseTimeout(Mac48Address recipient, uint8_t tid)
Callback when ADDBA response is not received after timeout.
Definition: qos-txop.cc:686
ns3::Txop::NotifyChannelAccessed
virtual void NotifyChannelAccessed(Time txopDuration=Seconds(0))
Called by the FrameExchangeManager to notify that channel access has been granted for the given amoun...
Definition: txop.cc:348
ns3::QosTxop::NotifyChannelAccessed
void NotifyChannelAccessed(Time txopDuration) override
Called by the FrameExchangeManager to notify that channel access has been granted for the given amoun...
Definition: qos-txop.cc:538
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:923
ns3::QosTxop::SetDroppedMpduCallback
void SetDroppedMpduCallback(DroppedMpdu callback) override
Definition: qos-txop.cc:150
ns3::QosBlockedDestinations::Block
void Block(Mac48Address dest, uint8_t tid)
Block the given destination address and TID from sending (e.g.
Definition: qos-blocked-destinations.cc:42
ns3::QosTxop::GetBlockAckInactivityTimeout
uint16_t GetBlockAckInactivityTimeout(void) const
Get the BlockAck inactivity timeout.
Definition: qos-txop.cc:672
ns3::QosTxop::SetQosFrameExchangeManager
void SetQosFrameExchangeManager(const Ptr< QosFrameExchangeManager > qosFem)
Set the Frame Exchange Manager associated with this QoS STA.
Definition: qos-txop.cc:143
ns3::QosTxop::DoInitialize
void DoInitialize(void) override
Initialize() implementation.
Definition: qos-txop.cc:678
ns3::MakeTraceSourceAccessor
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
Definition: trace-source-accessor.h:202
ns3::QosTxop::SetBlockAckThreshold
void SetBlockAckThreshold(uint8_t threshold)
Set threshold for block ack mechanism.
Definition: qos-txop.cc:650
ns3::QosTxop::GetBaStartingSequence
uint16_t GetBaStartingSequence(Mac48Address address, uint8_t tid) const
Definition: qos-txop.cc:261
wifi-mac-queue.h
ns3::WifiMacHeader::SetAddr1
void SetAddr1(Mac48Address address)
Fill the Address 1 field with the given address.
Definition: wifi-mac-header.cc:108
ns3::Txop::m_mac
Ptr< RegularWifiMac > m_mac
the wifi MAC
Definition: txop.h:329
ns3::Txop::GenerateBackoff
virtual void GenerateBackoff(void)
Generate a new backoff now.
Definition: txop.cc:376
ns3::Txop::m_queue
Ptr< WifiMacQueue > m_queue
the wifi MAC queue
Definition: txop.h:327
wifi-psdu.h
ns3::WifiMacHeader
Implements the IEEE 802.11 MAC header.
Definition: wifi-mac-header.h:85
mgt-headers.h
ns3::QosTxop::GetBlockAckReqType
BlockAckReqType GetBlockAckReqType(Mac48Address recipient, uint8_t tid) const
Definition: qos-txop.cc:526
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
ns3::WifiMacQueueItem::ConstIterator
std::list< Ptr< WifiMacQueueItem > >::const_iterator ConstIterator
Const iterator typedef.
Definition: wifi-mac-queue-item.h:144
ns3::Txop::m_aifsn
uint8_t m_aifsn
the AIFSN
Definition: txop.h:345
ns3::MgtAddBaResponseHeader::GetTid
uint8_t GetTid(void) const
Return the Traffic ID (TID).
Definition: mgt-headers.cc:1756
ctrl-headers.h
ns3::QosTxop::SetMuCwMin
void SetMuCwMin(uint16_t cwMin)
Set the minimum contention window size to use while the MU EDCA Timer is running.
Definition: qos-txop.cc:158
ns3::QosTxop::GetAccessCategory
AcIndex GetAccessCategory(void) const
Get the access category of this object.
Definition: qos-txop.cc:750
ns3::QosTxop::SetMuEdcaTimer
void SetMuEdcaTimer(Time timer)
Set the MU EDCA Timer.
Definition: qos-txop.cc:179
ns3::BlockAckReqType
The different BlockAckRequest variants.
Definition: block-ack-type.h:75
ns3::QosTxop::m_muEdcaTimerStartTime
Time m_muEdcaTimerStartTime
last start time of the MU EDCA Timer
Definition: qos-txop.h:501
ns3::QosTxop::GetAifsn
uint8_t GetAifsn(void) const override
Return the number of slots that make up an AIFS according to the EDCA Parameter Set or the MU EDCA Pa...
Definition: qos-txop.cc:233
ns3::QosTxop::AssignSequenceNumber
void AssignSequenceNumber(Ptr< WifiMacQueueItem > 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:514
ns3::QosTxop::ResetBa
void ResetBa(Mac48Address recipient, uint8_t tid)
Reset BA agreement after BA negotiation failed.
Definition: qos-txop.cc:703
ns3::QosUtilsIsOldPacket
bool QosUtilsIsOldPacket(uint16_t startingSeq, uint16_t seqNumber)
This function checks if packet with sequence number seqNumber is an "old" packet.
Definition: qos-utils.cc:178
ns3::QosTxop::m_failedAddBaTimeout
Time m_failedAddBaTimeout
timeout after failed BA agreement
Definition: qos-txop.h:494
ns3::Time::IsZero
bool IsZero(void) const
Exactly equivalent to t == 0.
Definition: nstime.h:301
ns3::Callback::Bind
Callback< R, T2, T3, T4, T5, T6, T7, T8, T9 > Bind(T a)
Bind the first arguments.
Definition: callback.h:1329
ns3::WifiMacQueueItem::IsInFlight
bool IsInFlight(void) const
Return true if this MPDU is in flight, false otherwise.
Definition: wifi-mac-queue-item.cc:237
ns3::QosUtilsMapTidToAc
AcIndex QosUtilsMapTidToAc(uint8_t tid)
Maps TID (Traffic ID) to Access classes.
Definition: qos-utils.cc:126
ns3::Mac48Address::IsBroadcast
bool IsBroadcast(void) const
Definition: mac48-address.cc:158
ns3::MilliSeconds
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1297
ns3::BlockAckType
The different BlockAck variants.
Definition: block-ack-type.h:34
ns3::OriginatorBlockAckAgreement::ESTABLISHED
@ ESTABLISHED
Definition: originator-block-ack-agreement.h:104
ns3::QosTxop::HasFramesToTransmit
bool HasFramesToTransmit(void) override
Check if the Txop has frames to transmit.
Definition: qos-txop.cc:301
ns3::QosTxop::m_qosFem
Ptr< QosFrameExchangeManager > m_qosFem
the QoS Frame Exchange Manager
Definition: qos-txop.h:483
ns3::MakeBooleanChecker
Ptr< const AttributeChecker > MakeBooleanChecker(void)
Definition: boolean.cc:121
ns3::QosTxop::SetFailedAddBaTimeout
void SetFailedAddBaTimeout(Time failedAddBaTimeout)
Set the timeout for failed BA agreement.
Definition: qos-txop.cc:731
ns3::WifiMacHeader::IsQosData
bool IsQosData(void) const
Return true if the Type is DATA and Subtype is one of the possible values for QoS Data.
Definition: wifi-mac-header.cc:565
first.address
address
Definition: first.py:44
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:104
ns3::WifiMacHeader::GetSequenceNumber
uint16_t GetSequenceNumber(void) const
Return the sequence number of the header.
Definition: wifi-mac-header.cc:777
ns3::StatusCode::IsSuccess
bool IsSuccess(void) const
Return whether the status code is success.
Definition: status-code.cc:42
ns3::QosTxop::PushFront
void PushFront(Ptr< const Packet > packet, const WifiMacHeader &hdr)
Definition: qos-txop.cc:584
ns3::QosTxop::m_blockAckInactivityTimeout
uint16_t m_blockAckInactivityTimeout
the BlockAck inactivity timeout value (in TUs, i.e.
Definition: qos-txop.h:490
ns3::QosTxop::GetAddBaResponseTimeout
Time GetAddBaResponseTimeout(void) const
Get the timeout for ADDBA response.
Definition: qos-txop.cc:725
msdu-aggregator.h
ns3::QosTxop
Handle packet fragmentation and retransmissions for QoS data frames as well as MSDU aggregation (A-MS...
Definition: qos-txop.h:72
ns3::QosTxop::m_txopDuration
Time m_txopDuration
the duration of a TXOP
Definition: qos-txop.h:492
ns3::MgtAddBaResponseHeader
Implement the header for management frames of type Add Block Ack response.
Definition: mgt-headers.h:1150
ns3::MakeCallback
Callback< R, Ts... > MakeCallback(R(T::*memPtr)(Ts...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
Definition: callback.h:1642
ns3::QosTxop::PrepareBlockAckRequest
Ptr< const WifiMacQueueItem > PrepareBlockAckRequest(Mac48Address recipient, uint8_t tid) const
Definition: qos-txop.cc:267
ns3::MakePointerAccessor
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition: pointer.h:227
qos-blocked-destinations.h
ns3::QosTxop::SetAddBaResponseTimeout
void SetAddBaResponseTimeout(Time addBaResponseTimeout)
Set the timeout to wait for ADDBA response.
Definition: qos-txop.cc:718
ns3::WifiMacHeader::SetAddr2
void SetAddr2(Mac48Address address)
Fill the Address 2 field with the given address.
Definition: wifi-mac-header.cc:114
ns3::WifiMacHeader::GetQosTid
uint8_t GetQosTid(void) const
Return the Traffic ID of a QoS header.
Definition: wifi-mac-header.cc:862
ns3::IsInWindow
bool IsInWindow(uint16_t seq, uint16_t winstart, uint16_t winsize)
Definition: wifi-utils.cc:116
ns3::WIFI_MAC_CTL_BACKREQ
@ WIFI_MAC_CTL_BACKREQ
Definition: wifi-mac-header.h:43
ns3::QosTxop::m_addBaResponseTimeout
Time m_addBaResponseTimeout
timeout for ADDBA response
Definition: qos-txop.h:493
ns3::MgtDelBaHeader
Implement the header for management frames of type Delete Block Ack.
Definition: mgt-headers.h:1271
ns3::Txop::m_droppedMpduCallback
DroppedMpdu m_droppedMpduCallback
the dropped MPDU callback
Definition: txop.h:326
ns3::QosTxop::GetMinCw
uint32_t GetMinCw(void) const override
Return the minimum contention window size from the EDCA Parameter Set or the MU EDCA Parameter Set,...
Definition: qos-txop.cc:211
ns3::Time::Min
static Time Min()
Minimum representable Time Not to be confused with Min(Time,Time).
Definition: nstime.h:274
ns3::Time::IsStrictlyNegative
bool IsStrictlyNegative(void) const
Exactly equivalent to t < 0.
Definition: nstime.h:325
timeout
ns3::Time timeout
Definition: openflow-switch.cc:52
ns3::Txop::DoDispose
void DoDispose(void) override
Destructor implementation.
Definition: txop.cc:111
ns3::MgtAddBaResponseHeader::GetStatusCode
StatusCode GetStatusCode(void) const
Return the status code.
Definition: mgt-headers.cc:1750
NS_LOG_DEBUG
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:273
ns3::QosTxop::IsQosOldPacket
bool IsQosOldPacket(Ptr< const WifiMacQueueItem > mpdu)
Check if the given MPDU is to be considered old according to the current starting sequence number of ...
Definition: qos-txop.cc:331
ns3::QosTxop::m_ac
AcIndex m_ac
the access category
Definition: qos-txop.h:482
ns3::QosTxop::GetNextMpdu
Ptr< WifiMacQueueItem > GetNextMpdu(Ptr< const WifiMacQueueItem > peekedItem, WifiTxParameters &txParams, Time availableTime, bool initialFrame, WifiMacQueueItem::ConstIterator &queueIt)
Prepare the frame to transmit starting from the MPDU that has been previously peeked by calling PeekN...
Definition: qos-txop.cc:443
ns3::QosTxop::m_muCwMin
uint32_t m_muCwMin
the MU CW minimum
Definition: qos-txop.h:497
ns3::Seconds
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1289
ns3::WIFI_MAC_DROP_QOS_OLD_PACKET
@ WIFI_MAC_DROP_QOS_OLD_PACKET
Definition: wifi-mac.h:59
ns3::QosTxop::NotifyChannelReleased
void NotifyChannelReleased(void) override
Called by the FrameExchangeManager to notify the completion of the transmissions.
Definition: qos-txop.cc:556
ns3::QosTxop::GetMaxCw
uint32_t GetMaxCw(void) const override
Return the maximum contention window size from the EDCA Parameter Set or the MU EDCA Parameter Set,...
Definition: qos-txop.cc:222
ns3::QosTxop::m_muEdcaTimer
Time m_muEdcaTimer
the MU EDCA Timer
Definition: qos-txop.h:500
ns3::TimeValue
AttributeValue implementation for Time.
Definition: nstime.h:1353
NS_LOG_FUNCTION
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Definition: log-macros-enabled.h:244
ns3::AcIndex
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
Definition: qos-utils.h:71
ns3::QosTxop::StartMuEdcaTimerNow
void StartMuEdcaTimerNow(void)
Start the MU EDCA Timer.
Definition: qos-txop.cc:186
ns3::BlockAckManager::NotifyDiscardedMpdu
void NotifyDiscardedMpdu(Ptr< const WifiMacQueueItem > mpdu)
Definition: block-ack-manager.cc:570
ns3::QosTxop::ScheduleBar
void ScheduleBar(Ptr< const WifiMacQueueItem > bar, bool skipIfNoDataQueued=false)
Definition: qos-txop.cc:289
ns3::QosTxop::m_startTxop
Time m_startTxop
the start TXOP time
Definition: qos-txop.h:491
ns3::Txop::m_access
ChannelAccessStatus m_access
channel access status
Definition: txop.h:336
ns3::WifiMacHeader::SetType
void SetType(WifiMacType type, bool resetToDsFromDs=true)
Set Type/Subtype values with the correct values depending on the given type.
Definition: wifi-mac-header.cc:132
ns3::WifiMacHeader::SetDsNotTo
void SetDsNotTo(void)
Un-set the To DS bit in the Frame Control field.
Definition: wifi-mac-header.cc:102
ns3::QosTxop::EdcaDisabled
bool EdcaDisabled(void) const
Return true if the EDCA is disabled (the MU EDCA Timer is running and the MU AIFSN is zero),...
Definition: qos-txop.cc:205
ns3::QosTxop::GetBlockAckType
BlockAckType GetBlockAckType(Mac48Address recipient, uint8_t tid) const
Definition: qos-txop.cc:532
ns3::WifiMacQueueItem::IsFragment
bool IsFragment(void) const
Return true if this item contains an MSDU fragment, false otherwise.
Definition: wifi-mac-queue-item.cc:101
ns3::QosTxop::m_blockAckThreshold
uint8_t m_blockAckThreshold
the block ack threshold (use BA mechanism if number of packets in queue reaches this value.
Definition: qos-txop.h:486
ns3::CreateObject
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
Definition: object.h:576
ns3::QosTxop::MuEdcaTimerRunning
bool MuEdcaTimerRunning(void) const
Return true if the MU EDCA Timer is running, false otherwise.
Definition: qos-txop.cc:198
ns3::QosTxop::CompleteMpduTx
void CompleteMpduTx(Ptr< WifiMacQueueItem > mpdu)
Stores an MPDU (part of an A-MPDU) in block ack agreement (i.e.
Definition: qos-txop.cc:639
ns3::QosTxop::IsQosTxop
bool IsQosTxop(void) const override
Check for QoS TXOP.
Definition: qos-txop.cc:744
wifi-mac-trailer.h
ns3::QosTxop::SetMuAifsn
void SetMuAifsn(uint8_t aifsn)
Set the number of slots that make up an AIFS while the MU EDCA Timer is running.
Definition: qos-txop.cc:172
ns3::Txop::NOT_REQUESTED
@ NOT_REQUESTED
Definition: txop.h:94
channel-access-manager.h
ns3::Time::MS
@ MS
millisecond
Definition: nstime.h:116
ns3::WifiMacQueue::EMPTY
static const ConstIterator EMPTY
Invalid iterator to signal an empty queue.
Definition: wifi-mac-queue.h:298
ns3::QosTxop::SetMuCwMax
void SetMuCwMax(uint16_t cwMax)
Set the maximum contention window size to use while the MU EDCA Timer is running.
Definition: qos-txop.cc:165
ns3::QosTxop::IsTxopStarted
virtual bool IsTxopStarted(void) const
Return true if a TXOP has started.
Definition: qos-txop.cc:549
ns3::QosTxop::GetFailedAddBaTimeout
Time GetFailedAddBaTimeout(void) const
Get the timeout for failed BA agreement.
Definition: qos-txop.cc:738
ns3::MakeTimeAccessor
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition: nstime.h:1354
ns3::QosTxop::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition: qos-txop.cc:53
ns3::QosTxop::m_txopTrace
TracedCallback< Time, Time > m_txopTrace
TXOP trace callback.
Definition: qos-txop.h:503
ns3::QosTxop::GetRemainingTxop
virtual Time GetRemainingTxop(void) const
Return the remaining duration in the current TXOP.
Definition: qos-txop.cc:570
ns3::Txop
Handle packet fragmentation and retransmissions for data and management frames.
Definition: txop.h:65