A Discrete-Event Network Simulator
API
regular-wifi-mac.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2008 INRIA
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19  */
20 
21 #include "ns3/log.h"
22 #include "ns3/pointer.h"
23 #include "ns3/packet.h"
24 #include "regular-wifi-mac.h"
25 #include "wifi-phy.h"
26 #include "mac-rx-middle.h"
27 #include "mac-tx-middle.h"
28 #include "msdu-aggregator.h"
29 #include "mpdu-aggregator.h"
30 #include "mgt-headers.h"
31 #include "amsdu-subframe-header.h"
32 #include "wifi-net-device.h"
33 #include "ns3/ht-configuration.h"
34 #include "ns3/vht-configuration.h"
35 #include "ns3/he-configuration.h"
36 #include <algorithm>
37 #include <cmath>
38 #include "ns3/he-frame-exchange-manager.h"
39 #include "channel-access-manager.h"
40 #include "wifi-mac-queue.h"
41 
42 namespace ns3 {
43 
44 NS_LOG_COMPONENT_DEFINE ("RegularWifiMac");
45 
46 NS_OBJECT_ENSURE_REGISTERED (RegularWifiMac);
47 
49  : m_qosSupported (0),
50  m_erpSupported (0),
51  m_dsssSupported (0)
52 {
53  NS_LOG_FUNCTION (this);
54  m_rxMiddle = Create<MacRxMiddle> ();
55  m_rxMiddle->SetForwardCallback (MakeCallback (&RegularWifiMac::Receive, this));
56 
57  m_txMiddle = Create<MacTxMiddle> ();
58 
59  m_channelAccessManager = CreateObject<ChannelAccessManager> ();
60 }
61 
63 {
64  NS_LOG_FUNCTION (this);
65 }
66 
67 void
69 {
70  NS_LOG_FUNCTION (this);
71  if (m_txop != nullptr)
72  {
73  m_txop->Initialize ();
74  }
75 
76  for (EdcaQueues::const_iterator i = m_edca.begin (); i != m_edca.end (); ++i)
77  {
78  i->second->Initialize ();
79  }
80 }
81 
82 void
84 {
85  NS_LOG_FUNCTION (this);
86 
87  m_rxMiddle = 0;
88  m_txMiddle = 0;
89 
90  m_phy = 0;
91  m_stationManager = 0;
92  if (m_feManager != 0)
93  {
94  m_feManager->Dispose ();
95  }
96  m_feManager = 0;
97 
98  if (m_txop != nullptr)
99  {
100  m_txop->Dispose ();
101  }
102  m_txop = 0;
103 
104  for (EdcaQueues::iterator i = m_edca.begin (); i != m_edca.end (); ++i)
105  {
106  i->second->Dispose ();
107  i->second = 0;
108  }
109 
110  m_channelAccessManager->Dispose ();
112 
114 }
115 
116 void
118 {
119  NS_LOG_FUNCTION (this);
120 
121  if (GetHeSupported ())
122  {
123  m_feManager = CreateObject<HeFrameExchangeManager> ();
124  }
125  else if (GetVhtSupported ())
126  {
127  m_feManager = CreateObject<VhtFrameExchangeManager> ();
128  }
129  else if (GetHtSupported ())
130  {
131  m_feManager = CreateObject<HtFrameExchangeManager> ();
132  }
133  else if (GetQosSupported ())
134  {
135  m_feManager = CreateObject<QosFrameExchangeManager> ();
136  }
137  else
138  {
139  m_feManager = CreateObject<FrameExchangeManager> ();
140  }
141 
142  m_feManager->SetWifiMac (this);
143  m_feManager->SetMacTxMiddle (m_txMiddle);
144  m_feManager->SetMacRxMiddle (m_rxMiddle);
145  m_feManager->SetAddress (GetAddress ());
146  m_feManager->SetBssid (GetBssid ());
147  m_feManager->GetWifiTxTimer ().SetMpduResponseTimeoutCallback (MakeCallback (&MpduResponseTimeoutTracedCallback::operator(),
149  m_feManager->GetWifiTxTimer ().SetPsduResponseTimeoutCallback (MakeCallback (&PsduResponseTimeoutTracedCallback::operator(),
151  m_feManager->GetWifiTxTimer ().SetPsduMapResponseTimeoutCallback (MakeCallback (&PsduMapResponseTimeoutTracedCallback::operator(),
153  m_feManager->SetDroppedMpduCallback (MakeCallback (&DroppedMpduTracedCallback::operator(),
155  m_feManager->SetAckedMpduCallback (MakeCallback (&MpduTracedCallback::operator(),
157  m_channelAccessManager->SetupFrameExchangeManager (m_feManager);
158  if (GetQosSupported ())
159  {
160  for (const auto& pair : m_edca)
161  {
162  pair.second->SetQosFrameExchangeManager (DynamicCast<QosFrameExchangeManager> (m_feManager));
163  }
164  }
165 }
166 
169 {
170  return m_feManager;
171 }
172 
173 void
175 {
176  NS_LOG_FUNCTION (this << stationManager);
177  m_stationManager = stationManager;
178 }
179 
182 {
183  return m_stationManager;
184 }
185 
188 {
189  NS_LOG_FUNCTION (this);
190  ExtendedCapabilities capabilities;
191  capabilities.SetHtSupported (GetHtSupported ());
192  capabilities.SetVhtSupported (GetVhtSupported ());
193  //TODO: to be completed
194  return capabilities;
195 }
196 
199 {
200  NS_LOG_FUNCTION (this);
201  HtCapabilities capabilities;
202  if (GetHtSupported ())
203  {
204  Ptr<HtConfiguration> htConfiguration = GetHtConfiguration ();
205  bool sgiSupported = htConfiguration->GetShortGuardIntervalSupported ();
206  capabilities.SetHtSupported (1);
207  capabilities.SetLdpc (htConfiguration->GetLdpcSupported ());
208  capabilities.SetSupportedChannelWidth (m_phy->GetChannelWidth () >= 40);
209  capabilities.SetShortGuardInterval20 (sgiSupported);
210  capabilities.SetShortGuardInterval40 (m_phy->GetChannelWidth () >= 40 && sgiSupported);
211  // Set Maximum A-MSDU Length subfield
212  uint16_t maxAmsduSize = std::max ({m_voMaxAmsduSize, m_viMaxAmsduSize,
214  if (maxAmsduSize <= 3839)
215  {
216  capabilities.SetMaxAmsduLength (3839);
217  }
218  else
219  {
220  capabilities.SetMaxAmsduLength (7935);
221  }
222  uint32_t maxAmpduLength = std::max ({m_voMaxAmpduSize, m_viMaxAmpduSize,
224  // round to the next power of two minus one
225  maxAmpduLength = (1ul << static_cast<uint32_t> (std::ceil (std::log2 (maxAmpduLength + 1)))) - 1;
226  // The maximum A-MPDU length in HT capabilities elements ranges from 2^13-1 to 2^16-1
227  capabilities.SetMaxAmpduLength (std::min (std::max (maxAmpduLength, 8191u), 65535u));
228 
229  capabilities.SetLSigProtectionSupport (true);
230  uint64_t maxSupportedRate = 0; //in bit/s
231  for (const auto & mcs : m_phy->GetMcsList (WIFI_MOD_CLASS_HT))
232  {
233  capabilities.SetRxMcsBitmask (mcs.GetMcsValue ());
234  uint8_t nss = (mcs.GetMcsValue () / 8) + 1;
235  NS_ASSERT (nss > 0 && nss < 5);
236  uint64_t dataRate = mcs.GetDataRate (m_phy->GetChannelWidth (), sgiSupported ? 400 : 800, nss);
237  if (dataRate > maxSupportedRate)
238  {
239  maxSupportedRate = dataRate;
240  NS_LOG_DEBUG ("Updating maxSupportedRate to " << maxSupportedRate);
241  }
242  }
243  capabilities.SetRxHighestSupportedDataRate (static_cast<uint16_t> (maxSupportedRate / 1e6)); //in Mbit/s
244  capabilities.SetTxMcsSetDefined (m_phy->GetNMcs () > 0);
246  //we do not support unequal modulations
247  capabilities.SetTxRxMcsSetUnequal (0);
248  capabilities.SetTxUnequalModulation (0);
249  }
250  return capabilities;
251 }
252 
255 {
256  NS_LOG_FUNCTION (this);
257  VhtCapabilities capabilities;
258  if (GetVhtSupported ())
259  {
260  Ptr<HtConfiguration> htConfiguration = GetHtConfiguration ();
261  Ptr<VhtConfiguration> vhtConfiguration = GetVhtConfiguration ();
262  bool sgiSupported = htConfiguration->GetShortGuardIntervalSupported ();
263  capabilities.SetVhtSupported (1);
264  if (m_phy->GetChannelWidth () == 160)
265  {
266  capabilities.SetSupportedChannelWidthSet (1);
267  }
268  else
269  {
270  capabilities.SetSupportedChannelWidthSet (0);
271  }
272  // Set Maximum MPDU Length subfield
273  uint16_t maxAmsduSize = std::max ({m_voMaxAmsduSize, m_viMaxAmsduSize,
275  if (maxAmsduSize <= 3839)
276  {
277  capabilities.SetMaxMpduLength (3895);
278  }
279  else if (maxAmsduSize <= 7935)
280  {
281  capabilities.SetMaxMpduLength (7991);
282  }
283  else
284  {
285  capabilities.SetMaxMpduLength (11454);
286  }
287  uint32_t maxAmpduLength = std::max ({m_voMaxAmpduSize, m_viMaxAmpduSize,
289  // round to the next power of two minus one
290  maxAmpduLength = (1ul << static_cast<uint32_t> (std::ceil (std::log2 (maxAmpduLength + 1)))) - 1;
291  // The maximum A-MPDU length in VHT capabilities elements ranges from 2^13-1 to 2^20-1
292  capabilities.SetMaxAmpduLength (std::min (std::max (maxAmpduLength, 8191u), 1048575u));
293 
294  capabilities.SetRxLdpc (htConfiguration->GetLdpcSupported ());
295  capabilities.SetShortGuardIntervalFor80Mhz ((m_phy->GetChannelWidth () == 80) && sgiSupported);
296  capabilities.SetShortGuardIntervalFor160Mhz ((m_phy->GetChannelWidth () == 160) && sgiSupported);
297  uint8_t maxMcs = 0;
298  for (const auto & mcs : m_phy->GetMcsList (WIFI_MOD_CLASS_VHT))
299  {
300  if (mcs.GetMcsValue () > maxMcs)
301  {
302  maxMcs = mcs.GetMcsValue ();
303  }
304  }
305  // Support same MaxMCS for each spatial stream
306  for (uint8_t nss = 1; nss <= m_phy->GetMaxSupportedRxSpatialStreams (); nss++)
307  {
308  capabilities.SetRxMcsMap (maxMcs, nss);
309  }
310  for (uint8_t nss = 1; nss <= m_phy->GetMaxSupportedTxSpatialStreams (); nss++)
311  {
312  capabilities.SetTxMcsMap (maxMcs, nss);
313  }
314  uint64_t maxSupportedRateLGI = 0; //in bit/s
315  for (const auto & mcs : m_phy->GetMcsList (WIFI_MOD_CLASS_VHT))
316  {
317  if (!mcs.IsAllowed (m_phy->GetChannelWidth (), 1))
318  {
319  continue;
320  }
321  if (mcs.GetDataRate (m_phy->GetChannelWidth ()) > maxSupportedRateLGI)
322  {
323  maxSupportedRateLGI = mcs.GetDataRate (m_phy->GetChannelWidth ());
324  NS_LOG_DEBUG ("Updating maxSupportedRateLGI to " << maxSupportedRateLGI);
325  }
326  }
327  capabilities.SetRxHighestSupportedLgiDataRate (static_cast<uint16_t> (maxSupportedRateLGI / 1e6)); //in Mbit/s
328  capabilities.SetTxHighestSupportedLgiDataRate (static_cast<uint16_t> (maxSupportedRateLGI / 1e6)); //in Mbit/s
329  //To be filled in once supported
330  capabilities.SetRxStbc (0);
331  capabilities.SetTxStbc (0);
332  }
333  return capabilities;
334 }
335 
338 {
339  NS_LOG_FUNCTION (this);
340  HeCapabilities capabilities;
341  if (GetHeSupported ())
342  {
343  Ptr<HtConfiguration> htConfiguration = GetHtConfiguration ();
344  Ptr<HeConfiguration> heConfiguration = GetHeConfiguration ();
345  capabilities.SetHeSupported (1);
346  uint8_t channelWidthSet = 0;
347  if ((m_phy->GetChannelWidth () >= 40) && (m_phy->GetPhyBand () == WIFI_PHY_BAND_2_4GHZ))
348  {
349  channelWidthSet |= 0x01;
350  }
352  {
353  channelWidthSet |= 0x02;
354  }
355  if ((m_phy->GetChannelWidth () >= 160) && ((m_phy->GetPhyBand () == WIFI_PHY_BAND_5GHZ) || (m_phy->GetPhyBand () == WIFI_PHY_BAND_6GHZ)))
356  {
357  channelWidthSet |= 0x04;
358  }
359  capabilities.SetChannelWidthSet (channelWidthSet);
360  capabilities.SetLdpcCodingInPayload (htConfiguration->GetLdpcSupported ());
361  uint8_t gi = 0;
362  if (heConfiguration->GetGuardInterval () <= NanoSeconds (1600))
363  {
364  //todo: We assume for now that if we support 800ns GI then 1600ns GI is supported as well
365  gi |= 0x01;
366  }
367  if (heConfiguration->GetGuardInterval () == NanoSeconds (800))
368  {
369  gi |= 0x02;
370  }
371  capabilities.SetHeLtfAndGiForHePpdus (gi);
372  uint32_t maxAmpduLength = std::max ({m_voMaxAmpduSize, m_viMaxAmpduSize,
374  // round to the next power of two minus one
375  maxAmpduLength = (1ul << static_cast<uint32_t> (std::ceil (std::log2 (maxAmpduLength + 1)))) - 1;
376  // The maximum A-MPDU length in HE capabilities elements ranges from 2^20-1 to 2^23-1
377  capabilities.SetMaxAmpduLength (std::min (std::max (maxAmpduLength, 1048575u), 8388607u));
378 
379  uint8_t maxMcs = 0;
380  for (const auto & mcs : m_phy->GetMcsList (WIFI_MOD_CLASS_HE))
381  {
382  if (mcs.GetMcsValue () > maxMcs)
383  {
384  maxMcs = mcs.GetMcsValue ();
385  }
386  }
387  capabilities.SetHighestMcsSupported (maxMcs);
389  }
390  return capabilities;
391 }
392 
393 void
395 {
396  NS_LOG_FUNCTION (this << +threshold);
397  if (m_qosSupported)
398  {
399  GetVOQueue ()->SetBlockAckThreshold (threshold);
400  }
401 }
402 
403 void
405 {
406  NS_LOG_FUNCTION (this << +threshold);
407  if (m_qosSupported)
408  {
409  GetVIQueue ()->SetBlockAckThreshold (threshold);
410  }
411 }
412 
413 void
415 {
416  NS_LOG_FUNCTION (this << +threshold);
417  if (m_qosSupported)
418  {
419  GetBEQueue ()->SetBlockAckThreshold (threshold);
420  }
421 }
422 
423 void
425 {
426  NS_LOG_FUNCTION (this << +threshold);
427  if (m_qosSupported)
428  {
429  GetBKQueue ()->SetBlockAckThreshold (threshold);
430  }
431 }
432 
433 void
435 {
436  NS_LOG_FUNCTION (this << timeout);
437  if (m_qosSupported)
438  {
440  }
441 }
442 
443 void
445 {
446  NS_LOG_FUNCTION (this << timeout);
447  if (m_qosSupported)
448  {
450  }
451 }
452 
453 void
455 {
456  NS_LOG_FUNCTION (this << timeout);
457  if (m_qosSupported)
458  {
460  }
461 }
462 
463 void
465 {
466  NS_LOG_FUNCTION (this << timeout);
467  if (m_qosSupported)
468  {
470  }
471 }
472 
473 void
475 {
476  NS_LOG_FUNCTION (this << ac);
477 
478  //Our caller shouldn't be attempting to setup a queue that is
479  //already configured.
480  NS_ASSERT (m_edca.find (ac) == m_edca.end ());
481 
482  Ptr<QosTxop> edca = CreateObject<QosTxop> (ac);
484  edca->SetWifiMac (this);
485  edca->SetTxMiddle (m_txMiddle);
486  edca->GetBaManager ()->SetTxOkCallback (MakeCallback (&MpduTracedCallback::operator(),
488  edca->GetBaManager ()->SetTxFailedCallback (MakeCallback (&MpduTracedCallback::operator(),
490  edca->SetDroppedMpduCallback (MakeCallback (&DroppedMpduTracedCallback::operator(),
492 
493  m_edca.insert (std::make_pair (ac, edca));
494 }
495 
496 void
498 {
499  NS_LOG_FUNCTION (this << type);
500  m_typeOfStation = type;
501 }
502 
505 {
506  return m_typeOfStation;
507 }
508 
509 Ptr<Txop>
511 {
512  return m_txop;
513 }
514 
517 {
518  return m_edca.find (ac)->second;
519 }
520 
522 RegularWifiMac::GetQosTxop (uint8_t tid) const
523 {
524  return GetQosTxop (QosUtilsMapTidToAc (tid));
525 }
526 
529 {
530  return (m_qosSupported ? m_edca.find (AC_VO)->second : nullptr);
531 }
532 
535 {
536  return (m_qosSupported ? m_edca.find (AC_VI)->second : nullptr);
537 }
538 
541 {
542  return (m_qosSupported ? m_edca.find (AC_BE)->second : nullptr);
543 }
544 
547 {
548  return (m_qosSupported ? m_edca.find (AC_BK)->second : nullptr);
549 }
550 
553 {
554  if (ac == AC_BE_NQOS)
555  {
556  NS_ASSERT (m_txop != nullptr);
557  return m_txop->GetWifiMacQueue ();
558  }
559  NS_ASSERT (ac == AC_BE || ac == AC_BK || ac == AC_VI || ac == AC_VO);
560  return m_edca.find (ac)->second->GetWifiMacQueue ();
561 }
562 
563 void
565 {
566  NS_LOG_FUNCTION (this << phy);
567  m_phy = phy;
568  m_channelAccessManager->SetupPhyListener (phy);
569  NS_ASSERT (m_feManager != 0);
570  m_feManager->SetWifiPhy (phy);
571 }
572 
575 {
576  NS_LOG_FUNCTION (this);
577  return m_phy;
578 }
579 
580 void
582 {
583  NS_LOG_FUNCTION (this);
584  NS_ASSERT (m_feManager != 0);
585  m_feManager->ResetPhy ();
586  m_channelAccessManager->RemovePhyListener (m_phy);
587  m_phy = 0;
588 }
589 
590 void
592 {
593  NS_LOG_FUNCTION (this);
594  m_forwardUp = upCallback;
595 }
596 
597 void
599 {
600  NS_LOG_FUNCTION (this);
601  m_linkUp = linkUp;
602 }
603 
604 void
606 {
607  NS_LOG_FUNCTION (this);
608  m_linkDown = linkDown;
609 }
610 
611 void
613 {
614  NS_LOG_FUNCTION (this << enable);
616  m_qosSupported = enable;
617 
618  if (!m_qosSupported)
619  {
620  // create a non-QoS TXOP
621  m_txop = CreateObject<Txop> ();
623  m_txop->SetWifiMac (this);
625  m_txop->SetDroppedMpduCallback (MakeCallback (&DroppedMpduTracedCallback::operator(),
627  }
628  else
629  {
630  //Construct the EDCAFs. The ordering is important - highest
631  //priority (Table 9-1 UP-to-AC mapping; IEEE 802.11-2012) must be created
632  //first.
637  }
638 }
639 
640 bool
642 {
643  return m_qosSupported;
644 }
645 
646 bool
648 {
649  if (GetHtConfiguration ())
650  {
651  return true;
652  }
653  return false;
654 }
655 
656 bool
658 {
659  if (GetVhtConfiguration ())
660  {
661  return true;
662  }
663  return false;
664 }
665 
666 bool
668 {
669  if (GetHeConfiguration ())
670  {
671  return true;
672  }
673  return false;
674 }
675 
676 bool
678 {
679  return m_erpSupported;
680 }
681 
682 void
684 {
685  NS_LOG_FUNCTION (this);
686  if (enable)
687  {
688  SetDsssSupported (true);
689  }
690  m_erpSupported = enable;
691 }
692 
693 void
695 {
696  NS_LOG_FUNCTION (this);
697  m_dsssSupported = enable;
698 }
699 
700 bool
702 {
703  return m_dsssSupported;
704 }
705 
706 void
708 {
709  NS_LOG_FUNCTION (this);
710  m_ctsToSelfSupported = enable;
711 }
712 
713 void
715 {
716  NS_LOG_FUNCTION (this << address);
717  m_address = address;
718 }
719 
722 {
723  return m_address;
724 }
725 
726 void
728 {
729  NS_LOG_FUNCTION (this << ssid);
730  m_ssid = ssid;
731 }
732 
733 Ssid
735 {
736  return m_ssid;
737 }
738 
739 void
741 {
742  NS_LOG_FUNCTION (this << bssid);
743  m_bssid = bssid;
744  if (m_feManager)
745  {
746  m_feManager->SetBssid (bssid);
747  }
748 }
749 
752 {
753  return m_bssid;
754 }
755 
756 void
758 {
759  NS_ASSERT (m_feManager != 0);
760  m_feManager->SetPromisc ();
761 }
762 
763 void
765 {
766  NS_LOG_FUNCTION (this << enable);
767  m_shortSlotTimeSupported = enable;
768 }
769 
770 bool
772 {
774 }
775 
776 void
778  Mac48Address to, Mac48Address from)
779 {
780  //We expect RegularWifiMac subclasses which do support forwarding (e.g.,
781  //AP) to override this method. Therefore, we throw a fatal error if
782  //someone tries to invoke this method on a class which has not done
783  //this.
784  NS_FATAL_ERROR ("This MAC entity (" << this << ", " << GetAddress ()
785  << ") does not support Enqueue() with from address");
786 }
787 
788 bool
790 {
791  return false;
792 }
793 
794 void
796 {
797  NS_LOG_FUNCTION (this << packet << from << to);
798  m_forwardUp (packet, from, to);
799 }
800 
801 void
803 {
804  NS_LOG_FUNCTION (this << *mpdu);
805 
806  const WifiMacHeader* hdr = &mpdu->GetHeader ();
807  Ptr<Packet> packet = mpdu->GetPacket ()->Copy ();
808  Mac48Address to = hdr->GetAddr1 ();
809  Mac48Address from = hdr->GetAddr2 ();
810 
811  //We don't know how to deal with any frame that is not addressed to
812  //us (and odds are there is nothing sensible we could do anyway),
813  //so we ignore such frames.
814  //
815  //The derived class may also do some such filtering, but it doesn't
816  //hurt to have it here too as a backstop.
817  if (to != GetAddress ())
818  {
819  return;
820  }
821 
822  if (hdr->IsMgt () && hdr->IsAction ())
823  {
824  //There is currently only any reason for Management Action
825  //frames to be flying about if we are a QoS STA.
827 
828  WifiActionHeader actionHdr;
829  packet->RemoveHeader (actionHdr);
830 
831  switch (actionHdr.GetCategory ())
832  {
834 
835  switch (actionHdr.GetAction ().blockAck)
836  {
838  {
839  MgtAddBaRequestHeader reqHdr;
840  packet->RemoveHeader (reqHdr);
841 
842  //We've received an ADDBA Request. Our policy here is
843  //to automatically accept it, so we get the ADDBA
844  //Response on it's way immediately.
845  NS_ASSERT (m_feManager != 0);
846  Ptr<HtFrameExchangeManager> htFem = DynamicCast<HtFrameExchangeManager> (m_feManager);
847  if (htFem != 0)
848  {
849  htFem->SendAddBaResponse (&reqHdr, from);
850  }
851  //This frame is now completely dealt with, so we're done.
852  return;
853  }
855  {
856  MgtAddBaResponseHeader respHdr;
857  packet->RemoveHeader (respHdr);
858 
859  //We've received an ADDBA Response. We assume that it
860  //indicates success after an ADDBA Request we have
861  //sent (we could, in principle, check this, but it
862  //seems a waste given the level of the current model)
863  //and act by locally establishing the agreement on
864  //the appropriate queue.
865  AcIndex ac = QosUtilsMapTidToAc (respHdr.GetTid ());
866  m_edca[ac]->GotAddBaResponse (&respHdr, from);
867  //This frame is now completely dealt with, so we're done.
868  return;
869  }
871  {
872  MgtDelBaHeader delBaHdr;
873  packet->RemoveHeader (delBaHdr);
874 
875  if (delBaHdr.IsByOriginator ())
876  {
877  //This DELBA frame was sent by the originator, so
878  //this means that an ingoing established
879  //agreement exists in HtFrameExchangeManager and we need to
880  //destroy it.
881  NS_ASSERT (m_feManager != 0);
882  Ptr<HtFrameExchangeManager> htFem = DynamicCast<HtFrameExchangeManager> (m_feManager);
883  if (htFem != 0)
884  {
885  htFem->DestroyBlockAckAgreement (from, delBaHdr.GetTid ());
886  }
887  }
888  else
889  {
890  //We must have been the originator. We need to
891  //tell the correct queue that the agreement has
892  //been torn down
893  AcIndex ac = QosUtilsMapTidToAc (delBaHdr.GetTid ());
894  m_edca[ac]->GotDelBaFrame (&delBaHdr, from);
895  }
896  //This frame is now completely dealt with, so we're done.
897  return;
898  }
899  default:
900  NS_FATAL_ERROR ("Unsupported Action field in Block Ack Action frame");
901  return;
902  }
903  default:
904  NS_FATAL_ERROR ("Unsupported Action frame received");
905  return;
906  }
907  }
908  NS_FATAL_ERROR ("Don't know how to handle frame (type=" << hdr->GetType ());
909 }
910 
911 void
913 {
914  NS_LOG_FUNCTION (this << *mpdu);
915  for (auto& msduPair : *PeekPointer (mpdu))
916  {
917  ForwardUp (msduPair.first, msduPair.second.GetSourceAddr (),
918  msduPair.second.GetDestinationAddr ());
919  }
920 }
921 
922 TypeId
924 {
925  static TypeId tid = TypeId ("ns3::RegularWifiMac")
926  .SetParent<WifiMac> ()
927  .SetGroupName ("Wifi")
928  .AddAttribute ("QosSupported",
929  "This Boolean attribute is set to enable 802.11e/WMM-style QoS support at this STA.",
930  TypeId::ATTR_GET | TypeId::ATTR_CONSTRUCT, // prevent setting after construction
931  BooleanValue (false),
935  .AddAttribute ("CtsToSelfSupported",
936  "Use CTS to Self when using a rate that is not in the basic rate set.",
937  BooleanValue (false),
940  .AddAttribute ("VO_MaxAmsduSize",
941  "Maximum length in bytes of an A-MSDU for AC_VO access class "
942  "(capped to 7935 for HT PPDUs and 11398 for VHT/HE PPDUs). "
943  "Value 0 means A-MSDU aggregation is disabled for that AC.",
944  UintegerValue (0),
946  MakeUintegerChecker<uint16_t> (0, 11398))
947  .AddAttribute ("VI_MaxAmsduSize",
948  "Maximum length in bytes of an A-MSDU for AC_VI access class "
949  "(capped to 7935 for HT PPDUs and 11398 for VHT/HE PPDUs). "
950  "Value 0 means A-MSDU aggregation is disabled for that AC.",
951  UintegerValue (0),
953  MakeUintegerChecker<uint16_t> (0, 11398))
954  .AddAttribute ("BE_MaxAmsduSize",
955  "Maximum length in bytes of an A-MSDU for AC_BE access class "
956  "(capped to 7935 for HT PPDUs and 11398 for VHT/HE PPDUs). "
957  "Value 0 means A-MSDU aggregation is disabled for that AC.",
958  UintegerValue (0),
960  MakeUintegerChecker<uint16_t> (0, 11398))
961  .AddAttribute ("BK_MaxAmsduSize",
962  "Maximum length in bytes of an A-MSDU for AC_BK access class "
963  "(capped to 7935 for HT PPDUs and 11398 for VHT/HE PPDUs). "
964  "Value 0 means A-MSDU aggregation is disabled for that AC.",
965  UintegerValue (0),
967  MakeUintegerChecker<uint16_t> (0, 11398))
968  .AddAttribute ("VO_MaxAmpduSize",
969  "Maximum length in bytes of an A-MPDU for AC_VO access class "
970  "(capped to 65535 for HT PPDUs, 1048575 for VHT PPDUs, and 6500631 for HE PPDUs). "
971  "Value 0 means A-MPDU aggregation is disabled for that AC.",
972  UintegerValue (0),
974  MakeUintegerChecker<uint32_t> (0, 6500631))
975  .AddAttribute ("VI_MaxAmpduSize",
976  "Maximum length in bytes of an A-MPDU for AC_VI access class "
977  "(capped to 65535 for HT PPDUs, 1048575 for VHT PPDUs, and 6500631 for HE PPDUs). "
978  "Value 0 means A-MPDU aggregation is disabled for that AC.",
979  UintegerValue (65535),
981  MakeUintegerChecker<uint32_t> (0, 6500631))
982  .AddAttribute ("BE_MaxAmpduSize",
983  "Maximum length in bytes of an A-MPDU for AC_BE access class "
984  "(capped to 65535 for HT PPDUs, 1048575 for VHT PPDUs, and 6500631 for HE PPDUs). "
985  "Value 0 means A-MPDU aggregation is disabled for that AC.",
986  UintegerValue (65535),
988  MakeUintegerChecker<uint32_t> (0, 6500631))
989  .AddAttribute ("BK_MaxAmpduSize",
990  "Maximum length in bytes of an A-MPDU for AC_BK access class "
991  "(capped to 65535 for HT PPDUs, 1048575 for VHT PPDUs, and 6500631 for HE PPDUs). "
992  "Value 0 means A-MPDU aggregation is disabled for that AC.",
993  UintegerValue (0),
995  MakeUintegerChecker<uint32_t> (0, 6500631))
996  .AddAttribute ("VO_BlockAckThreshold",
997  "If number of packets in VO queue reaches this value, "
998  "block ack mechanism is used. If this value is 0, block ack is never used."
999  "When A-MPDU is enabled, block ack mechanism is used regardless of this value.",
1000  UintegerValue (0),
1002  MakeUintegerChecker<uint8_t> (0, 64))
1003  .AddAttribute ("VI_BlockAckThreshold",
1004  "If number of packets in VI queue reaches this value, "
1005  "block ack mechanism is used. If this value is 0, block ack is never used."
1006  "When A-MPDU is enabled, block ack mechanism is used regardless of this value.",
1007  UintegerValue (0),
1009  MakeUintegerChecker<uint8_t> (0, 64))
1010  .AddAttribute ("BE_BlockAckThreshold",
1011  "If number of packets in BE queue reaches this value, "
1012  "block ack mechanism is used. If this value is 0, block ack is never used."
1013  "When A-MPDU is enabled, block ack mechanism is used regardless of this value.",
1014  UintegerValue (0),
1016  MakeUintegerChecker<uint8_t> (0, 64))
1017  .AddAttribute ("BK_BlockAckThreshold",
1018  "If number of packets in BK queue reaches this value, "
1019  "block ack mechanism is used. If this value is 0, block ack is never used."
1020  "When A-MPDU is enabled, block ack mechanism is used regardless of this value.",
1021  UintegerValue (0),
1023  MakeUintegerChecker<uint8_t> (0, 64))
1024  .AddAttribute ("VO_BlockAckInactivityTimeout",
1025  "Represents max time (blocks of 1024 microseconds) allowed for block ack"
1026  "inactivity for AC_VO. If this value isn't equal to 0 a timer start after that a"
1027  "block ack setup is completed and will be reset every time that a block ack"
1028  "frame is received. If this value is 0, block ack inactivity timeout won't be used.",
1029  UintegerValue (0),
1031  MakeUintegerChecker<uint16_t> ())
1032  .AddAttribute ("VI_BlockAckInactivityTimeout",
1033  "Represents max time (blocks of 1024 microseconds) allowed for block ack"
1034  "inactivity for AC_VI. If this value isn't equal to 0 a timer start after that a"
1035  "block ack setup is completed and will be reset every time that a block ack"
1036  "frame is received. If this value is 0, block ack inactivity timeout won't be used.",
1037  UintegerValue (0),
1039  MakeUintegerChecker<uint16_t> ())
1040  .AddAttribute ("BE_BlockAckInactivityTimeout",
1041  "Represents max time (blocks of 1024 microseconds) allowed for block ack"
1042  "inactivity for AC_BE. If this value isn't equal to 0 a timer start after that a"
1043  "block ack setup is completed and will be reset every time that a block ack"
1044  "frame is received. If this value is 0, block ack inactivity timeout won't be used.",
1045  UintegerValue (0),
1047  MakeUintegerChecker<uint16_t> ())
1048  .AddAttribute ("BK_BlockAckInactivityTimeout",
1049  "Represents max time (blocks of 1024 microseconds) allowed for block ack"
1050  "inactivity for AC_BK. If this value isn't equal to 0 a timer start after that a"
1051  "block ack setup is completed and will be reset every time that a block ack"
1052  "frame is received. If this value is 0, block ack inactivity timeout won't be used.",
1053  UintegerValue (0),
1055  MakeUintegerChecker<uint16_t> ())
1056  .AddAttribute ("ShortSlotTimeSupported",
1057  "Whether or not short slot time is supported (only used by ERP APs or STAs).",
1058  BooleanValue (true),
1061  MakeBooleanChecker ())
1062  .AddAttribute ("Txop",
1063  "The Txop object.",
1064  PointerValue (),
1066  MakePointerChecker<Txop> ())
1067  .AddAttribute ("VO_Txop",
1068  "Queue that manages packets belonging to AC_VO access class.",
1069  PointerValue (),
1071  MakePointerChecker<QosTxop> ())
1072  .AddAttribute ("VI_Txop",
1073  "Queue that manages packets belonging to AC_VI access class.",
1074  PointerValue (),
1076  MakePointerChecker<QosTxop> ())
1077  .AddAttribute ("BE_Txop",
1078  "Queue that manages packets belonging to AC_BE access class.",
1079  PointerValue (),
1081  MakePointerChecker<QosTxop> ())
1082  .AddAttribute ("BK_Txop",
1083  "Queue that manages packets belonging to AC_BK access class.",
1084  PointerValue (),
1086  MakePointerChecker<QosTxop> ())
1087  .AddTraceSource ("TxOkHeader",
1088  "The header of successfully transmitted packet.",
1090  "ns3::WifiMacHeader::TracedCallback",
1092  "Use the AckedMpdu trace instead.")
1093  .AddTraceSource ("TxErrHeader",
1094  "The header of unsuccessfully transmitted packet.",
1096  "ns3::WifiMacHeader::TracedCallback",
1098  "Depending on the failure type, use the NAckedMpdu trace, the "
1099  "DroppedMpdu trace or one of the traces associated with TX timeouts.")
1100  .AddTraceSource ("AckedMpdu",
1101  "An MPDU that was successfully acknowledged, via either a "
1102  "Normal Ack or a Block Ack.",
1104  "ns3::WifiMacQueueItem::TracedCallback")
1105  .AddTraceSource ("NAckedMpdu",
1106  "An MPDU that was negatively acknowledged via a Block Ack.",
1108  "ns3::WifiMacQueueItem::TracedCallback")
1109  .AddTraceSource ("DroppedMpdu",
1110  "An MPDU that was dropped for the given reason (see WifiMacDropReason).",
1112  "ns3::RegularWifiMac::DroppedMpduCallback")
1113  .AddTraceSource ("MpduResponseTimeout",
1114  "An MPDU whose response was not received before the timeout, along with "
1115  "an identifier of the type of timeout (see WifiTxTimer::Reason) and the "
1116  "TXVECTOR used to transmit the MPDU. This trace source is fired when a "
1117  "CTS is missing after an RTS or a Normal Ack is missing after an MPDU "
1118  "or after a DL MU PPDU acknowledged in SU format.",
1120  "ns3::RegularWifiMac::MpduResponseTimeoutCallback")
1121  .AddTraceSource ("PsduResponseTimeout",
1122  "A PSDU whose response was not received before the timeout, along with "
1123  "an identifier of the type of timeout (see WifiTxTimer::Reason) and the "
1124  "TXVECTOR used to transmit the PSDU. This trace source is fired when a "
1125  "BlockAck is missing after an A-MPDU, a BlockAckReq (possibly in the "
1126  "context of the acknowledgment of a DL MU PPDU in SU format) or a TB PPDU "
1127  "(in the latter case the missing BlockAck is a Multi-STA BlockAck).",
1129  "ns3::RegularWifiMac::PsduResponseTimeoutCallback")
1130  .AddTraceSource ("PsduMapResponseTimeout",
1131  "A PSDU map for which not all the responses were received before the timeout, "
1132  "along with an identifier of the type of timeout (see WifiTxTimer::Reason), "
1133  "the set of MAC addresses of the stations that did not respond and the total "
1134  "number of stations that had to respond. This trace source is fired when not "
1135  "all the addressed stations responded to an MU-BAR Trigger frame (either sent as "
1136  "a SU frame or aggregated to PSDUs in the DL MU PPDU), a Basic Trigger Frame or "
1137  "a BSRP Trigger Frame.",
1139  "ns3::RegularWifiMac::PsduMapResponseTimeoutCallback")
1140  ;
1141  return tid;
1142 }
1143 
1144 void
1146 {
1147  NS_LOG_FUNCTION (this << standard);
1148  uint32_t cwmin = 0;
1149  uint32_t cwmax = 0;
1150  switch (standard)
1151  {
1153  case WIFI_STANDARD_80211ac:
1156  {
1158  cwmin = 15;
1159  cwmax = 1023;
1160  break;
1161  }
1164  {
1166  }
1167  case WIFI_STANDARD_80211g:
1168  SetErpSupported (true);
1169  case WIFI_STANDARD_80211a:
1170  case WIFI_STANDARD_80211p:
1171  cwmin = 15;
1172  cwmax = 1023;
1173  break;
1174  case WIFI_STANDARD_80211b:
1175  SetDsssSupported (true);
1176  cwmin = 31;
1177  cwmax = 1023;
1178  break;
1179  default:
1180  NS_FATAL_ERROR ("Unsupported WifiPhyStandard in RegularWifiMac::FinishConfigureStandard ()");
1181  }
1182 
1184  ConfigureContentionWindow (cwmin, cwmax);
1185 }
1186 
1187 void
1188 RegularWifiMac::ConfigureContentionWindow (uint32_t cwMin, uint32_t cwMax)
1189 {
1190  bool isDsssOnly = m_dsssSupported && !m_erpSupported;
1191  if (m_txop != nullptr)
1192  {
1193  //The special value of AC_BE_NQOS which exists in the Access
1194  //Category enumeration allows us to configure plain old DCF.
1195  ConfigureDcf (m_txop, cwMin, cwMax, isDsssOnly, AC_BE_NQOS);
1196  }
1197 
1198  //Now we configure the EDCA functions
1199  for (EdcaQueues::const_iterator i = m_edca.begin (); i != m_edca.end (); ++i)
1200  {
1201  ConfigureDcf (i->second, cwMin, cwMax, isDsssOnly, i->first);
1202  }
1203 }
1204 
1205 uint32_t
1207 {
1208  uint32_t maxSize = 0;
1209  switch (ac)
1210  {
1211  case AC_BE:
1212  maxSize = m_beMaxAmpduSize;
1213  break;
1214  case AC_BK:
1215  maxSize = m_bkMaxAmpduSize;
1216  break;
1217  case AC_VI:
1218  maxSize = m_viMaxAmpduSize;
1219  break;
1220  case AC_VO:
1221  maxSize = m_voMaxAmpduSize;
1222  break;
1223  default:
1224  NS_ABORT_MSG ("Unknown AC " << ac);
1225  return 0;
1226  }
1227  return maxSize;
1228 }
1229 
1230 uint16_t
1232 {
1233  uint16_t maxSize = 0;
1234  switch (ac)
1235  {
1236  case AC_BE:
1237  maxSize = m_beMaxAmsduSize;
1238  break;
1239  case AC_BK:
1240  maxSize = m_bkMaxAmsduSize;
1241  break;
1242  case AC_VI:
1243  maxSize = m_viMaxAmsduSize;
1244  break;
1245  case AC_VO:
1246  maxSize = m_voMaxAmsduSize;
1247  break;
1248  default:
1249  NS_ABORT_MSG ("Unknown AC " << ac);
1250  return 0;
1251  }
1252  return maxSize;
1253 }
1254 
1255 } //namespace ns3
ns3::RegularWifiMac::SetupEdcaQueue
void SetupEdcaQueue(AcIndex ac)
This method is a private utility invoked to configure the channel access function for the specified A...
Definition: regular-wifi-mac.cc:474
ns3::WIFI_STANDARD_80211n_5GHZ
@ WIFI_STANDARD_80211n_5GHZ
Definition: wifi-standards.h:132
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::RegularWifiMac::GetFrameExchangeManager
Ptr< FrameExchangeManager > GetFrameExchangeManager(void) const
Get the Frame Exchange Manager.
Definition: regular-wifi-mac.cc:168
mac-tx-middle.h
ns3::VhtCapabilities
The IEEE 802.11ac VHT Capabilities.
Definition: vht-capabilities.h:35
ns3::Object::Dispose
void Dispose(void)
Dispose of this Object.
Definition: object.cc:214
ns3::HtCapabilities::SetTxMcsSetDefined
void SetTxMcsSetDefined(uint8_t txMcsSetDefined)
Set the transmit MCS set defined.
Definition: ht-capabilities.cc:172
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::WifiMacQueueItem::GetPacket
Ptr< const Packet > GetPacket(void) const
Get the packet stored in this item.
Definition: wifi-mac-queue-item.cc:66
ns3::RegularWifiMac::m_erpSupported
bool m_erpSupported
This Boolean is set true iff this WifiMac is to model 802.11g.
Definition: regular-wifi-mac.h:427
ns3::RegularWifiMac::SetBeBlockAckInactivityTimeout
void SetBeBlockAckInactivityTimeout(uint16_t timeout)
Set BE block ack inactivity timeout.
Definition: regular-wifi-mac.cc:454
ns3::BooleanValue
AttributeValue implementation for Boolean.
Definition: boolean.h:37
ns3::TypeId::ATTR_CONSTRUCT
@ ATTR_CONSTRUCT
The attribute can be written at construction-time.
Definition: type-id.h:66
ns3::RegularWifiMac::GetExtendedCapabilities
ExtendedCapabilities GetExtendedCapabilities(void) const
Return the extended capabilities of the device.
Definition: regular-wifi-mac.cc:187
ns3::HtCapabilities::SetTxUnequalModulation
void SetTxUnequalModulation(uint8_t txUnequalModulation)
Set the transmit unequal modulation.
Definition: ht-capabilities.cc:190
min
#define min(a, b)
Definition: 80211b.c:42
ns3::RegularWifiMac::m_address
Mac48Address m_address
MAC address of this station.
Definition: regular-wifi-mac.h:434
regular-wifi-mac.h
ns3::RegularWifiMac::SetViBlockAckInactivityTimeout
void SetViBlockAckInactivityTimeout(uint16_t timeout)
Set VI block ack inactivity timeout.
Definition: regular-wifi-mac.cc:444
ns3::Callback
Callback template class.
Definition: callback.h:1279
ns3::ExtendedCapabilities::SetHtSupported
void SetHtSupported(uint8_t htSupported)
Set the HT Supported flag.
Definition: extended-capabilities.cc:95
ns3::RegularWifiMac::GetSsid
Ssid GetSsid(void) const override
Definition: regular-wifi-mac.cc:734
ns3::HeCapabilities::SetHeSupported
void SetHeSupported(uint8_t heSupported)
Set HE supported.
Definition: he-capabilities.cc:107
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::Txop::SetChannelAccessManager
void SetChannelAccessManager(const Ptr< ChannelAccessManager > manager)
Set ChannelAccessManager this Txop is associated to.
Definition: txop.cc:122
amsdu-subframe-header.h
ns3::RegularWifiMac::m_viMaxAmpduSize
uint32_t m_viMaxAmpduSize
maximum A-MPDU size for AC_VI (in bytes)
Definition: regular-wifi-mac.h:443
ns3::WIFI_MOD_CLASS_HT
@ WIFI_MOD_CLASS_HT
HT (Clause 19)
Definition: wifi-phy-common.h:130
ns3::WIFI_MOD_CLASS_HE
@ WIFI_MOD_CLASS_HE
HE (Clause 27)
Definition: wifi-phy-common.h:132
ns3::VhtCapabilities::SetSupportedChannelWidthSet
void SetSupportedChannelWidthSet(uint8_t channelWidthSet)
Set the supported channel width set.
Definition: vht-capabilities.cc:230
ns3::HeCapabilities::SetHeLtfAndGiForHePpdus
void SetHeLtfAndGiForHePpdus(uint8_t heLtfAndGiForHePpdus)
Set HE LTF and GI for HE PDPUs.
Definition: he-capabilities.cc:436
ns3::WifiMac::DoDispose
virtual void DoDispose()
Destructor implementation.
Definition: wifi-mac.cc:79
ns3::RegularWifiMac::SetBssid
void SetBssid(Mac48Address bssid)
Definition: regular-wifi-mac.cc:740
ns3::RegularWifiMac::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition: regular-wifi-mac.cc:923
ns3::WIFI_STANDARD_80211ax_2_4GHZ
@ WIFI_STANDARD_80211ax_2_4GHZ
Definition: wifi-standards.h:134
ns3::WIFI_STANDARD_80211g
@ WIFI_STANDARD_80211g
Definition: wifi-standards.h:129
ns3::MgtDelBaHeader::GetTid
uint8_t GetTid(void) const
Return the Traffic ID (TID).
Definition: mgt-headers.cc:1872
ns3::HeCapabilities::SetHighestNssSupported
void SetHighestNssSupported(uint8_t nss)
Set highest NSS supported.
Definition: he-capabilities.cc:464
ns3::WIFI_STANDARD_80211p
@ WIFI_STANDARD_80211p
Definition: wifi-standards.h:130
ns3::RegularWifiMac::GetQosTxop
Ptr< QosTxop > GetQosTxop(AcIndex ac) const
Accessor for a specified EDCA object.
Definition: regular-wifi-mac.cc:516
ns3::WIFI_PHY_BAND_5GHZ
@ WIFI_PHY_BAND_5GHZ
The 5 GHz band.
Definition: wifi-phy-band.h:37
ns3::HtCapabilities::SetMaxAmpduLength
void SetMaxAmpduLength(uint32_t maxAmpduLength)
Set the maximum AMPDU length.
Definition: ht-capabilities.cc:146
ns3::WIFI_STANDARD_80211ax_5GHZ
@ WIFI_STANDARD_80211ax_5GHZ
Definition: wifi-standards.h:135
ns3::RegularWifiMac::GetHeSupported
bool GetHeSupported() const
Return whether the device supports HE.
Definition: regular-wifi-mac.cc:667
ns3::HtCapabilities::SetRxHighestSupportedDataRate
void SetRxHighestSupportedDataRate(uint16_t maxSupportedRate)
Set the receive highest supported data rate.
Definition: ht-capabilities.cc:166
ns3::QosTxop::GetBaManager
Ptr< BlockAckManager > GetBaManager(void)
Get the Block Ack Manager associated with this QosTxop.
Definition: qos-txop.cc:243
ns3::VhtCapabilities::SetRxMcsMap
void SetRxMcsMap(uint8_t mcs, uint8_t nss)
Definition: vht-capabilities.cc:280
ns3::HeCapabilities
The IEEE 802.11ax HE Capabilities.
Definition: he-capabilities.h:34
ns3::QosTxop::SetBlockAckInactivityTimeout
void SetBlockAckInactivityTimeout(uint16_t timeout)
Set the BlockAck inactivity timeout.
Definition: qos-txop.cc:647
ns3::RegularWifiMac::SetLinkDownCallback
void SetLinkDownCallback(Callback< void > linkDown) override
Definition: regular-wifi-mac.cc:605
ns3::WifiMac::GetVhtConfiguration
Ptr< VhtConfiguration > GetVhtConfiguration(void) const
Definition: wifi-mac.cc:194
ns3::MgtAddBaRequestHeader
Implement the header for management frames of type Add Block Ack request.
Definition: mgt-headers.h:1018
ns3::RegularWifiMac::m_shortSlotTimeSupported
bool m_shortSlotTimeSupported
flag whether short slot time is supported
Definition: regular-wifi-mac.h:531
ns3::VhtCapabilities::SetRxStbc
void SetRxStbc(uint8_t rxStbc)
Set the receive STBC.
Definition: vht-capabilities.cc:254
ns3::RegularWifiMac::GetBssid
Mac48Address GetBssid(void) const override
Definition: regular-wifi-mac.cc:751
ns3::RegularWifiMac::GetErpSupported
bool GetErpSupported() const
Return whether the device supports ERP.
Definition: regular-wifi-mac.cc:677
ns3::PointerValue
Hold objects of type Ptr<T>.
Definition: pointer.h:37
ns3::Mac48Address
an EUI-48 address
Definition: mac48-address.h:44
ns3::RegularWifiMac::GetMaxAmpduSize
uint32_t GetMaxAmpduSize(AcIndex ac) const
Return the maximum A-MPDU size of the given Access Category.
Definition: regular-wifi-mac.cc:1206
ns3::RegularWifiMac::m_viMaxAmsduSize
uint16_t m_viMaxAmsduSize
maximum A-MSDU size for AC_VI (in bytes)
Definition: regular-wifi-mac.h:438
ns3::TypeId::ATTR_GET
@ ATTR_GET
The attribute can be read.
Definition: type-id.h:64
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::HtCapabilities::SetTxRxMcsSetUnequal
void SetTxRxMcsSetUnequal(uint8_t txRxMcsSetUnequal)
Set the transmit / receive MCS set unequal.
Definition: ht-capabilities.cc:178
ns3::HtCapabilities::SetRxMcsBitmask
void SetRxMcsBitmask(uint8_t index)
Set the receive MCS bitmask.
Definition: ht-capabilities.cc:160
ns3::ExtendedCapabilities::SetVhtSupported
void SetVhtSupported(uint8_t vhtSupported)
Set the VHT Supported flag.
Definition: extended-capabilities.cc:101
ns3::TypeOfStation
TypeOfStation
Enumeration for type of station.
Definition: wifi-mac.h:41
ns3::RegularWifiMac::m_rxMiddle
Ptr< MacRxMiddle > m_rxMiddle
RX middle (defragmentation etc.)
Definition: regular-wifi-mac.h:217
ns3::RegularWifiMac::SetLinkUpCallback
void SetLinkUpCallback(Callback< void > linkUp) override
Definition: regular-wifi-mac.cc:598
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::WifiActionHeader::BLOCK_ACK_ADDBA_REQUEST
@ BLOCK_ACK_ADDBA_REQUEST
Definition: mgt-headers.h:946
ns3::RegularWifiMac::DeaggregateAmsduAndForward
virtual void DeaggregateAmsduAndForward(Ptr< WifiMacQueueItem > mpdu)
This method can be called to de-aggregate an A-MSDU and forward the constituent packets up the stack.
Definition: regular-wifi-mac.cc:912
ns3::RegularWifiMac::m_voMaxAmsduSize
uint16_t m_voMaxAmsduSize
maximum A-MSDU size for AC_VO (in bytes)
Definition: regular-wifi-mac.h:437
ns3::RegularWifiMac::GetQosSupported
bool GetQosSupported() const
Return whether the device supports QoS.
Definition: regular-wifi-mac.cc:641
ns3::PeekPointer
U * PeekPointer(const Ptr< U > &p)
Definition: ptr.h:415
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::RegularWifiMac::SetSsid
void SetSsid(Ssid ssid) override
Definition: regular-wifi-mac.cc:727
ns3::WifiPhy::GetNMcs
uint16_t GetNMcs(void) const
Definition: wifi-phy.cc:2050
ns3::Ssid
The IEEE 802.11 SSID Information Element.
Definition: ssid.h:36
ns3::RegularWifiMac::m_bkMaxAmsduSize
uint16_t m_bkMaxAmsduSize
maximum A-MSDU size for AC_BK (in bytes)
Definition: regular-wifi-mac.h:440
ns3::RegularWifiMac::m_typeOfStation
TypeOfStation m_typeOfStation
the type of station
Definition: regular-wifi-mac.h:407
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
wifi-mac-queue.h
ns3::VhtCapabilities::SetRxLdpc
void SetRxLdpc(uint8_t rxLdpc)
Set the receive LDPC.
Definition: vht-capabilities.cc:236
ns3::RegularWifiMac::m_bkMaxAmpduSize
uint32_t m_bkMaxAmpduSize
maximum A-MPDU size for AC_BK (in bytes)
Definition: regular-wifi-mac.h:445
ns3::RegularWifiMac::GetMaxAmsduSize
uint16_t GetMaxAmsduSize(AcIndex ac) const
Return the maximum A-MSDU size of the given Access Category.
Definition: regular-wifi-mac.cc:1231
ns3::RegularWifiMac::ConfigureContentionWindow
void ConfigureContentionWindow(uint32_t cwMin, uint32_t cwMax)
Definition: regular-wifi-mac.cc:1188
ns3::RegularWifiMac::m_linkDown
Callback< void > m_linkDown
Callback when a link is down.
Definition: regular-wifi-mac.h:227
ns3::RegularWifiMac::GetAddress
Mac48Address GetAddress(void) const override
Definition: regular-wifi-mac.cc:721
ns3::WifiMacHeader
Implements the IEEE 802.11 MAC header.
Definition: wifi-mac-header.h:85
mgt-headers.h
ns3::HeCapabilities::SetMaxAmpduLength
void SetMaxAmpduLength(uint32_t maxAmpduLength)
Set the maximum AMPDU length.
Definition: he-capabilities.cc:443
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
ns3::WifiActionHeader
See IEEE 802.11 chapter 7.3.1.11 Header format: | category: 1 | action value: 1 |.
Definition: mgt-headers.h:885
ns3::WifiPhy::GetMaxSupportedTxSpatialStreams
uint8_t GetMaxSupportedTxSpatialStreams(void) const
Definition: wifi-phy.cc:1403
ns3::WifiActionHeader::GetAction
ActionValue GetAction()
Return the action value.
Definition: mgt-headers.cc:1247
NS_FATAL_ERROR
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:165
ns3::HeCapabilities::SetHighestMcsSupported
void SetHighestMcsSupported(uint8_t mcs)
Set highest MCS supported.
Definition: he-capabilities.cc:457
ns3::RegularWifiMac::SupportsSendFrom
bool SupportsSendFrom(void) const override
Definition: regular-wifi-mac.cc:789
ns3::MgtAddBaResponseHeader::GetTid
uint8_t GetTid(void) const
Return the Traffic ID (TID).
Definition: mgt-headers.cc:1756
ns3::RegularWifiMac::m_edca
EdcaQueues m_edca
This is a map from Access Category index to the corresponding channel access function.
Definition: regular-wifi-mac.h:241
ns3::AC_VI
@ AC_VI
Video.
Definition: qos-utils.h:77
ns3::WifiMacHeader::GetType
WifiMacType GetType(void) const
Return the type (enum WifiMacType)
Definition: wifi-mac-header.cc:448
ns3::RegularWifiMac::m_droppedMpduCallback
DroppedMpduTracedCallback m_droppedMpduCallback
This trace indicates that an MPDU was dropped for the given reason.
Definition: regular-wifi-mac.h:470
ns3::RegularWifiMac::m_beMaxAmpduSize
uint32_t m_beMaxAmpduSize
maximum A-MPDU size for AC_BE (in bytes)
Definition: regular-wifi-mac.h:444
max
#define max(a, b)
Definition: 80211b.c:43
ns3::NanoSeconds
Time NanoSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1313
ns3::HtCapabilities::SetHtSupported
void SetHtSupported(uint8_t htSupported)
Set the HT supported field.
Definition: ht-capabilities.cc:102
ns3::VhtCapabilities::SetShortGuardIntervalFor80Mhz
void SetShortGuardIntervalFor80Mhz(uint8_t shortGuardInterval)
Set the short guard interval 80 MHz.
Definition: vht-capabilities.cc:242
ns3::HtCapabilities::SetTxMaxNSpatialStreams
void SetTxMaxNSpatialStreams(uint8_t maxTxSpatialStreams)
Set the transmit maximum N spatial streams.
Definition: ht-capabilities.cc:184
ns3::RegularWifiMac::GetVhtSupported
bool GetVhtSupported() const
Return whether the device supports VHT.
Definition: regular-wifi-mac.cc:657
ns3::RegularWifiMac::m_ctsToSelfSupported
bool m_ctsToSelfSupported
flag indicating whether CTS-To-Self is supported
Definition: regular-wifi-mac.h:532
ns3::RegularWifiMac::ResetWifiPhy
void ResetWifiPhy(void) override
Remove currently attached WifiPhy device from this MAC.
Definition: regular-wifi-mac.cc:581
ns3::RegularWifiMac::SetupFrameExchangeManager
void SetupFrameExchangeManager(void)
Create a Frame Exchange Manager depending on the supported version of the standard.
Definition: regular-wifi-mac.cc:117
ns3::RegularWifiMac::SetAddress
void SetAddress(Mac48Address address) override
Definition: regular-wifi-mac.cc:714
wifi-net-device.h
ns3::HtCapabilities
The HT Capabilities Information Element.
Definition: ht-capabilities.h:42
ns3::QosUtilsMapTidToAc
AcIndex QosUtilsMapTidToAc(uint8_t tid)
Maps TID (Traffic ID) to Access classes.
Definition: qos-utils.cc:126
ns3::RegularWifiMac::DoDispose
void DoDispose() override
Destructor implementation.
Definition: regular-wifi-mac.cc:83
ns3::RegularWifiMac::m_linkUp
Callback< void > m_linkUp
Callback when a link is up.
Definition: regular-wifi-mac.h:226
ns3::WIFI_STANDARD_80211a
@ WIFI_STANDARD_80211a
Definition: wifi-standards.h:127
ns3::Packet::RemoveHeader
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
Definition: packet.cc:280
ns3::Txop::GetWifiMacQueue
Ptr< WifiMacQueue > GetWifiMacQueue() const
Return the packet queue associated with this Txop.
Definition: txop.cc:154
ns3::RegularWifiMac::m_txop
Ptr< Txop > m_txop
This holds a pointer to the TXOP instance for this WifiMac - used for transmission of frames to non-Q...
Definition: regular-wifi-mac.h:233
ns3::WifiActionHeader::ActionValue::blockAck
BlockAckActionValue blockAck
block ack
Definition: mgt-headers.h:960
ns3::AC_BE
@ AC_BE
Best Effort.
Definition: qos-utils.h:73
ns3::RegularWifiMac::GetShortSlotTimeSupported
bool GetShortSlotTimeSupported(void) const override
Definition: regular-wifi-mac.cc:771
ns3::AC_BE_NQOS
@ AC_BE_NQOS
Non-QoS.
Definition: qos-utils.h:81
ns3::RegularWifiMac::m_voMaxAmpduSize
uint32_t m_voMaxAmpduSize
maximum A-MPDU size for AC_VO (in bytes)
Definition: regular-wifi-mac.h:442
ns3::RegularWifiMac::GetTxop
Ptr< Txop > GetTxop(void) const
Accessor for the DCF object.
Definition: regular-wifi-mac.cc:510
ns3::WifiMac
base class for all MAC-level wifi objects.
Definition: wifi-mac.h:72
ns3::WifiMac::GetHeConfiguration
Ptr< HeConfiguration > GetHeConfiguration(void) const
Definition: wifi-mac.cc:201
ns3::RegularWifiMac::m_stationManager
Ptr< WifiRemoteStationManager > m_stationManager
Remote station manager (rate control, RTS/CTS/fragmentation thresholds etc.)
Definition: regular-wifi-mac.h:223
ns3::MakeBooleanChecker
Ptr< const AttributeChecker > MakeBooleanChecker(void)
Definition: boolean.cc:121
ns3::AC_BK
@ AC_BK
Background.
Definition: qos-utils.h:75
ns3::WIFI_STANDARD_80211b
@ WIFI_STANDARD_80211b
Definition: wifi-standards.h:128
ns3::HtCapabilities::SetMaxAmsduLength
void SetMaxAmsduLength(uint16_t maxAmsduLength)
Set the maximum AMSDU length.
Definition: ht-capabilities.cc:132
first.address
address
Definition: first.py:44
ns3::WifiPhy::GetPhyBand
WifiPhyBand GetPhyBand(void) const
Get the configured Wi-Fi band.
Definition: wifi-phy.cc:1124
ns3::RegularWifiMac::SetVoBlockAckThreshold
void SetVoBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_VO.
Definition: regular-wifi-mac.cc:394
mac-rx-middle.h
ns3::TypeId::OBSOLETE
@ OBSOLETE
Attribute or trace source is not used anymore; simulation fails.
Definition: type-id.h:74
ns3::HtCapabilities::SetLdpc
void SetLdpc(uint8_t ldpc)
Set the LDPC field.
Definition: ht-capabilities.cc:108
ns3::RegularWifiMac::m_ackedMpduCallback
MpduTracedCallback m_ackedMpduCallback
ack'ed MPDU callback
Definition: regular-wifi-mac.h:453
ns3::VhtCapabilities::SetMaxAmpduLength
void SetMaxAmpduLength(uint32_t maxAmpduLength)
Set the maximum AMPDU length.
Definition: vht-capabilities.cc:266
ns3::RegularWifiMac::SetTypeOfStation
void SetTypeOfStation(TypeOfStation type) override
This method is invoked by a subclass to specify what type of station it is implementing.
Definition: regular-wifi-mac.cc:497
ns3::VhtCapabilities::SetTxMcsMap
void SetTxMcsMap(uint8_t mcs, uint8_t nss)
Definition: vht-capabilities.cc:288
ns3::WIFI_STANDARD_80211ax_6GHZ
@ WIFI_STANDARD_80211ax_6GHZ
Definition: wifi-standards.h:136
ns3::RegularWifiMac::m_mpduResponseTimeoutCallback
MpduResponseTimeoutTracedCallback m_mpduResponseTimeoutCallback
MPDU response timeout traced callback.
Definition: regular-wifi-mac.h:489
ns3::RegularWifiMac::SetWifiRemoteStationManager
void SetWifiRemoteStationManager(const Ptr< WifiRemoteStationManager > stationManager) override
Definition: regular-wifi-mac.cc:174
ns3::RegularWifiMac::SetBeBlockAckThreshold
void SetBeBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_BE.
Definition: regular-wifi-mac.cc:414
ns3::RegularWifiMac::ForwardUp
void ForwardUp(Ptr< const Packet > packet, Mac48Address from, Mac48Address to)
Forward the packet up to the device.
Definition: regular-wifi-mac.cc:795
ns3::WIFI_STANDARD_80211ac
@ WIFI_STANDARD_80211ac
Definition: wifi-standards.h:133
msdu-aggregator.h
ns3::RegularWifiMac::m_beMaxAmsduSize
uint16_t m_beMaxAmsduSize
maximum A-MSDU size for AC_BE (in bytes)
Definition: regular-wifi-mac.h:439
ns3::WifiMacHeader::IsMgt
bool IsMgt(void) const
Return true if the Type is Management.
Definition: wifi-mac-header.cc:577
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::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
ns3::RegularWifiMac::GetTxopQueue
virtual Ptr< WifiMacQueue > GetTxopQueue(AcIndex ac) const
Get the wifi MAC queue of the (Qos)Txop associated with the given AC.
Definition: regular-wifi-mac.cc:552
ns3::RegularWifiMac::SetBkBlockAckInactivityTimeout
void SetBkBlockAckInactivityTimeout(uint16_t timeout)
Set BK block ack inactivity timeout.
Definition: regular-wifi-mac.cc:464
NS_ABORT_IF
#define NS_ABORT_IF(cond)
Abnormal program termination if a condition is true.
Definition: abort.h:77
ns3::RegularWifiMac::m_bssid
Mac48Address m_bssid
the BSSID
Definition: regular-wifi-mac.h:435
ns3::RegularWifiMac::GetTypeOfStation
TypeOfStation GetTypeOfStation(void) const override
Return the type of station.
Definition: regular-wifi-mac.cc:504
ns3::AC_VO
@ AC_VO
Voice.
Definition: qos-utils.h:79
ns3::VhtCapabilities::SetVhtSupported
void SetVhtSupported(uint8_t vhtSupported)
Set the VHT supported field.
Definition: vht-capabilities.cc:66
ns3::VhtCapabilities::SetTxHighestSupportedLgiDataRate
void SetTxHighestSupportedLgiDataRate(uint16_t supportedDatarate)
Set the transmit highest supported LGI data rate.
Definition: vht-capabilities.cc:340
ns3::RegularWifiMac::m_txErrCallback
TracedCallback< const WifiMacHeader & > m_txErrCallback
transmit error callback
Definition: regular-wifi-mac.h:448
ns3::RegularWifiMac::SetViBlockAckThreshold
void SetViBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_VI.
Definition: regular-wifi-mac.cc:404
ns3::RegularWifiMac::m_dsssSupported
bool m_dsssSupported
This Boolean is set true iff this WifiMac is to model 802.11b.
Definition: regular-wifi-mac.h:432
ns3::ExtendedCapabilities
The Extended Capabilities Information Element.
Definition: extended-capabilities.h:35
ns3::MgtDelBaHeader
Implement the header for management frames of type Delete Block Ack.
Definition: mgt-headers.h:1271
ns3::RegularWifiMac::SetQosSupported
virtual void SetQosSupported(bool enable)
Enable or disable QoS support for the device.
Definition: regular-wifi-mac.cc:612
ns3::WIFI_PHY_BAND_2_4GHZ
@ WIFI_PHY_BAND_2_4GHZ
The 2.4 GHz band.
Definition: wifi-phy-band.h:35
timeout
ns3::Time timeout
Definition: openflow-switch.cc:52
ns3::WifiMac::GetHtConfiguration
Ptr< HtConfiguration > GetHtConfiguration(void) const
Definition: wifi-mac.cc:187
ns3::RegularWifiMac::ConfigureStandard
void ConfigureStandard(WifiStandard standard) override
Definition: regular-wifi-mac.cc:1145
ns3::RegularWifiMac::SetCtsToSelfSupported
void SetCtsToSelfSupported(bool enable)
Enable or disable CTS-to-self feature.
Definition: regular-wifi-mac.cc:707
ns3::RegularWifiMac::GetHtCapabilities
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities of the device.
Definition: regular-wifi-mac.cc:198
NS_LOG_DEBUG
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:273
ns3::RegularWifiMac::Enqueue
void Enqueue(Ptr< Packet > packet, Mac48Address to, Mac48Address from) override
Definition: regular-wifi-mac.cc:777
ns3::Txop::SetWifiMac
virtual void SetWifiMac(const Ptr< RegularWifiMac > mac)
Set the wifi MAC this Txop is associated to.
Definition: txop.cc:136
ns3::HeCapabilities::SetLdpcCodingInPayload
void SetLdpcCodingInPayload(uint8_t ldpcCodingInPayload)
Set indication whether the transmission and reception of LDPC encoded packets is supported.
Definition: he-capabilities.cc:430
ns3::RegularWifiMac::GetHeCapabilities
HeCapabilities GetHeCapabilities(void) const
Return the HE capabilities of the device.
Definition: regular-wifi-mac.cc:337
ns3::RegularWifiMac::m_feManager
Ptr< FrameExchangeManager > m_feManager
Frame Exchange Manager.
Definition: regular-wifi-mac.h:221
ns3::RegularWifiMac::SetDsssSupported
void SetDsssSupported(bool enable)
Enable or disable DSSS support for the device.
Definition: regular-wifi-mac.cc:694
ns3::RegularWifiMac::SetBkBlockAckThreshold
void SetBkBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_BK.
Definition: regular-wifi-mac.cc:424
ns3::WifiActionHeader::GetCategory
CategoryValue GetCategory()
Return the category value.
Definition: mgt-headers.cc:1226
ns3::Packet::Copy
Ptr< Packet > Copy(void) const
performs a COW copy of the packet.
Definition: packet.cc:121
ns3::RegularWifiMac::SetForwardUpCallback
void SetForwardUpCallback(ForwardUpCallback upCallback) override
Definition: regular-wifi-mac.cc:591
ns3::RegularWifiMac::m_txOkCallback
TracedCallback< const WifiMacHeader & > m_txOkCallback
transmit OK callback
Definition: regular-wifi-mac.h:447
ns3::HtCapabilities::SetSupportedChannelWidth
void SetSupportedChannelWidth(uint8_t supportedChannelWidth)
Set the supported channel width field.
Definition: ht-capabilities.cc:114
ns3::RegularWifiMac::RegularWifiMac
RegularWifiMac()
Definition: regular-wifi-mac.cc:48
ns3::RegularWifiMac::SetWifiPhy
void SetWifiPhy(const Ptr< WifiPhy > phy) override
Definition: regular-wifi-mac.cc:564
ns3::HtCapabilities::SetShortGuardInterval20
void SetShortGuardInterval20(uint8_t shortGuardInterval)
Set the short guard interval 20 field.
Definition: ht-capabilities.cc:120
ns3::RegularWifiMac::GetBKQueue
Ptr< QosTxop > GetBKQueue(void) const
Accessor for the AC_BK channel access function.
Definition: regular-wifi-mac.cc:546
ns3::RegularWifiMac::SetShortSlotTimeSupported
void SetShortSlotTimeSupported(bool enable) override
Enable or disable short slot time feature.
Definition: regular-wifi-mac.cc:764
ns3::HtCapabilities::SetLSigProtectionSupport
void SetLSigProtectionSupport(uint8_t lSigProtection)
Set the LSIG protection support.
Definition: ht-capabilities.cc:140
third.ssid
ssid
Definition: third.py:100
ns3::WifiPhy::GetChannelWidth
uint16_t GetChannelWidth(void) const
Definition: wifi-phy.cc:1233
ns3::RegularWifiMac::DoInitialize
void DoInitialize() override
Initialize() implementation.
Definition: regular-wifi-mac.cc:68
ns3::AcIndex
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
Definition: qos-utils.h:71
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::RegularWifiMac::m_txMiddle
Ptr< MacTxMiddle > m_txMiddle
TX middle (aggregation etc.)
Definition: regular-wifi-mac.h:218
ns3::WIFI_PHY_BAND_6GHZ
@ WIFI_PHY_BAND_6GHZ
The 6 GHz band.
Definition: wifi-phy-band.h:39
ns3::WifiPhy::GetMaxSupportedRxSpatialStreams
uint8_t GetMaxSupportedRxSpatialStreams(void) const
Definition: wifi-phy.cc:1421
ns3::RegularWifiMac::m_channelAccessManager
Ptr< ChannelAccessManager > m_channelAccessManager
channel access manager
Definition: regular-wifi-mac.h:219
ns3::RegularWifiMac::GetDsssSupported
bool GetDsssSupported() const
Return whether the device supports DSSS.
Definition: regular-wifi-mac.cc:701
ns3::WifiMac::ConfigureDcf
void ConfigureDcf(Ptr< Txop > dcf, uint32_t cwmin, uint32_t cwmax, bool isDsss, AcIndex ac)
Definition: wifi-mac.cc:127
ns3::UintegerValue
Hold an unsigned integer type.
Definition: uinteger.h:44
ns3::RegularWifiMac::GetWifiRemoteStationManager
Ptr< WifiRemoteStationManager > GetWifiRemoteStationManager(void) const override
Definition: regular-wifi-mac.cc:181
ns3::RegularWifiMac::GetVhtCapabilities
VhtCapabilities GetVhtCapabilities(void) const
Return the VHT capabilities of the device.
Definition: regular-wifi-mac.cc:254
ns3::RegularWifiMac::m_nackedMpduCallback
MpduTracedCallback m_nackedMpduCallback
nack'ed MPDU callback
Definition: regular-wifi-mac.h:454
ns3::RegularWifiMac::GetBEQueue
Ptr< QosTxop > GetBEQueue(void) const
Accessor for the AC_BE channel access function.
Definition: regular-wifi-mac.cc:540
ns3::RegularWifiMac::m_phy
Ptr< WifiPhy > m_phy
Wifi PHY.
Definition: regular-wifi-mac.h:220
ns3::WifiActionHeader::BLOCK_ACK_DELBA
@ BLOCK_ACK_DELBA
Definition: mgt-headers.h:948
ns3::VhtCapabilities::SetRxHighestSupportedLgiDataRate
void SetRxHighestSupportedLgiDataRate(uint16_t supportedDatarate)
Set the receive highest supported LGI data rate.
Definition: vht-capabilities.cc:334
ns3::WIFI_STANDARD_80211n_2_4GHZ
@ WIFI_STANDARD_80211n_2_4GHZ
Definition: wifi-standards.h:131
ns3::VhtCapabilities::SetShortGuardIntervalFor160Mhz
void SetShortGuardIntervalFor160Mhz(uint8_t shortGuardInterval)
Set the short guard interval 160 MHz.
Definition: vht-capabilities.cc:248
ns3::WifiStandard
WifiStandard
Identifies the allowed configurations that a Wifi device is configured to use.
Definition: wifi-standards.h:126
ns3::MakeUintegerAccessor
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition: uinteger.h:45
ns3::WIFI_MOD_CLASS_VHT
@ WIFI_MOD_CLASS_VHT
VHT (Clause 22)
Definition: wifi-phy-common.h:131
ns3::VhtCapabilities::SetMaxMpduLength
void SetMaxMpduLength(uint16_t length)
Set the maximum MPDU length.
Definition: vht-capabilities.cc:211
ns3::RegularWifiMac::SetPromisc
void SetPromisc(void) override
Sets the interface in promiscuous mode.
Definition: regular-wifi-mac.cc:757
ns3::RegularWifiMac::~RegularWifiMac
virtual ~RegularWifiMac()
Definition: regular-wifi-mac.cc:62
ns3::VhtCapabilities::SetTxStbc
void SetTxStbc(uint8_t txStbc)
Set the transmit STBC.
Definition: vht-capabilities.cc:260
ns3::RegularWifiMac::GetVOQueue
Ptr< QosTxop > GetVOQueue(void) const
Accessor for the AC_VO channel access function.
Definition: regular-wifi-mac.cc:528
ns3::RegularWifiMac::SetVoBlockAckInactivityTimeout
void SetVoBlockAckInactivityTimeout(uint16_t timeout)
Set VO block ack inactivity timeout.
Definition: regular-wifi-mac.cc:434
ns3::Object::Initialize
void Initialize(void)
Invoke DoInitialize on all Objects aggregated to this one.
Definition: object.cc:183
ns3::Txop::SetTxMiddle
void SetTxMiddle(const Ptr< MacTxMiddle > txMiddle)
Set MacTxMiddle this Txop is associated to.
Definition: txop.cc:129
ns3::WifiMacHeader::GetAddr2
Mac48Address GetAddr2(void) const
Return the address in the Address 2 field.
Definition: wifi-mac-header.cc:430
ns3::WifiPhy::GetMcsList
std::list< WifiMode > GetMcsList(void) const
The WifiPhy::GetMcsList() method is used (e.g., by a WifiRemoteStationManager) to determine the set o...
Definition: wifi-phy.cc:2064
ns3::WifiActionHeader::BLOCK_ACK_ADDBA_RESPONSE
@ BLOCK_ACK_ADDBA_RESPONSE
Definition: mgt-headers.h:947
ns3::RegularWifiMac::GetHtSupported
bool GetHtSupported() const
Return whether the device supports HT.
Definition: regular-wifi-mac.cc:647
channel-access-manager.h
ns3::RegularWifiMac::m_qosSupported
bool m_qosSupported
This Boolean is set true iff this WifiMac is to model 802.11e/WMM style Quality of Service.
Definition: regular-wifi-mac.h:422
ns3::RegularWifiMac::GetVIQueue
Ptr< QosTxop > GetVIQueue(void) const
Accessor for the AC_VI channel access function.
Definition: regular-wifi-mac.cc:534
ns3::RegularWifiMac::Receive
virtual void Receive(Ptr< WifiMacQueueItem > mpdu)
This method acts as the MacRxMiddle receive callback and is invoked to notify us that a frame has bee...
Definition: regular-wifi-mac.cc:802
ns3::WifiMacHeader::IsAction
bool IsAction(void) const
Return true if the header is an Action header.
Definition: wifi-mac-header.cc:729
ns3::HeCapabilities::SetChannelWidthSet
void SetChannelWidthSet(uint8_t channelWidthSet)
Set channel width set.
Definition: he-capabilities.cc:423
third.phy
phy
Definition: third.py:93
ns3::RegularWifiMac::m_forwardUp
ForwardUpCallback m_forwardUp
Callback to forward packet up the stack.
Definition: regular-wifi-mac.h:225
ns3::RegularWifiMac::m_psduResponseTimeoutCallback
PsduResponseTimeoutTracedCallback m_psduResponseTimeoutCallback
PSDU response timeout traced callback.
Definition: regular-wifi-mac.h:508
ns3::RegularWifiMac::SetErpSupported
void SetErpSupported(bool enable)
Enable or disable ERP support for the device.
Definition: regular-wifi-mac.cc:683
ns3::RegularWifiMac::m_ssid
Ssid m_ssid
Service Set ID (SSID)
Definition: regular-wifi-mac.h:229
ns3::WifiActionHeader::BLOCK_ACK
@ BLOCK_ACK
Definition: mgt-headers.h:898
ns3::MgtDelBaHeader::IsByOriginator
bool IsByOriginator(void) const
Check if the initiator bit in the DELBA is set.
Definition: mgt-headers.cc:1866
ns3::HtCapabilities::SetShortGuardInterval40
void SetShortGuardInterval40(uint8_t shortGuardInterval)
Set the short guard interval 40 field.
Definition: ht-capabilities.cc:126
ns3::RegularWifiMac::m_psduMapResponseTimeoutCallback
PsduMapResponseTimeoutTracedCallback m_psduMapResponseTimeoutCallback
PSDU map response timeout traced callback.
Definition: regular-wifi-mac.h:529
ns3::RegularWifiMac::GetWifiPhy
Ptr< WifiPhy > GetWifiPhy(void) const override
Definition: regular-wifi-mac.cc:574
NS_ABORT_MSG
#define NS_ABORT_MSG(msg)
Unconditional abnormal program termination with a message.
Definition: abort.h:50
ns3::Object::IsInitialized
bool IsInitialized(void) const
Check if the object has been initialized.
Definition: object.cc:208