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  if (heConfiguration->GetGuardInterval () == NanoSeconds (800))
362  {
363  //todo: We assume for now that if we support 800ns GI then 1600ns GI is supported as well
364  //todo: Assuming reception support for both 1x HE LTF and 4x HE LTF 800 ns
365  capabilities.SetHeSuPpdu1xHeLtf800nsGi (true);
366  capabilities.SetHePpdu4xHeLtf800nsGi (true);
367  }
368 
369  uint32_t maxAmpduLength = std::max ({m_voMaxAmpduSize, m_viMaxAmpduSize,
371  // round to the next power of two minus one
372  maxAmpduLength = (1ul << static_cast<uint32_t> (std::ceil (std::log2 (maxAmpduLength + 1)))) - 1;
373  // The maximum A-MPDU length in HE capabilities elements ranges from 2^20-1 to 2^23-1
374  capabilities.SetMaxAmpduLength (std::min (std::max (maxAmpduLength, 1048575u), 8388607u));
375 
376  uint8_t maxMcs = 0;
377  for (const auto & mcs : m_phy->GetMcsList (WIFI_MOD_CLASS_HE))
378  {
379  if (mcs.GetMcsValue () > maxMcs)
380  {
381  maxMcs = mcs.GetMcsValue ();
382  }
383  }
384  capabilities.SetHighestMcsSupported (maxMcs);
386  }
387  return capabilities;
388 }
389 
390 void
392 {
393  NS_LOG_FUNCTION (this << +threshold);
394  if (m_qosSupported)
395  {
396  GetVOQueue ()->SetBlockAckThreshold (threshold);
397  }
398 }
399 
400 void
402 {
403  NS_LOG_FUNCTION (this << +threshold);
404  if (m_qosSupported)
405  {
406  GetVIQueue ()->SetBlockAckThreshold (threshold);
407  }
408 }
409 
410 void
412 {
413  NS_LOG_FUNCTION (this << +threshold);
414  if (m_qosSupported)
415  {
416  GetBEQueue ()->SetBlockAckThreshold (threshold);
417  }
418 }
419 
420 void
422 {
423  NS_LOG_FUNCTION (this << +threshold);
424  if (m_qosSupported)
425  {
426  GetBKQueue ()->SetBlockAckThreshold (threshold);
427  }
428 }
429 
430 void
432 {
433  NS_LOG_FUNCTION (this << timeout);
434  if (m_qosSupported)
435  {
437  }
438 }
439 
440 void
442 {
443  NS_LOG_FUNCTION (this << timeout);
444  if (m_qosSupported)
445  {
447  }
448 }
449 
450 void
452 {
453  NS_LOG_FUNCTION (this << timeout);
454  if (m_qosSupported)
455  {
457  }
458 }
459 
460 void
462 {
463  NS_LOG_FUNCTION (this << timeout);
464  if (m_qosSupported)
465  {
467  }
468 }
469 
470 void
472 {
473  NS_LOG_FUNCTION (this << ac);
474 
475  //Our caller shouldn't be attempting to setup a queue that is
476  //already configured.
477  NS_ASSERT (m_edca.find (ac) == m_edca.end ());
478 
479  Ptr<QosTxop> edca = CreateObject<QosTxop> (ac);
481  edca->SetWifiMac (this);
482  edca->SetTxMiddle (m_txMiddle);
483  edca->GetBaManager ()->SetTxOkCallback (MakeCallback (&MpduTracedCallback::operator(),
485  edca->GetBaManager ()->SetTxFailedCallback (MakeCallback (&MpduTracedCallback::operator(),
487  edca->SetDroppedMpduCallback (MakeCallback (&DroppedMpduTracedCallback::operator(),
489 
490  m_edca.insert (std::make_pair (ac, edca));
491 }
492 
493 void
495 {
496  NS_LOG_FUNCTION (this << type);
497  m_typeOfStation = type;
498 }
499 
502 {
503  return m_typeOfStation;
504 }
505 
506 Ptr<Txop>
508 {
509  return m_txop;
510 }
511 
514 {
515  return m_edca.find (ac)->second;
516 }
517 
519 RegularWifiMac::GetQosTxop (uint8_t tid) const
520 {
521  return GetQosTxop (QosUtilsMapTidToAc (tid));
522 }
523 
526 {
527  return (m_qosSupported ? m_edca.find (AC_VO)->second : nullptr);
528 }
529 
532 {
533  return (m_qosSupported ? m_edca.find (AC_VI)->second : nullptr);
534 }
535 
538 {
539  return (m_qosSupported ? m_edca.find (AC_BE)->second : nullptr);
540 }
541 
544 {
545  return (m_qosSupported ? m_edca.find (AC_BK)->second : nullptr);
546 }
547 
550 {
551  if (ac == AC_BE_NQOS)
552  {
553  NS_ASSERT (m_txop != nullptr);
554  return m_txop->GetWifiMacQueue ();
555  }
556  NS_ASSERT (ac == AC_BE || ac == AC_BK || ac == AC_VI || ac == AC_VO);
557  return m_edca.find (ac)->second->GetWifiMacQueue ();
558 }
559 
560 void
562 {
563  NS_LOG_FUNCTION (this << phy);
564  m_phy = phy;
565  m_channelAccessManager->SetupPhyListener (phy);
566  NS_ASSERT (m_feManager != 0);
567  m_feManager->SetWifiPhy (phy);
568 }
569 
572 {
573  NS_LOG_FUNCTION (this);
574  return m_phy;
575 }
576 
577 void
579 {
580  NS_LOG_FUNCTION (this);
581  NS_ASSERT (m_feManager != 0);
582  m_feManager->ResetPhy ();
583  m_channelAccessManager->RemovePhyListener (m_phy);
584  m_phy = 0;
585 }
586 
587 void
589 {
590  NS_LOG_FUNCTION (this);
591  m_forwardUp = upCallback;
592 }
593 
594 void
596 {
597  NS_LOG_FUNCTION (this);
598  m_linkUp = linkUp;
599 }
600 
601 void
603 {
604  NS_LOG_FUNCTION (this);
605  m_linkDown = linkDown;
606 }
607 
608 void
610 {
611  NS_LOG_FUNCTION (this << enable);
613  m_qosSupported = enable;
614 
615  if (!m_qosSupported)
616  {
617  // create a non-QoS TXOP
618  m_txop = CreateObject<Txop> ();
620  m_txop->SetWifiMac (this);
622  m_txop->SetDroppedMpduCallback (MakeCallback (&DroppedMpduTracedCallback::operator(),
624  }
625  else
626  {
627  //Construct the EDCAFs. The ordering is important - highest
628  //priority (Table 9-1 UP-to-AC mapping; IEEE 802.11-2012) must be created
629  //first.
634  }
635 }
636 
637 bool
639 {
640  return m_qosSupported;
641 }
642 
643 bool
645 {
646  if (GetHtConfiguration ())
647  {
648  return true;
649  }
650  return false;
651 }
652 
653 bool
655 {
656  if (GetVhtConfiguration ())
657  {
658  return true;
659  }
660  return false;
661 }
662 
663 bool
665 {
666  if (GetHeConfiguration ())
667  {
668  return true;
669  }
670  return false;
671 }
672 
673 bool
675 {
676  return m_erpSupported;
677 }
678 
679 void
681 {
682  NS_LOG_FUNCTION (this);
683  if (enable)
684  {
685  SetDsssSupported (true);
686  }
687  m_erpSupported = enable;
688 }
689 
690 void
692 {
693  NS_LOG_FUNCTION (this);
694  m_dsssSupported = enable;
695 }
696 
697 bool
699 {
700  return m_dsssSupported;
701 }
702 
703 void
705 {
706  NS_LOG_FUNCTION (this);
707  m_ctsToSelfSupported = enable;
708 }
709 
710 void
712 {
713  NS_LOG_FUNCTION (this << address);
714  m_address = address;
715 }
716 
719 {
720  return m_address;
721 }
722 
723 void
725 {
726  NS_LOG_FUNCTION (this << ssid);
727  m_ssid = ssid;
728 }
729 
730 Ssid
732 {
733  return m_ssid;
734 }
735 
736 void
738 {
739  NS_LOG_FUNCTION (this << bssid);
740  m_bssid = bssid;
741  if (m_feManager)
742  {
743  m_feManager->SetBssid (bssid);
744  }
745 }
746 
749 {
750  return m_bssid;
751 }
752 
753 void
755 {
756  NS_ASSERT (m_feManager != 0);
757  m_feManager->SetPromisc ();
758 }
759 
760 void
762 {
763  NS_LOG_FUNCTION (this << enable);
764  m_shortSlotTimeSupported = enable;
765 }
766 
767 bool
769 {
771 }
772 
773 void
775  Mac48Address to, Mac48Address from)
776 {
777  //We expect RegularWifiMac subclasses which do support forwarding (e.g.,
778  //AP) to override this method. Therefore, we throw a fatal error if
779  //someone tries to invoke this method on a class which has not done
780  //this.
781  NS_FATAL_ERROR ("This MAC entity (" << this << ", " << GetAddress ()
782  << ") does not support Enqueue() with from address");
783 }
784 
785 bool
787 {
788  return false;
789 }
790 
791 void
793 {
794  NS_LOG_FUNCTION (this << packet << from << to);
795  m_forwardUp (packet, from, to);
796 }
797 
798 void
800 {
801  NS_LOG_FUNCTION (this << *mpdu);
802 
803  const WifiMacHeader* hdr = &mpdu->GetHeader ();
804  Ptr<Packet> packet = mpdu->GetPacket ()->Copy ();
805  Mac48Address to = hdr->GetAddr1 ();
806  Mac48Address from = hdr->GetAddr2 ();
807 
808  //We don't know how to deal with any frame that is not addressed to
809  //us (and odds are there is nothing sensible we could do anyway),
810  //so we ignore such frames.
811  //
812  //The derived class may also do some such filtering, but it doesn't
813  //hurt to have it here too as a backstop.
814  if (to != GetAddress ())
815  {
816  return;
817  }
818 
819  if (hdr->IsMgt () && hdr->IsAction ())
820  {
821  //There is currently only any reason for Management Action
822  //frames to be flying about if we are a QoS STA.
824 
825  WifiActionHeader actionHdr;
826  packet->RemoveHeader (actionHdr);
827 
828  switch (actionHdr.GetCategory ())
829  {
831 
832  switch (actionHdr.GetAction ().blockAck)
833  {
835  {
836  MgtAddBaRequestHeader reqHdr;
837  packet->RemoveHeader (reqHdr);
838 
839  //We've received an ADDBA Request. Our policy here is
840  //to automatically accept it, so we get the ADDBA
841  //Response on it's way immediately.
842  NS_ASSERT (m_feManager != 0);
843  Ptr<HtFrameExchangeManager> htFem = DynamicCast<HtFrameExchangeManager> (m_feManager);
844  if (htFem != 0)
845  {
846  htFem->SendAddBaResponse (&reqHdr, from);
847  }
848  //This frame is now completely dealt with, so we're done.
849  return;
850  }
852  {
853  MgtAddBaResponseHeader respHdr;
854  packet->RemoveHeader (respHdr);
855 
856  //We've received an ADDBA Response. We assume that it
857  //indicates success after an ADDBA Request we have
858  //sent (we could, in principle, check this, but it
859  //seems a waste given the level of the current model)
860  //and act by locally establishing the agreement on
861  //the appropriate queue.
862  AcIndex ac = QosUtilsMapTidToAc (respHdr.GetTid ());
863  m_edca[ac]->GotAddBaResponse (&respHdr, from);
864  //This frame is now completely dealt with, so we're done.
865  return;
866  }
868  {
869  MgtDelBaHeader delBaHdr;
870  packet->RemoveHeader (delBaHdr);
871 
872  if (delBaHdr.IsByOriginator ())
873  {
874  //This DELBA frame was sent by the originator, so
875  //this means that an ingoing established
876  //agreement exists in HtFrameExchangeManager and we need to
877  //destroy it.
878  NS_ASSERT (m_feManager != 0);
879  Ptr<HtFrameExchangeManager> htFem = DynamicCast<HtFrameExchangeManager> (m_feManager);
880  if (htFem != 0)
881  {
882  htFem->DestroyBlockAckAgreement (from, delBaHdr.GetTid ());
883  }
884  }
885  else
886  {
887  //We must have been the originator. We need to
888  //tell the correct queue that the agreement has
889  //been torn down
890  AcIndex ac = QosUtilsMapTidToAc (delBaHdr.GetTid ());
891  m_edca[ac]->GotDelBaFrame (&delBaHdr, from);
892  }
893  //This frame is now completely dealt with, so we're done.
894  return;
895  }
896  default:
897  NS_FATAL_ERROR ("Unsupported Action field in Block Ack Action frame");
898  return;
899  }
900  default:
901  NS_FATAL_ERROR ("Unsupported Action frame received");
902  return;
903  }
904  }
905  NS_FATAL_ERROR ("Don't know how to handle frame (type=" << hdr->GetType ());
906 }
907 
908 void
910 {
911  NS_LOG_FUNCTION (this << *mpdu);
912  for (auto& msduPair : *PeekPointer (mpdu))
913  {
914  ForwardUp (msduPair.first, msduPair.second.GetSourceAddr (),
915  msduPair.second.GetDestinationAddr ());
916  }
917 }
918 
919 TypeId
921 {
922  static TypeId tid = TypeId ("ns3::RegularWifiMac")
923  .SetParent<WifiMac> ()
924  .SetGroupName ("Wifi")
925  .AddAttribute ("QosSupported",
926  "This Boolean attribute is set to enable 802.11e/WMM-style QoS support at this STA.",
927  TypeId::ATTR_GET | TypeId::ATTR_CONSTRUCT, // prevent setting after construction
928  BooleanValue (false),
932  .AddAttribute ("CtsToSelfSupported",
933  "Use CTS to Self when using a rate that is not in the basic rate set.",
934  BooleanValue (false),
937  .AddAttribute ("VO_MaxAmsduSize",
938  "Maximum length in bytes of an A-MSDU for AC_VO access class "
939  "(capped to 7935 for HT PPDUs and 11398 for VHT/HE PPDUs). "
940  "Value 0 means A-MSDU aggregation is disabled for that AC.",
941  UintegerValue (0),
943  MakeUintegerChecker<uint16_t> (0, 11398))
944  .AddAttribute ("VI_MaxAmsduSize",
945  "Maximum length in bytes of an A-MSDU for AC_VI access class "
946  "(capped to 7935 for HT PPDUs and 11398 for VHT/HE PPDUs). "
947  "Value 0 means A-MSDU aggregation is disabled for that AC.",
948  UintegerValue (0),
950  MakeUintegerChecker<uint16_t> (0, 11398))
951  .AddAttribute ("BE_MaxAmsduSize",
952  "Maximum length in bytes of an A-MSDU for AC_BE access class "
953  "(capped to 7935 for HT PPDUs and 11398 for VHT/HE PPDUs). "
954  "Value 0 means A-MSDU aggregation is disabled for that AC.",
955  UintegerValue (0),
957  MakeUintegerChecker<uint16_t> (0, 11398))
958  .AddAttribute ("BK_MaxAmsduSize",
959  "Maximum length in bytes of an A-MSDU for AC_BK access class "
960  "(capped to 7935 for HT PPDUs and 11398 for VHT/HE PPDUs). "
961  "Value 0 means A-MSDU aggregation is disabled for that AC.",
962  UintegerValue (0),
964  MakeUintegerChecker<uint16_t> (0, 11398))
965  .AddAttribute ("VO_MaxAmpduSize",
966  "Maximum length in bytes of an A-MPDU for AC_VO access class "
967  "(capped to 65535 for HT PPDUs, 1048575 for VHT PPDUs, and 6500631 for HE PPDUs). "
968  "Value 0 means A-MPDU aggregation is disabled for that AC.",
969  UintegerValue (0),
971  MakeUintegerChecker<uint32_t> (0, 6500631))
972  .AddAttribute ("VI_MaxAmpduSize",
973  "Maximum length in bytes of an A-MPDU for AC_VI access class "
974  "(capped to 65535 for HT PPDUs, 1048575 for VHT PPDUs, and 6500631 for HE PPDUs). "
975  "Value 0 means A-MPDU aggregation is disabled for that AC.",
976  UintegerValue (65535),
978  MakeUintegerChecker<uint32_t> (0, 6500631))
979  .AddAttribute ("BE_MaxAmpduSize",
980  "Maximum length in bytes of an A-MPDU for AC_BE access class "
981  "(capped to 65535 for HT PPDUs, 1048575 for VHT PPDUs, and 6500631 for HE PPDUs). "
982  "Value 0 means A-MPDU aggregation is disabled for that AC.",
983  UintegerValue (65535),
985  MakeUintegerChecker<uint32_t> (0, 6500631))
986  .AddAttribute ("BK_MaxAmpduSize",
987  "Maximum length in bytes of an A-MPDU for AC_BK access class "
988  "(capped to 65535 for HT PPDUs, 1048575 for VHT PPDUs, and 6500631 for HE PPDUs). "
989  "Value 0 means A-MPDU aggregation is disabled for that AC.",
990  UintegerValue (0),
992  MakeUintegerChecker<uint32_t> (0, 6500631))
993  .AddAttribute ("VO_BlockAckThreshold",
994  "If number of packets in VO queue reaches this value, "
995  "block ack mechanism is used. If this value is 0, block ack is never used."
996  "When A-MPDU is enabled, block ack mechanism is used regardless of this value.",
997  UintegerValue (0),
999  MakeUintegerChecker<uint8_t> (0, 64))
1000  .AddAttribute ("VI_BlockAckThreshold",
1001  "If number of packets in VI queue reaches this value, "
1002  "block ack mechanism is used. If this value is 0, block ack is never used."
1003  "When A-MPDU is enabled, block ack mechanism is used regardless of this value.",
1004  UintegerValue (0),
1006  MakeUintegerChecker<uint8_t> (0, 64))
1007  .AddAttribute ("BE_BlockAckThreshold",
1008  "If number of packets in BE queue reaches this value, "
1009  "block ack mechanism is used. If this value is 0, block ack is never used."
1010  "When A-MPDU is enabled, block ack mechanism is used regardless of this value.",
1011  UintegerValue (0),
1013  MakeUintegerChecker<uint8_t> (0, 64))
1014  .AddAttribute ("BK_BlockAckThreshold",
1015  "If number of packets in BK queue reaches this value, "
1016  "block ack mechanism is used. If this value is 0, block ack is never used."
1017  "When A-MPDU is enabled, block ack mechanism is used regardless of this value.",
1018  UintegerValue (0),
1020  MakeUintegerChecker<uint8_t> (0, 64))
1021  .AddAttribute ("VO_BlockAckInactivityTimeout",
1022  "Represents max time (blocks of 1024 microseconds) allowed for block ack"
1023  "inactivity for AC_VO. If this value isn't equal to 0 a timer start after that a"
1024  "block ack setup is completed and will be reset every time that a block ack"
1025  "frame is received. If this value is 0, block ack inactivity timeout won't be used.",
1026  UintegerValue (0),
1028  MakeUintegerChecker<uint16_t> ())
1029  .AddAttribute ("VI_BlockAckInactivityTimeout",
1030  "Represents max time (blocks of 1024 microseconds) allowed for block ack"
1031  "inactivity for AC_VI. If this value isn't equal to 0 a timer start after that a"
1032  "block ack setup is completed and will be reset every time that a block ack"
1033  "frame is received. If this value is 0, block ack inactivity timeout won't be used.",
1034  UintegerValue (0),
1036  MakeUintegerChecker<uint16_t> ())
1037  .AddAttribute ("BE_BlockAckInactivityTimeout",
1038  "Represents max time (blocks of 1024 microseconds) allowed for block ack"
1039  "inactivity for AC_BE. If this value isn't equal to 0 a timer start after that a"
1040  "block ack setup is completed and will be reset every time that a block ack"
1041  "frame is received. If this value is 0, block ack inactivity timeout won't be used.",
1042  UintegerValue (0),
1044  MakeUintegerChecker<uint16_t> ())
1045  .AddAttribute ("BK_BlockAckInactivityTimeout",
1046  "Represents max time (blocks of 1024 microseconds) allowed for block ack"
1047  "inactivity for AC_BK. If this value isn't equal to 0 a timer start after that a"
1048  "block ack setup is completed and will be reset every time that a block ack"
1049  "frame is received. If this value is 0, block ack inactivity timeout won't be used.",
1050  UintegerValue (0),
1052  MakeUintegerChecker<uint16_t> ())
1053  .AddAttribute ("ShortSlotTimeSupported",
1054  "Whether or not short slot time is supported (only used by ERP APs or STAs).",
1055  BooleanValue (true),
1058  MakeBooleanChecker ())
1059  .AddAttribute ("Txop",
1060  "The Txop object.",
1061  PointerValue (),
1063  MakePointerChecker<Txop> ())
1064  .AddAttribute ("VO_Txop",
1065  "Queue that manages packets belonging to AC_VO access class.",
1066  PointerValue (),
1068  MakePointerChecker<QosTxop> ())
1069  .AddAttribute ("VI_Txop",
1070  "Queue that manages packets belonging to AC_VI access class.",
1071  PointerValue (),
1073  MakePointerChecker<QosTxop> ())
1074  .AddAttribute ("BE_Txop",
1075  "Queue that manages packets belonging to AC_BE access class.",
1076  PointerValue (),
1078  MakePointerChecker<QosTxop> ())
1079  .AddAttribute ("BK_Txop",
1080  "Queue that manages packets belonging to AC_BK access class.",
1081  PointerValue (),
1083  MakePointerChecker<QosTxop> ())
1084  .AddTraceSource ("TxOkHeader",
1085  "The header of successfully transmitted packet.",
1087  "ns3::WifiMacHeader::TracedCallback",
1089  "Use the AckedMpdu trace instead.")
1090  .AddTraceSource ("TxErrHeader",
1091  "The header of unsuccessfully transmitted packet.",
1093  "ns3::WifiMacHeader::TracedCallback",
1095  "Depending on the failure type, use the NAckedMpdu trace, the "
1096  "DroppedMpdu trace or one of the traces associated with TX timeouts.")
1097  .AddTraceSource ("AckedMpdu",
1098  "An MPDU that was successfully acknowledged, via either a "
1099  "Normal Ack or a Block Ack.",
1101  "ns3::WifiMacQueueItem::TracedCallback")
1102  .AddTraceSource ("NAckedMpdu",
1103  "An MPDU that was negatively acknowledged via a Block Ack.",
1105  "ns3::WifiMacQueueItem::TracedCallback")
1106  .AddTraceSource ("DroppedMpdu",
1107  "An MPDU that was dropped for the given reason (see WifiMacDropReason).",
1109  "ns3::RegularWifiMac::DroppedMpduCallback")
1110  .AddTraceSource ("MpduResponseTimeout",
1111  "An MPDU whose response was not received before the timeout, along with "
1112  "an identifier of the type of timeout (see WifiTxTimer::Reason) and the "
1113  "TXVECTOR used to transmit the MPDU. This trace source is fired when a "
1114  "CTS is missing after an RTS or a Normal Ack is missing after an MPDU "
1115  "or after a DL MU PPDU acknowledged in SU format.",
1117  "ns3::RegularWifiMac::MpduResponseTimeoutCallback")
1118  .AddTraceSource ("PsduResponseTimeout",
1119  "A PSDU whose response was not received before the timeout, along with "
1120  "an identifier of the type of timeout (see WifiTxTimer::Reason) and the "
1121  "TXVECTOR used to transmit the PSDU. This trace source is fired when a "
1122  "BlockAck is missing after an A-MPDU, a BlockAckReq (possibly in the "
1123  "context of the acknowledgment of a DL MU PPDU in SU format) or a TB PPDU "
1124  "(in the latter case the missing BlockAck is a Multi-STA BlockAck).",
1126  "ns3::RegularWifiMac::PsduResponseTimeoutCallback")
1127  .AddTraceSource ("PsduMapResponseTimeout",
1128  "A PSDU map for which not all the responses were received before the timeout, "
1129  "along with an identifier of the type of timeout (see WifiTxTimer::Reason), "
1130  "the set of MAC addresses of the stations that did not respond and the total "
1131  "number of stations that had to respond. This trace source is fired when not "
1132  "all the addressed stations responded to an MU-BAR Trigger frame (either sent as "
1133  "a SU frame or aggregated to PSDUs in the DL MU PPDU), a Basic Trigger Frame or "
1134  "a BSRP Trigger Frame.",
1136  "ns3::RegularWifiMac::PsduMapResponseTimeoutCallback")
1137  ;
1138  return tid;
1139 }
1140 
1141 void
1143 {
1144  NS_LOG_FUNCTION (this << standard);
1145  uint32_t cwmin = 0;
1146  uint32_t cwmax = 0;
1147  switch (standard)
1148  {
1150  case WIFI_STANDARD_80211ac:
1153  {
1155  cwmin = 15;
1156  cwmax = 1023;
1157  break;
1158  }
1161  {
1163  }
1164  case WIFI_STANDARD_80211g:
1165  SetErpSupported (true);
1166  case WIFI_STANDARD_80211a:
1167  case WIFI_STANDARD_80211p:
1168  cwmin = 15;
1169  cwmax = 1023;
1170  break;
1171  case WIFI_STANDARD_80211b:
1172  SetDsssSupported (true);
1173  cwmin = 31;
1174  cwmax = 1023;
1175  break;
1176  default:
1177  NS_FATAL_ERROR ("Unsupported WifiPhyStandard in RegularWifiMac::FinishConfigureStandard ()");
1178  }
1179 
1181  ConfigureContentionWindow (cwmin, cwmax);
1182 }
1183 
1184 void
1185 RegularWifiMac::ConfigureContentionWindow (uint32_t cwMin, uint32_t cwMax)
1186 {
1187  bool isDsssOnly = m_dsssSupported && !m_erpSupported;
1188  if (m_txop != nullptr)
1189  {
1190  //The special value of AC_BE_NQOS which exists in the Access
1191  //Category enumeration allows us to configure plain old DCF.
1192  ConfigureDcf (m_txop, cwMin, cwMax, isDsssOnly, AC_BE_NQOS);
1193  }
1194 
1195  //Now we configure the EDCA functions
1196  for (EdcaQueues::const_iterator i = m_edca.begin (); i != m_edca.end (); ++i)
1197  {
1198  ConfigureDcf (i->second, cwMin, cwMax, isDsssOnly, i->first);
1199  }
1200 }
1201 
1202 uint32_t
1204 {
1205  uint32_t maxSize = 0;
1206  switch (ac)
1207  {
1208  case AC_BE:
1209  maxSize = m_beMaxAmpduSize;
1210  break;
1211  case AC_BK:
1212  maxSize = m_bkMaxAmpduSize;
1213  break;
1214  case AC_VI:
1215  maxSize = m_viMaxAmpduSize;
1216  break;
1217  case AC_VO:
1218  maxSize = m_voMaxAmpduSize;
1219  break;
1220  default:
1221  NS_ABORT_MSG ("Unknown AC " << ac);
1222  return 0;
1223  }
1224  return maxSize;
1225 }
1226 
1227 uint16_t
1229 {
1230  uint16_t maxSize = 0;
1231  switch (ac)
1232  {
1233  case AC_BE:
1234  maxSize = m_beMaxAmsduSize;
1235  break;
1236  case AC_BK:
1237  maxSize = m_bkMaxAmsduSize;
1238  break;
1239  case AC_VI:
1240  maxSize = m_viMaxAmsduSize;
1241  break;
1242  case AC_VO:
1243  maxSize = m_voMaxAmsduSize;
1244  break;
1245  default:
1246  NS_ABORT_MSG ("Unknown AC " << ac);
1247  return 0;
1248  }
1249  return maxSize;
1250 }
1251 
1252 } //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:471
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
ns3::HeCapabilities::SetHePpdu4xHeLtf800nsGi
void SetHePpdu4xHeLtf800nsGi(bool heSuPpdu4xHeLtf800nsGi)
Set 4xHE-LTF and 800ns GI in HE SU PPDU and HE MU PPDU reception support.
Definition: he-capabilities.cc:567
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:451
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:441
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:731
ns3::HeCapabilities::SetHeSupported
void SetHeSupported(uint8_t heSupported)
Set HE supported.
Definition: he-capabilities.cc:140
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::WifiMac::DoDispose
virtual void DoDispose()
Destructor implementation.
Definition: wifi-mac.cc:79
ns3::RegularWifiMac::SetBssid
void SetBssid(Mac48Address bssid)
Definition: regular-wifi-mac.cc:737
ns3::RegularWifiMac::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition: regular-wifi-mac.cc:920
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:594
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:513
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:664
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:602
ns3::WifiMac::GetVhtConfiguration
Ptr< VhtConfiguration > GetVhtConfiguration(void) const
Definition: wifi-mac.cc:193
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:748
ns3::RegularWifiMac::GetErpSupported
bool GetErpSupported() const
Return whether the device supports ERP.
Definition: regular-wifi-mac.cc:674
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:1203
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:595
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:909
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:638
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:724
ns3::WifiPhy::GetNMcs
uint16_t GetNMcs(void) const
Definition: wifi-phy.cc:2051
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:1228
ns3::RegularWifiMac::ConfigureContentionWindow
void ConfigureContentionWindow(uint32_t cwMin, uint32_t cwMax)
Definition: regular-wifi-mac.cc:1185
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:718
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:573
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:1404
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:587
ns3::RegularWifiMac::SupportsSendFrom
bool SupportsSendFrom(void) const override
Definition: regular-wifi-mac.cc:786
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:654
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:578
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:711
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:768
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:507
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:199
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:1125
ns3::RegularWifiMac::SetVoBlockAckThreshold
void SetVoBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_VO.
Definition: regular-wifi-mac.cc:391
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:494
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:411
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:792
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:549
ns3::RegularWifiMac::SetBkBlockAckInactivityTimeout
void SetBkBlockAckInactivityTimeout(uint16_t timeout)
Set BK block ack inactivity timeout.
Definition: regular-wifi-mac.cc:461
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:501
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:401
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:609
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:1142
ns3::RegularWifiMac::SetCtsToSelfSupported
void SetCtsToSelfSupported(bool enable)
Enable or disable CTS-to-self feature.
Definition: regular-wifi-mac.cc:704
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:774
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:555
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:691
ns3::RegularWifiMac::SetBkBlockAckThreshold
void SetBkBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_BK.
Definition: regular-wifi-mac.cc:421
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:588
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:561
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:543
ns3::RegularWifiMac::SetShortSlotTimeSupported
void SetShortSlotTimeSupported(bool enable) override
Enable or disable short slot time feature.
Definition: regular-wifi-mac.cc:761
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:1234
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:1422
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:698
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:537
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:754
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:525
ns3::RegularWifiMac::SetVoBlockAckInactivityTimeout
void SetVoBlockAckInactivityTimeout(uint16_t timeout)
Set VO block ack inactivity timeout.
Definition: regular-wifi-mac.cc:431
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:2065
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:644
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:531
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:799
ns3::HeCapabilities::SetHeSuPpdu1xHeLtf800nsGi
void SetHeSuPpdu1xHeLtf800nsGi(bool heSuPpdu1xHeLtf800nsGi)
Set 1xHE-LTF and 800ns GI in HE SU PPDU reception support.
Definition: he-capabilities.cc:561
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:548
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:680
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:571
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