A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
yans-wifi-phy.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 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  * Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19  * Ghada Badawy <gbadawy@gmail.com>
20  * Sébastien Deronne <sebastien.deronne@gmail.com>
21  */
22 
23 #include "yans-wifi-phy.h"
24 #include "yans-wifi-channel.h"
25 #include "wifi-mode.h"
26 #include "wifi-preamble.h"
27 #include "wifi-phy-state-helper.h"
28 #include "error-rate-model.h"
29 #include "ns3/simulator.h"
30 #include "ns3/packet.h"
31 #include "ns3/assert.h"
32 #include "ns3/log.h"
33 #include "ns3/double.h"
34 #include "ns3/uinteger.h"
35 #include "ns3/enum.h"
36 #include "ns3/pointer.h"
37 #include "ns3/net-device.h"
38 #include "ns3/trace-source-accessor.h"
39 #include "ns3/boolean.h"
40 #include "ns3/node.h"
41 #include "ampdu-tag.h"
42 #include <cmath>
43 
44 namespace ns3 {
45 
46 NS_LOG_COMPONENT_DEFINE ("YansWifiPhy");
47 
48 NS_OBJECT_ENSURE_REGISTERED (YansWifiPhy);
49 
50 TypeId
52 {
53  static TypeId tid = TypeId ("ns3::YansWifiPhy")
54  .SetParent<WifiPhy> ()
55  .SetGroupName ("Wifi")
56  .AddConstructor<YansWifiPhy> ()
57  .AddAttribute ("EnergyDetectionThreshold",
58  "The energy of a received signal should be higher than "
59  "this threshold (dbm) to allow the PHY layer to detect the signal.",
60  DoubleValue (-96.0),
63  MakeDoubleChecker<double> ())
64  .AddAttribute ("CcaMode1Threshold",
65  "The energy of a received signal should be higher than "
66  "this threshold (dbm) to allow the PHY layer to declare CCA BUSY state.",
67  DoubleValue (-99.0),
70  MakeDoubleChecker<double> ())
71  .AddAttribute ("TxGain",
72  "Transmission gain (dB).",
73  DoubleValue (1.0),
76  MakeDoubleChecker<double> ())
77  .AddAttribute ("RxGain",
78  "Reception gain (dB).",
79  DoubleValue (1.0),
82  MakeDoubleChecker<double> ())
83  .AddAttribute ("TxPowerLevels",
84  "Number of transmission power levels available between "
85  "TxPowerStart and TxPowerEnd included.",
86  UintegerValue (1),
88  MakeUintegerChecker<uint32_t> ())
89  .AddAttribute ("TxPowerEnd",
90  "Maximum available transmission level (dbm).",
91  DoubleValue (16.0206),
94  MakeDoubleChecker<double> ())
95  .AddAttribute ("TxPowerStart",
96  "Minimum available transmission level (dbm).",
97  DoubleValue (16.0206),
100  MakeDoubleChecker<double> ())
101  .AddAttribute ("RxNoiseFigure",
102  "Loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver."
103  " According to Wikipedia (http://en.wikipedia.org/wiki/Noise_figure), this is "
104  "\"the difference in decibels (dB) between"
105  " the noise output of the actual receiver to the noise output of an "
106  " ideal receiver with the same overall gain and bandwidth when the receivers "
107  " are connected to sources at the standard noise temperature T0 (usually 290 K)\".",
108  DoubleValue (7),
111  MakeDoubleChecker<double> ())
112  .AddAttribute ("State",
113  "The state of the PHY layer.",
114  PointerValue (),
116  MakePointerChecker<WifiPhyStateHelper> ())
117  .AddAttribute ("ChannelSwitchDelay",
118  "Delay between two short frames transmitted on different frequencies.",
119  TimeValue (MicroSeconds (250)),
121  MakeTimeChecker ())
122  .AddAttribute ("ChannelNumber",
123  "Channel center frequency = Channel starting frequency + 5 MHz * nch.",
124  UintegerValue (1),
127  MakeUintegerChecker<uint16_t> ())
128  .AddAttribute ("Frequency",
129  "The operating frequency.",
130  UintegerValue (2407),
133  MakeUintegerChecker<uint32_t> ())
134  .AddAttribute ("TxAntennas",
135  "The number of supported Tx antennas.",
136  UintegerValue (1),
139  MakeUintegerChecker<uint32_t> ())
140  .AddAttribute ("RxAntennas",
141  "The number of supported Rx antennas.",
142  UintegerValue (1),
145  MakeUintegerChecker<uint32_t> ())
146  .AddAttribute ("ShortGuardEnabled",
147  "Whether or not short guard interval is enabled."
148  "This parameter is only valuable for 802.11n/ac STAs and APs.",
149  BooleanValue (false),
153  .AddAttribute ("LdpcEnabled",
154  "Whether or not LDPC is enabled.",
155  BooleanValue (false),
159  .AddAttribute ("STBCEnabled",
160  "Whether or not STBC is enabled.",
161  BooleanValue (false),
165  .AddAttribute ("GreenfieldEnabled",
166  "Whether or not Greenfield is enabled."
167  "This parameter is only valuable for 802.11n STAs and APs.",
168  BooleanValue (false),
172  .AddAttribute ("ShortPlcpPreambleSupported",
173  "Whether or not short PLCP preamble is supported."
174  "This parameter is only valuable for 802.11b STAs and APs."
175  "Note: 802.11g APs and STAs always support short PLCP preamble.",
176  BooleanValue (false),
180  .AddAttribute ("ChannelWidth",
181  "Whether 5MHz, 10MHz, 20MHz, 22MHz, 40MHz, 80 MHz or 160 MHz.",
182  UintegerValue (20),
185  MakeUintegerChecker<uint32_t> ())
186  ;
187  return tid;
188 }
189 
191  : m_initialized (false),
192  m_channelNumber (1),
193  m_endRxEvent (),
194  m_endPlcpRxEvent (),
195  m_channelStartingFrequency (0),
196  m_mpdusNum (0),
197  m_plcpSuccess (false),
198  m_txMpduReferenceNumber (0xffffffff),
199  m_rxMpduReferenceNumber (0xffffffff)
200 {
201  NS_LOG_FUNCTION (this);
202  m_random = CreateObject<UniformRandomVariable> ();
203  m_state = CreateObject<WifiPhyStateHelper> ();
204 }
205 
207 {
208  NS_LOG_FUNCTION (this);
209 }
210 
211 void
213 {
214  NS_LOG_FUNCTION (this);
215  m_channel = 0;
216  m_deviceRateSet.clear ();
217  m_deviceMcsSet.clear ();
218  m_device = 0;
219  m_mobility = 0;
220  m_state = 0;
221 }
222 
223 void
225 {
226  NS_LOG_FUNCTION (this);
227  m_initialized = true;
228 }
229 
230 void
232 {
233  NS_LOG_FUNCTION (this << standard);
234  switch (standard)
235  {
237  Configure80211a ();
238  break;
240  Configure80211b ();
241  break;
243  Configure80211g ();
244  break;
247  break;
250  break;
252  ConfigureHolland ();
253  break;
256  Configure80211n ();
257  break;
260  Configure80211n ();
261  break;
263  Configure80211ac ();
264  break;
265  default:
266  NS_ASSERT (false);
267  break;
268  }
269 }
270 
271 void
272 YansWifiPhy::SetRxNoiseFigure (double noiseFigureDb)
273 {
274  NS_LOG_FUNCTION (this << noiseFigureDb);
275  m_interference.SetNoiseFigure (DbToRatio (noiseFigureDb));
276 }
277 
278 void
280 {
281  NS_LOG_FUNCTION (this << start);
283 }
284 
285 void
287 {
288  NS_LOG_FUNCTION (this << end);
289  m_txPowerEndDbm = end;
290 }
291 
292 void
294 {
295  NS_LOG_FUNCTION (this << n);
296  m_nTxPower = n;
297 }
298 
299 void
301 {
302  NS_LOG_FUNCTION (this << gain);
303  m_txGainDb = gain;
304 }
305 
306 void
308 {
309  NS_LOG_FUNCTION (this << gain);
310  m_rxGainDb = gain;
311 }
312 
313 void
314 YansWifiPhy::SetEdThreshold (double threshold)
315 {
316  NS_LOG_FUNCTION (this << threshold);
317  m_edThresholdW = DbmToW (threshold);
318 }
319 
320 void
322 {
323  NS_LOG_FUNCTION (this << threshold);
324  m_ccaMode1ThresholdW = DbmToW (threshold);
325 }
326 
327 void
329 {
331 }
332 
333 void
335 {
336  m_device = device;
337 }
338 
339 void
341 {
343 }
344 
345 double
347 {
349 }
350 
351 double
353 {
354  return m_txPowerBaseDbm;
355 }
356 
357 double
359 {
360  return m_txPowerEndDbm;
361 }
362 
363 double
365 {
366  return m_txGainDb;
367 }
368 
369 double
371 {
372  return m_rxGainDb;
373 }
374 
375 double
377 {
378  return WToDbm (m_edThresholdW);
379 }
380 
381 double
383 {
384  return WToDbm (m_ccaMode1ThresholdW);
385 }
386 
389 {
391 }
392 
395 {
396  return m_device;
397 }
398 
401 {
402  if (m_mobility != 0)
403  {
404  return m_mobility;
405  }
406  else
407  {
408  return m_device->GetNode ()->GetObject<MobilityModel> ();
409  }
410 }
411 
412 double
413 YansWifiPhy::CalculateSnr (WifiTxVector txVector, double ber) const
414 {
415  return m_interference.GetErrorRateModel ()->CalculateSnr (txVector, ber);
416 }
417 
420 {
421  return m_channel;
422 }
423 
424 void
426 {
427  m_channel = channel;
428  m_channel->Add (this);
429 }
430 
431 void
433 {
434  if (!m_initialized)
435  {
436  //this is not channel switch, this is initialization
437  NS_LOG_DEBUG ("start at channel " << nch);
438  m_channelNumber = nch;
439  return;
440  }
441 
443  switch (m_state->GetState ())
444  {
445  case YansWifiPhy::RX:
446  NS_LOG_DEBUG ("drop packet because of channel switching while reception");
448  m_endRxEvent.Cancel ();
449  goto switchChannel;
450  break;
451  case YansWifiPhy::TX:
452  NS_LOG_DEBUG ("channel switching postponed until end of current transmission");
454  break;
456  case YansWifiPhy::IDLE:
457  goto switchChannel;
458  break;
459  case YansWifiPhy::SLEEP:
460  NS_LOG_DEBUG ("channel switching ignored in sleep mode");
461  break;
462  default:
463  NS_ASSERT (false);
464  break;
465  }
466 
467  return;
468 
469 switchChannel:
470 
471  NS_LOG_DEBUG ("switching channel " << m_channelNumber << " -> " << nch);
472  m_state->SwitchToChannelSwitching (m_channelSwitchDelay);
474  /*
475  * Needed here to be able to correctly sensed the medium for the first
476  * time after the switching. The actual switching is not performed until
477  * after m_channelSwitchDelay. Packets received during the switching
478  * state are added to the event list and are employed later to figure
479  * out the state of the medium after the switching.
480  */
481  m_channelNumber = nch;
482 }
483 
484 uint16_t
486 {
487  return m_channelNumber;
488 }
489 
490 Time
492 {
493  return m_channelSwitchDelay;
494 }
495 
496 double
498 {
500 }
501 
502 void
504 {
505  NS_LOG_FUNCTION (this);
506  switch (m_state->GetState ())
507  {
508  case YansWifiPhy::TX:
509  NS_LOG_DEBUG ("setting sleep mode postponed until end of current transmission");
511  break;
512  case YansWifiPhy::RX:
513  NS_LOG_DEBUG ("setting sleep mode postponed until end of current reception");
515  break;
517  NS_LOG_DEBUG ("setting sleep mode postponed until end of channel switching");
519  break;
521  case YansWifiPhy::IDLE:
522  NS_LOG_DEBUG ("setting sleep mode");
523  m_state->SwitchToSleep ();
524  break;
525  case YansWifiPhy::SLEEP:
526  NS_LOG_DEBUG ("already in sleep mode");
527  break;
528  default:
529  NS_ASSERT (false);
530  break;
531  }
532 }
533 
534 void
536 {
537  NS_LOG_FUNCTION (this);
538  switch (m_state->GetState ())
539  {
540  case YansWifiPhy::TX:
541  case YansWifiPhy::RX:
542  case YansWifiPhy::IDLE:
545  {
546  NS_LOG_DEBUG ("not in sleep mode, there is nothing to resume");
547  break;
548  }
549  case YansWifiPhy::SLEEP:
550  {
551  NS_LOG_DEBUG ("resuming from sleep mode");
553  m_state->SwitchFromSleep (delayUntilCcaEnd);
554  break;
555  }
556  default:
557  {
558  NS_ASSERT (false);
559  break;
560  }
561  }
562 }
563 
564 void
566 {
567  m_state->SetReceiveOkCallback (callback);
568 }
569 
570 void
572 {
573  m_state->SetReceiveErrorCallback (callback);
574 }
575 
576 void
578  double rxPowerDbm,
579  WifiTxVector txVector,
580  enum WifiPreamble preamble,
581  enum mpduType mpdutype,
582  Time rxDuration)
583 {
584  //This function should be later split to check separately whether plcp preamble and plcp header can be successfully received.
585  //Note: plcp preamble reception is not yet modeled.
586  NS_LOG_FUNCTION (this << packet << rxPowerDbm << txVector.GetMode () << preamble << (uint32_t)mpdutype);
587  AmpduTag ampduTag;
588  rxPowerDbm += m_rxGainDb;
589  double rxPowerW = DbmToW (rxPowerDbm);
590  Time endRx = Simulator::Now () + rxDuration;
591  Time preambleAndHeaderDuration = CalculatePlcpPreambleAndHeaderDuration (txVector, preamble);
592 
594  event = m_interference.Add (packet->GetSize (),
595  txVector,
596  preamble,
597  rxDuration,
598  rxPowerW);
599 
600  switch (m_state->GetState ())
601  {
603  NS_LOG_DEBUG ("drop packet because of channel switching");
604  NotifyRxDrop (packet);
605  m_plcpSuccess = false;
606  /*
607  * Packets received on the upcoming channel are added to the event list
608  * during the switching state. This way the medium can be correctly sensed
609  * when the device listens to the channel for the first time after the
610  * switching e.g. after channel switching, the channel may be sensed as
611  * busy due to other devices' tramissions started before the end of
612  * the switching.
613  */
614  if (endRx > Simulator::Now () + m_state->GetDelayUntilIdle ())
615  {
616  //that packet will be noise _after_ the completion of the
617  //channel switching.
618  goto maybeCcaBusy;
619  }
620  break;
621  case YansWifiPhy::RX:
622  NS_LOG_DEBUG ("drop packet because already in Rx (power=" <<
623  rxPowerW << "W)");
624  NotifyRxDrop (packet);
625  if (endRx > Simulator::Now () + m_state->GetDelayUntilIdle ())
626  {
627  //that packet will be noise _after_ the reception of the
628  //currently-received packet.
629  goto maybeCcaBusy;
630  }
631  break;
632  case YansWifiPhy::TX:
633  NS_LOG_DEBUG ("drop packet because already in Tx (power=" <<
634  rxPowerW << "W)");
635  NotifyRxDrop (packet);
636  if (endRx > Simulator::Now () + m_state->GetDelayUntilIdle ())
637  {
638  //that packet will be noise _after_ the transmission of the
639  //currently-transmitted packet.
640  goto maybeCcaBusy;
641  }
642  break;
644  case YansWifiPhy::IDLE:
645  if (rxPowerW > m_edThresholdW) //checked here, no need to check in the payload reception (current implementation assumes constant rx power over the packet duration)
646  {
647  if (preamble == WIFI_PREAMBLE_NONE && (m_mpdusNum == 0 || m_plcpSuccess == false))
648  {
649  m_plcpSuccess = false;
650  m_mpdusNum = 0;
651  NS_LOG_DEBUG ("drop packet because no PLCP preamble/header has been received");
652  NotifyRxDrop (packet);
653  goto maybeCcaBusy;
654  }
655  else if (preamble != WIFI_PREAMBLE_NONE && packet->PeekPacketTag (ampduTag) && m_mpdusNum == 0)
656  {
657  //received the first MPDU in an MPDU
658  m_mpdusNum = ampduTag.GetRemainingNbOfMpdus ();
660  }
661  else if (preamble == WIFI_PREAMBLE_NONE && packet->PeekPacketTag (ampduTag) && m_mpdusNum > 0)
662  {
663  //received the other MPDUs that are part of the A-MPDU
664  if (ampduTag.GetRemainingNbOfMpdus () < (m_mpdusNum - 1))
665  {
666  NS_LOG_DEBUG ("Missing MPDU from the A-MPDU " << m_mpdusNum - ampduTag.GetRemainingNbOfMpdus ());
667  m_mpdusNum = ampduTag.GetRemainingNbOfMpdus ();
668  }
669  else
670  {
671  m_mpdusNum--;
672  }
673  }
674  else if (preamble != WIFI_PREAMBLE_NONE && packet->PeekPacketTag (ampduTag) && m_mpdusNum > 0)
675  {
676  NS_LOG_DEBUG ("New A-MPDU started while " << m_mpdusNum << " MPDUs from previous are lost");
677  m_mpdusNum = ampduTag.GetRemainingNbOfMpdus ();
678  }
679  else if (preamble != WIFI_PREAMBLE_NONE && m_mpdusNum > 0 )
680  {
681  NS_LOG_DEBUG ("Didn't receive the last MPDUs from an A-MPDU " << m_mpdusNum);
682  m_mpdusNum = 0;
683  }
684 
685  NS_LOG_DEBUG ("sync to signal (power=" << rxPowerW << "W)");
686  //sync to signal
687  m_state->SwitchToRx (rxDuration);
689  NotifyRxBegin (packet);
691 
692  if (preamble != WIFI_PREAMBLE_NONE)
693  {
695  m_endPlcpRxEvent = Simulator::Schedule (preambleAndHeaderDuration, &YansWifiPhy::StartReceivePacket, this,
696  packet, txVector, preamble, mpdutype, event);
697  }
698 
701  packet, preamble, mpdutype, event);
702  }
703  else
704  {
705  NS_LOG_DEBUG ("drop packet because signal power too Small (" <<
706  rxPowerW << "<" << m_edThresholdW << ")");
707  NotifyRxDrop (packet);
708  m_plcpSuccess = false;
709  goto maybeCcaBusy;
710  }
711  break;
712  case YansWifiPhy::SLEEP:
713  NS_LOG_DEBUG ("drop packet because in sleep mode");
714  NotifyRxDrop (packet);
715  m_plcpSuccess = false;
716  break;
717  }
718 
719  return;
720 
721 maybeCcaBusy:
722  //We are here because we have received the first bit of a packet and we are
723  //not going to be able to synchronize on it
724  //In this model, CCA becomes busy when the aggregation of all signals as
725  //tracked by the InterferenceHelper class is higher than the CcaBusyThreshold
726 
728  if (!delayUntilCcaEnd.IsZero ())
729  {
730  m_state->SwitchMaybeToCcaBusy (delayUntilCcaEnd);
731  }
732 }
733 
734 void
736  WifiTxVector txVector,
737  enum WifiPreamble preamble,
738  enum mpduType mpdutype,
740 {
741  NS_LOG_FUNCTION (this << packet << txVector.GetMode () << preamble << (uint32_t)mpdutype);
742  NS_ASSERT (IsStateRx ());
744  AmpduTag ampduTag;
745  WifiMode txMode = txVector.GetMode ();
746 
747  struct InterferenceHelper::SnrPer snrPer;
748  snrPer = m_interference.CalculatePlcpHeaderSnrPer (event);
749 
750  NS_LOG_DEBUG ("snr(dB)=" << RatioToDb (snrPer.snr) << ", per=" << snrPer.per);
751 
752  if (m_random->GetValue () > snrPer.per) //plcp reception succeeded
753  {
754  if (IsModeSupported (txMode) || IsMcsSupported (txMode))
755  {
756  NS_LOG_DEBUG ("receiving plcp payload"); //endReceive is already scheduled
757  m_plcpSuccess = true;
758  }
759  else //mode is not allowed
760  {
761  NS_LOG_DEBUG ("drop packet because it was sent using an unsupported mode (" << txMode << ")");
762  NotifyRxDrop (packet);
763  m_plcpSuccess = false;
764  }
765  }
766  else //plcp reception failed
767  {
768  NS_LOG_DEBUG ("drop packet because plcp preamble/header reception failed");
769  NotifyRxDrop (packet);
770  m_plcpSuccess = false;
771  }
772 }
773 
774 void
776 {
777  SendPacket (packet, txVector, preamble, NORMAL_MPDU);
778 }
779 
780 void
782 {
783  NS_LOG_FUNCTION (this << packet << txVector.GetMode ()
784  << txVector.GetMode ().GetDataRate (txVector)
785  << preamble << (uint32_t)txVector.GetTxPowerLevel () << (uint32_t)mpdutype);
786  /* Transmission can happen if:
787  * - we are syncing on a packet. It is the responsability of the
788  * MAC layer to avoid doing this but the PHY does nothing to
789  * prevent it.
790  * - we are idle
791  */
792  NS_ASSERT (!m_state->IsStateTx () && !m_state->IsStateSwitching ());
793 
794  if (m_state->IsStateSleep ())
795  {
796  NS_LOG_DEBUG ("Dropping packet because in sleep mode");
797  NotifyTxDrop (packet);
798  return;
799  }
800 
801  Time txDuration = CalculateTxDuration (packet->GetSize (), txVector, preamble, GetFrequency (), mpdutype, 1);
802  NS_ASSERT (txDuration > NanoSeconds (0));
803 
804  if (m_state->IsStateRx ())
805  {
807  m_endRxEvent.Cancel ();
809  }
810  NotifyTxBegin (packet);
811  uint32_t dataRate500KbpsUnits;
813  {
814  dataRate500KbpsUnits = 128 + txVector.GetMode ().GetMcsValue ();
815  }
816  else
817  {
818  dataRate500KbpsUnits = txVector.GetMode ().GetDataRate (txVector.GetChannelWidth (), txVector.IsShortGuardInterval (), 1) * txVector.GetNss () / 500000;
819  }
820  if (mpdutype == MPDU_IN_AGGREGATE && preamble != WIFI_PREAMBLE_NONE)
821  {
822  //send the first MPDU in an MPDU
824  }
825  struct mpduInfo aMpdu;
826  aMpdu.type = mpdutype;
828  NotifyMonitorSniffTx (packet, (uint16_t)GetChannelFrequencyMhz (), GetChannelNumber (), dataRate500KbpsUnits, preamble, txVector, aMpdu);
829  m_state->SwitchToTx (txDuration, packet, GetPowerDbm (txVector.GetTxPowerLevel ()), txVector, preamble);
830  m_channel->Send (this, packet, GetPowerDbm (txVector.GetTxPowerLevel ()) + m_txGainDb, txVector, preamble, mpdutype, txDuration);
831 }
832 
833 uint32_t
835 {
836  return m_deviceRateSet.size ();
837 }
838 
839 WifiMode
840 YansWifiPhy::GetMode (uint32_t mode) const
841 {
842  return m_deviceRateSet[mode];
843 }
844 
845 bool
847 {
848  for (uint32_t i = 0; i < GetNModes (); i++)
849  {
850  if (mode == GetMode (i))
851  {
852  return true;
853  }
854  }
855  return false;
856 }
857 bool
859 {
860  for (uint32_t i = 0; i < GetNMcs (); i++)
861  {
862  if (mcs == GetMcs (i))
863  {
864  return true;
865  }
866  }
867  return false;
868 }
869 
870 uint32_t
872 {
873  return m_nTxPower;
874 }
875 
876 void
878 {
879  NS_LOG_FUNCTION (this);
880  m_channelStartingFrequency = 5e3; //5.000 GHz
881  SetChannelWidth (20); //20 MHz
882 
891 }
892 
893 void
895 {
896  NS_LOG_FUNCTION (this);
897  m_channelStartingFrequency = 2407; //2.407 GHz
898  SetChannelWidth (22); //22 MHz
899 
904 }
905 
906 void
908 {
909  NS_LOG_FUNCTION (this);
910  Configure80211b ();
911  SetChannelWidth (20); //20 MHz
912 
921 }
922 
923 void
925 {
926  NS_LOG_FUNCTION (this);
927  m_channelStartingFrequency = 5e3; //5.000 GHz, suppose 802.11a
928  SetChannelWidth (10); //10 MHz
929 
938 }
939 
940 void
942 {
943  NS_LOG_FUNCTION (this);
944  m_channelStartingFrequency = 5e3; //5.000 GHz, suppose 802.11a
945  SetChannelWidth (5); //5 MHz
946 
955 }
956 
957 void
959 {
960  NS_LOG_FUNCTION (this);
961  m_channelStartingFrequency = 5e3; //5.000 GHz
962  SetChannelWidth (20); //20 MHz
963 
969 }
970 
971 void
973 {
974  NS_LOG_FUNCTION (this);
975 
976  bool htFound = false;
977  for (std::vector<uint32_t>::size_type i = 0; i < m_bssMembershipSelectorSet.size (); i++)
978  {
980  {
981  htFound = true;
982  break;
983  }
984  }
985  if (htFound)
986  {
987  // erase all HtMcs modes from deviceMcsSet
988  size_t index = m_deviceMcsSet.size () - 1;
989  for (std::vector<WifiMode>::reverse_iterator rit = m_deviceMcsSet.rbegin (); rit != m_deviceMcsSet.rend(); ++rit, --index)
990  {
991  if (m_deviceMcsSet[index].GetModulationClass ()== WIFI_MOD_CLASS_HT)
992  {
993  m_deviceMcsSet.erase (m_deviceMcsSet.begin () + index);
994  }
995  }
996  m_deviceMcsSet.push_back (WifiPhy::GetHtMcs0 ());
997  m_deviceMcsSet.push_back (WifiPhy::GetHtMcs1 ());
998  m_deviceMcsSet.push_back (WifiPhy::GetHtMcs2 ());
999  m_deviceMcsSet.push_back (WifiPhy::GetHtMcs3 ());
1000  m_deviceMcsSet.push_back (WifiPhy::GetHtMcs4 ());
1001  m_deviceMcsSet.push_back (WifiPhy::GetHtMcs5 ());
1002  m_deviceMcsSet.push_back (WifiPhy::GetHtMcs6 ());
1003  m_deviceMcsSet.push_back (WifiPhy::GetHtMcs7 ());
1004  if (GetSupportedTxSpatialStreams () > 1)
1005  {
1006  m_deviceMcsSet.push_back (WifiPhy::GetHtMcs8 ());
1007  m_deviceMcsSet.push_back (WifiPhy::GetHtMcs9 ());
1008  m_deviceMcsSet.push_back (WifiPhy::GetHtMcs10 ());
1009  m_deviceMcsSet.push_back (WifiPhy::GetHtMcs11 ());
1010  m_deviceMcsSet.push_back (WifiPhy::GetHtMcs12 ());
1011  m_deviceMcsSet.push_back (WifiPhy::GetHtMcs13 ());
1012  m_deviceMcsSet.push_back (WifiPhy::GetHtMcs14 ());
1013  m_deviceMcsSet.push_back (WifiPhy::GetHtMcs15 ());
1014  }
1015  if (GetSupportedTxSpatialStreams () > 2)
1016  {
1017  m_deviceMcsSet.push_back (WifiPhy::GetHtMcs16 ());
1018  m_deviceMcsSet.push_back (WifiPhy::GetHtMcs17 ());
1019  m_deviceMcsSet.push_back (WifiPhy::GetHtMcs18 ());
1020  m_deviceMcsSet.push_back (WifiPhy::GetHtMcs19 ());
1021  m_deviceMcsSet.push_back (WifiPhy::GetHtMcs20 ());
1022  m_deviceMcsSet.push_back (WifiPhy::GetHtMcs21 ());
1023  m_deviceMcsSet.push_back (WifiPhy::GetHtMcs22 ());
1024  m_deviceMcsSet.push_back (WifiPhy::GetHtMcs23 ());
1025  }
1026  if (GetSupportedTxSpatialStreams () > 3)
1027  {
1028  m_deviceMcsSet.push_back (WifiPhy::GetHtMcs24 ());
1029  m_deviceMcsSet.push_back (WifiPhy::GetHtMcs25 ());
1030  m_deviceMcsSet.push_back (WifiPhy::GetHtMcs26 ());
1031  m_deviceMcsSet.push_back (WifiPhy::GetHtMcs27 ());
1032  m_deviceMcsSet.push_back (WifiPhy::GetHtMcs28 ());
1033  m_deviceMcsSet.push_back (WifiPhy::GetHtMcs29 ());
1034  m_deviceMcsSet.push_back (WifiPhy::GetHtMcs30 ());
1035  m_deviceMcsSet.push_back (WifiPhy::GetHtMcs31 ());
1036  }
1037  }
1038 }
1039 
1040 void
1042 {
1043  NS_LOG_FUNCTION (this);
1044  if (m_channelStartingFrequency >= 2400 && m_channelStartingFrequency <= 2500) //at 2.4 GHz
1045  {
1046  Configure80211b ();
1047  Configure80211g ();
1048  }
1049  if (m_channelStartingFrequency >= 5000 && m_channelStartingFrequency <= 6000) //at 5 GHz
1050  {
1051  Configure80211a ();
1052  }
1053  SetChannelWidth (20); //20 MHz
1054  m_bssMembershipSelectorSet.push_back (HT_PHY);
1056 }
1057 
1058 void
1060 {
1061  NS_LOG_FUNCTION (this);
1062  m_channelStartingFrequency = 5e3; //5.000 GHz
1063  Configure80211n ();
1064  SetChannelWidth (80); //80 MHz
1065 
1066  m_deviceMcsSet.push_back (WifiPhy::GetVhtMcs0 ());
1067  m_deviceMcsSet.push_back (WifiPhy::GetVhtMcs1 ());
1068  m_deviceMcsSet.push_back (WifiPhy::GetVhtMcs2 ());
1069  m_deviceMcsSet.push_back (WifiPhy::GetVhtMcs3 ());
1070  m_deviceMcsSet.push_back (WifiPhy::GetVhtMcs4 ());
1071  m_deviceMcsSet.push_back (WifiPhy::GetVhtMcs5 ());
1072  m_deviceMcsSet.push_back (WifiPhy::GetVhtMcs6 ());
1073  m_deviceMcsSet.push_back (WifiPhy::GetVhtMcs7 ());
1074  m_deviceMcsSet.push_back (WifiPhy::GetVhtMcs8 ());
1075  m_deviceMcsSet.push_back (WifiPhy::GetVhtMcs9 ());
1076 
1077  m_bssMembershipSelectorSet.push_back (VHT_PHY);
1078 }
1079 
1080 void
1082 {
1083  m_state->RegisterListener (listener);
1084 }
1085 
1086 void
1088 {
1089  m_state->UnregisterListener (listener);
1090 }
1091 
1092 bool
1094 {
1095  return m_state->IsStateCcaBusy ();
1096 }
1097 
1098 bool
1100 {
1101  return m_state->IsStateIdle ();
1102 }
1103 
1104 bool
1106 {
1107  return m_state->IsStateBusy ();
1108 }
1109 
1110 bool
1112 {
1113  return m_state->IsStateRx ();
1114 }
1115 
1116 bool
1118 {
1119  return m_state->IsStateTx ();
1120 }
1121 
1122 bool
1124 {
1125  return m_state->IsStateSwitching ();
1126 }
1127 
1128 bool
1130 {
1131  return m_state->IsStateSleep ();
1132 }
1133 
1134 Time
1136 {
1137  return m_state->GetStateDuration ();
1138 }
1139 
1140 Time
1142 {
1143  return m_state->GetDelayUntilIdle ();
1144 }
1145 
1146 Time
1148 {
1149  return m_state->GetLastRxStartTime ();
1150 }
1151 
1152 double
1154 {
1155  return m_edThresholdW;
1156 }
1157 
1158 double
1159 YansWifiPhy::GetPowerDbm (uint8_t power) const
1160 {
1162  NS_ASSERT (m_nTxPower > 0);
1163  double dbm;
1164  if (m_nTxPower > 1)
1165  {
1166  dbm = m_txPowerBaseDbm + power * (m_txPowerEndDbm - m_txPowerBaseDbm) / (m_nTxPower - 1);
1167  }
1168  else
1169  {
1170  NS_ASSERT_MSG (m_txPowerBaseDbm == m_txPowerEndDbm, "cannot have TxPowerEnd != TxPowerStart with TxPowerLevels == 1");
1171  dbm = m_txPowerBaseDbm;
1172  }
1173  return dbm;
1174 }
1175 
1176 void
1178 {
1179  NS_LOG_FUNCTION (this << packet << event);
1180  NS_ASSERT (IsStateRx ());
1181  NS_ASSERT (event->GetEndTime () == Simulator::Now ());
1182 
1183  struct InterferenceHelper::SnrPer snrPer;
1184  snrPer = m_interference.CalculatePlcpPayloadSnrPer (event);
1186 
1187  if (m_plcpSuccess == true)
1188  {
1189  NS_LOG_DEBUG ("mode=" << (event->GetPayloadMode ().GetDataRate (event->GetTxVector ())) <<
1190  ", snr(dB)=" << RatioToDb (snrPer.snr) << ", per=" << snrPer.per << ", size=" << packet->GetSize ());
1191 
1192  if (m_random->GetValue () > snrPer.per)
1193  {
1194  NotifyRxEnd (packet);
1195  uint32_t dataRate500KbpsUnits;
1196  if ((event->GetPayloadMode ().GetModulationClass () == WIFI_MOD_CLASS_HT) || (event->GetPayloadMode ().GetModulationClass () == WIFI_MOD_CLASS_VHT))
1197  {
1198  dataRate500KbpsUnits = 128 + event->GetPayloadMode ().GetMcsValue ();
1199  }
1200  else
1201  {
1202  dataRate500KbpsUnits = event->GetPayloadMode ().GetDataRate (event->GetTxVector ().GetChannelWidth (), event->GetTxVector ().IsShortGuardInterval (), 1) * event->GetTxVector ().GetNss () / 500000;
1203  }
1204  struct signalNoiseDbm signalNoise;
1205  signalNoise.signal = RatioToDb (event->GetRxPowerW ()) + 30;
1206  signalNoise.noise = RatioToDb (event->GetRxPowerW () / snrPer.snr) - GetRxNoiseFigure () + 30;
1207  struct mpduInfo aMpdu;
1208  aMpdu.type = mpdutype;
1210  NotifyMonitorSniffRx (packet, (uint16_t)GetChannelFrequencyMhz (), GetChannelNumber (), dataRate500KbpsUnits, event->GetPreambleType (), event->GetTxVector (), aMpdu, signalNoise);
1211  m_state->SwitchFromRxEndOk (packet, snrPer.snr, event->GetTxVector (), event->GetPreambleType ());
1212  }
1213  else
1214  {
1215  /* failure. */
1216  NotifyRxDrop (packet);
1217  m_state->SwitchFromRxEndError (packet, snrPer.snr);
1218  }
1219  }
1220  else
1221  {
1222  m_state->SwitchFromRxEndError (packet, snrPer.snr);
1223  }
1224 
1225  if (preamble == WIFI_PREAMBLE_NONE && mpdutype == LAST_MPDU_IN_AGGREGATE)
1226  {
1227  m_plcpSuccess = false;
1228  }
1229 }
1230 
1231 int64_t
1233 {
1234  NS_LOG_FUNCTION (this << stream);
1235  m_random->SetStream (stream);
1236  return 1;
1237 }
1238 
1239 void
1241 {
1243 }
1244 
1245 void
1247 {
1250 }
1251 
1252 void
1254 {
1255  m_numberOfReceivers = rx;
1256 }
1257 
1258 void
1260 {
1261  m_ldpc = Ldpc;
1262 }
1263 
1264 void
1266 {
1267  m_stbc = stbc;
1268 }
1269 
1270 void
1272 {
1273  m_greenfield = greenfield;
1274 }
1275 
1276 bool
1278 {
1279  return m_guardInterval;
1280 }
1281 
1282 void
1283 YansWifiPhy::SetGuardInterval (bool guardInterval)
1284 {
1285  m_guardInterval = guardInterval;
1286 }
1287 
1288 uint32_t
1290 {
1292 }
1293 
1294 uint32_t
1296 {
1297  return m_numberOfTransmitters;
1298 }
1299 
1300 uint32_t
1302 {
1303  return m_numberOfReceivers;
1304 }
1305 
1306 bool
1308 {
1309  return m_ldpc;
1310 }
1311 
1312 bool
1314 {
1315  return m_stbc;
1316 }
1317 
1318 bool
1320 {
1321  return m_greenfield;
1322 }
1323 
1324 bool
1326 {
1327  return m_shortPreamble;
1328 }
1329 
1330 void
1332 {
1333  m_shortPreamble = enable;
1334 }
1335 
1336 void
1337 YansWifiPhy::SetChannelWidth (uint32_t channelwidth)
1338 {
1339  NS_ASSERT_MSG (channelwidth == 5 || channelwidth == 10 || channelwidth == 20 || channelwidth == 22 || channelwidth == 40 || channelwidth == 80 || channelwidth == 160, "wrong channel width value");
1340  m_channelWidth = channelwidth;
1341  AddSupportedChannelWidth (channelwidth);
1342 }
1343 
1344 uint32_t
1346 {
1347  return m_channelWidth;
1348 }
1349 
1350 uint8_t
1352 {
1353  return (static_cast<uint8_t> (GetNumberOfReceiveAntennas ()));
1354 }
1355 
1356 uint8_t
1358 {
1359  return (static_cast<uint8_t> (GetNumberOfTransmitAntennas ()));
1360 }
1361 
1362 void
1364 {
1365  NS_LOG_FUNCTION (this << width);
1366  for (std::vector<uint32_t>::size_type i = 0; i != m_supportedChannelWidthSet.size (); i++)
1367  {
1368  if (m_supportedChannelWidthSet[i] == width)
1369  {
1370  return;
1371  }
1372  }
1373  m_supportedChannelWidthSet.push_back (width);
1374 }
1375 
1376 std::vector<uint32_t>
1378 {
1380 }
1381 
1382 uint32_t
1384 {
1385  return m_bssMembershipSelectorSet.size ();
1386 }
1387 
1388 uint32_t
1389 YansWifiPhy::GetBssMembershipSelector (uint32_t selector) const
1390 {
1391  return m_bssMembershipSelectorSet[selector];
1392 }
1393 
1396 {
1397  uint32_t id = GetBssMembershipSelector (selector);
1398  WifiModeList supportedmodes;
1399  if (id == HT_PHY || id == VHT_PHY)
1400  {
1401  //mandatory MCS 0 to 7
1402  supportedmodes.push_back (WifiPhy::GetHtMcs0 ());
1403  supportedmodes.push_back (WifiPhy::GetHtMcs1 ());
1404  supportedmodes.push_back (WifiPhy::GetHtMcs2 ());
1405  supportedmodes.push_back (WifiPhy::GetHtMcs3 ());
1406  supportedmodes.push_back (WifiPhy::GetHtMcs4 ());
1407  supportedmodes.push_back (WifiPhy::GetHtMcs5 ());
1408  supportedmodes.push_back (WifiPhy::GetHtMcs6 ());
1409  supportedmodes.push_back (WifiPhy::GetHtMcs7 ());
1410  }
1411  if (id == VHT_PHY)
1412  {
1413  //mandatory MCS 0 to 9
1414  supportedmodes.push_back (WifiPhy::GetVhtMcs0 ());
1415  supportedmodes.push_back (WifiPhy::GetVhtMcs1 ());
1416  supportedmodes.push_back (WifiPhy::GetVhtMcs2 ());
1417  supportedmodes.push_back (WifiPhy::GetVhtMcs3 ());
1418  supportedmodes.push_back (WifiPhy::GetVhtMcs4 ());
1419  supportedmodes.push_back (WifiPhy::GetVhtMcs5 ());
1420  supportedmodes.push_back (WifiPhy::GetVhtMcs6 ());
1421  supportedmodes.push_back (WifiPhy::GetVhtMcs7 ());
1422  supportedmodes.push_back (WifiPhy::GetVhtMcs8 ());
1423  supportedmodes.push_back (WifiPhy::GetVhtMcs9 ());
1424  }
1425  return supportedmodes;
1426 }
1427 
1428 uint8_t
1430 {
1431  return m_deviceMcsSet.size ();
1432 }
1433 
1434 WifiMode
1435 YansWifiPhy::GetMcs (uint8_t mcs) const
1436 {
1437  return m_deviceMcsSet[mcs];
1438 }
1439 
1440 } //namespace ns3
ERP-OFDM PHY (Clause 19, Section 19.5)
static WifiMode GetVhtMcs6()
Return MCS 6 from VHT MCS values.
Definition: wifi-phy.cc:1531
uint16_t m_channelNumber
Operating channel number.
tuple channel
Definition: third.py:85
static WifiMode GetOfdmRate9MbpsBW5MHz()
Return a WifiMode for OFDM at 9Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:1185
static WifiMode GetErpOfdmRate24Mbps()
Return a WifiMode for ERP-OFDM at 24Mbps.
Definition: wifi-phy.cc:876
static WifiMode GetDsssRate11Mbps()
Return a WifiMode for DSSS at 11Mbps.
Definition: wifi-phy.cc:813
virtual double CalculateSnr(WifiTxVector txVector, double ber) const
virtual uint8_t GetSupportedTxSpatialStreams(void) const
virtual bool IsStateBusy(void)
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
static WifiMode GetErpOfdmRate36Mbps()
Return a WifiMode for ERP-OFDM at 36Mbps.
Definition: wifi-phy.cc:888
void NotifyMonitorSniffTx(Ptr< const Packet > packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, WifiPreamble preamble, WifiTxVector txVector, struct mpduInfo aMpdu)
Public method used to fire a MonitorSniffer trace for a wifi packet being transmitted.
Definition: wifi-phy.cc:765
A struct for both SNR and PER.
uint16_t GetChannelNumber(void) const
Return the current channel number.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
OFDM PHY for the 5 GHz band (Clause 17 with 5 MHz channel bandwidth)
void Configure80211b(void)
Configure YansWifiPhy with appropriate channel frequency and supported rates for 802.11b standard.
double RatioToDb(double ratio) const
Convert from ratio to dB.
Definition: wifi-phy.cc:1619
void SetStream(int64_t stream)
Specifies the stream number for this RNG stream.
virtual uint32_t GetFrequency(void) const
std::vector< uint32_t > m_supportedChannelWidthSet
Supported channel width.
virtual bool IsModeSupported(WifiMode mode) const
Check if the given WifiMode is supported by the PHY.
static WifiMode GetVhtMcs8()
Return MCS 8 from VHT MCS values.
Definition: wifi-phy.cc:1547
AttributeValue implementation for Boolean.
Definition: boolean.h:34
The PHY layer is sleeping.
Definition: wifi-phy.h:182
EventId m_endPlcpRxEvent
virtual WifiModeList GetMembershipSelectorModes(uint32_t selector)
The WifiPhy::GetMembershipSelectorModes() method is used (e.g., by a WifiRemoteStationManager) to det...
virtual std::vector< uint32_t > GetSupportedChannelWidthSet(void) const
Ptr< ErrorRateModel > GetErrorRateModel(void) const
Return the error rate model.
static WifiMode GetOfdmRate9Mbps()
Return a WifiMode for OFDM at 9Mbps.
Definition: wifi-phy.cc:939
HT OFDM PHY for the 5 GHz band (clause 20)
static WifiMode GetOfdmRate18MbpsBW10MHz()
Return a WifiMode for OFDM at 18Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:1086
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
static WifiMode GetOfdmRate27MbpsBW10MHz()
Return a WifiMode for OFDM at 27Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:1110
uint8_t GetRemainingNbOfMpdus(void) const
Definition: ampdu-tag.cc:110
void SetErrorRateModel(Ptr< ErrorRateModel > rate)
Sets the error rate model.
virtual void SendPacket(Ptr< const Packet > packet, WifiTxVector txVector, enum WifiPreamble preamble)
virtual bool IsStateSwitching(void)
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:44
virtual bool IsStateTx(void)
static WifiMode GetOfdmRate3MbpsBW5MHz()
Return a WifiMode for OFDM at 3Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:1149
static WifiMode GetVhtMcs0()
Return MCS 0 from VHT MCS values.
Definition: wifi-phy.cc:1483
static WifiMode GetDsssRate1Mbps()
Return a WifiMode for DSSS at 1Mbps.
Definition: wifi-phy.cc:774
void Configure80211n(void)
Configure YansWifiPhy with appropriate channel frequency and supported rates for 802.11n standard.
Ptr< YansWifiChannel > m_channel
YansWifiChannel that this YansWifiPhy is connected to.
void SetTxGain(double gain)
Sets the transmission gain (dB).
enum mpduType type
Definition: wifi-phy.h:63
802.11 PHY layer model
Definition: wifi-phy.h:151
static WifiMode GetErpOfdmRate18Mbps()
Return a WifiMode for ERP-OFDM at 18Mbps.
Definition: wifi-phy.cc:864
static WifiMode GetHtMcs7()
Return MCS 7 from HT MCS values.
Definition: wifi-phy.cc:1280
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:81
bool IsZero(void) const
Definition: nstime.h:274
static WifiMode GetVhtMcs5()
Return MCS 5 from VHT MCS values.
Definition: wifi-phy.cc:1523
virtual void SetGuardInterval(bool guardInterval)
Enable or disable short/long guard interval.
static WifiMode GetHtMcs22()
Return MCS 22 from HT MCS values.
Definition: wifi-phy.cc:1400
static WifiMode GetHtMcs14()
Return MCS 14 from HT MCS values.
Definition: wifi-phy.cc:1336
static WifiMode GetOfdmRate12Mbps()
Return a WifiMode for OFDM at 12Mbps.
Definition: wifi-phy.cc:951
enum WifiModulationClass GetModulationClass() const
Definition: wifi-mode.cc:384
static WifiMode GetHtMcs31()
Return MCS 31 from HT MCS values.
Definition: wifi-phy.cc:1472
virtual void SetLdpc(bool ldpc)
Enable or disable LDPC.
static WifiMode GetHtMcs21()
Return MCS 21 from HT MCS values.
Definition: wifi-phy.cc:1392
#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
static WifiMode GetHtMcs30()
Return MCS 30 from HT MCS values.
Definition: wifi-phy.cc:1464
Time GetEnergyDuration(double energyW)
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:201
virtual void RegisterListener(WifiPhyListener *listener)
static WifiMode GetHtMcs10()
Return MCS 10 from HT MCS values.
Definition: wifi-phy.cc:1304
static WifiMode GetHtMcs26()
Return MCS 26 from HT MCS values.
Definition: wifi-phy.cc:1432
bool IsShortGuardInterval(void) const
static WifiMode GetOfdmRate1_5MbpsBW5MHz()
Return a WifiMode for OFDM at 1.5Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:1125
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
Definition: packet.h:792
OFDM PHY for the 5 GHz band (Clause 17 with 10 MHz channel bandwidth)
static WifiMode GetHtMcs17()
Return MCS 17 from HT MCS values.
Definition: wifi-phy.cc:1360
static WifiMode GetHtMcs24()
Return MCS 24 from HT MCS values.
Definition: wifi-phy.cc:1416
double m_txPowerBaseDbm
Minimum transmission power (dBm)
static WifiMode GetOfdmRate4_5MbpsBW10MHz()
Return a WifiMode for OFDM at 4.5Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:1038
static WifiMode GetOfdmRate54Mbps()
Return a WifiMode for OFDM at 54Mbps.
Definition: wifi-phy.cc:1011
void SetChannelNumber(uint16_t id)
Set the current channel number.
void NotifyTxDrop(Ptr< const Packet > packet)
Public method used to fire a PhyTxDrop trace.
Definition: wifi-phy.cc:735
HT OFDM PHY for the 2.4 GHz band (clause 20)
VHT PHY (Clause 22)
Definition: wifi-mode.h:64
Ptr< MobilityModel > m_mobility
Pointer to the mobility model.
static WifiMode GetHtMcs8()
Return MCS 8 from HT MCS values.
Definition: wifi-phy.cc:1288
static WifiMode GetHtMcs18()
Return MCS 18 from HT MCS values.
Definition: wifi-phy.cc:1368
virtual bool IsStateSleep(void)
void NotifyTxBegin(Ptr< const Packet > packet)
Public method used to fire a PhyTxBegin trace.
Definition: wifi-phy.cc:723
double m_edThresholdW
Energy detection threshold in watts.
void Configure80211_5Mhz()
Configure YansWifiPhy with appropriate channel frequency and supported rates for 802.11a standard with 5MHz channel spacing.
virtual Time GetDelayUntilIdle(void)
static WifiMode GetVhtMcs4()
Return MCS 4 from VHT MCS values.
Definition: wifi-phy.cc:1515
static WifiMode GetHtMcs27()
Return MCS 27 from HT MCS values.
Definition: wifi-phy.cc:1440
uint32_t m_rxMpduReferenceNumber
A-MPDU reference number to identify all received subframes belonging to the same received A-MPDU...
void Configure80211a(void)
Configure YansWifiPhy with appropriate channel frequency and supported rates for 802.11a standard.
void Configure80211ac(void)
Configure YansWifiPhy with appropriate channel frequency and supported rates for 802.11ac standard.
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
Definition: wifi-mode.h:99
void Configure80211g(void)
Configure YansWifiPhy with appropriate channel frequency and supported rates for 802.11g standard.
static WifiMode GetOfdmRate36Mbps()
Return a WifiMode for OFDM at 36Mbps.
Definition: wifi-phy.cc:987
static WifiMode GetVhtMcs7()
Return MCS 7 from VHT MCS values.
Definition: wifi-phy.cc:1539
static WifiMode GetOfdmRate6MbpsBW5MHz()
Return a WifiMode for OFDM at 6Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:1173
virtual Time GetStateDuration(void)
static WifiMode GetVhtMcs3()
Return MCS 3 from VHT MCS values.
Definition: wifi-phy.cc:1507
void NotifyMonitorSniffRx(Ptr< const Packet > packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, WifiPreamble preamble, WifiTxVector txVector, struct mpduInfo aMpdu, struct signalNoiseDbm signalNoise)
Public method used to fire a MonitorSniffer trace for a wifi packet being received.
Definition: wifi-phy.cc:759
virtual uint32_t GetNBssMembershipSelectors(void) const
The WifiPhy::NBssMembershipSelectors() method is used (e.g., by a WifiRemoteStationManager) to determ...
double m_rxGainDb
Reception gain (dB)
uint8_t GetTxPowerLevel(void) const
double GetTxGain(void) const
Return the transmission gain (dB).
bool m_shortPreamble
Flag if short PLCP preamble is supported.
std::vector< uint32_t > m_bssMembershipSelectorSet
The PHY layer is switching to other channel.
Definition: wifi-phy.h:178
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
Definition: time.cc:446
void SetMobility(Ptr< MobilityModel > mobility)
assign a mobility model to this device
virtual void SetChannelWidth(uint32_t channelwidth)
Set channel width.
static WifiMode GetHtMcs16()
Return MCS 16 from HT MCS values.
Definition: wifi-phy.cc:1352
static WifiMode GetErpOfdmRate54Mbps()
Return a WifiMode for ERP-OFDM at 54Mbps.
Definition: wifi-phy.cc:912
virtual void SetReceiveErrorCallback(WifiPhy::RxErrorCallback callback)
static WifiMode GetHtMcs29()
Return MCS 29 from HT MCS values.
Definition: wifi-phy.cc:1456
static WifiMode GetHtMcs11()
Return MCS 11 from HT MCS values.
Definition: wifi-phy.cc:1312
void NotifyRxDrop(Ptr< const Packet > packet)
Public method used to fire a PhyRxDrop trace.
Definition: wifi-phy.cc:753
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
Definition: wifi-preamble.h:30
Keep track of the current position and velocity of an object.
void SetErrorRateModel(Ptr< ErrorRateModel > rate)
Set the error rate model for this interference helper.
virtual uint32_t GetNModes(void) const
The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used (e.g., by a WifiRemoteStationManager...
virtual bool IsStateRx(void)
virtual uint8_t GetNMcs(void) const
virtual double GetTxPowerStart(void) const
Return the minimum available transmission power level (dBm).
WifiPhyStandard
Identifies the PHY specification that a Wifi device is configured to use.
bool PeekPacketTag(Tag &tag) const
Search a matching tag and call Tag::Deserialize if it is found.
Definition: packet.cc:846
virtual WifiMode GetMode(uint32_t mode) const
The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used (e.g., by a WifiRemoteStationManager...
double m_channelStartingFrequency
Standard-dependent center frequency of 0-th channel in MHz.
void StartReceivePacket(Ptr< Packet > packet, WifiTxVector txVector, WifiPreamble preamble, enum mpduType mpdutype, Ptr< InterferenceHelper::Event > event)
Starting receiving the payload of a packet (i.e.
void SetEdThreshold(double threshold)
Sets the energy detection threshold (dBm).
The MPDU is not part of an A-MPDU.
Definition: wifi-phy.h:48
static WifiMode GetHtMcs2()
Return MCS 2 from HT MCS values.
Definition: wifi-phy.cc:1240
bool m_ldpc
Flag if LDPC is used.
tuple mobility
Definition: third.py:101
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:220
static EventId Schedule(Time const &delay, MEM mem_ptr, OBJ obj)
Schedule an event to expire after delay.
Definition: simulator.h:1221
AttributeValue implementation for Time.
Definition: nstime.h:957
Time CalculatePlcpPreambleAndHeaderDuration(WifiTxVector txVector, enum WifiPreamble preamble)
Definition: wifi-phy.cc:696
uint32_t mpduRefNumber
Definition: wifi-phy.h:64
#define VHT_PHY
Definition: yans-wifi-phy.h:44
Time NanoSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:919
receive notifications about phy events.
Definition: wifi-phy.h:70
virtual bool GetStbc(void) const
Return whether STBC is supported.
bool m_stbc
Flag if STBC is used.
Hold an unsigned integer type.
Definition: uinteger.h:44
static WifiMode GetHtMcs12()
Return MCS 12 from HT MCS values.
Definition: wifi-phy.cc:1320
WifiModeList m_deviceRateSet
This vector holds the set of transmission modes that this WifiPhy(-derived class) can support...
static WifiMode GetErpOfdmRate48Mbps()
Return a WifiMode for ERP-OFDM at 48Mbps.
Definition: wifi-phy.cc:900
double m_ccaMode1ThresholdW
Clear channel assessment (CCA) threshold in watts.
virtual void DoDispose(void)
Destructor implementation.
virtual void SetStbc(bool stbc)
Enable or disable STBC.
#define HT_PHY
Definition: yans-wifi-phy.h:45
static WifiMode GetOfdmRate12MbpsBW10MHz()
Return a WifiMode for OFDM at 12Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:1074
uint32_t GetChannelWidth(void) const
virtual uint32_t GetBssMembershipSelector(uint32_t selector) const
The WifiPhy::BssMembershipSelector() method is used (e.g., by a WifiRemoteStationManager) to determin...
HT PHY (Clause 20)
Definition: wifi-mode.h:62
struct InterferenceHelper::SnrPer CalculatePlcpHeaderSnrPer(Ptr< InterferenceHelper::Event > event)
Calculate the SNIR at the start of the plcp header and accumulate all SNIR changes in the snir vector...
virtual WifiMode GetMcs(uint8_t mcs) const
The WifiPhy::GetMcs() method is used (e.g., by a WifiRemoteStationManager) to determine the set of tr...
uint8_t GetMcsValue(void) const
Definition: wifi-mode.cc:362
Time CalculateTxDuration(uint32_t size, WifiTxVector txVector, enum WifiPreamble preamble, double frequency)
Definition: wifi-phy.cc:717
double GetRxGain(void) const
Return the reception gain (dB).
The aim of the AmpduTag is to provide means for a MAC to specify that a packet includes A-MPDU since ...
Definition: ampdu-tag.h:38
uint32_t m_txMpduReferenceNumber
A-MPDU reference number to identify all transmitted subframes belonging to the same received A-MPDU...
void NotifyRxBegin(Ptr< const Packet > packet)
Public method used to fire a PhyRxBegin trace.
Definition: wifi-phy.cc:741
static WifiMode GetOfdmRate18Mbps()
Return a WifiMode for OFDM at 18Mbps.
Definition: wifi-phy.cc:963
double GetChannelFrequencyMhz() const
Return current center channel frequency in MHz.
static WifiMode GetOfdmRate9MbpsBW10MHz()
Return a WifiMode for OFDM at 9Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:1062
static WifiMode GetOfdmRate12MbpsBW5MHz()
Return a WifiMode for OFDM at 12Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:1197
void SetChannel(Ptr< YansWifiChannel > channel)
Set the YansWifiChannel this YansWifiPhy is to be connected to.
void SetNTxPower(uint32_t n)
Sets the number of transmission power levels available between the minimum level and the maximum leve...
virtual void SetShortPlcpPreambleSupported(bool preamble)
Enable or disable short PLCP preamble.
virtual bool IsStateCcaBusy(void)
virtual void AddSupportedChannelWidth(uint32_t width)
The MPDU is part of an A-MPDU, but is not the last aggregate.
Definition: wifi-phy.h:50
static WifiMode GetVhtMcs1()
Return MCS 1 from VHT MCS values.
Definition: wifi-phy.cc:1491
virtual ~YansWifiPhy()
This is intended to be the configuration used in this paper: Gavin Holland, Nitin Vaidya and Paramvir...
static WifiMode GetOfdmRate48Mbps()
Return a WifiMode for OFDM at 48Mbps.
Definition: wifi-phy.cc:999
double m_txPowerEndDbm
Maximum transmission power (dBm)
static WifiMode GetHtMcs0()
Return MCS 0 from HT MCS values.
Definition: wifi-phy.cc:1224
virtual void SetReceiveOkCallback(WifiPhy::RxOkCallback callback)
struct InterferenceHelper::SnrPer CalculatePlcpPayloadSnrPer(Ptr< InterferenceHelper::Event > event)
Calculate the SNIR at the start of the plcp payload and accumulate all SNIR changes in the snir vecto...
virtual void UnregisterListener(WifiPhyListener *listener)
The PHY layer is IDLE.
Definition: wifi-phy.h:162
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
double GetCcaMode1Threshold(void) const
Return the CCA threshold (dBm).
OFDM PHY for the 5 GHz band (Clause 17)
void NotifyRxStart()
Notify that RX has started.
Hold objects of type Ptr<T>.
Definition: pointer.h:36
VHT OFDM PHY (clause 22)
void EraseEvents(void)
Erase all events.
802.11 PHY layer modelThis PHY implements a model of 802.11a.
Definition: yans-wifi-phy.h:66
static WifiMode GetOfdmRate24Mbps()
Return a WifiMode for OFDM at 24Mbps.
Definition: wifi-phy.cc:975
Ptr< const AttributeChecker > MakeBooleanChecker(void)
Definition: boolean.cc:121
Ptr< InterferenceHelper::Event > Add(uint32_t size, WifiTxVector txVector, enum WifiPreamble preamble, Time duration, double rxPower)
Add the packet-related signal to interference helper.
double GetEdThreshold(void) const
Return the energy detection threshold (dBm).
static TypeId GetTypeId(void)
DSSS PHY (Clause 15) and HR/DSSS PHY (Clause 18)
virtual uint32_t GetNumberOfTransmitAntennas(void) const
static WifiMode GetHtMcs13()
Return MCS 13 from HT MCS values.
Definition: wifi-phy.cc:1328
virtual bool GetShortPlcpPreambleSupported(void) const
Return whether short PLCP preamble is supported.
double GetValue(double min, double max)
Get the next random value, as a double in the specified range .
static WifiMode GetHtMcs20()
Return MCS 20 from HT MCS values.
Definition: wifi-phy.cc:1384
static WifiMode GetHtMcs5()
Return MCS 5 from HT MCS values.
Definition: wifi-phy.cc:1264
virtual uint32_t GetNumberOfReceiveAntennas(void) const
uint64_t GetDataRate(uint32_t channelWidth, bool isShortGuardInterval, uint8_t nss) const
Definition: wifi-mode.cc:109
uint32_t m_nTxPower
Number of available transmission power levels.
static WifiMode GetVhtMcs2()
Return MCS 2 from VHT MCS values.
Definition: wifi-phy.cc:1499
void SetRxGain(double gain)
Sets the reception gain (dB).
WifiModeList m_deviceMcsSet
static WifiMode GetDsssRate5_5Mbps()
Return a WifiMode for DSSS at 5.5Mbps.
Definition: wifi-phy.cc:801
static WifiMode GetOfdmRate2_25MbpsBW5MHz()
Return a WifiMode for OFDM at 2.25Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:1137
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Definition: nstime.h:958
virtual void SetSleepMode(void)
Put in sleep mode.
std::vector< WifiMode > WifiModeList
In various parts of the code, folk are interested in maintaining a list of transmission modes...
Definition: wifi-mode.h:233
static Time Now(void)
Return the current simulation virtual time.
Definition: simulator.cc:223
static WifiMode GetErpOfdmRate9Mbps()
Return a WifiMode for ERP-OFDM at 9Mbps.
Definition: wifi-phy.cc:840
void SetTxPowerStart(double start)
Sets the minimum available transmission power level (dBm).
virtual void SetNumberOfTransmitAntennas(uint32_t tx)
virtual void DoInitialize(void)
Initialize() implementation.
Time GetChannelSwitchDelay(void) const
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Definition: assert.h:90
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Definition: double.h:42
virtual bool IsStateIdle(void)
virtual Time GetLastRxStartTime(void) const
Return the start time of the last received packet.
virtual bool GetGreenfield(void) const
Return whether Greenfield is supported.
static WifiMode GetErpOfdmRate6Mbps()
Return a WifiMode for ERP-OFDM at 6Mbps.
Definition: wifi-phy.cc:828
Ptr< UniformRandomVariable > m_random
Provides uniform random variables.
Ptr< NetDevice > m_device
Pointer to the device.
void StartReceivePreambleAndHeader(Ptr< Packet > packet, double rxPowerDbm, WifiTxVector txVector, WifiPreamble preamble, enum mpduType mpdutype, Time rxDuration)
Starting receiving the plcp of a packet (i.e.
uint8_t GetNss(void) const
InterferenceHelper m_interference
Pointer to InterferenceHelper.
static WifiMode GetErpOfdmRate12Mbps()
Return a WifiMode for ERP-OFDM at 12Mbps.
Definition: wifi-phy.cc:852
virtual bool GetGuardInterval(void) const
Return whether guard interval is being used.
void NotifyRxEnd(Ptr< const Packet > packet)
Public method used to fire a PhyRxEnd trace.
Definition: wifi-phy.cc:747
void NotifyRxEnd()
Notify that RX has ended.
void SetNoiseFigure(double value)
Set the noise figure.
Time m_channelSwitchDelay
Time required to switch between channel.
virtual void ConfigureStandard(enum WifiPhyStandard standard)
Configure the PHY-level parameters for different Wi-Fi standard.
static WifiMode GetHtMcs19()
Return MCS 19 from HT MCS values.
Definition: wifi-phy.cc:1376
static WifiMode GetHtMcs6()
Return MCS 6 from HT MCS values.
Definition: wifi-phy.cc:1272
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:236
uint32_t m_channelWidth
Channel width.
static WifiMode GetHtMcs28()
Return MCS 28 from HT MCS values.
Definition: wifi-phy.cc:1448
static WifiMode GetHtMcs9()
Return MCS 9 from HT MCS values.
Definition: wifi-phy.cc:1296
void ConfigureHtDeviceMcsSet(void)
Configure the device Mcs set with the appropriate HtMcs modes for the number of available transmit sp...
static WifiMode GetHtMcs4()
Return MCS 4 from HT MCS values.
Definition: wifi-phy.cc:1256
virtual bool GetLdpc(void) const
Return if LDPC is supported.
void Cancel(void)
This method is syntactic sugar for the ns3::Simulator::Cancel method.
Definition: event-id.cc:53
static WifiMode GetHtMcs25()
Return MCS 25 from HT MCS values.
Definition: wifi-phy.cc:1424
uint16_t m_mpdusNum
carries the number of expected mpdus that are part of an A-MPDU
double m_txGainDb
Transmission gain (dB)
bool m_greenfield
Flag if GreenField format is supported.
double WToDbm(double w) const
Convert from Watts to dBm.
Definition: wifi-phy.cc:1613
double GetPowerDbm(uint8_t power) const
Get the power of the given power level in dBm.
bool m_guardInterval
Flag if short guard interval is used.
virtual uint32_t GetChannelWidth(void) const
Return channel width.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:911
virtual void SetNumberOfReceiveAntennas(uint32_t rx)
void SetDevice(Ptr< NetDevice > device)
Sets the device this PHY is associated with.
double DbmToW(double dbm) const
Convert from dBm to Watts.
Definition: wifi-phy.cc:1606
static WifiMode GetHtMcs1()
Return MCS 1 from HT MCS values.
Definition: wifi-phy.cc:1232
uint32_t m_numberOfTransmitters
Number of transmitters.
virtual bool IsMcsSupported(WifiMode mcs)
double GetEdThresholdW(void) const
Return the energy detection threshold.
static WifiMode GetHtMcs23()
Return MCS 23 from HT MCS values.
Definition: wifi-phy.cc:1408
virtual Ptr< WifiChannel > GetChannel(void) const
Return the WifiChannel this WifiPhy is connected to.
static WifiMode GetDsssRate2Mbps()
Return a WifiMode for DSSS at 2Mbps.
Definition: wifi-phy.cc:786
static WifiMode GetVhtMcs9()
Return MCS 9 from VHT MCS values.
Definition: wifi-phy.cc:1555
void SetCcaMode1Threshold(double threshold)
Sets the CCA threshold (dBm).
static WifiMode GetOfdmRate6MbpsBW10MHz()
Return a WifiMode for OFDM at 6Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:1050
WifiMode GetMode(void) const
The PHY layer is receiving a packet.
Definition: wifi-phy.h:174
void ConfigureHolland(void)
Ptr< NetDevice > GetDevice(void) const
Return the device this PHY is associated with.
double GetNoiseFigure(void) const
Return the noise figure.
void SetTxPowerEnd(double end)
Sets the maximum available transmission power level (dBm).
This class can be used to hold variables of floating point type such as 'double' or 'float'...
Definition: double.h:41
virtual uint8_t GetSupportedRxSpatialStreams(void) const
double GetRxNoiseFigure(void) const
Return the RX noise figure (dBm).
static WifiMode GetOfdmRate24MbpsBW10MHz()
Return a WifiMode for OFDM at 24Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:1098
The PHY layer has sense the medium busy through the CCA mechanism.
Definition: wifi-phy.h:166
static WifiMode GetOfdmRate13_5MbpsBW5MHz()
Return a WifiMode for OFDM at 13.5Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:1209
virtual double GetTxPowerEnd(void) const
Return the maximum available transmission power level (dBm).
bool IsExpired(void) const
This method is syntactic sugar for the ns3::Simulator::IsExpired method.
Definition: event-id.cc:59
void EndReceive(Ptr< Packet > packet, enum WifiPreamble preamble, enum mpduType mpdutype, Ptr< InterferenceHelper::Event > event)
The last bit of the packet has arrived.
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
a unique identifier for an interface.
Definition: type-id.h:58
uint32_t m_numberOfReceivers
Number of receivers.
static WifiMode GetHtMcs15()
Return MCS 15 from HT MCS values.
Definition: wifi-phy.cc:1344
virtual void ResumeFromSleep(void)
Resume from sleep mode.
bool m_plcpSuccess
Flag if the PLCP of the packet or the first MPDU in an A-MPDU has been received.
The PHY layer is sending a packet.
Definition: wifi-phy.h:170
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:827
bool m_initialized
Flag for runtime initialization.
static WifiMode GetHtMcs3()
Return MCS 3 from HT MCS values.
Definition: wifi-phy.cc:1248
double DbToRatio(double db) const
Convert from dB to ratio.
Definition: wifi-phy.cc:1599
static WifiMode GetOfdmRate6Mbps()
Return a WifiMode for OFDM at 6Mbps.
Definition: wifi-phy.cc:927
virtual void SetFrequency(uint32_t freq)
static WifiMode GetOfdmRate4_5MbpsBW5MHz()
Return a WifiMode for OFDM at 4.5Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:1161
void Configure80211_10Mhz(void)
Configure YansWifiPhy with appropriate channel frequency and supported rates for 802.11a standard with 10MHz channel spacing.
virtual uint32_t GetNTxPower(void) const
Return the number of available transmission power levels.
mpduType
This enumeration defines the type of an MPDU.
Definition: wifi-phy.h:45
void SetRxNoiseFigure(double noiseFigureDb)
Sets the RX loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver.
static WifiMode GetOfdmRate3MbpsBW10MHz()
Return a WifiMode for OFDM at 3Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:1026
Ptr< ErrorRateModel > GetErrorRateModel(void) const
Return the error rate model this PHY is using.
Ptr< WifiPhyStateHelper > m_state
Pointer to WifiPhyStateHelper.
The MPDU is the last aggregate in an A-MPDU.
Definition: wifi-phy.h:52
Ptr< MobilityModel > GetMobility(void)
Return the mobility model this PHY is associated with.
virtual void SetGreenfield(bool greenfield)
Enable or disable Greenfield support.