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  m_txop = CreateObject<Txop> ();
63  m_txop->SetWifiMac (this);
65  m_txop->SetDroppedMpduCallback (MakeCallback (&DroppedMpduTracedCallback::operator(),
67 
68  //Construct the EDCAFs. The ordering is important - highest
69  //priority (Table 9-1 UP-to-AC mapping; IEEE 802.11-2012) must be created
70  //first.
75 }
76 
78 {
79  NS_LOG_FUNCTION (this);
80 }
81 
82 void
84 {
85  NS_LOG_FUNCTION (this);
86  m_txop->Initialize ();
87 
88  for (EdcaQueues::const_iterator i = m_edca.begin (); i != m_edca.end (); ++i)
89  {
90  i->second->Initialize ();
91  }
92 }
93 
94 void
96 {
97  NS_LOG_FUNCTION (this);
98 
99  m_rxMiddle = 0;
100  m_txMiddle = 0;
101 
102  m_phy = 0;
103  m_stationManager = 0;
104  if (m_feManager != 0)
105  {
106  m_feManager->Dispose ();
107  }
108  m_feManager = 0;
109 
110  m_txop->Dispose ();
111  m_txop = 0;
112 
113  for (EdcaQueues::iterator i = m_edca.begin (); i != m_edca.end (); ++i)
114  {
115  i->second->Dispose ();
116  i->second = 0;
117  }
118 
119  m_channelAccessManager->Dispose ();
121 
123 }
124 
125 void
127 {
128  NS_LOG_FUNCTION (this);
129 
130  if (GetHeSupported ())
131  {
132  m_feManager = CreateObject<HeFrameExchangeManager> ();
133  }
134  else if (GetVhtSupported ())
135  {
136  m_feManager = CreateObject<VhtFrameExchangeManager> ();
137  }
138  else if (GetHtSupported ())
139  {
140  m_feManager = CreateObject<HtFrameExchangeManager> ();
141  }
142  else if (GetQosSupported ())
143  {
144  m_feManager = CreateObject<QosFrameExchangeManager> ();
145  }
146  else
147  {
148  m_feManager = CreateObject<FrameExchangeManager> ();
149  }
150 
151  m_feManager->SetWifiMac (this);
152  m_feManager->SetMacTxMiddle (m_txMiddle);
153  m_feManager->SetMacRxMiddle (m_rxMiddle);
154  m_feManager->SetAddress (GetAddress ());
155  m_feManager->SetBssid (GetBssid ());
156  m_feManager->GetWifiTxTimer ().SetMpduResponseTimeoutCallback (MakeCallback (&MpduResponseTimeoutTracedCallback::operator(),
158  m_feManager->GetWifiTxTimer ().SetPsduResponseTimeoutCallback (MakeCallback (&PsduResponseTimeoutTracedCallback::operator(),
160  m_feManager->GetWifiTxTimer ().SetPsduMapResponseTimeoutCallback (MakeCallback (&PsduMapResponseTimeoutTracedCallback::operator(),
162  m_feManager->SetDroppedMpduCallback (MakeCallback (&DroppedMpduTracedCallback::operator(),
164  m_feManager->SetAckedMpduCallback (MakeCallback (&MpduTracedCallback::operator(),
166  m_channelAccessManager->SetupFrameExchangeManager (m_feManager);
167  if (GetQosSupported ())
168  {
169  for (const auto& pair : m_edca)
170  {
171  pair.second->SetQosFrameExchangeManager (DynamicCast<QosFrameExchangeManager> (m_feManager));
172  }
173  }
174 }
175 
178 {
179  return m_feManager;
180 }
181 
182 void
184 {
185  NS_LOG_FUNCTION (this << stationManager);
186  m_stationManager = stationManager;
187 }
188 
191 {
192  return m_stationManager;
193 }
194 
197 {
198  NS_LOG_FUNCTION (this);
199  ExtendedCapabilities capabilities;
200  capabilities.SetHtSupported (GetHtSupported ());
201  capabilities.SetVhtSupported (GetVhtSupported ());
202  //TODO: to be completed
203  return capabilities;
204 }
205 
208 {
209  NS_LOG_FUNCTION (this);
210  HtCapabilities capabilities;
211  if (GetHtSupported ())
212  {
213  Ptr<HtConfiguration> htConfiguration = GetHtConfiguration ();
214  bool sgiSupported = htConfiguration->GetShortGuardIntervalSupported ();
215  capabilities.SetHtSupported (1);
216  capabilities.SetLdpc (htConfiguration->GetLdpcSupported ());
217  capabilities.SetSupportedChannelWidth (m_phy->GetChannelWidth () >= 40);
218  capabilities.SetShortGuardInterval20 (sgiSupported);
219  capabilities.SetShortGuardInterval40 (m_phy->GetChannelWidth () >= 40 && sgiSupported);
220  // Set Maximum A-MSDU Length subfield
221  uint16_t maxAmsduSize = std::max ({m_voMaxAmsduSize, m_viMaxAmsduSize,
223  if (maxAmsduSize <= 3839)
224  {
225  capabilities.SetMaxAmsduLength (3839);
226  }
227  else
228  {
229  capabilities.SetMaxAmsduLength (7935);
230  }
231  uint32_t maxAmpduLength = std::max ({m_voMaxAmpduSize, m_viMaxAmpduSize,
233  // round to the next power of two minus one
234  maxAmpduLength = (1ul << static_cast<uint32_t> (std::ceil (std::log2 (maxAmpduLength + 1)))) - 1;
235  // The maximum A-MPDU length in HT capabilities elements ranges from 2^13-1 to 2^16-1
236  capabilities.SetMaxAmpduLength (std::min (std::max (maxAmpduLength, 8191u), 65535u));
237 
238  capabilities.SetLSigProtectionSupport (true);
239  uint64_t maxSupportedRate = 0; //in bit/s
240  for (const auto & mcs : m_phy->GetMcsList (WIFI_MOD_CLASS_HT))
241  {
242  capabilities.SetRxMcsBitmask (mcs.GetMcsValue ());
243  uint8_t nss = (mcs.GetMcsValue () / 8) + 1;
244  NS_ASSERT (nss > 0 && nss < 5);
245  uint64_t dataRate = mcs.GetDataRate (m_phy->GetChannelWidth (), sgiSupported ? 400 : 800, nss);
246  if (dataRate > maxSupportedRate)
247  {
248  maxSupportedRate = dataRate;
249  NS_LOG_DEBUG ("Updating maxSupportedRate to " << maxSupportedRate);
250  }
251  }
252  capabilities.SetRxHighestSupportedDataRate (static_cast<uint16_t> (maxSupportedRate / 1e6)); //in Mbit/s
253  capabilities.SetTxMcsSetDefined (m_phy->GetNMcs () > 0);
255  //we do not support unequal modulations
256  capabilities.SetTxRxMcsSetUnequal (0);
257  capabilities.SetTxUnequalModulation (0);
258  }
259  return capabilities;
260 }
261 
264 {
265  NS_LOG_FUNCTION (this);
266  VhtCapabilities capabilities;
267  if (GetVhtSupported ())
268  {
269  Ptr<HtConfiguration> htConfiguration = GetHtConfiguration ();
270  Ptr<VhtConfiguration> vhtConfiguration = GetVhtConfiguration ();
271  bool sgiSupported = htConfiguration->GetShortGuardIntervalSupported ();
272  capabilities.SetVhtSupported (1);
273  if (m_phy->GetChannelWidth () == 160)
274  {
275  capabilities.SetSupportedChannelWidthSet (1);
276  }
277  else
278  {
279  capabilities.SetSupportedChannelWidthSet (0);
280  }
281  // Set Maximum MPDU Length subfield
282  uint16_t maxAmsduSize = std::max ({m_voMaxAmsduSize, m_viMaxAmsduSize,
284  if (maxAmsduSize <= 3839)
285  {
286  capabilities.SetMaxMpduLength (3895);
287  }
288  else if (maxAmsduSize <= 7935)
289  {
290  capabilities.SetMaxMpduLength (7991);
291  }
292  else
293  {
294  capabilities.SetMaxMpduLength (11454);
295  }
296  uint32_t maxAmpduLength = std::max ({m_voMaxAmpduSize, m_viMaxAmpduSize,
298  // round to the next power of two minus one
299  maxAmpduLength = (1ul << static_cast<uint32_t> (std::ceil (std::log2 (maxAmpduLength + 1)))) - 1;
300  // The maximum A-MPDU length in VHT capabilities elements ranges from 2^13-1 to 2^20-1
301  capabilities.SetMaxAmpduLength (std::min (std::max (maxAmpduLength, 8191u), 1048575u));
302 
303  capabilities.SetRxLdpc (htConfiguration->GetLdpcSupported ());
304  capabilities.SetShortGuardIntervalFor80Mhz ((m_phy->GetChannelWidth () == 80) && sgiSupported);
305  capabilities.SetShortGuardIntervalFor160Mhz ((m_phy->GetChannelWidth () == 160) && sgiSupported);
306  uint8_t maxMcs = 0;
307  for (const auto & mcs : m_phy->GetMcsList (WIFI_MOD_CLASS_VHT))
308  {
309  if (mcs.GetMcsValue () > maxMcs)
310  {
311  maxMcs = mcs.GetMcsValue ();
312  }
313  }
314  // Support same MaxMCS for each spatial stream
315  for (uint8_t nss = 1; nss <= m_phy->GetMaxSupportedRxSpatialStreams (); nss++)
316  {
317  capabilities.SetRxMcsMap (maxMcs, nss);
318  }
319  for (uint8_t nss = 1; nss <= m_phy->GetMaxSupportedTxSpatialStreams (); nss++)
320  {
321  capabilities.SetTxMcsMap (maxMcs, nss);
322  }
323  uint64_t maxSupportedRateLGI = 0; //in bit/s
324  for (const auto & mcs : m_phy->GetMcsList (WIFI_MOD_CLASS_VHT))
325  {
326  if (!mcs.IsAllowed (m_phy->GetChannelWidth (), 1))
327  {
328  continue;
329  }
330  if (mcs.GetDataRate (m_phy->GetChannelWidth ()) > maxSupportedRateLGI)
331  {
332  maxSupportedRateLGI = mcs.GetDataRate (m_phy->GetChannelWidth ());
333  NS_LOG_DEBUG ("Updating maxSupportedRateLGI to " << maxSupportedRateLGI);
334  }
335  }
336  capabilities.SetRxHighestSupportedLgiDataRate (static_cast<uint16_t> (maxSupportedRateLGI / 1e6)); //in Mbit/s
337  capabilities.SetTxHighestSupportedLgiDataRate (static_cast<uint16_t> (maxSupportedRateLGI / 1e6)); //in Mbit/s
338  //To be filled in once supported
339  capabilities.SetRxStbc (0);
340  capabilities.SetTxStbc (0);
341  }
342  return capabilities;
343 }
344 
347 {
348  NS_LOG_FUNCTION (this);
349  HeCapabilities capabilities;
350  if (GetHeSupported ())
351  {
352  Ptr<HtConfiguration> htConfiguration = GetHtConfiguration ();
353  Ptr<HeConfiguration> heConfiguration = GetHeConfiguration ();
354  capabilities.SetHeSupported (1);
355  uint8_t channelWidthSet = 0;
356  if ((m_phy->GetChannelWidth () >= 40) && (m_phy->GetPhyBand () == WIFI_PHY_BAND_2_4GHZ))
357  {
358  channelWidthSet |= 0x01;
359  }
361  {
362  channelWidthSet |= 0x02;
363  }
364  if ((m_phy->GetChannelWidth () >= 160) && ((m_phy->GetPhyBand () == WIFI_PHY_BAND_5GHZ) || (m_phy->GetPhyBand () == WIFI_PHY_BAND_6GHZ)))
365  {
366  channelWidthSet |= 0x04;
367  }
368  capabilities.SetChannelWidthSet (channelWidthSet);
369  capabilities.SetLdpcCodingInPayload (htConfiguration->GetLdpcSupported ());
370  uint8_t gi = 0;
371  if (heConfiguration->GetGuardInterval () <= NanoSeconds (1600))
372  {
373  //todo: We assume for now that if we support 800ns GI then 1600ns GI is supported as well
374  gi |= 0x01;
375  }
376  if (heConfiguration->GetGuardInterval () == NanoSeconds (800))
377  {
378  gi |= 0x02;
379  }
380  capabilities.SetHeLtfAndGiForHePpdus (gi);
381  uint32_t maxAmpduLength = std::max ({m_voMaxAmpduSize, m_viMaxAmpduSize,
383  // round to the next power of two minus one
384  maxAmpduLength = (1ul << static_cast<uint32_t> (std::ceil (std::log2 (maxAmpduLength + 1)))) - 1;
385  // The maximum A-MPDU length in HE capabilities elements ranges from 2^20-1 to 2^23-1
386  capabilities.SetMaxAmpduLength (std::min (std::max (maxAmpduLength, 1048575u), 8388607u));
387 
388  uint8_t maxMcs = 0;
389  for (const auto & mcs : m_phy->GetMcsList (WIFI_MOD_CLASS_HE))
390  {
391  if (mcs.GetMcsValue () > maxMcs)
392  {
393  maxMcs = mcs.GetMcsValue ();
394  }
395  }
396  capabilities.SetHighestMcsSupported (maxMcs);
398  }
399  return capabilities;
400 }
401 
402 void
404 {
405  NS_LOG_FUNCTION (this << +threshold);
406  GetVOQueue ()->SetBlockAckThreshold (threshold);
407 }
408 
409 void
411 {
412  NS_LOG_FUNCTION (this << +threshold);
413  GetVIQueue ()->SetBlockAckThreshold (threshold);
414 }
415 
416 void
418 {
419  NS_LOG_FUNCTION (this << +threshold);
420  GetBEQueue ()->SetBlockAckThreshold (threshold);
421 }
422 
423 void
425 {
426  NS_LOG_FUNCTION (this << +threshold);
427  GetBKQueue ()->SetBlockAckThreshold (threshold);
428 }
429 
430 void
432 {
433  NS_LOG_FUNCTION (this << timeout);
435 }
436 
437 void
439 {
440  NS_LOG_FUNCTION (this << timeout);
442 }
443 
444 void
446 {
447  NS_LOG_FUNCTION (this << timeout);
449 }
450 
451 void
453 {
454  NS_LOG_FUNCTION (this << timeout);
456 }
457 
458 void
460 {
461  NS_LOG_FUNCTION (this << ac);
462 
463  //Our caller shouldn't be attempting to setup a queue that is
464  //already configured.
465  NS_ASSERT (m_edca.find (ac) == m_edca.end ());
466 
467  Ptr<QosTxop> edca = CreateObject<QosTxop> (ac);
469  edca->SetWifiMac (this);
470  edca->SetTxMiddle (m_txMiddle);
471  edca->GetBaManager ()->SetTxOkCallback (MakeCallback (&MpduTracedCallback::operator(),
473  edca->GetBaManager ()->SetTxFailedCallback (MakeCallback (&MpduTracedCallback::operator(),
475  edca->SetDroppedMpduCallback (MakeCallback (&DroppedMpduTracedCallback::operator(),
477 
478  m_edca.insert (std::make_pair (ac, edca));
479 }
480 
481 void
483 {
484  NS_LOG_FUNCTION (this << type);
485  m_typeOfStation = type;
486 }
487 
490 {
491  return m_typeOfStation;
492 }
493 
494 Ptr<Txop>
496 {
497  return m_txop;
498 }
499 
502 {
503  return m_edca.find (ac)->second;
504 }
505 
507 RegularWifiMac::GetQosTxop (uint8_t tid) const
508 {
509  return GetQosTxop (QosUtilsMapTidToAc (tid));
510 }
511 
514 {
515  return m_edca.find (AC_VO)->second;
516 }
517 
520 {
521  return m_edca.find (AC_VI)->second;
522 }
523 
526 {
527  return m_edca.find (AC_BE)->second;
528 }
529 
532 {
533  return m_edca.find (AC_BK)->second;
534 }
535 
538 {
539  if (ac == AC_BE_NQOS)
540  {
541  return m_txop->GetWifiMacQueue ();
542  }
543  NS_ASSERT (ac == AC_BE || ac == AC_BK || ac == AC_VI || ac == AC_VO);
544  return m_edca.find (ac)->second->GetWifiMacQueue ();
545 }
546 
547 void
549 {
550  NS_LOG_FUNCTION (this << phy);
551  m_phy = phy;
552  m_channelAccessManager->SetupPhyListener (phy);
553  NS_ASSERT (m_feManager != 0);
554  m_feManager->SetWifiPhy (phy);
555 }
556 
559 {
560  NS_LOG_FUNCTION (this);
561  return m_phy;
562 }
563 
564 void
566 {
567  NS_LOG_FUNCTION (this);
568  NS_ASSERT (m_feManager != 0);
569  m_feManager->ResetPhy ();
570  m_channelAccessManager->RemovePhyListener (m_phy);
571  m_phy = 0;
572 }
573 
574 void
576 {
577  NS_LOG_FUNCTION (this);
578  m_forwardUp = upCallback;
579 }
580 
581 void
583 {
584  NS_LOG_FUNCTION (this);
585  m_linkUp = linkUp;
586 }
587 
588 void
590 {
591  NS_LOG_FUNCTION (this);
592  m_linkDown = linkDown;
593 }
594 
595 void
597 {
598  NS_LOG_FUNCTION (this << enable);
599  m_qosSupported = enable;
600 }
601 
602 bool
604 {
605  return m_qosSupported;
606 }
607 
608 bool
610 {
611  if (GetHtConfiguration ())
612  {
613  return true;
614  }
615  return false;
616 }
617 
618 bool
620 {
621  if (GetVhtConfiguration ())
622  {
623  return true;
624  }
625  return false;
626 }
627 
628 bool
630 {
631  if (GetHeConfiguration ())
632  {
633  return true;
634  }
635  return false;
636 }
637 
638 bool
640 {
641  return m_erpSupported;
642 }
643 
644 void
646 {
647  NS_LOG_FUNCTION (this);
648  if (enable)
649  {
650  SetDsssSupported (true);
651  }
652  m_erpSupported = enable;
653 }
654 
655 void
657 {
658  NS_LOG_FUNCTION (this);
659  m_dsssSupported = enable;
660 }
661 
662 bool
664 {
665  return m_dsssSupported;
666 }
667 
668 void
670 {
671  NS_LOG_FUNCTION (this);
672  m_ctsToSelfSupported = enable;
673 }
674 
675 void
677 {
678  NS_LOG_FUNCTION (this << address);
679  m_address = address;
680 }
681 
684 {
685  return m_address;
686 }
687 
688 void
690 {
691  NS_LOG_FUNCTION (this << ssid);
692  m_ssid = ssid;
693 }
694 
695 Ssid
697 {
698  return m_ssid;
699 }
700 
701 void
703 {
704  NS_LOG_FUNCTION (this << bssid);
705  m_bssid = bssid;
706  if (m_feManager)
707  {
708  m_feManager->SetBssid (bssid);
709  }
710 }
711 
714 {
715  return m_bssid;
716 }
717 
718 void
720 {
721  NS_ASSERT (m_feManager != 0);
722  m_feManager->SetPromisc ();
723 }
724 
725 void
727 {
728  NS_LOG_FUNCTION (this << enable);
729  m_shortSlotTimeSupported = enable;
730 }
731 
732 bool
734 {
736 }
737 
738 void
740  Mac48Address to, Mac48Address from)
741 {
742  //We expect RegularWifiMac subclasses which do support forwarding (e.g.,
743  //AP) to override this method. Therefore, we throw a fatal error if
744  //someone tries to invoke this method on a class which has not done
745  //this.
746  NS_FATAL_ERROR ("This MAC entity (" << this << ", " << GetAddress ()
747  << ") does not support Enqueue() with from address");
748 }
749 
750 bool
752 {
753  return false;
754 }
755 
756 void
758 {
759  NS_LOG_FUNCTION (this << packet << from << to);
760  m_forwardUp (packet, from, to);
761 }
762 
763 void
765 {
766  NS_LOG_FUNCTION (this << *mpdu);
767 
768  const WifiMacHeader* hdr = &mpdu->GetHeader ();
769  Ptr<Packet> packet = mpdu->GetPacket ()->Copy ();
770  Mac48Address to = hdr->GetAddr1 ();
771  Mac48Address from = hdr->GetAddr2 ();
772 
773  //We don't know how to deal with any frame that is not addressed to
774  //us (and odds are there is nothing sensible we could do anyway),
775  //so we ignore such frames.
776  //
777  //The derived class may also do some such filtering, but it doesn't
778  //hurt to have it here too as a backstop.
779  if (to != GetAddress ())
780  {
781  return;
782  }
783 
784  if (hdr->IsMgt () && hdr->IsAction ())
785  {
786  //There is currently only any reason for Management Action
787  //frames to be flying about if we are a QoS STA.
789 
790  WifiActionHeader actionHdr;
791  packet->RemoveHeader (actionHdr);
792 
793  switch (actionHdr.GetCategory ())
794  {
796 
797  switch (actionHdr.GetAction ().blockAck)
798  {
800  {
801  MgtAddBaRequestHeader reqHdr;
802  packet->RemoveHeader (reqHdr);
803 
804  //We've received an ADDBA Request. Our policy here is
805  //to automatically accept it, so we get the ADDBA
806  //Response on it's way immediately.
807  NS_ASSERT (m_feManager != 0);
808  Ptr<HtFrameExchangeManager> htFem = DynamicCast<HtFrameExchangeManager> (m_feManager);
809  if (htFem != 0)
810  {
811  htFem->SendAddBaResponse (&reqHdr, from);
812  }
813  //This frame is now completely dealt with, so we're done.
814  return;
815  }
817  {
818  MgtAddBaResponseHeader respHdr;
819  packet->RemoveHeader (respHdr);
820 
821  //We've received an ADDBA Response. We assume that it
822  //indicates success after an ADDBA Request we have
823  //sent (we could, in principle, check this, but it
824  //seems a waste given the level of the current model)
825  //and act by locally establishing the agreement on
826  //the appropriate queue.
827  AcIndex ac = QosUtilsMapTidToAc (respHdr.GetTid ());
828  m_edca[ac]->GotAddBaResponse (&respHdr, from);
829  //This frame is now completely dealt with, so we're done.
830  return;
831  }
833  {
834  MgtDelBaHeader delBaHdr;
835  packet->RemoveHeader (delBaHdr);
836 
837  if (delBaHdr.IsByOriginator ())
838  {
839  //This DELBA frame was sent by the originator, so
840  //this means that an ingoing established
841  //agreement exists in HtFrameExchangeManager and we need to
842  //destroy it.
843  NS_ASSERT (m_feManager != 0);
844  Ptr<HtFrameExchangeManager> htFem = DynamicCast<HtFrameExchangeManager> (m_feManager);
845  if (htFem != 0)
846  {
847  htFem->DestroyBlockAckAgreement (from, delBaHdr.GetTid ());
848  }
849  }
850  else
851  {
852  //We must have been the originator. We need to
853  //tell the correct queue that the agreement has
854  //been torn down
855  AcIndex ac = QosUtilsMapTidToAc (delBaHdr.GetTid ());
856  m_edca[ac]->GotDelBaFrame (&delBaHdr, from);
857  }
858  //This frame is now completely dealt with, so we're done.
859  return;
860  }
861  default:
862  NS_FATAL_ERROR ("Unsupported Action field in Block Ack Action frame");
863  return;
864  }
865  default:
866  NS_FATAL_ERROR ("Unsupported Action frame received");
867  return;
868  }
869  }
870  NS_FATAL_ERROR ("Don't know how to handle frame (type=" << hdr->GetType ());
871 }
872 
873 void
875 {
876  NS_LOG_FUNCTION (this << *mpdu);
877  for (auto& msduPair : *PeekPointer (mpdu))
878  {
879  ForwardUp (msduPair.first, msduPair.second.GetSourceAddr (),
880  msduPair.second.GetDestinationAddr ());
881  }
882 }
883 
884 TypeId
886 {
887  static TypeId tid = TypeId ("ns3::RegularWifiMac")
888  .SetParent<WifiMac> ()
889  .SetGroupName ("Wifi")
890  .AddAttribute ("QosSupported",
891  "This Boolean attribute is set to enable 802.11e/WMM-style QoS support at this STA.",
892  BooleanValue (false),
896  .AddAttribute ("CtsToSelfSupported",
897  "Use CTS to Self when using a rate that is not in the basic rate set.",
898  BooleanValue (false),
901  .AddAttribute ("VO_MaxAmsduSize",
902  "Maximum length in bytes of an A-MSDU for AC_VO access class "
903  "(capped to 7935 for HT PPDUs and 11398 for VHT/HE PPDUs). "
904  "Value 0 means A-MSDU aggregation is disabled for that AC.",
905  UintegerValue (0),
907  MakeUintegerChecker<uint16_t> (0, 11398))
908  .AddAttribute ("VI_MaxAmsduSize",
909  "Maximum length in bytes of an A-MSDU for AC_VI access class "
910  "(capped to 7935 for HT PPDUs and 11398 for VHT/HE PPDUs). "
911  "Value 0 means A-MSDU aggregation is disabled for that AC.",
912  UintegerValue (0),
914  MakeUintegerChecker<uint16_t> (0, 11398))
915  .AddAttribute ("BE_MaxAmsduSize",
916  "Maximum length in bytes of an A-MSDU for AC_BE access class "
917  "(capped to 7935 for HT PPDUs and 11398 for VHT/HE PPDUs). "
918  "Value 0 means A-MSDU aggregation is disabled for that AC.",
919  UintegerValue (0),
921  MakeUintegerChecker<uint16_t> (0, 11398))
922  .AddAttribute ("BK_MaxAmsduSize",
923  "Maximum length in bytes of an A-MSDU for AC_BK access class "
924  "(capped to 7935 for HT PPDUs and 11398 for VHT/HE PPDUs). "
925  "Value 0 means A-MSDU aggregation is disabled for that AC.",
926  UintegerValue (0),
928  MakeUintegerChecker<uint16_t> (0, 11398))
929  .AddAttribute ("VO_MaxAmpduSize",
930  "Maximum length in bytes of an A-MPDU for AC_VO access class "
931  "(capped to 65535 for HT PPDUs, 1048575 for VHT PPDUs, and 6500631 for HE PPDUs). "
932  "Value 0 means A-MPDU aggregation is disabled for that AC.",
933  UintegerValue (0),
935  MakeUintegerChecker<uint32_t> (0, 6500631))
936  .AddAttribute ("VI_MaxAmpduSize",
937  "Maximum length in bytes of an A-MPDU for AC_VI access class "
938  "(capped to 65535 for HT PPDUs, 1048575 for VHT PPDUs, and 6500631 for HE PPDUs). "
939  "Value 0 means A-MPDU aggregation is disabled for that AC.",
940  UintegerValue (65535),
942  MakeUintegerChecker<uint32_t> (0, 6500631))
943  .AddAttribute ("BE_MaxAmpduSize",
944  "Maximum length in bytes of an A-MPDU for AC_BE access class "
945  "(capped to 65535 for HT PPDUs, 1048575 for VHT PPDUs, and 6500631 for HE PPDUs). "
946  "Value 0 means A-MPDU aggregation is disabled for that AC.",
947  UintegerValue (65535),
949  MakeUintegerChecker<uint32_t> (0, 6500631))
950  .AddAttribute ("BK_MaxAmpduSize",
951  "Maximum length in bytes of an A-MPDU for AC_BK access class "
952  "(capped to 65535 for HT PPDUs, 1048575 for VHT PPDUs, and 6500631 for HE PPDUs). "
953  "Value 0 means A-MPDU aggregation is disabled for that AC.",
954  UintegerValue (0),
956  MakeUintegerChecker<uint32_t> (0, 6500631))
957  .AddAttribute ("VO_BlockAckThreshold",
958  "If number of packets in VO queue reaches this value, "
959  "block ack mechanism is used. If this value is 0, block ack is never used."
960  "When A-MPDU is enabled, block ack mechanism is used regardless of this value.",
961  UintegerValue (0),
963  MakeUintegerChecker<uint8_t> (0, 64))
964  .AddAttribute ("VI_BlockAckThreshold",
965  "If number of packets in VI queue reaches this value, "
966  "block ack mechanism is used. If this value is 0, block ack is never used."
967  "When A-MPDU is enabled, block ack mechanism is used regardless of this value.",
968  UintegerValue (0),
970  MakeUintegerChecker<uint8_t> (0, 64))
971  .AddAttribute ("BE_BlockAckThreshold",
972  "If number of packets in BE queue reaches this value, "
973  "block ack mechanism is used. If this value is 0, block ack is never used."
974  "When A-MPDU is enabled, block ack mechanism is used regardless of this value.",
975  UintegerValue (0),
977  MakeUintegerChecker<uint8_t> (0, 64))
978  .AddAttribute ("BK_BlockAckThreshold",
979  "If number of packets in BK queue reaches this value, "
980  "block ack mechanism is used. If this value is 0, block ack is never used."
981  "When A-MPDU is enabled, block ack mechanism is used regardless of this value.",
982  UintegerValue (0),
984  MakeUintegerChecker<uint8_t> (0, 64))
985  .AddAttribute ("VO_BlockAckInactivityTimeout",
986  "Represents max time (blocks of 1024 microseconds) allowed for block ack"
987  "inactivity for AC_VO. If this value isn't equal to 0 a timer start after that a"
988  "block ack setup is completed and will be reset every time that a block ack"
989  "frame is received. If this value is 0, block ack inactivity timeout won't be used.",
990  UintegerValue (0),
992  MakeUintegerChecker<uint16_t> ())
993  .AddAttribute ("VI_BlockAckInactivityTimeout",
994  "Represents max time (blocks of 1024 microseconds) allowed for block ack"
995  "inactivity for AC_VI. If this value isn't equal to 0 a timer start after that a"
996  "block ack setup is completed and will be reset every time that a block ack"
997  "frame is received. If this value is 0, block ack inactivity timeout won't be used.",
998  UintegerValue (0),
1000  MakeUintegerChecker<uint16_t> ())
1001  .AddAttribute ("BE_BlockAckInactivityTimeout",
1002  "Represents max time (blocks of 1024 microseconds) allowed for block ack"
1003  "inactivity for AC_BE. If this value isn't equal to 0 a timer start after that a"
1004  "block ack setup is completed and will be reset every time that a block ack"
1005  "frame is received. If this value is 0, block ack inactivity timeout won't be used.",
1006  UintegerValue (0),
1008  MakeUintegerChecker<uint16_t> ())
1009  .AddAttribute ("BK_BlockAckInactivityTimeout",
1010  "Represents max time (blocks of 1024 microseconds) allowed for block ack"
1011  "inactivity for AC_BK. If this value isn't equal to 0 a timer start after that a"
1012  "block ack setup is completed and will be reset every time that a block ack"
1013  "frame is received. If this value is 0, block ack inactivity timeout won't be used.",
1014  UintegerValue (0),
1016  MakeUintegerChecker<uint16_t> ())
1017  .AddAttribute ("ShortSlotTimeSupported",
1018  "Whether or not short slot time is supported (only used by ERP APs or STAs).",
1019  BooleanValue (true),
1022  MakeBooleanChecker ())
1023  .AddAttribute ("Txop",
1024  "The Txop object.",
1025  PointerValue (),
1027  MakePointerChecker<Txop> ())
1028  .AddAttribute ("VO_Txop",
1029  "Queue that manages packets belonging to AC_VO access class.",
1030  PointerValue (),
1032  MakePointerChecker<QosTxop> ())
1033  .AddAttribute ("VI_Txop",
1034  "Queue that manages packets belonging to AC_VI access class.",
1035  PointerValue (),
1037  MakePointerChecker<QosTxop> ())
1038  .AddAttribute ("BE_Txop",
1039  "Queue that manages packets belonging to AC_BE access class.",
1040  PointerValue (),
1042  MakePointerChecker<QosTxop> ())
1043  .AddAttribute ("BK_Txop",
1044  "Queue that manages packets belonging to AC_BK access class.",
1045  PointerValue (),
1047  MakePointerChecker<QosTxop> ())
1048  .AddTraceSource ("TxOkHeader",
1049  "The header of successfully transmitted packet.",
1051  "ns3::WifiMacHeader::TracedCallback",
1053  "Use the AckedMpdu trace instead.")
1054  .AddTraceSource ("TxErrHeader",
1055  "The header of unsuccessfully transmitted packet.",
1057  "ns3::WifiMacHeader::TracedCallback",
1059  "Depending on the failure type, use the NAckedMpdu trace, the "
1060  "DroppedMpdu trace or one of the traces associated with TX timeouts.")
1061  .AddTraceSource ("AckedMpdu",
1062  "An MPDU that was successfully acknowledged, via either a "
1063  "Normal Ack or a Block Ack.",
1065  "ns3::WifiMacQueueItem::TracedCallback")
1066  .AddTraceSource ("NAckedMpdu",
1067  "An MPDU that was negatively acknowledged via a Block Ack.",
1069  "ns3::WifiMacQueueItem::TracedCallback")
1070  .AddTraceSource ("DroppedMpdu",
1071  "An MPDU that was dropped for the given reason (see WifiMacDropReason).",
1073  "ns3::RegularWifiMac::DroppedMpduCallback")
1074  .AddTraceSource ("MpduResponseTimeout",
1075  "An MPDU whose response was not received before the timeout, along with "
1076  "an identifier of the type of timeout (see WifiTxTimer::Reason) and the "
1077  "TXVECTOR used to transmit the MPDU. This trace source is fired when a "
1078  "CTS is missing after an RTS or a Normal Ack is missing after an MPDU "
1079  "or after a DL MU PPDU acknowledged in SU format.",
1081  "ns3::RegularWifiMac::MpduResponseTimeoutCallback")
1082  .AddTraceSource ("PsduResponseTimeout",
1083  "A PSDU whose response was not received before the timeout, along with "
1084  "an identifier of the type of timeout (see WifiTxTimer::Reason) and the "
1085  "TXVECTOR used to transmit the PSDU. This trace source is fired when a "
1086  "BlockAck is missing after an A-MPDU, a BlockAckReq (possibly in the "
1087  "context of the acknowledgment of a DL MU PPDU in SU format) or a TB PPDU "
1088  "(in the latter case the missing BlockAck is a Multi-STA BlockAck).",
1090  "ns3::RegularWifiMac::PsduResponseTimeoutCallback")
1091  .AddTraceSource ("PsduMapResponseTimeout",
1092  "A PSDU map for which not all the responses were received before the timeout, "
1093  "along with an identifier of the type of timeout (see WifiTxTimer::Reason), "
1094  "the set of MAC addresses of the stations that did not respond and the total "
1095  "number of stations that had to respond. This trace source is fired when not "
1096  "all the addressed stations responded to an MU-BAR Trigger frame (either sent as "
1097  "a SU frame or aggregated to PSDUs in the DL MU PPDU), a Basic Trigger Frame or "
1098  "a BSRP Trigger Frame.",
1100  "ns3::RegularWifiMac::PsduMapResponseTimeoutCallback")
1101  ;
1102  return tid;
1103 }
1104 
1105 void
1107 {
1108  NS_LOG_FUNCTION (this << standard);
1109  uint32_t cwmin = 0;
1110  uint32_t cwmax = 0;
1111  switch (standard)
1112  {
1114  case WIFI_STANDARD_80211ac:
1117  {
1118  SetQosSupported (true);
1119  cwmin = 15;
1120  cwmax = 1023;
1121  break;
1122  }
1125  {
1126  SetQosSupported (true);
1127  }
1128  case WIFI_STANDARD_80211g:
1129  SetErpSupported (true);
1130  case WIFI_STANDARD_80211a:
1131  case WIFI_STANDARD_80211p:
1132  cwmin = 15;
1133  cwmax = 1023;
1134  break;
1135  case WIFI_STANDARD_80211b:
1136  SetDsssSupported (true);
1137  cwmin = 31;
1138  cwmax = 1023;
1139  break;
1140  default:
1141  NS_FATAL_ERROR ("Unsupported WifiPhyStandard in RegularWifiMac::FinishConfigureStandard ()");
1142  }
1143 
1145  ConfigureContentionWindow (cwmin, cwmax);
1146 }
1147 
1148 void
1149 RegularWifiMac::ConfigureContentionWindow (uint32_t cwMin, uint32_t cwMax)
1150 {
1151  bool isDsssOnly = m_dsssSupported && !m_erpSupported;
1152  //The special value of AC_BE_NQOS which exists in the Access
1153  //Category enumeration allows us to configure plain old DCF.
1154  ConfigureDcf (m_txop, cwMin, cwMax, isDsssOnly, AC_BE_NQOS);
1155 
1156  //Now we configure the EDCA functions
1157  for (EdcaQueues::const_iterator i = m_edca.begin (); i != m_edca.end (); ++i)
1158  {
1159  ConfigureDcf (i->second, cwMin, cwMax, isDsssOnly, i->first);
1160  }
1161 }
1162 
1163 uint32_t
1165 {
1166  uint32_t maxSize = 0;
1167  switch (ac)
1168  {
1169  case AC_BE:
1170  maxSize = m_beMaxAmpduSize;
1171  break;
1172  case AC_BK:
1173  maxSize = m_bkMaxAmpduSize;
1174  break;
1175  case AC_VI:
1176  maxSize = m_viMaxAmpduSize;
1177  break;
1178  case AC_VO:
1179  maxSize = m_voMaxAmpduSize;
1180  break;
1181  default:
1182  NS_ABORT_MSG ("Unknown AC " << ac);
1183  return 0;
1184  }
1185  return maxSize;
1186 }
1187 
1188 uint16_t
1190 {
1191  uint16_t maxSize = 0;
1192  switch (ac)
1193  {
1194  case AC_BE:
1195  maxSize = m_beMaxAmsduSize;
1196  break;
1197  case AC_BK:
1198  maxSize = m_bkMaxAmsduSize;
1199  break;
1200  case AC_VI:
1201  maxSize = m_viMaxAmsduSize;
1202  break;
1203  case AC_VO:
1204  maxSize = m_voMaxAmsduSize;
1205  break;
1206  default:
1207  NS_ABORT_MSG ("Unknown AC " << ac);
1208  return 0;
1209  }
1210  return maxSize;
1211 }
1212 
1213 } //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:459
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:177
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:59
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:425
ns3::RegularWifiMac::SetBeBlockAckInactivityTimeout
void SetBeBlockAckInactivityTimeout(uint16_t timeout)
Set BE block ack inactivity timeout.
Definition: regular-wifi-mac.cc:445
ns3::BooleanValue
AttributeValue implementation for Boolean.
Definition: boolean.h:37
ns3::RegularWifiMac::GetExtendedCapabilities
ExtendedCapabilities GetExtendedCapabilities(void) const
Return the extended capabilities of the device.
Definition: regular-wifi-mac.cc:196
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:432
regular-wifi-mac.h
ns3::RegularWifiMac::SetViBlockAckInactivityTimeout
void SetViBlockAckInactivityTimeout(uint16_t timeout)
Set VI block ack inactivity timeout.
Definition: regular-wifi-mac.cc:438
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:696
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:441
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:702
ns3::RegularWifiMac::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition: regular-wifi-mac.cc:885
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:501
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:629
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:658
ns3::RegularWifiMac::SetLinkDownCallback
void SetLinkDownCallback(Callback< void > linkDown) override
Definition: regular-wifi-mac.cc:589
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:529
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:713
ns3::RegularWifiMac::GetErpSupported
bool GetErpSupported() const
Return whether the device supports ERP.
Definition: regular-wifi-mac.cc:639
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:1164
ns3::RegularWifiMac::m_viMaxAmsduSize
uint16_t m_viMaxAmsduSize
maximum A-MSDU size for AC_VI (in bytes)
Definition: regular-wifi-mac.h:436
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:582
ns3::MakeBooleanAccessor
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition: boolean.h:85
mpdu-aggregator.h
ns3::WifiMacQueueItem::GetHeader
const WifiMacHeader & GetHeader(void) const
Get the header stored in this item.
Definition: wifi-mac-queue-item.cc:65
ns3::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:874
ns3::RegularWifiMac::m_voMaxAmsduSize
uint16_t m_voMaxAmsduSize
maximum A-MSDU size for AC_VO (in bytes)
Definition: regular-wifi-mac.h:435
ns3::RegularWifiMac::GetQosSupported
bool GetQosSupported() const
Return whether the device supports QoS.
Definition: regular-wifi-mac.cc:603
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:689
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:438
ns3::RegularWifiMac::m_typeOfStation
TypeOfStation m_typeOfStation
the type of station
Definition: regular-wifi-mac.h:405
ns3::MakeTraceSourceAccessor
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
Definition: trace-source-accessor.h:202
ns3::QosTxop::SetBlockAckThreshold
void SetBlockAckThreshold(uint8_t threshold)
Set threshold for block ack mechanism.
Definition: qos-txop.cc:650
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:443
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:1189
ns3::RegularWifiMac::ConfigureContentionWindow
void ConfigureContentionWindow(uint32_t cwMin, uint32_t cwMax)
Definition: regular-wifi-mac.cc:1149
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:683
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:751
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:468
ns3::RegularWifiMac::m_beMaxAmpduSize
uint32_t m_beMaxAmpduSize
maximum A-MPDU size for AC_BE (in bytes)
Definition: regular-wifi-mac.h:442
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:619
ns3::RegularWifiMac::m_ctsToSelfSupported
bool m_ctsToSelfSupported
flag indicating whether CTS-To-Self is supported
Definition: regular-wifi-mac.h:530
ns3::RegularWifiMac::ResetWifiPhy
void ResetWifiPhy(void) override
Remove currently attached WifiPhy device from this MAC.
Definition: regular-wifi-mac.cc:565
ns3::RegularWifiMac::SetupFrameExchangeManager
void SetupFrameExchangeManager(void)
Create a Frame Exchange Manager depending on the supported version of the standard.
Definition: regular-wifi-mac.cc:126
ns3::RegularWifiMac::SetAddress
void SetAddress(Mac48Address address) override
Definition: regular-wifi-mac.cc:676
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:95
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:733
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:440
ns3::RegularWifiMac::GetTxop
Ptr< Txop > GetTxop(void) const
Accessor for the DCF object.
Definition: regular-wifi-mac.cc:495
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:403
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:451
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:482
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:487
ns3::RegularWifiMac::SetWifiRemoteStationManager
void SetWifiRemoteStationManager(const Ptr< WifiRemoteStationManager > stationManager) override
Definition: regular-wifi-mac.cc:183
ns3::RegularWifiMac::SetBeBlockAckThreshold
void SetBeBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_BE.
Definition: regular-wifi-mac.cc:417
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:757
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:437
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:537
ns3::RegularWifiMac::SetBkBlockAckInactivityTimeout
void SetBkBlockAckInactivityTimeout(uint16_t timeout)
Set BK block ack inactivity timeout.
Definition: regular-wifi-mac.cc:452
ns3::RegularWifiMac::m_bssid
Mac48Address m_bssid
the BSSID
Definition: regular-wifi-mac.h:433
ns3::RegularWifiMac::GetTypeOfStation
TypeOfStation GetTypeOfStation(void) const override
Return the type of station.
Definition: regular-wifi-mac.cc:489
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:446
ns3::RegularWifiMac::SetViBlockAckThreshold
void SetViBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_VI.
Definition: regular-wifi-mac.cc:410
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:430
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:596
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:1106
ns3::RegularWifiMac::SetCtsToSelfSupported
void SetCtsToSelfSupported(bool enable)
Enable or disable CTS-to-self feature.
Definition: regular-wifi-mac.cc:669
ns3::RegularWifiMac::GetHtCapabilities
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities of the device.
Definition: regular-wifi-mac.cc:207
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:739
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:346
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:656
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:575
ns3::RegularWifiMac::m_txOkCallback
TracedCallback< const WifiMacHeader & > m_txOkCallback
transmit OK callback
Definition: regular-wifi-mac.h:445
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:548
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:531
ns3::RegularWifiMac::SetShortSlotTimeSupported
void SetShortSlotTimeSupported(bool enable) override
Enable or disable short slot time feature.
Definition: regular-wifi-mac.cc:726
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:83
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:663
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:190
ns3::RegularWifiMac::GetVhtCapabilities
VhtCapabilities GetVhtCapabilities(void) const
Return the VHT capabilities of the device.
Definition: regular-wifi-mac.cc:263
ns3::RegularWifiMac::m_nackedMpduCallback
MpduTracedCallback m_nackedMpduCallback
nack'ed MPDU callback
Definition: regular-wifi-mac.h:452
ns3::RegularWifiMac::GetBEQueue
Ptr< QosTxop > GetBEQueue(void) const
Accessor for the AC_BE channel access function.
Definition: regular-wifi-mac.cc:525
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:719
ns3::RegularWifiMac::~RegularWifiMac
virtual ~RegularWifiMac()
Definition: regular-wifi-mac.cc:77
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:513
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: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:609
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:420
ns3::RegularWifiMac::GetVIQueue
Ptr< QosTxop > GetVIQueue(void) const
Accessor for the AC_VI channel access function.
Definition: regular-wifi-mac.cc:519
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:764
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:506
ns3::RegularWifiMac::SetErpSupported
void SetErpSupported(bool enable)
Enable or disable ERP support for the device.
Definition: regular-wifi-mac.cc:645
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:527
ns3::RegularWifiMac::GetWifiPhy
Ptr< WifiPhy > GetWifiPhy(void) const override
Definition: regular-wifi-mac.cc:558
NS_ABORT_MSG
#define NS_ABORT_MSG(msg)
Unconditional abnormal program termination with a message.
Definition: abort.h:50