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) != nullptr);
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 
358 {
359  NS_LOG_FUNCTION (this << +tid << recipient << item);
360 
361  // lambda to peek the next frame
362  auto peek = [this, &tid, &recipient, &item] () -> Ptr<const WifiMacQueueItem>
363  {
364  if (tid == 8 && recipient.IsBroadcast ()) // undefined TID and recipient
365  {
366  return m_queue->PeekFirstAvailable (m_qosBlockedDestinations, item);
367  }
368  if (m_qosBlockedDestinations->IsBlocked (recipient, tid))
369  {
370  return nullptr;
371  }
372  return m_queue->PeekByTidAndAddress (tid, recipient, item);
373  };
374 
375  item = peek ();
376  // remove old packets (must be retransmissions or in flight, otherwise they did
377  // not get a sequence number assigned)
378  while (item != nullptr && !item->IsFragment ())
379  {
380  if ((item->GetHeader ().IsRetry () || item->IsInFlight ())
381  && IsQosOldPacket (item))
382  {
383  NS_LOG_DEBUG ("Removing an old packet from EDCA queue: " << *item);
385  {
387  }
388  auto oldItem = item;
389  item = peek ();
390  m_queue->Remove (oldItem);
391  }
392  else if (item->IsInFlight ())
393  {
394  NS_LOG_DEBUG ("Skipping in flight MPDU: " << *item);
395  item = peek ();
396  }
397  else
398  {
399  break;
400  }
401  }
402  if (item != nullptr)
403  {
404  NS_ASSERT (!item->IsInFlight ());
405  WifiMacHeader& hdr = item->GetItem ()->GetHeader ();
406 
407  // peek the next sequence number and check if it is within the transmit window
408  // in case of QoS data frame
409  uint16_t sequence = (hdr.IsRetry () ? hdr.GetSequenceNumber ()
410  : m_txMiddle->PeekNextSequenceNumberFor (&hdr));
411  if (hdr.IsQosData ())
412  {
413  Mac48Address recipient = hdr.GetAddr1 ();
414  uint8_t tid = hdr.GetQosTid ();
415 
416  if (GetBaAgreementEstablished (recipient, tid)
417  && !IsInWindow (sequence, GetBaStartingSequence (recipient, tid), GetBaBufferSize (recipient, tid)))
418  {
419  NS_LOG_DEBUG ("Packet beyond the end of the current transmit window");
420  return nullptr;
421  }
422  }
423 
424  // Assign a sequence number if this is not a fragment nor a retransmission
425  if (!item->IsFragment () && !hdr.IsRetry ())
426  {
427  hdr.SetSequenceNumber (sequence);
428  }
429  NS_LOG_DEBUG ("Packet peeked from EDCA queue: " << *item);
430  return item;
431  }
432 
433  return nullptr;
434 }
435 
438  Time availableTime, bool initialFrame)
439 {
440  NS_ASSERT (peekedItem != 0);
441  NS_ASSERT (m_qosFem != 0);
442  NS_LOG_FUNCTION (this << *peekedItem << &txParams << availableTime << initialFrame);
443 
444  Mac48Address recipient = peekedItem->GetHeader ().GetAddr1 ();
445 
446  // The TXOP limit can be exceeded by the TXOP holder if it does not transmit more
447  // than one Data or Management frame in the TXOP and the frame is not in an A-MPDU
448  // consisting of more than one MPDU (Sec. 10.22.2.8 of 802.11-2016)
449  Time actualAvailableTime = (initialFrame && txParams.GetSize (recipient) == 0
450  ? Time::Min () : availableTime);
451 
452  if (!m_qosFem->TryAddMpdu (peekedItem, txParams, actualAvailableTime))
453  {
454  return nullptr;
455  }
456 
457  NS_ASSERT (peekedItem->IsQueued ());
459 
460  // If it is a non-broadcast QoS Data frame and it is not a retransmission nor a fragment,
461  // attempt A-MSDU aggregation
462  if (peekedItem->GetHeader ().IsQosData ())
463  {
464  uint8_t tid = peekedItem->GetHeader ().GetQosTid ();
465 
466  // we should not be asked to dequeue an MPDU that is beyond the transmit window.
467  // Note that PeekNextMpdu() temporarily assigns the next available sequence number
468  // to the peeked frame
469  NS_ASSERT (!GetBaAgreementEstablished (recipient, tid)
470  || IsInWindow (peekedItem->GetHeader ().GetSequenceNumber (),
471  GetBaStartingSequence (recipient, tid),
472  GetBaBufferSize (recipient, tid)));
473 
474  // try A-MSDU aggregation
475  if (m_mac->GetHtSupported () && !recipient.IsBroadcast ()
476  && !peekedItem->GetHeader ().IsRetry () && !peekedItem->IsFragment ()
477  && !peekedItem->IsInFlight ())
478  {
479  Ptr<HtFrameExchangeManager> htFem = StaticCast<HtFrameExchangeManager> (m_qosFem);
480  mpdu = htFem->GetMsduAggregator ()->GetNextAmsdu (peekedItem, txParams, availableTime);
481  }
482 
483  if (mpdu != 0)
484  {
485  NS_LOG_DEBUG ("Prepared an MPDU containing an A-MSDU");
486  }
487  // else aggregation was not attempted or failed
488  }
489 
490  if (mpdu == 0)
491  {
492  mpdu = peekedItem->GetItem ();
493  }
494 
495  // Assign a sequence number if this is not a fragment nor a retransmission
496  AssignSequenceNumber (mpdu);
497  NS_LOG_DEBUG ("Got MPDU from EDCA queue: " << *mpdu);
498 
499  return mpdu;
500 }
501 
502 void
504 {
505  NS_LOG_FUNCTION (this << *mpdu);
506 
507  if (!mpdu->IsFragment () && !mpdu->GetHeader ().IsRetry () && !mpdu->IsInFlight ())
508  {
509  uint16_t sequence = m_txMiddle->GetNextSequenceNumberFor (&mpdu->GetHeader ());
510  mpdu->GetHeader ().SetSequenceNumber (sequence);
511  }
512 }
513 
515 QosTxop::GetBlockAckReqType (Mac48Address recipient, uint8_t tid) const
516 {
517  return m_baManager->GetBlockAckReqType (recipient, tid);
518 }
519 
521 QosTxop::GetBlockAckType (Mac48Address recipient, uint8_t tid) const
522 {
523  return m_baManager->GetBlockAckType (recipient, tid);
524 }
525 
526 void
528 {
529  NS_LOG_FUNCTION (this << txopDuration);
530 
531  NS_ASSERT (txopDuration != Time::Min ());
533  m_txopDuration = txopDuration;
535 }
536 
537 bool
539 {
540  NS_LOG_FUNCTION (this << !m_startTxop.IsZero ());
541  return (!m_startTxop.IsZero ());
542 }
543 
544 void
546 {
547  NS_LOG_FUNCTION (this);
548 
550  {
551  NS_LOG_DEBUG ("Terminating TXOP. Duration = " << Simulator::Now () - m_startTxop);
553  }
554  m_startTxop = Seconds (0);
556 }
557 
558 Time
560 {
562  Time remainingTxop = m_txopDuration;
563  remainingTxop -= (Simulator::Now () - m_startTxop);
564  if (remainingTxop.IsStrictlyNegative ())
565  {
566  remainingTxop = Seconds (0);
567  }
568  NS_LOG_FUNCTION (this << remainingTxop);
569  return remainingTxop;
570 }
571 
572 void
574 {
575  NS_LOG_FUNCTION (this << packet << &hdr);
576  WifiMacTrailer fcs;
577  m_queue->PushFront (Create<WifiMacQueueItem> (packet, hdr));
579  {
580  m_channelAccessManager->RequestAccess (this);
581  }
582 }
583 
584 void
586 {
587  NS_LOG_FUNCTION (this << respHdr << recipient);
588  uint8_t tid = respHdr->GetTid ();
589  if (respHdr->GetStatusCode ().IsSuccess ())
590  {
591  NS_LOG_DEBUG ("block ack agreement established with " << recipient << " tid " << +tid);
592  // A (destination, TID) pair is "blocked" (i.e., no more packets are sent)
593  // when an Add BA Request is sent to the destination. However, when the
594  // Add BA Request timer expires, the (destination, TID) pair is "unblocked"
595  // and packets to the destination are sent again (under normal ack policy).
596  // Thus, there may be a packet needing to be retransmitted when the
597  // Add BA Response is received. In this case, the starting sequence number
598  // shall be set equal to the sequence number of such packet.
599  uint16_t startingSeq = m_txMiddle->GetNextSeqNumberByTidAndAddress (tid, recipient);
600  auto peekedItem = m_queue->PeekByTidAndAddress (tid, recipient);
601  if (peekedItem != nullptr && peekedItem->GetHeader ().IsRetry ())
602  {
603  startingSeq = peekedItem->GetHeader ().GetSequenceNumber ();
604  }
605  m_baManager->UpdateAgreement (respHdr, recipient, startingSeq);
606  }
607  else
608  {
609  NS_LOG_DEBUG ("discard ADDBA response" << recipient);
610  m_baManager->NotifyAgreementRejected (recipient, tid);
611  }
612 
614  {
615  m_channelAccessManager->RequestAccess (this);
616  }
617 }
618 
619 void
621 {
622  NS_LOG_FUNCTION (this << delBaHdr << recipient);
623  NS_LOG_DEBUG ("received DELBA frame from=" << recipient);
624  m_baManager->DestroyAgreement (recipient, delBaHdr->GetTid ());
625 }
626 
627 void
629 {
630  NS_ASSERT (mpdu->GetHeader ().IsQosData ());
631  // If there is an established BA agreement, store the packet in the queue of outstanding packets
632  if (GetBaAgreementEstablished (mpdu->GetHeader ().GetAddr1 (), mpdu->GetHeader ().GetQosTid ()))
633  {
634  m_baManager->StorePacket (mpdu);
635  }
636 }
637 
638 void
639 QosTxop::SetBlockAckThreshold (uint8_t threshold)
640 {
641  NS_LOG_FUNCTION (this << +threshold);
642  m_blockAckThreshold = threshold;
643  m_baManager->SetBlockAckThreshold (threshold);
644 }
645 
646 void
648 {
649  NS_LOG_FUNCTION (this << timeout);
651 }
652 
653 uint8_t
655 {
656  NS_LOG_FUNCTION (this);
657  return m_blockAckThreshold;
658 }
659 
660 uint16_t
662 {
664 }
665 
666 void
668 {
669  NS_LOG_FUNCTION (this);
670  ResetCw ();
671  GenerateBackoff ();
672 }
673 
674 void
676 {
677  NS_LOG_FUNCTION (this << recipient << +tid);
678  // If agreement is still pending, ADDBA response is not received
679  if (m_baManager->ExistsAgreementInState (recipient, tid, OriginatorBlockAckAgreement::PENDING))
680  {
681  m_baManager->NotifyAgreementNoReply (recipient, tid);
683  GenerateBackoff ();
685  {
686  m_channelAccessManager->RequestAccess (this);
687  }
688  }
689 }
690 
691 void
692 QosTxop::ResetBa (Mac48Address recipient, uint8_t tid)
693 {
694  NS_LOG_FUNCTION (this << recipient << +tid);
695  // This function is scheduled when waiting for an ADDBA response. However,
696  // before this function is called, a DELBA request may arrive, which causes
697  // the agreement to be deleted. Hence, check if an agreement exists before
698  // notifying that the agreement has to be reset.
699  if (m_baManager->ExistsAgreement (recipient, tid)
700  && !m_baManager->ExistsAgreementInState (recipient, tid, OriginatorBlockAckAgreement::ESTABLISHED))
701  {
702  m_baManager->NotifyAgreementReset (recipient, tid);
703  }
704 }
705 
706 void
708 {
709  NS_LOG_FUNCTION (this << addBaResponseTimeout);
710  m_addBaResponseTimeout = addBaResponseTimeout;
711 }
712 
713 Time
715 {
716  return m_addBaResponseTimeout;
717 }
718 
719 void
721 {
722  NS_LOG_FUNCTION (this << failedAddBaTimeout);
723  m_failedAddBaTimeout = failedAddBaTimeout;
724 }
725 
726 Time
728 {
729  return m_failedAddBaTimeout;
730 }
731 
732 bool
733 QosTxop::IsQosTxop (void) const
734 {
735  return true;
736 }
737 
738 AcIndex
740 {
741  return m_ac;
742 }
743 
744 } //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:465
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:61
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:475
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:464
ns3::QosTxop::GetBlockAckThreshold
uint8_t GetBlockAckThreshold(void) const
Return the current threshold for block ack mechanism.
Definition: qos-txop.cc:654
ns3::QosTxop::m_muCwMax
uint32_t m_muCwMax
the MU CW maximum
Definition: qos-txop.h:478
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:585
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:620
ns3::QosTxop::SetBlockAckInactivityTimeout
void SetBlockAckInactivityTimeout(uint16_t timeout)
Set the BlockAck inactivity timeout.
Definition: qos-txop.cc:647
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:479
ns3::QosTxop::GetNextSequenceNumberFor
uint16_t GetNextSequenceNumberFor(const WifiMacHeader *hdr)
Return the next sequence number for the given header.
Definition: qos-txop.cc:319
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:72
ns3::QosTxop::AddBaResponseTimeout
void AddBaResponseTimeout(Mac48Address recipient, uint8_t tid)
Callback when ADDBA response is not received after timeout.
Definition: qos-txop.cc:675
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:527
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:661
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:667
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:639
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:515
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
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:739
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:481
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:503
ns3::QosTxop::ResetBa
void ResetBa(Mac48Address recipient, uint8_t tid)
Reset BA agreement after BA negotiation failed.
Definition: qos-txop.cc:692
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:474
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:463
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:720
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:573
ns3::QosTxop::m_blockAckInactivityTimeout
uint16_t m_blockAckInactivityTimeout
the BlockAck inactivity timeout value (in TUs, i.e.
Definition: qos-txop.h:470
ns3::QosTxop::GetAddBaResponseTimeout
Time GetAddBaResponseTimeout(void) const
Get the timeout for ADDBA response.
Definition: qos-txop.cc:714
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:472
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:707
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:473
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:462
ns3::QosTxop::m_muCwMin
uint32_t m_muCwMin
the MU CW minimum
Definition: qos-txop.h:477
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:545
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:480
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:567
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:471
ns3::QosTxop::GetNextMpdu
Ptr< WifiMacQueueItem > GetNextMpdu(Ptr< const WifiMacQueueItem > peekedItem, WifiTxParameters &txParams, Time availableTime, bool initialFrame)
Prepare the frame to transmit starting from the MPDU that has been previously peeked by calling PeekN...
Definition: qos-txop.cc:437
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::QosTxop::PeekNextMpdu
Ptr< const WifiMacQueueItem > PeekNextMpdu(uint8_t tid=8, Mac48Address recipient=Mac48Address::GetBroadcast(), Ptr< const WifiMacQueueItem > item=nullptr)
Peek the next frame to transmit to the given receiver and of the given TID from the EDCA queue.
Definition: qos-txop.cc:357
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:521
ns3::WifiMacQueueItem::IsFragment
bool IsFragment(void) const
Return true if this item contains an MSDU fragment, false otherwise.
Definition: wifi-mac-queue-item.cc:108
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:466
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:628
ns3::QosTxop::IsQosTxop
bool IsQosTxop(void) const override
Check for QoS TXOP.
Definition: qos-txop.cc:733
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::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:538
ns3::QosTxop::GetFailedAddBaTimeout
Time GetFailedAddBaTimeout(void) const
Get the timeout for failed BA agreement.
Definition: qos-txop.cc:727
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:483
ns3::QosTxop::GetRemainingTxop
virtual Time GetRemainingTxop(void) const
Return the remaining duration in the current TXOP.
Definition: qos-txop.cc:559
ns3::Txop
Handle packet fragmentation and retransmissions for data and management frames.
Definition: txop.h:65