A Discrete-Event Network Simulator
API
wifi-remote-station-manager.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2005,2006,2007 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/boolean.h"
23 #include "ns3/uinteger.h"
24 #include "ns3/enum.h"
25 #include "ns3/simulator.h"
27 #include "wifi-phy.h"
28 #include "wifi-mac.h"
29 #include "wifi-mac-header.h"
30 #include "wifi-mac-trailer.h"
31 #include "ht-configuration.h"
32 #include "vht-configuration.h"
33 #include "he-configuration.h"
34 #include "wifi-net-device.h"
35 
36 namespace ns3 {
37 
38 NS_LOG_COMPONENT_DEFINE ("WifiRemoteStationManager");
39 
40 NS_OBJECT_ENSURE_REGISTERED (WifiRemoteStationManager);
41 
42 TypeId
44 {
45  static TypeId tid = TypeId ("ns3::WifiRemoteStationManager")
46  .SetParent<Object> ()
47  .SetGroupName ("Wifi")
48  .AddAttribute ("MaxSsrc",
49  "The maximum number of retransmission attempts for any packet with size <= RtsCtsThreshold. "
50  "This value will not have any effect on some rate control algorithms.",
51  UintegerValue (7),
53  MakeUintegerChecker<uint32_t> ())
54  .AddAttribute ("MaxSlrc",
55  "The maximum number of retransmission attempts for any packet with size > RtsCtsThreshold. "
56  "This value will not have any effect on some rate control algorithms.",
57  UintegerValue (4),
59  MakeUintegerChecker<uint32_t> ())
60  .AddAttribute ("RtsCtsThreshold",
61  "If the size of the PSDU is bigger than this value, we use an RTS/CTS handshake before sending the data frame."
62  "This value will not have any effect on some rate control algorithms.",
63  UintegerValue (65535),
65  MakeUintegerChecker<uint32_t> ())
66  .AddAttribute ("FragmentationThreshold",
67  "If the size of the PSDU is bigger than this value, we fragment it such that the size of the fragments are equal or smaller. "
68  "This value does not apply when it is carried in an A-MPDU. "
69  "This value will not have any effect on some rate control algorithms.",
70  UintegerValue (65535),
73  MakeUintegerChecker<uint32_t> ())
74  .AddAttribute ("NonUnicastMode",
75  "Wifi mode used for non-unicast transmissions.",
76  WifiModeValue (),
79  .AddAttribute ("DefaultTxPowerLevel",
80  "Default power level to be used for transmissions. "
81  "This is the power level that is used by all those WifiManagers that do not implement TX power control.",
82  UintegerValue (0),
84  MakeUintegerChecker<uint8_t> ())
85  .AddAttribute ("ErpProtectionMode",
86  "Protection mode used when non-ERP STAs are connected to an ERP AP: Rts-Cts or Cts-To-Self",
91  .AddAttribute ("HtProtectionMode",
92  "Protection mode used when non-HT STAs are connected to a HT AP: Rts-Cts or Cts-To-Self",
97  .AddTraceSource ("MacTxRtsFailed",
98  "The transmission of a RTS by the MAC layer has failed",
100  "ns3::Mac48Address::TracedCallback")
101  .AddTraceSource ("MacTxDataFailed",
102  "The transmission of a data packet by the MAC layer has failed",
104  "ns3::Mac48Address::TracedCallback")
105  .AddTraceSource ("MacTxFinalRtsFailed",
106  "The transmission of a RTS has exceeded the maximum number of attempts",
108  "ns3::Mac48Address::TracedCallback")
109  .AddTraceSource ("MacTxFinalDataFailed",
110  "The transmission of a data packet has exceeded the maximum number of attempts",
112  "ns3::Mac48Address::TracedCallback")
113  ;
114  return tid;
115 }
116 
118  : m_pcfSupported (false),
119  m_useNonErpProtection (false),
120  m_useNonHtProtection (false),
121  m_useGreenfieldProtection (false),
122  m_shortPreambleEnabled (false),
123  m_shortSlotTimeEnabled (false)
124 {
125  NS_LOG_FUNCTION (this);
126 }
127 
129 {
130  NS_LOG_FUNCTION (this);
131 }
132 
133 void
135 {
136  NS_LOG_FUNCTION (this);
137  Reset ();
138 }
139 
140 void
142 {
143  NS_LOG_FUNCTION (this << phy);
144  //We need to track our PHY because it is the object that knows the
145  //full set of transmit rates that are supported. We need to know
146  //this in order to find the relevant mandatory rates when choosing a
147  //transmit rate for automatic control responses like
148  //acknowledgments.
149  m_wifiPhy = phy;
150  m_defaultTxMode = phy->GetMode (0);
152  if (GetHtSupported ())
153  {
154  m_defaultTxMcs = phy->GetMcs (0);
155  }
156  Reset ();
157 }
158 
159 void
161 {
162  NS_LOG_FUNCTION (this << mac);
163  //We need to track our MAC because it is the object that knows the
164  //full set of interframe spaces.
165  m_wifiMac = mac;
166  Reset ();
167 }
168 
169 void
171 {
172  NS_LOG_FUNCTION (this << maxSsrc);
173  m_maxSsrc = maxSsrc;
174 }
175 
176 void
178 {
179  NS_LOG_FUNCTION (this << maxSlrc);
180  m_maxSlrc = maxSlrc;
181 }
182 
183 void
185 {
186  NS_LOG_FUNCTION (this << threshold);
187  m_rtsCtsThreshold = threshold;
188 }
189 
190 void
192 {
193  NS_LOG_FUNCTION (this << threshold);
194  DoSetFragmentationThreshold (threshold);
195 }
196 
197 void
199 {
200  NS_LOG_FUNCTION (this << enable);
201  m_shortPreambleEnabled = enable;
202 }
203 
204 void
206 {
207  NS_LOG_FUNCTION (this << enable);
208  m_shortSlotTimeEnabled = enable;
209 }
210 
211 bool
213 {
214  return m_shortSlotTimeEnabled;
215 }
216 
217 bool
219 {
220  return m_shortPreambleEnabled;
221 }
222 
223 bool
225 {
226  Ptr<WifiNetDevice> device = DynamicCast<WifiNetDevice> (m_wifiPhy->GetDevice ());
227  Ptr<HtConfiguration> htConfiguration = device->GetHtConfiguration ();
228  if (htConfiguration)
229  {
230  return true;
231  }
232  return false;
233 }
234 
235 bool
237 {
238  Ptr<WifiNetDevice> device = DynamicCast<WifiNetDevice> (m_wifiPhy->GetDevice ());
239  Ptr<VhtConfiguration> vhtConfiguration = device->GetVhtConfiguration ();
240  if (vhtConfiguration)
241  {
242  return true;
243  }
244  return false;
245 }
246 
247 bool
249 {
250  Ptr<WifiNetDevice> device = DynamicCast<WifiNetDevice> (m_wifiPhy->GetDevice ());
251  Ptr<HeConfiguration> heConfiguration = device->GetHeConfiguration ();
252  if (heConfiguration)
253  {
254  return true;
255  }
256  return false;
257 }
258 
259 void
261 {
262  m_pcfSupported = enable;
263 }
264 
265 bool
267 {
268  return m_pcfSupported;
269 }
270 
271 bool
273 {
274  if (GetHtSupported ())
275  {
276  Ptr<WifiNetDevice> device = DynamicCast<WifiNetDevice> (m_wifiPhy->GetDevice ());
277  Ptr<HtConfiguration> htConfiguration = device->GetHtConfiguration ();
278  NS_ASSERT (htConfiguration); //If HT is supported, we should have a HT configuration attached
279  if (htConfiguration->GetGreenfieldSupported ())
280  {
281  return true;
282  }
283  }
284  return false;
285 }
286 
287 bool
289 {
290  if (GetHtSupported ())
291  {
292  Ptr<WifiNetDevice> device = DynamicCast<WifiNetDevice> (m_wifiPhy->GetDevice ());
293  Ptr<HtConfiguration> htConfiguration = device->GetHtConfiguration ();
294  NS_ASSERT (htConfiguration); //If HT is supported, we should have a HT configuration attached
295  return htConfiguration->GetLdpcSupported ();
296  }
297  return false;
298 }
299 
300 bool
302 {
303  if (GetHtSupported ())
304  {
305  Ptr<WifiNetDevice> device = DynamicCast<WifiNetDevice> (m_wifiPhy->GetDevice ());
306  Ptr<HtConfiguration> htConfiguration = device->GetHtConfiguration ();
307  NS_ASSERT (htConfiguration); //If HT is supported, we should have a HT configuration attached
308  if (htConfiguration->GetShortGuardIntervalSupported ())
309  {
310  return true;
311  }
312  }
313  return false;
314 }
315 
316 uint16_t
318 {
319  uint16_t gi = 0;
320  if (GetHeSupported ())
321  {
322  Ptr<WifiNetDevice> device = DynamicCast<WifiNetDevice> (m_wifiPhy->GetDevice ());
323  Ptr<HeConfiguration> heConfiguration = device->GetHeConfiguration ();
324  NS_ASSERT (heConfiguration); //If HE is supported, we should have a HE configuration attached
325  gi = static_cast<uint16_t>(heConfiguration->GetGuardInterval ().GetNanoSeconds ());
326  }
327  return gi;
328 }
329 
330 uint32_t
332 {
333  return DoGetFragmentationThreshold ();
334 }
335 
336 void
338 {
339  NS_LOG_FUNCTION (this << address << isShortPreambleSupported);
340  NS_ASSERT (!address.IsGroup ());
342  state->m_shortPreamble = isShortPreambleSupported;
343 }
344 
345 void
347 {
348  NS_LOG_FUNCTION (this << address << isShortSlotTimeSupported);
349  NS_ASSERT (!address.IsGroup ());
351  state->m_shortSlotTime = isShortSlotTimeSupported;
352 }
353 
354 void
356 {
357  NS_LOG_FUNCTION (this << address << mode);
358  NS_ASSERT (!address.IsGroup ());
360  for (WifiModeListIterator i = state->m_operationalRateSet.begin (); i != state->m_operationalRateSet.end (); i++)
361  {
362  if ((*i) == mode)
363  {
364  //already in.
365  return;
366  }
367  }
368  state->m_operationalRateSet.push_back (mode);
369 }
370 
371 void
373 {
374  NS_LOG_FUNCTION (this << address);
375  NS_ASSERT (!address.IsGroup ());
377  state->m_operationalRateSet.clear ();
378  for (uint8_t i = 0; i < m_wifiPhy->GetNModes (); i++)
379  {
380  state->m_operationalRateSet.push_back (m_wifiPhy->GetMode (i));
381  if (m_wifiPhy->GetMode (i).IsMandatory ())
382  {
384  }
385  }
386 }
387 
388 void
390 {
391  NS_LOG_FUNCTION (this << address);
392  NS_ASSERT (!address.IsGroup ());
394  state->m_operationalMcsSet.clear ();
395  for (uint8_t i = 0; i < m_wifiPhy->GetNMcs (); i++)
396  {
397  state->m_operationalMcsSet.push_back (m_wifiPhy->GetMcs (i));
398  }
399 }
400 
401 void
403 {
404  NS_LOG_FUNCTION (this << address);
405  NS_ASSERT (!address.IsGroup ());
407  state->m_operationalMcsSet.clear ();
408 }
409 
410 void
412 {
413  NS_LOG_FUNCTION (this << address << mcs);
414  NS_ASSERT (!address.IsGroup ());
416  for (WifiModeListIterator i = state->m_operationalMcsSet.begin (); i != state->m_operationalMcsSet.end (); i++)
417  {
418  if ((*i) == mcs)
419  {
420  //already in.
421  return;
422  }
423  }
424  state->m_operationalMcsSet.push_back (mcs);
425 }
426 
427 bool
429 {
431 }
432 
433 bool
435 {
437 }
438 
439 bool
441 {
443 }
444 
445 bool
447 {
448  if (address.IsGroup ())
449  {
450  return false;
451  }
453 }
454 
455 bool
457 {
458  if (address.IsGroup ())
459  {
460  return true;
461  }
463 }
464 
465 bool
467 {
468  if (address.IsGroup ())
469  {
470  return false;
471  }
473 }
474 
475 void
477 {
478  NS_ASSERT (!address.IsGroup ());
480 }
481 
482 void
484 {
485  NS_ASSERT (!address.IsGroup ());
487 }
488 
489 void
491 {
492  NS_ASSERT (!address.IsGroup ());
494 }
495 
496 void
498 {
499  NS_ASSERT (!address.IsGroup ());
501 }
502 
505 {
506  NS_LOG_FUNCTION (this << header);
507  Mac48Address address = header.GetAddr1 ();
508  if (!header.IsMgt () && address.IsGroup ())
509  {
510  WifiMode mode = GetNonUnicastMode ();
511  WifiTxVector v;
512  v.SetMode (mode);
516  v.SetGuardInterval (ConvertGuardIntervalToNanoSeconds (mode, DynamicCast<WifiNetDevice> (m_wifiPhy->GetDevice ())));
517  v.SetNTx (1);
518  v.SetNss (1);
519  v.SetNess (0);
520  return v;
521  }
522  WifiTxVector txVector;
523  if (header.IsMgt ())
524  {
525  //Use the lowest basic rate for management frames
526  WifiMode mgtMode;
527  if (GetNBasicModes () > 0)
528  {
529  mgtMode = GetBasicMode (0);
530  }
531  else
532  {
533  mgtMode = GetDefaultMode ();
534  }
535  txVector.SetMode (mgtMode);
539  txVector.SetGuardInterval (ConvertGuardIntervalToNanoSeconds (mgtMode, DynamicCast<WifiNetDevice> (m_wifiPhy->GetDevice ())));
540  }
541  else
542  {
543  txVector = DoGetDataTxVector (Lookup (address));
545  }
546  Ptr<WifiNetDevice> device = DynamicCast<WifiNetDevice> (m_wifiPhy->GetDevice ());
547  Ptr<HeConfiguration> heConfiguration = device->GetHeConfiguration ();
548  if (heConfiguration)
549  {
550  UintegerValue bssColor;
551  heConfiguration->GetAttribute ("BssColor", bssColor);
552  txVector.SetBssColor (bssColor.Get ());
553  }
554  return txVector;
555 }
556 
559 {
560  WifiMode defaultMode = GetDefaultMode ();
561  WifiPreamble defaultPreamble;
562  if (defaultMode.GetModulationClass () == WIFI_MOD_CLASS_HE)
563  {
564  defaultPreamble = WIFI_PREAMBLE_HE_SU;
565  }
566  else if (defaultMode.GetModulationClass () == WIFI_MOD_CLASS_VHT)
567  {
568  defaultPreamble = WIFI_PREAMBLE_VHT_SU;
569  }
570  else if (defaultMode.GetModulationClass () == WIFI_MOD_CLASS_HT)
571  {
572  defaultPreamble = WIFI_PREAMBLE_HT_MF;
573  }
574  else
575  {
576  defaultPreamble = WIFI_PREAMBLE_LONG;
577  }
578 
579  return WifiTxVector (defaultMode,
581  defaultPreamble,
582  ConvertGuardIntervalToNanoSeconds (defaultMode, DynamicCast<WifiNetDevice> (m_wifiPhy->GetDevice ())),
585  0,
587  false);
588 }
589 
592 {
593  NS_LOG_FUNCTION (this << address);
594  if (address.IsGroup ())
595  {
596  WifiMode mode = GetNonUnicastMode ();
597  WifiTxVector v;
598  v.SetMode (mode);
602  v.SetGuardInterval (ConvertGuardIntervalToNanoSeconds (mode, DynamicCast<WifiNetDevice> (m_wifiPhy->GetDevice ())));
603  v.SetNTx (1);
604  v.SetNss (1);
605  v.SetNess (0);
606  return v;
607  }
608  return DoGetRtsTxVector (Lookup (address));
609 }
610 
611 void
613 {
614  NS_LOG_FUNCTION (this << address << *header);
615  NS_ASSERT (!address.IsGroup ());
616  AcIndex ac = QosUtilsMapTidToAc ((header->IsQosData ()) ? header->GetQosTid () : 0);
617  m_ssrc[ac]++;
620 }
621 
622 void
624  uint32_t packetSize)
625 {
626  NS_LOG_FUNCTION (this << address << *header);
627  NS_ASSERT (!address.IsGroup ());
628  AcIndex ac = QosUtilsMapTidToAc ((header->IsQosData ()) ? header->GetQosTid () : 0);
629  bool longMpdu = (packetSize + header->GetSize () + WIFI_MAC_FCS_LENGTH) > m_rtsCtsThreshold;
630  if (longMpdu)
631  {
632  m_slrc[ac]++;
633  }
634  else
635  {
636  m_ssrc[ac]++;
637  }
640 }
641 
642 void
644  double ctsSnr, WifiMode ctsMode, double rtsSnr)
645 {
646  NS_LOG_FUNCTION (this << address << *header << ctsSnr << ctsMode << rtsSnr);
647  NS_ASSERT (!address.IsGroup ());
648  WifiRemoteStation *station = Lookup (address);
649  AcIndex ac = QosUtilsMapTidToAc ((header->IsQosData ()) ? header->GetQosTid () : 0);
650  station->m_state->m_info.NotifyTxSuccess (m_ssrc[ac]);
651  m_ssrc[ac] = 0;
652  DoReportRtsOk (station, ctsSnr, ctsMode, rtsSnr);
653 }
654 
655 void
657  double ackSnr, WifiMode ackMode, double dataSnr,
658  WifiTxVector dataTxVector, uint32_t packetSize)
659 {
660  NS_LOG_FUNCTION (this << address << *header << ackSnr << ackMode << dataSnr << dataTxVector << packetSize);
661  NS_ASSERT (!address.IsGroup ());
662  WifiRemoteStation *station = Lookup (address);
663  AcIndex ac = QosUtilsMapTidToAc ((header->IsQosData ()) ? header->GetQosTid () : 0);
664  bool longMpdu = (packetSize + header->GetSize () + WIFI_MAC_FCS_LENGTH) > m_rtsCtsThreshold;
665  if (longMpdu)
666  {
667  station->m_state->m_info.NotifyTxSuccess (m_slrc[ac]);
668  m_slrc[ac] = 0;
669  }
670  else
671  {
672  station->m_state->m_info.NotifyTxSuccess (m_ssrc[ac]);
673  m_ssrc[ac] = 0;
674  }
675  DoReportDataOk (station, ackSnr, ackMode, dataSnr, dataTxVector.GetChannelWidth (), dataTxVector.GetNss ());
676 }
677 
678 void
680 {
681  NS_LOG_FUNCTION (this << address << *header);
682  NS_ASSERT (!address.IsGroup ());
683  WifiRemoteStation *station = Lookup (address);
684  AcIndex ac = QosUtilsMapTidToAc ((header->IsQosData ()) ? header->GetQosTid () : 0);
685  station->m_state->m_info.NotifyTxFailed ();
686  m_ssrc[ac] = 0;
688  DoReportFinalRtsFailed (station);
689 }
690 
691 void
693  uint32_t packetSize)
694 {
695  NS_LOG_FUNCTION (this << address << *header);
696  NS_ASSERT (!address.IsGroup ());
697  WifiRemoteStation *station = Lookup (address);
698  AcIndex ac = QosUtilsMapTidToAc ((header->IsQosData ()) ? header->GetQosTid () : 0);
699  station->m_state->m_info.NotifyTxFailed ();
700  bool longMpdu = (packetSize + header->GetSize () + WIFI_MAC_FCS_LENGTH) > m_rtsCtsThreshold;
701  if (longMpdu)
702  {
703  m_slrc[ac] = 0;
704  }
705  else
706  {
707  m_ssrc[ac] = 0;
708  }
710  DoReportFinalDataFailed (station);
711 }
712 
713 void
715 {
716  NS_LOG_FUNCTION (this << address << rxSnr << txMode);
717  if (address.IsGroup ())
718  {
719  return;
720  }
721  DoReportRxOk (Lookup (address), rxSnr, txMode);
722 }
723 
724 void
726  uint8_t nSuccessfulMpdus, uint8_t nFailedMpdus,
727  double rxSnr, double dataSnr, WifiTxVector dataTxVector)
728 {
729  NS_LOG_FUNCTION (this << address << +nSuccessfulMpdus << +nFailedMpdus << rxSnr << dataSnr << dataTxVector);
730  NS_ASSERT (!address.IsGroup ());
731  for (uint8_t i = 0; i < nFailedMpdus; i++)
732  {
734  }
735  DoReportAmpduTxStatus (Lookup (address), nSuccessfulMpdus, nFailedMpdus, rxSnr, dataSnr, dataTxVector.GetChannelWidth (), dataTxVector.GetNss ());
736 }
737 
738 bool
739 WifiRemoteStationManager::NeedRts (const WifiMacHeader &header, uint32_t size)
740 {
741  NS_LOG_FUNCTION (this << header << size);
742  Mac48Address address = header.GetAddr1 ();
743  WifiTxVector txVector = GetDataTxVector (header);
744  WifiMode mode = txVector.GetMode ();
745  if (address.IsGroup ())
746  {
747  return false;
748  }
751  || (mode.GetModulationClass () == WIFI_MOD_CLASS_HT)
752  || (mode.GetModulationClass () == WIFI_MOD_CLASS_VHT)
753  || (mode.GetModulationClass () == WIFI_MOD_CLASS_HE))
755  {
756  NS_LOG_DEBUG ("WifiRemoteStationManager::NeedRTS returning true to protect non-ERP stations");
757  return true;
758  }
759  else if (m_htProtectionMode == RTS_CTS
760  && ((mode.GetModulationClass () == WIFI_MOD_CLASS_HT)
761  || (mode.GetModulationClass () == WIFI_MOD_CLASS_VHT))
764  {
765  NS_LOG_DEBUG ("WifiRemoteStationManager::NeedRTS returning true to protect non-HT stations");
766  return true;
767  }
768  bool normally = (size > m_rtsCtsThreshold);
769  return DoNeedRts (Lookup (address), size, normally);
770 }
771 
772 bool
774 {
775  WifiMode mode = txVector.GetMode ();
776  NS_LOG_FUNCTION (this << mode);
779  || (mode.GetModulationClass () == WIFI_MOD_CLASS_HT)
780  || (mode.GetModulationClass () == WIFI_MOD_CLASS_VHT)
781  || (mode.GetModulationClass () == WIFI_MOD_CLASS_HE))
783  {
784  NS_LOG_DEBUG ("WifiRemoteStationManager::NeedCtsToSelf returning true to protect non-ERP stations");
785  return true;
786  }
787  else if (m_htProtectionMode == CTS_TO_SELF
788  && ((mode.GetModulationClass () == WIFI_MOD_CLASS_HT)
789  || (mode.GetModulationClass () == WIFI_MOD_CLASS_VHT))
792  {
793  NS_LOG_DEBUG ("WifiRemoteStationManager::NeedCtsToSelf returning true to protect non-HT stations");
794  return true;
795  }
796  else if (!m_useNonErpProtection)
797  {
798  //search for the BSS Basic Rate set, if the used mode is in the basic set then there is no need for CTS To Self
799  for (WifiModeListIterator i = m_bssBasicRateSet.begin (); i != m_bssBasicRateSet.end (); i++)
800  {
801  if (mode == *i)
802  {
803  NS_LOG_DEBUG ("WifiRemoteStationManager::NeedCtsToSelf returning false");
804  return false;
805  }
806  }
807  if (GetHtSupported ())
808  {
809  //search for the BSS Basic MCS set, if the used mode is in the basic set then there is no need for CTS To Self
810  for (WifiModeListIterator i = m_bssBasicMcsSet.begin (); i != m_bssBasicMcsSet.end (); i++)
811  {
812  if (mode == *i)
813  {
814  NS_LOG_DEBUG ("WifiRemoteStationManager::NeedCtsToSelf returning false");
815  return false;
816  }
817  }
818  }
819  NS_LOG_DEBUG ("WifiRemoteStationManager::NeedCtsToSelf returning true");
820  return true;
821  }
822  return false;
823 }
824 
825 void
827 {
828  NS_LOG_FUNCTION (this << enable);
829  m_useNonErpProtection = enable;
830 }
831 
832 bool
834 {
835  return m_useNonErpProtection;
836 }
837 
838 void
840 {
841  NS_LOG_FUNCTION (this << enable);
842  m_useNonHtProtection = enable;
843 }
844 
845 bool
847 {
848  return m_useNonHtProtection;
849 }
850 
851 void
853 {
854  NS_LOG_FUNCTION (this << enable);
855  m_useGreenfieldProtection = enable;
856 }
857 
858 bool
860 {
862 }
863 
864 bool
866  Ptr<const Packet> packet)
867 {
868  NS_LOG_FUNCTION (this << address << packet << *header);
869  NS_ASSERT (!address.IsGroup ());
870  AcIndex ac = QosUtilsMapTidToAc ((header->IsQosData ()) ? header->GetQosTid () : 0);
871  bool longMpdu = (packet->GetSize () + header->GetSize () + WIFI_MAC_FCS_LENGTH) > m_rtsCtsThreshold;
872  uint32_t retryCount, maxRetryCount;
873  if (longMpdu)
874  {
875  retryCount = m_slrc[ac];
876  maxRetryCount = m_maxSlrc;
877  }
878  else
879  {
880  retryCount = m_ssrc[ac];
881  maxRetryCount = m_maxSsrc;
882  }
883  bool normally = retryCount < maxRetryCount;
884  NS_LOG_DEBUG ("WifiRemoteStationManager::NeedRetransmission count: " << retryCount << " result: " << std::boolalpha << normally);
885  return DoNeedRetransmission (Lookup (address), packet, normally);
886 }
887 
888 bool
890  Ptr<const Packet> packet)
891 {
892  NS_LOG_FUNCTION (this << address << packet << *header);
893  if (address.IsGroup ())
894  {
895  return false;
896  }
897  bool normally = (packet->GetSize () + header->GetSize () + WIFI_MAC_FCS_LENGTH) > GetFragmentationThreshold ();
898  NS_LOG_DEBUG ("WifiRemoteStationManager::NeedFragmentation result: " << std::boolalpha << normally);
899  return DoNeedFragmentation (Lookup (address), packet, normally);
900 }
901 
902 void
904 {
905  NS_LOG_FUNCTION (this << threshold);
906  if (threshold < 256)
907  {
908  /*
909  * ASN.1 encoding of the MAC and PHY MIB (256 ... 8000)
910  */
911  NS_LOG_WARN ("Fragmentation threshold should be larger than 256. Setting to 256.");
913  }
914  else
915  {
916  /*
917  * The length of each fragment shall be an even number of octets, except for the last fragment if an MSDU or
918  * MMPDU, which may be either an even or an odd number of octets.
919  */
920  if (threshold % 2 != 0)
921  {
922  NS_LOG_WARN ("Fragmentation threshold should be an even number. Setting to " << threshold - 1);
923  m_nextFragmentationThreshold = threshold - 1;
924  }
925  else
926  {
927  m_nextFragmentationThreshold = threshold;
928  }
929  }
930 }
931 
932 void
934 {
936 }
937 
938 uint32_t
940 {
942 }
943 
944 uint32_t
946 {
947  NS_LOG_FUNCTION (this << *header << packet);
948  //The number of bytes a fragment can support is (Threshold - WIFI_HEADER_SIZE - WIFI_FCS).
949  uint32_t nFragments = (packet->GetSize () / (GetFragmentationThreshold () - header->GetSize () - WIFI_MAC_FCS_LENGTH));
950 
951  //If the size of the last fragment is not 0.
952  if ((packet->GetSize () % (GetFragmentationThreshold () - header->GetSize () - WIFI_MAC_FCS_LENGTH)) > 0)
953  {
954  nFragments++;
955  }
956  NS_LOG_DEBUG ("WifiRemoteStationManager::GetNFragments returning " << nFragments);
957  return nFragments;
958 }
959 
960 uint32_t
962  Ptr<const Packet> packet, uint32_t fragmentNumber)
963 {
964  NS_LOG_FUNCTION (this << address << *header << packet << fragmentNumber);
965  NS_ASSERT (!address.IsGroup ());
966  uint32_t nFragment = GetNFragments (header, packet);
967  if (fragmentNumber >= nFragment)
968  {
969  NS_LOG_DEBUG ("WifiRemoteStationManager::GetFragmentSize returning 0");
970  return 0;
971  }
972  //Last fragment
973  if (fragmentNumber == nFragment - 1)
974  {
975  uint32_t lastFragmentSize = packet->GetSize () - (fragmentNumber * (GetFragmentationThreshold () - header->GetSize () - WIFI_MAC_FCS_LENGTH));
976  NS_LOG_DEBUG ("WifiRemoteStationManager::GetFragmentSize returning " << lastFragmentSize);
977  return lastFragmentSize;
978  }
979  //All fragments but the last, the number of bytes is (Threshold - WIFI_HEADER_SIZE - WIFI_FCS).
980  else
981  {
982  uint32_t fragmentSize = GetFragmentationThreshold () - header->GetSize () - WIFI_MAC_FCS_LENGTH;
983  NS_LOG_DEBUG ("WifiRemoteStationManager::GetFragmentSize returning " << fragmentSize);
984  return fragmentSize;
985  }
986 }
987 
988 uint32_t
990  Ptr<const Packet> packet, uint32_t fragmentNumber)
991 {
992  NS_LOG_FUNCTION (this << address << *header << packet << fragmentNumber);
993  NS_ASSERT (!address.IsGroup ());
994  NS_ASSERT (fragmentNumber < GetNFragments (header, packet));
995  uint32_t fragmentOffset = fragmentNumber * (GetFragmentationThreshold () - header->GetSize () - WIFI_MAC_FCS_LENGTH);
996  NS_LOG_DEBUG ("WifiRemoteStationManager::GetFragmentOffset returning " << fragmentOffset);
997  return fragmentOffset;
998 }
999 
1000 bool
1002  Ptr<const Packet> packet, uint32_t fragmentNumber)
1003 {
1004  NS_LOG_FUNCTION (this << address << *header << packet << fragmentNumber);
1005  NS_ASSERT (!address.IsGroup ());
1006  bool isLast = fragmentNumber == (GetNFragments (header, packet) - 1);
1007  NS_LOG_DEBUG ("WifiRemoteStationManager::IsLastFragment returning " << std::boolalpha << isLast);
1008  return isLast;
1009 }
1010 
1011 uint8_t
1013 {
1014  return m_defaultTxPowerLevel;
1015 }
1016 
1019 {
1021  return state->m_info;
1022 }
1023 
1026 {
1027  NS_LOG_FUNCTION (this << address);
1028  for (StationStates::const_iterator i = m_states.begin (); i != m_states.end (); i++)
1029  {
1030  if ((*i)->m_address == address)
1031  {
1032  NS_LOG_DEBUG ("WifiRemoteStationManager::LookupState returning existing state");
1033  return (*i);
1034  }
1035  }
1038  state->m_address = address;
1039  state->m_operationalRateSet.push_back (GetDefaultMode ());
1040  state->m_operationalMcsSet.push_back (GetDefaultMcs ());
1041  state->m_htCapabilities = 0;
1042  state->m_vhtCapabilities = 0;
1043  state->m_heCapabilities = 0;
1045  state->m_guardInterval = GetGuardInterval ();
1046  state->m_ness = 0;
1047  state->m_aggregation = false;
1048  state->m_qosSupported = false;
1049  const_cast<WifiRemoteStationManager *> (this)->m_states.push_back (state);
1050  NS_LOG_DEBUG ("WifiRemoteStationManager::LookupState returning new state");
1051  return state;
1052 }
1053 
1056 {
1057  NS_LOG_FUNCTION (this << address);
1058  for (Stations::const_iterator i = m_stations.begin (); i != m_stations.end (); i++)
1059  {
1060  if ((*i)->m_state->m_address == address)
1061  {
1062  return (*i);
1063  }
1064  }
1066 
1067  WifiRemoteStation *station = DoCreateStation ();
1068  station->m_state = state;
1069  const_cast<WifiRemoteStationManager *> (this)->m_stations.push_back (station);
1070  return station;
1071 }
1072 
1073 void
1075 {
1076  NS_LOG_FUNCTION (this << from << qosSupported);
1077  WifiRemoteStationState *state;
1078  state = LookupState (from);
1079  state->m_qosSupported = qosSupported;
1080 }
1081 
1082 void
1084 {
1085  //Used by all stations to record HT capabilities of remote stations
1086  NS_LOG_FUNCTION (this << from << htCapabilities);
1087  WifiRemoteStationState *state;
1088  state = LookupState (from);
1089  if (htCapabilities.GetSupportedChannelWidth () == 1)
1090  {
1091  state->m_channelWidth = 40;
1092  }
1093  else
1094  {
1095  state->m_channelWidth = 20;
1096  }
1097  SetQosSupport (from, true);
1098  for (uint8_t j = 0; j < m_wifiPhy->GetNMcs (); j++)
1099  {
1100  WifiMode mcs = m_wifiPhy->GetMcs (j);
1101  if (mcs.GetModulationClass () == WIFI_MOD_CLASS_HT && htCapabilities.IsSupportedMcs (mcs.GetMcsValue ()))
1102  {
1103  AddSupportedMcs (from, mcs);
1104  }
1105  }
1106  state->m_htCapabilities = Create<const HtCapabilities> (htCapabilities);
1107 }
1108 
1109 void
1111 {
1112  //Used by all stations to record VHT capabilities of remote stations
1113  NS_LOG_FUNCTION (this << from << vhtCapabilities);
1114  WifiRemoteStationState *state;
1115  state = LookupState (from);
1116  if (vhtCapabilities.GetSupportedChannelWidthSet () == 1)
1117  {
1118  state->m_channelWidth = 160;
1119  }
1120  else
1121  {
1122  state->m_channelWidth = 80;
1123  }
1124  //This is a workaround to enable users to force a 20 or 40 MHz channel for a VHT-compliant device,
1125  //since IEEE 802.11ac standard says that 20, 40 and 80 MHz channels are mandatory.
1126  if (m_wifiPhy->GetChannelWidth () < state->m_channelWidth)
1127  {
1129  }
1130  for (uint8_t i = 1; i <= m_wifiPhy->GetMaxSupportedTxSpatialStreams (); i++)
1131  {
1132  for (uint8_t j = 0; j < m_wifiPhy->GetNMcs (); j++)
1133  {
1134  WifiMode mcs = m_wifiPhy->GetMcs (j);
1135  if (mcs.GetModulationClass () == WIFI_MOD_CLASS_VHT && vhtCapabilities.IsSupportedMcs (mcs.GetMcsValue (), i))
1136  {
1137  AddSupportedMcs (from, mcs);
1138  }
1139  }
1140  }
1141  state->m_vhtCapabilities = Create<const VhtCapabilities> (vhtCapabilities);
1142 }
1143 
1144 void
1146 {
1147  //Used by all stations to record HE capabilities of remote stations
1148  NS_LOG_FUNCTION (this << from << heCapabilities);
1149  WifiRemoteStationState *state;
1150  state = LookupState (from);
1152  {
1153  if (heCapabilities.GetChannelWidthSet () & 0x04)
1154  {
1155  state->m_channelWidth = 160;
1156  }
1157  else if (heCapabilities.GetChannelWidthSet () & 0x02)
1158  {
1159  state->m_channelWidth = 80;
1160  }
1161  //For other cases at 5 GHz, the supported channel width is set by the VHT capabilities
1162  }
1163  else if (m_wifiPhy->GetPhyBand () == WIFI_PHY_BAND_2_4GHZ)
1164  {
1165  if (heCapabilities.GetChannelWidthSet () & 0x01)
1166  {
1167  state->m_channelWidth = 40;
1168  }
1169  else
1170  {
1171  state->m_channelWidth = 20;
1172  }
1173  }
1174  if (heCapabilities.GetHeLtfAndGiForHePpdus () >= 2)
1175  {
1176  state->m_guardInterval = 800;
1177  }
1178  else if (heCapabilities.GetHeLtfAndGiForHePpdus () == 1)
1179  {
1180  state->m_guardInterval = 1600;
1181  }
1182  else
1183  {
1184  state->m_guardInterval = 3200;
1185  }
1186  for (uint8_t i = 1; i <= m_wifiPhy->GetMaxSupportedTxSpatialStreams (); i++)
1187  {
1188  for (uint8_t j = 0; j < m_wifiPhy->GetNMcs (); j++)
1189  {
1190  WifiMode mcs = m_wifiPhy->GetMcs (j);
1192  && heCapabilities.GetHighestNssSupported () >= i
1193  && heCapabilities.GetHighestMcsSupported () >= j)
1194  {
1195  AddSupportedMcs (from, mcs);
1196  }
1197  }
1198  }
1199  state->m_heCapabilities = Create<const HeCapabilities> (heCapabilities);
1200  SetQosSupport (from, true);
1201 }
1202 
1205 {
1206  return LookupState (from)->m_htCapabilities;
1207 }
1208 
1211 {
1212  return LookupState (from)->m_vhtCapabilities;
1213 }
1214 
1217 {
1218  return LookupState (from)->m_heCapabilities;
1219 }
1220 
1221 bool
1223 {
1225 
1226  if (!htCapabilities)
1227  {
1228  return false;
1229  }
1230  return htCapabilities->GetGreenfield ();
1231 }
1232 
1233 bool
1235 {
1239  bool supported = false;
1240  if (htCapabilities)
1241  {
1242  supported |= htCapabilities->GetLdpc ();
1243  }
1244  if (vhtCapabilities)
1245  {
1246  supported |= vhtCapabilities->GetRxLdpc ();
1247  }
1248  if (heCapabilities)
1249  {
1250  supported |= heCapabilities->GetLdpcCodingInPayload ();
1251  }
1252  return supported;
1253 }
1254 
1255 WifiMode
1257 {
1258  return m_defaultTxMode;
1259 }
1260 
1261 WifiMode
1263 {
1264  return m_defaultTxMcs;
1265 }
1266 
1267 void
1269 {
1270  NS_LOG_FUNCTION (this);
1271  for (StationStates::const_iterator i = m_states.begin (); i != m_states.end (); i++)
1272  {
1273  delete (*i);
1274  }
1275  m_states.clear ();
1276  for (Stations::const_iterator i = m_stations.begin (); i != m_stations.end (); i++)
1277  {
1278  delete (*i);
1279  }
1280  m_stations.clear ();
1281  m_bssBasicRateSet.clear ();
1282  m_bssBasicMcsSet.clear ();
1283  m_ssrc.fill (0);
1284  m_slrc.fill (0);
1285 }
1286 
1287 void
1289 {
1290  NS_LOG_FUNCTION (this << mode);
1291  if (mode.GetModulationClass () >= WIFI_MOD_CLASS_HT)
1292  {
1293  NS_FATAL_ERROR ("It is not allowed to add a HT rate in the BSSBasicRateSet!");
1294  }
1295  for (uint8_t i = 0; i < GetNBasicModes (); i++)
1296  {
1297  if (GetBasicMode (i) == mode)
1298  {
1299  return;
1300  }
1301  }
1302  m_bssBasicRateSet.push_back (mode);
1303 }
1304 
1305 uint8_t
1307 {
1308  return static_cast<uint8_t> (m_bssBasicRateSet.size ());
1309 }
1310 
1311 WifiMode
1313 {
1314  NS_ASSERT (i < GetNBasicModes ());
1315  return m_bssBasicRateSet[i];
1316 }
1317 
1318 uint32_t
1320 {
1321  uint32_t size = 0;
1322  for (WifiModeListIterator i = m_bssBasicRateSet.begin (); i != m_bssBasicRateSet.end (); i++)
1323  {
1324  if (i->GetModulationClass () == WIFI_MOD_CLASS_ERP_OFDM)
1325  {
1326  continue;
1327  }
1328  size++;
1329  }
1330  return size;
1331 }
1332 
1333 WifiMode
1335 {
1337  uint32_t index = 0;
1338  bool found = false;
1339  for (WifiModeListIterator j = m_bssBasicRateSet.begin (); j != m_bssBasicRateSet.end (); )
1340  {
1341  if (i == index)
1342  {
1343  found = true;
1344  }
1345  if (j->GetModulationClass () != WIFI_MOD_CLASS_ERP_OFDM)
1346  {
1347  if (found)
1348  {
1349  break;
1350  }
1351  }
1352  index++;
1353  j++;
1354  }
1355  return m_bssBasicRateSet[index];
1356 }
1357 
1358 void
1360 {
1361  NS_LOG_FUNCTION (this << +mcs.GetMcsValue ());
1362  for (uint8_t i = 0; i < GetNBasicMcs (); i++)
1363  {
1364  if (GetBasicMcs (i) == mcs)
1365  {
1366  return;
1367  }
1368  }
1369  m_bssBasicMcsSet.push_back (mcs);
1370 }
1371 
1372 uint8_t
1374 {
1375  return static_cast<uint8_t> (m_bssBasicMcsSet.size ());
1376 }
1377 
1378 WifiMode
1380 {
1381  NS_ASSERT (i < GetNBasicMcs ());
1382  return m_bssBasicMcsSet[i];
1383 }
1384 
1385 WifiMode
1387 {
1388  if (m_nonUnicastMode == WifiMode ())
1389  {
1390  if (GetNBasicModes () > 0)
1391  {
1392  return GetBasicMode (0);
1393  }
1394  else
1395  {
1396  return GetDefaultMode ();
1397  }
1398  }
1399  else
1400  {
1401  return m_nonUnicastMode;
1402  }
1403 }
1404 
1405 bool
1407  uint32_t size, bool normally)
1408 {
1409  return normally;
1410 }
1411 
1412 bool
1414  Ptr<const Packet> packet, bool normally)
1415 {
1416  return normally;
1417 }
1418 
1419 bool
1421  Ptr<const Packet> packet, bool normally)
1422 {
1423  return normally;
1424 }
1425 
1426 void
1427 WifiRemoteStationManager::DoReportAmpduTxStatus (WifiRemoteStation *station, uint8_t nSuccessfulMpdus, uint8_t nFailedMpdus, double rxSnr, double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss)
1428 {
1429  NS_LOG_DEBUG ("DoReportAmpduTxStatus received but the manager does not handle A-MPDUs!");
1430 }
1431 
1432 WifiMode
1434 {
1435  NS_ASSERT (i < GetNSupported (station));
1436  return station->m_state->m_operationalRateSet[i];
1437 }
1438 
1439 WifiMode
1441 {
1442  NS_ASSERT (i < GetNMcsSupported (station));
1443  return station->m_state->m_operationalMcsSet[i];
1444 }
1445 
1446 WifiMode
1448 {
1449  NS_ASSERT (i < GetNNonErpSupported (station));
1450  //IEEE 802.11g standard defines that if the protection mechanism is enabled, RTS, CTS and CTS-To-Self
1451  //frames should select a rate in the BSSBasicRateSet that corresponds to an 802.11b basic rate.
1452  //This is a implemented here to avoid changes in every RAA, but should maybe be moved in case it breaks standard rules.
1453  uint32_t index = 0;
1454  bool found = false;
1455  for (WifiModeListIterator j = station->m_state->m_operationalRateSet.begin (); j != station->m_state->m_operationalRateSet.end (); )
1456  {
1457  if (i == index)
1458  {
1459  found = true;
1460  }
1461  if (j->GetModulationClass () != WIFI_MOD_CLASS_ERP_OFDM)
1462  {
1463  if (found)
1464  {
1465  break;
1466  }
1467  }
1468  index++;
1469  j++;
1470  }
1471  return station->m_state->m_operationalRateSet[index];
1472 }
1473 
1476 {
1477  return station->m_state->m_address;
1478 }
1479 
1480 uint16_t
1482 {
1483  return station->m_state->m_channelWidth;
1484 }
1485 
1486 bool
1488 {
1489  Ptr<const HtCapabilities> htCapabilities = station->m_state->m_htCapabilities;
1490 
1491  if (!htCapabilities)
1492  {
1493  return false;
1494  }
1495  return htCapabilities->GetShortGuardInterval20 ();
1496 }
1497 
1498 uint16_t
1500 {
1501  return station->m_state->m_guardInterval;
1502 }
1503 
1504 bool
1506 {
1507  Ptr<const HtCapabilities> htCapabilities = station->m_state->m_htCapabilities;
1508 
1509  if (!htCapabilities)
1510  {
1511  return false;
1512  }
1513  return htCapabilities->GetGreenfield ();
1514 }
1515 
1516 bool
1518 {
1519  return station->m_state->m_aggregation;
1520 }
1521 
1522 uint8_t
1524 {
1525  Ptr<const HtCapabilities> htCapabilities = station->m_state->m_htCapabilities;
1526 
1527  if (!htCapabilities)
1528  {
1529  return 1;
1530  }
1531  return htCapabilities->GetRxHighestSupportedAntennas ();
1532 }
1533 
1534 uint8_t
1536 {
1537  return station->m_state->m_ness;
1538 }
1539 
1542 {
1543  return m_wifiPhy;
1544 }
1545 
1548 {
1549  return m_wifiMac;
1550 }
1551 
1552 uint8_t
1554 {
1555  return static_cast<uint8_t> (station->m_state->m_operationalRateSet.size ());
1556 }
1557 
1558 bool
1560 {
1561  return station->m_state->m_qosSupported;
1562 }
1563 
1564 bool
1566 {
1567  return (station->m_state->m_htCapabilities != 0);
1568 }
1569 
1570 bool
1572 {
1573  return (station->m_state->m_vhtCapabilities != 0);
1574 }
1575 
1576 bool
1578 {
1579  return (station->m_state->m_heCapabilities != 0);
1580 }
1581 
1582 uint8_t
1584 {
1585  return static_cast<uint8_t> (station->m_state->m_operationalMcsSet.size ());
1586 }
1587 
1588 uint32_t
1590 {
1591  uint32_t size = 0;
1592  for (WifiModeListIterator i = station->m_state->m_operationalRateSet.begin (); i != station->m_state->m_operationalRateSet.end (); i++)
1593  {
1594  if (i->GetModulationClass () == WIFI_MOD_CLASS_ERP_OFDM)
1595  {
1596  continue;
1597  }
1598  size++;
1599  }
1600  return size;
1601 }
1602 
1603 uint16_t
1605 {
1607 }
1608 
1609 bool
1611 {
1613 
1614  if (!htCapabilities)
1615  {
1616  return false;
1617  }
1618  return htCapabilities->GetShortGuardInterval20 ();
1619 }
1620 
1621 uint8_t
1623 {
1625 
1626  if (!htCapabilities)
1627  {
1628  return 1;
1629  }
1630  return htCapabilities->GetRxHighestSupportedAntennas ();
1631 }
1632 
1633 uint8_t
1635 {
1636  return static_cast<uint8_t> (LookupState (address)->m_operationalMcsSet.size ());
1637 }
1638 
1639 bool
1641 {
1642  return (LookupState (address)->m_htCapabilities != 0);
1643 }
1644 
1645 bool
1647 {
1648  return (LookupState (address)->m_vhtCapabilities != 0);
1649 }
1650 
1651 bool
1653 {
1654  return (LookupState (address)->m_heCapabilities != 0);
1655 }
1656 
1657 void
1659 {
1660  m_defaultTxPowerLevel = txPower;
1661 }
1662 
1663 uint8_t
1665 {
1666  return m_wifiPhy->GetNumberOfAntennas ();
1667 }
1668 
1669 uint8_t
1671 {
1673 }
1674 
1675 bool
1677 {
1679 }
1680 
1681 bool
1683 {
1684  return (GetLdpcSupported () && GetLdpcSupported (dest));
1685 }
1686 
1687 } //namespace ns3
std::array< uint32_t, AC_BE_NQOS > m_ssrc
short retry count per AC
uint8_t GetNMcsSupported(Mac48Address address) const
Return the number of MCS supported by the station.
bool m_useNonHtProtection
flag if protection for non-HT stations against HT transmissions is enabled
bool m_shortPreamble
Flag if short PHY preamble is supported by the remote station.
uint8_t GetChannelWidthSet(void) const
Get channel width set.
void AddSupportedMcs(Mac48Address address, WifiMode mcs)
Record the MCS index supported by the station.
uint32_t GetNFragments(const WifiMacHeader *header, Ptr< const Packet > packet)
Return the number of fragments needed for the given packet.
Ptr< WifiMac > GetMac(void) const
Return the WifiMac.
void SetDefaultTxPowerLevel(uint8_t txPower)
Set the default transmission power level.
bool GetVhtSupported(void) const
Return whether the device has VHT capability support enabled.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
uint8_t GetNSupported(const WifiRemoteStation *station) const
Return the number of modes supported by the given station.
ERP-OFDM PHY (19.5)
Definition: wifi-mode.h:56
Ptr< HeConfiguration > GetHeConfiguration(void) const
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
uint32_t m_rtsCtsThreshold
Threshold for RTS/CTS.
bool m_shortSlotTimeEnabled
flag if short slot time is enabled
enum ns3::WifiRemoteStationState::@77 m_state
State of the station.
WifiMode GetMcs(uint8_t mcs) const
The WifiPhy::GetMcs() method is used (e.g., by a WifiRemoteStationManager) to determine the set of tr...
Definition: wifi-phy.cc:4314
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:45
void SetChannelWidth(uint16_t channelWidth)
Sets the selected channelWidth (in MHz)
bool GetShortPreambleSupported(Mac48Address address) const
Return whether the station supports short PHY preamble or not.
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
Definition: packet.h:852
void ReportFinalDataFailed(Mac48Address address, const WifiMacHeader *header, uint32_t packetSize)
Should be invoked after calling ReportDataFailed if NeedRetransmission returns false.
void AddAllSupportedMcs(Mac48Address address)
Invoked in a STA or AP to store all of the MCS supported by a destination which is also supported loc...
std::array< uint32_t, AC_BE_NQOS > m_slrc
long retry count per AC
void RecordWaitAssocTxOk(Mac48Address address)
Records that we are waiting for an ACK for the association response we sent.
virtual void DoReportRtsFailed(WifiRemoteStation *station)=0
This method is a pure virtual method that must be implemented by the sub-class.
static const uint32_t packetSize
WifiMode m_nonUnicastMode
Transmission mode for non-unicast Data frames.
void SetBssColor(uint8_t color)
Set the BSS color.
WifiPhyBand GetPhyBand(void) const
Get the configured Wi-Fi band.
Definition: wifi-phy.cc:1426
uint32_t m_nextFragmentationThreshold
Threshold for fragmentation that will be used for the next transmission.
void AddStationVhtCapabilities(Mac48Address from, VhtCapabilities vhtCapabilities)
Records VHT capabilities of the remote station.
uint32_t GetSize(void) const
Return the size of the WifiMacHeader in octets.
Mac48Address GetAddr1(void) const
Return the address in the Address 1 field.
bool GetHeSupported(void) const
Return whether the device has HE capability support enabled.
#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
Ptr< const HeCapabilities > m_heCapabilities
remote station HE capabilities
static const uint16_t WIFI_MAC_FCS_LENGTH
The length in octects of the IEEE 802.11 MAC FCS field.
WifiMode GetDefaultMcs(void) const
Return the default Modulation and Coding Scheme (MCS) index.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:205
uint32_t m_fragmentationThreshold
Current threshold for fragmentation.
The HT Capabilities Information ElementThis class knows how to serialise and deserialise the HT Capab...
uint8_t m_defaultTxPowerLevel
Default transmission power level.
void AddSupportedPhyPreamble(Mac48Address address, bool isShortPreambleSupported)
Record whether the short PHY preamble is supported by the station.
WifiMode GetNonUnicastMode(void) const
Return a mode for non-unicast packets.
WifiMode GetBasicMcs(uint8_t i) const
Return the MCS at the given list index.
Mac48Address m_address
Mac48Address of the remote station.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:165
void UpdateFragmentationThreshold(void)
Typically called to update the fragmentation threshold at the start of a new transmission.
void SetPcfSupported(bool enable)
Enable or disable PCF capability support.
bool GetUseNonHtProtection(void) const
Return whether the device supports protection of non-HT stations.
bool IsLastFragment(Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet, uint32_t fragmentNumber)
VHT PHY (Clause 22)
Definition: wifi-mode.h:62
The 5 GHz band.
Definition: wifi-phy-band.h:35
void ReportDataOk(Mac48Address address, const WifiMacHeader *header, double ackSnr, WifiMode ackMode, double dataSnr, WifiTxVector dataTxVector, uint32_t packetSize)
Should be invoked whenever we receive the ACK associated to a data packet we just sent...
uint8_t GetNss(uint16_t staId=SU_STA_ID) const
If this TX vector is associated with an SU PPDU, return the number of spatial streams.
TracedCallback< Mac48Address > m_macTxFinalRtsFailed
The trace source fired when the transmission of a RTS has exceeded the maximum number of attempts...
uint32_t GetFragmentationThreshold(void) const
Return the fragmentation threshold.
void SetLdpc(bool ldpc)
Sets if LDPC FEC coding is being used.
WifiPreamble GetPreambleForTransmission(WifiModulationClass modulation, bool useShortPreamble, bool useGreenfield)
Return the preamble to be used for the transmission.
Definition: wifi-utils.cc:116
bool GetUseGreenfieldProtection(void) const
Return whether protection for stations that do not support HT Greenfield format is enabled...
WifiMode GetSupported(const WifiRemoteStation *station, uint8_t i) const
Return whether mode associated with the specified station at the specified index. ...
uint8_t GetNBasicMcs(void) const
Return the number of basic MCS index.
Ptr< const AttributeChecker > MakeWifiModeChecker(void)
Definition: wifi-mode.cc:667
uint32_t GetNNonErpSupported(const WifiRemoteStation *station) const
Return the number of non-ERP modes supported by the given station.
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
Definition: wifi-mode.h:99
bool m_shortPreambleEnabled
flag if short PHY preamble is enabled
uint8_t GetSupportedChannelWidth(void) const
Return the supported channel width.
TID independent remote station statistics.
WifiRemoteStationState * m_state
Remote station state.
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
bool IsMandatory(void) const
Definition: wifi-mode.cc:451
void RecordDisassociated(Mac48Address address)
Records that the STA was disassociated.
phy
Definition: third.py:93
TracedCallback< Mac48Address > m_macTxFinalDataFailed
The trace source fired when the transmission of a data packet has exceeded the maximum number of atte...
WifiMode GetMode(uint16_t staId=SU_STA_ID) const
If this TX vector is associated with an SU PPDU, return the selected payload transmission mode...
uint16_t GetChannelWidth(void) const
Definition: wifi-phy.cc:1516
void SetShortSlotTimeEnabled(bool enable)
Enable or disable short slot time.
WifiTxVector GetDataTxVector(const WifiMacHeader &header)
uint8_t GetNMcs(void) const
The WifiPhy::GetNMcs() method is used (e.g., by a WifiRemoteStationManager) to determine the set of t...
Definition: wifi-phy.cc:4308
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
Definition: wifi-preamble.h:32
uint8_t GetNumberOfSupportedStreams(Mac48Address address) const
Return the number of spatial streams supported by the station.
bool GetShortPreambleEnabled(void) const
Return whether the device uses short PHY preambles.
bool GetGreenfield(const WifiRemoteStation *station) const
Return whether the station supports Greenfield or not.
ProtectionMode m_htProtectionMode
Protection mode for HT stations when non-HT stations are detected.
void SetRtsCtsThreshold(uint32_t threshold)
Sets the RTS threshold.
bool GetLdpcSupported(void) const
Return whether the device has LDPC support enabled.
bool m_qosSupported
Flag if QoS is supported by the station.
Hold variables of type enum.
Definition: enum.h:54
WifiRemoteStationState * LookupState(Mac48Address address) const
Return the state of the station associated with the given address.
WifiMode m_defaultTxMcs
The default transmission modulation-coding scheme (MCS)
bool IsSupportedMcs(uint8_t mcs) const
Return the is MCS supported flag.
virtual void DoReportRtsOk(WifiRemoteStation *station, double ctsSnr, WifiMode ctsMode, double rtsSnr)=0
This method is a pure virtual method that must be implemented by the sub-class.
Ptr< WifiPhy > m_wifiPhy
This is a pointer to the WifiPhy associated with this WifiRemoteStationManager that is set on call to...
virtual void DoReportRxOk(WifiRemoteStation *station, double rxSnr, WifiMode txMode)=0
This method is a pure virtual method that must be implemented by the sub-class.
void ReportRtsFailed(Mac48Address address, const WifiMacHeader *header)
Should be invoked whenever the RtsTimeout associated to a transmission attempt expires.
bool GetPcfSupported(void) const
Return whether the device has PCF capability support enabled.
bool GetShortSlotTimeSupported(Mac48Address address) const
Return whether the station supports short ERP slot time or not.
The IEEE 802.11ac VHT Capabilities.
void SetGuardInterval(uint16_t guardInterval)
Sets the guard interval duration (in nanoseconds)
void AddStationHtCapabilities(Mac48Address from, HtCapabilities htCapabilities)
Records HT capabilities of the remote station.
bool m_useNonErpProtection
flag if protection for non-ERP stations against ERP transmissions is enabled
Hold an unsigned integer type.
Definition: uinteger.h:44
virtual void DoReportDataFailed(WifiRemoteStation *station)=0
This method is a pure virtual method that must be implemented by the sub-class.
uint8_t GetSupportedChannelWidthSet() const
Get the supported channel width set.
Ptr< const AttributeAccessor > MakeEnumAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Definition: enum.h:203
void ReportRxOk(Mac48Address address, double rxSnr, WifiMode txMode)
void RecordGotAssocTxFailed(Mac48Address address)
Records that we missed an ACK for the association response we sent.
bool GetHtSupported(void) const
Return whether the device has HT capability support enabled.
mac
Definition: third.py:99
uint16_t ConvertGuardIntervalToNanoSeconds(WifiMode mode, const Ptr< WifiNetDevice > device)
Convert the guard interval to nanoseconds based on the WifiMode.
Definition: wifi-utils.cc:59
WifiRemoteStationInfo GetInfo(Mac48Address address)
AcIndex QosUtilsMapTidToAc(uint8_t tid)
Maps TID (Traffic ID) to Access classes.
Definition: qos-utils.cc:32
uint8_t GetQosTid(void) const
Return the Traffic ID of a QoS header.
void SetMaxSsrc(uint32_t maxSsrc)
Sets the maximum STA short retry count (SSRC).
void AddStationHeCapabilities(Mac48Address from, HeCapabilities heCapabilities)
Records HE capabilities of the remote station.
HT PHY (Clause 20)
Definition: wifi-mode.h:60
uint32_t m_maxSlrc
Maximum STA long retry count (SLRC)
bool m_pcfSupported
Flag if PCF capability is supported.
Ptr< const HeCapabilities > GetStationHeCapabilities(Mac48Address from)
Return the HE capabilities sent by the remote station.
bool NeedRetransmission(Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet)
Ptr< WifiMac > m_wifiMac
This is a pointer to the WifiMac associated with this WifiRemoteStationManager that is set on call to...
Ptr< const VhtCapabilities > m_vhtCapabilities
remote station VHT capabilities
uint32_t GetNNonErpBasicModes(void) const
Return the number of non-ERP basic modes we support.
WifiTxVector GetCtsToSelfTxVector(void)
Since CTS-to-self parameters are not dependent on the station, it is implemented in wifi remote stati...
Ptr< const HtCapabilities > m_htCapabilities
remote station HT capabilities
bool IsSupportedMcs(uint8_t mcs, uint8_t nss) const
Get the is MCS supported.
WifiMode GetNonErpBasicMode(uint8_t i) const
Return a basic mode from the set of basic modes that is not an ERP mode.
bool IsAssociated(Mac48Address address) const
Return whether the station associated.
virtual void SetupPhy(const Ptr< WifiPhy > phy)
Set up PHY associated with this device since it is the object that knows the full set of transmit rat...
hold a list of per-remote-station state.
WifiModulationClass GetModulationClass() const
Definition: wifi-mode.cc:480
bool GetQosSupported(Mac48Address address) const
Return whether the given station is QoS capable.
Ptr< const HtCapabilities > GetStationHtCapabilities(Mac48Address from)
Return the HT capabilities sent by the remote station.
bool NeedRts(const WifiMacHeader &header, uint32_t size)
WifiMode GetDefaultMode(void) const
Return the default transmission mode.
void SetQosSupport(Mac48Address from, bool qosSupported)
Records QoS support of the remote station.
WifiMode m_defaultTxMode
The default transmission mode.
void SetNss(uint8_t nss)
Sets the number of Nss.
WifiModeList m_bssBasicRateSet
This member is the list of WifiMode objects that comprise the BSSBasicRateSet parameter.
uint64_t Get(void) const
Definition: uinteger.cc:35
uint32_t GetFragmentOffset(Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet, uint32_t fragmentNumber)
bool GetShortSlotTimeEnabled(void) const
Return whether the device uses short slot time.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
address
Definition: first.py:44
void SetPreambleType(WifiPreamble preamble)
Sets the preamble type.
uint8_t GetNumberOfAntennas(void) const
Definition: wifi-phy.cc:1530
void AddSupportedMode(Mac48Address address, WifiMode mode)
Invoked in a STA or AP to store the set of modes supported by a destination which is also supported l...
WifiModeList m_operationalRateSet
This member is the list of WifiMode objects that comprise the OperationalRateSet parameter for this r...
uint32_t GetFragmentSize(Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet, uint32_t fragmentNumber)
void DoSetFragmentationThreshold(uint32_t threshold)
Actually sets the fragmentation threshold, it also checks the validity of the given threshold...
void AddBasicMode(WifiMode mode)
Invoked in a STA upon association to store the set of rates which belong to the BSSBasicRateSet of th...
uint16_t GetChannelWidthForTransmission(WifiMode mode, uint16_t maxSupportedChannelWidth)
Return the channel width that corresponds to the selected mode (instead of letting the PHY&#39;s default ...
Definition: wifi-utils.cc:97
void SetUseNonErpProtection(bool enable)
Enable or disable protection for non-ERP stations.
WifiModeList::const_iterator WifiModeListIterator
An iterator for WifiModeList vector.
Definition: wifi-mode.h:290
bool UseGreenfieldForDestination(Mac48Address dest) const
bool m_useGreenfieldProtection
flag if protection for stations that do not support HT Greenfield format is enabled ...
bool m_aggregation
Flag if MPDU aggregation is used by the remote station.
an EUI-48 address
Definition: mac48-address.h:43
TracedCallback< Mac48Address > m_macTxRtsFailed
The trace source fired when the transmission of a single RTS has failed.
virtual void DoReportDataOk(WifiRemoteStation *station, double ackSnr, WifiMode ackMode, double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss)=0
This method is a pure virtual method that must be implemented by the sub-class.
Mac48Address GetAddress(const WifiRemoteStation *station) const
Return the address of the station.
WifiMode GetNonErpSupported(const WifiRemoteStation *station, uint8_t i) const
Return whether non-ERP mode associated with the specified station at the specified index...
void SetTxPowerLevel(uint8_t powerlevel)
Sets the selected transmission power level.
Ptr< const AttributeAccessor > MakeWifiModeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Definition: wifi-mode.h:278
void SetNTx(uint8_t nTx)
Sets the number of TX antennas.
The 2.4 GHz band.
Definition: wifi-phy-band.h:33
bool GetShortGuardIntervalSupported(void) const
Return whether the device has SGI support enabled.
Stations m_stations
Information for each known stations.
void ReportRtsOk(Mac48Address address, const WifiMacHeader *header, double ctsSnr, WifiMode ctsMode, double rtsSnr)
Should be invoked whenever we receive the CTS associated to an RTS we just sent.
TracedCallback< Mac48Address > m_macTxDataFailed
The trace source fired when the transmission of a single data packet has failed.
bool GetAggregation(const WifiRemoteStation *station) const
Return whether the given station supports A-MPDU.
uint16_t m_channelWidth
Channel width (in MHz) supported by the remote station.
virtual bool DoNeedRetransmission(WifiRemoteStation *station, Ptr< const Packet > packet, bool normally)
uint8_t GetHighestMcsSupported(void) const
Get highest MCS supported.
void AddBasicMcs(WifiMode mcs)
Add a given Modulation and Coding Scheme (MCS) index to the set of basic MCS.
void SetMode(WifiMode mode)
Sets the selected payload transmission mode.
uint8_t GetNModes(void) const
The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used (e.g., by a WifiRemoteStationManager...
Definition: wifi-phy.cc:4296
virtual bool DoNeedFragmentation(WifiRemoteStation *station, Ptr< const Packet > packet, bool normally)
bool NeedCtsToSelf(WifiTxVector txVector)
Return if we need to do CTS-to-self before sending a DATA.
uint8_t GetNBasicModes(void) const
Return the number of basic modes we support.
uint8_t GetHeLtfAndGiForHePpdus(void) const
Get HE LTF and GI for HE PDPUs.
void SetUseNonHtProtection(bool enable)
Enable or disable protection for non-HT stations.
WifiMode GetMode(uint8_t mode) const
The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used (e.g., by a WifiRemoteStationManager...
Definition: wifi-phy.cc:4302
virtual void SetupMac(const Ptr< WifiMac > mac)
Set up MAC associated with this device since it is the object that knows the full set of timing param...
void SetMaxSlrc(uint32_t maxSlrc)
Sets the maximum STA long retry count (SLRC).
Ptr< WifiPhy > GetPhy(void) const
Return the WifiPhy.
void ReportDataFailed(Mac48Address address, const WifiMacHeader *header, uint32_t packetSize)
Should be invoked whenever the AckTimeout associated to a transmission attempt expires.
uint16_t GetGuardInterval(void) const
Return the supported HE guard interval duration (in nanoseconds).
bool IsMgt(void) const
Return true if the Type is Management.
A struct that holds information about each remote station.
WifiModeList m_operationalMcsSet
operational MCS set
static TypeId GetTypeId(void)
Get the type ID.
void AddSupportedErpSlotTime(Mac48Address address, bool isShortSlotTimeSupported)
Record whether the short ERP slot time is supported by the station.
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
Definition: log.h:265
void SetFragmentationThreshold(uint32_t threshold)
Sets a fragmentation threshold.
void Reset(void)
Reset the station, invoked in a STA upon dis-association or in an AP upon reboot. ...
bool GetUseNonErpProtection(void) const
Return whether the device supports protection of non-ERP stations.
uint32_t m_maxSsrc
Maximum STA short retry count (SSRC)
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:273
virtual void DoDispose(void)
Destructor implementation.
Ptr< const VhtCapabilities > GetStationVhtCapabilities(Mac48Address from)
Return the VHT capabilities sent by the remote station.
bool GetGreenfieldSupported(void) const
Return whether the device has HT Greenfield support enabled.
WifiTxVector GetRtsTxVector(Mac48Address address)
void SetUseGreenfieldProtection(bool enable)
Enable or disable protection for stations that do not support HT Greenfield format.
bool NeedFragmentation(Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet)
Ptr< const AttributeChecker > MakeEnumChecker(int v, std::string n, Ts... args)
Make an EnumChecker pre-configured with a set of allowed values by name.
Definition: enum.h:161
void SetNess(uint8_t ness)
Sets the Ness number.
virtual void DoReportAmpduTxStatus(WifiRemoteStation *station, uint8_t nSuccessfulMpdus, uint8_t nFailedMpdus, double rxSnr, double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss)
Typically called per A-MPDU, either when a Block ACK was successfully received or when a BlockAckTime...
Ptr< NetDevice > GetDevice(void) const
Return the device this PHY is associated with.
Definition: wifi-phy.cc:759
bool IsQosData(void) const
Return true if the Type is DATA and Subtype is one of the possible values for QoS Data...
uint8_t m_ness
Number of extended spatial streams of the remote station.
The 6 GHz band.
Definition: wifi-phy-band.h:37
uint16_t GetChannelWidth(void) const
bool UseLdpcForDestination(Mac48Address dest) const
bool m_shortSlotTime
Flag if short ERP slot time is supported by the remote station.
A base class which provides memory management and object aggregation.
Definition: object.h:87
AttributeValue implementation for WifiMode.
Definition: wifi-mode.h:278
StationStates m_states
States of known stations.
bool IsWaitAssocTxOk(Mac48Address address) const
Return whether we are waiting for an ACK for the association response we sent.
void SetShortPreambleEnabled(bool enable)
Enable or disable short PHY preambles.
virtual bool DoNeedRts(WifiRemoteStation *station, uint32_t size, bool normally)
ProtectionMode m_erpProtectionMode
Protection mode for ERP stations when non-ERP stations are detected.
WifiMode GetBasicMode(uint8_t i) const
Return a basic mode from the set of basic modes.
void AddAllSupportedModes(Mac48Address address)
Invoked in a STA or AP to store all of the modes supported by a destination which is also supported l...
virtual WifiTxVector DoGetDataTxVector(WifiRemoteStation *station)=0
Ptr< VhtConfiguration > GetVhtConfiguration(void) const
The IEEE 802.11ax HE Capabilities.
uint8_t GetMcsValue(void) const
Definition: wifi-mode.cc:458
Ptr< HtConfiguration > GetHtConfiguration(void) const
virtual void DoReportFinalDataFailed(WifiRemoteStation *station)=0
This method is a pure virtual method that must be implemented by the sub-class.
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
virtual WifiTxVector DoGetRtsTxVector(WifiRemoteStation *station)=0
bool IsBrandNew(Mac48Address address) const
Return whether the station state is brand new.
uint8_t GetMaxSupportedTxSpatialStreams(void) const
Definition: wifi-phy.cc:1549
a unique identifier for an interface.
Definition: type-id.h:58
void ReportFinalRtsFailed(Mac48Address address, const WifiMacHeader *header)
Should be invoked after calling ReportRtsFailed if NeedRetransmission returns false.
WifiRemoteStation * Lookup(Mac48Address address) const
Return the station associated with the given address.
void RemoveAllSupportedMcs(Mac48Address address)
Invoked in a STA or AP to delete all of the supported MCS by a destination.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:923
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
Definition: qos-utils.h:38
WifiRemoteStationInfo m_info
remote station info
WifiModeList m_bssBasicMcsSet
basic MCS set
virtual void DoReportFinalRtsFailed(WifiRemoteStation *station)=0
This method is a pure virtual method that must be implemented by the sub-class.
HE PHY (Clause 26)
Definition: wifi-mode.h:64
hold per-remote-station state.
virtual WifiRemoteStation * DoCreateStation(void) const =0
void RecordGotAssocTxOk(Mac48Address address)
Records that we got an ACK for the association response we sent.
uint8_t GetHighestNssSupported(void) const
Get highest NSS supported.
Implements the IEEE 802.11 MAC header.
WifiMode GetMcsSupported(const WifiRemoteStation *station, uint8_t i) const
Return the WifiMode supported by the specified station at the specified index.
uint16_t GetChannelWidthSupported(Mac48Address address) const
Return the channel width supported by the station.
uint16_t GetChannelWidth(const WifiRemoteStation *station) const
Return the channel width supported by the station.
uint8_t GetNess(const WifiRemoteStation *station) const
void ReportAmpduTxStatus(Mac48Address address, uint8_t nSuccessfulMpdus, uint8_t nFailedMpdus, double rxSnr, double dataSnr, WifiTxVector dataTxVector)
Typically called per A-MPDU, either when a Block ACK was successfully received or when a BlockAckTime...
uint16_t m_guardInterval
HE Guard interval duration (in nanoseconds) supported by the remote station.
uint32_t DoGetFragmentationThreshold(void) const
Return the current fragmentation threshold.