A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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  * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19  */
20 
21 #include "wifi-phy.h"
22 #include "wifi-mode.h"
23 #include "wifi-channel.h"
24 #include "wifi-preamble.h"
25 #include "ns3/simulator.h"
26 #include "ns3/packet.h"
27 #include "ns3/assert.h"
28 #include "ns3/log.h"
29 #include "ns3/double.h"
30 #include "ns3/uinteger.h"
31 #include "ns3/enum.h"
32 #include "ns3/trace-source-accessor.h"
33 #include <cmath>
34 
35 NS_LOG_COMPONENT_DEFINE ("WifiPhy");
36 
37 namespace ns3 {
38 
39 /****************************************************************
40  * This destructor is needed.
41  ****************************************************************/
42 
44 {
45 }
46 
47 /****************************************************************
48  * The actual WifiPhy class
49  ****************************************************************/
50 
52 
53 TypeId
55 {
56  static TypeId tid = TypeId ("ns3::WifiPhy")
57  .SetParent<Object> ()
58  .AddTraceSource ("PhyTxBegin",
59  "Trace source indicating a packet has begun transmitting over the channel medium",
61  .AddTraceSource ("PhyTxEnd",
62  "Trace source indicating a packet has been completely transmitted over the channel. NOTE: the only official WifiPhy implementation available to this date (YansWifiPhy) never fires this trace source.",
64  .AddTraceSource ("PhyTxDrop",
65  "Trace source indicating a packet has been dropped by the device during transmission",
67  .AddTraceSource ("PhyRxBegin",
68  "Trace source indicating a packet has begun being received from the channel medium by the device",
70  .AddTraceSource ("PhyRxEnd",
71  "Trace source indicating a packet has been completely received from the channel medium by the device",
73  .AddTraceSource ("PhyRxDrop",
74  "Trace source indicating a packet has been dropped by the device during reception",
76  .AddTraceSource ("MonitorSnifferRx",
77  "Trace source simulating a wifi device in monitor mode sniffing all received frames",
79  .AddTraceSource ("MonitorSnifferTx",
80  "Trace source simulating the capability of a wifi device in monitor mode to sniff all frames being transmitted",
82  ;
83  return tid;
84 }
85 
87 {
88  NS_LOG_FUNCTION (this);
89 }
90 
92 {
93  NS_LOG_FUNCTION (this);
94 }
95 
96 //Added by Ghada to support 11n
97 
98 //return the L-SIG
101 {
102  switch (payloadMode.GetBandwidth ())
103  {
104  case 20000000:
106  case 40000000:
108  default:
110  }
111 }
112 uint32_t
114 {
115  switch (preamble)
116  {
117  case WIFI_PREAMBLE_HT_MF:
118  return 4+ (4* txvector.GetNss());
119  case WIFI_PREAMBLE_HT_GF:
120  return (4*txvector.GetNss())+(4*txvector.GetNess());
121  default:
122  // no training for non HT
123  return 0;
124  }
125 }
126 
127 //return L-SIG
128 uint32_t
130 {
131  switch (preamble)
132  {
133  case WIFI_PREAMBLE_HT_MF:
134  // HT-SIG
135  return 8;
136  case WIFI_PREAMBLE_HT_GF:
137  //HT-SIG
138  return 8;
139  default:
140  // no HT-SIG for non HT
141  return 0;
142  }
143 
144 }
145 //end added by Ghada
146 
147 WifiMode
149 {
150  switch (payloadMode.GetModulationClass ())
151  {
152  case WIFI_MOD_CLASS_OFDM:
153  {
154  switch (payloadMode.GetBandwidth ())
155  {
156  case 5000000:
158  case 10000000:
160  default:
161  // (Section 18.3.2 "PLCP frame format"; IEEE Std 802.11-2012)
162  // actually this is only the first part of the PlcpHeader,
163  // because the last 16 bits of the PlcpHeader are using the
164  // same mode of the payload
165  return WifiPhy::GetOfdmRate6Mbps ();
166  }
167  }
168  //Added by Ghada to support 11n
169  case WIFI_MOD_CLASS_HT:
170  { //return the HT-SIG
171  // IEEE Std 802.11n, 20.3.23
172  switch (preamble)
173  {
174  case WIFI_PREAMBLE_HT_MF:
175  switch (payloadMode.GetBandwidth ())
176  {
177  case 20000000:
179  case 40000000:
181  default:
183  }
184  case WIFI_PREAMBLE_HT_GF:
185  switch (payloadMode.GetBandwidth ())
186  {
187  case 20000000:
189  case 40000000:
191  default:
193  }
194  default:
195  return WifiPhy::GetOfdmRate6Mbps ();
196  }
197  }
200 
201  case WIFI_MOD_CLASS_DSSS:
202  if (preamble == WIFI_PREAMBLE_LONG)
203  {
204  // (Section 16.2.3 "PLCP field definitions" and Section 17.2.2.2 "Long PPDU format"; IEEE Std 802.11-2012)
205  return WifiPhy::GetDsssRate1Mbps ();
206  }
207  else // WIFI_PREAMBLE_SHORT
208  {
209  // (Section 17.2.2.3 "Short PPDU format"; IEEE Std 802.11-2012)
210  return WifiPhy::GetDsssRate2Mbps ();
211  }
212 
213  default:
214  NS_FATAL_ERROR ("unsupported modulation class");
215  return WifiMode ();
216  }
217 }
218 
219 
220 uint32_t
222 {
223  switch (payloadMode.GetModulationClass ())
224  {
225  case WIFI_MOD_CLASS_OFDM:
226  {
227  switch (payloadMode.GetBandwidth ())
228  {
229  case 20000000:
230  default:
231  // (Section 18.3.3 "PLCP preamble (SYNC))" and Figure 18-4 "OFDM training structure"; IEEE Std 802.11-2012)
232  // also (Section 18.3.2.4 "Timing related parameters" Table 18-5 "Timing-related parameters"; IEEE Std 802.11-2012)
233  // We return the duration of the SIGNAL field only, since the
234  // SERVICE field (which strictly speaking belongs to the PLCP
235  // header, see Section 18.3.2 and Figure 18-1) is sent using the
236  // payload mode.
237  return 4;
238  case 10000000:
239  // (Section 18.3.2.4 "Timing related parameters" Table 18-5 "Timing-related parameters"; IEEE Std 802.11-2012)
240  return 8;
241  case 5000000:
242  // (Section 18.3.2.4 "Timing related parameters" Table 18-5 "Timing-related parameters"; IEEE Std 802.11-2012)
243  return 16;
244  }
245  }
246  //Added by Ghada to support 11n
247  case WIFI_MOD_CLASS_HT:
248  { //IEEE 802.11n Figure 20.1
249  switch (preamble)
250  {
251  case WIFI_PREAMBLE_HT_MF:
252  // L-SIG
253  return 4;
254  case WIFI_PREAMBLE_HT_GF:
255  //L-SIG
256  return 0;
257  default:
258  // L-SIG
259  return 4;
260  }
261  }
263  return 4;
264 
265  case WIFI_MOD_CLASS_DSSS:
266  if (preamble == WIFI_PREAMBLE_SHORT)
267  {
268  // (Section 17.2.2.3 "Short PPDU format" and Figure 17-2 "Short PPDU format"; IEEE Std 802.11-2012)
269  return 24;
270  }
271  else // WIFI_PREAMBLE_LONG
272  {
273  // (Section 17.2.2.2 "Long PPDU format" and Figure 17-1 "Short PPDU format"; IEEE Std 802.11-2012)
274  return 48;
275  }
276 
277  default:
278  NS_FATAL_ERROR ("unsupported modulation class");
279  return 0;
280  }
281 }
282 
283 uint32_t
285 {
286  switch (payloadMode.GetModulationClass ())
287  {
288  case WIFI_MOD_CLASS_OFDM:
289  {
290  switch (payloadMode.GetBandwidth ())
291  {
292  case 20000000:
293  default:
294  // (Section 18.3.3 "PLCP preamble (SYNC))" Figure 18-4 "OFDM training structure"
295  // also Section 18.3.2.3 "Modulation-dependent parameters" Table 18-4 "Modulation-dependent parameters"; IEEE Std 802.11-2012)
296  return 16;
297  case 10000000:
298  // (Section 18.3.3 "PLCP preamble (SYNC))" Figure 18-4 "OFDM training structure"
299  // also Section 18.3.2.3 "Modulation-dependent parameters" Table 18-4 "Modulation-dependent parameters"; IEEE Std 802.11-2012)
300  return 32;
301  case 5000000:
302  // (Section 18.3.3 "PLCP preamble (SYNC))" Figure 18-4 "OFDM training structure"
303  // also Section 18.3.2.3 "Modulation-dependent parameters" Table 18-4 "Modulation-dependent parameters"; IEEE Std 802.11-2012)
304  return 64;
305  }
306  }
307  case WIFI_MOD_CLASS_HT:
308  { //IEEE 802.11n Figure 20.1 the training symbols before L_SIG or HT_SIG
309  return 16;
310  }
312  return 16;
313 
314  case WIFI_MOD_CLASS_DSSS:
315  if (preamble == WIFI_PREAMBLE_SHORT)
316  {
317  // (Section 17.2.2.3 "Short PPDU format)" Figure 17-2 "Short PPDU format"; IEEE Std 802.11-2012)
318  return 72;
319  }
320  else // WIFI_PREAMBLE_LONG
321  {
322  // (Section 17.2.2.2 "Long PPDU format)" Figure 17-1 "Long PPDU format"; IEEE Std 802.11-2012)
323  return 144;
324  }
325  default:
326  NS_FATAL_ERROR ("unsupported modulation class");
327  return 0;
328  }
329 }
330 
331 double
333 {
334  WifiMode payloadMode=txvector.GetMode();
335 
336  NS_LOG_FUNCTION (size << payloadMode);
337 
338  switch (payloadMode.GetModulationClass ())
339  {
340  case WIFI_MOD_CLASS_OFDM:
342  {
343  // (Section 18.3.2.4 "Timing related parameters" Table 18-5 "Timing-related parameters"; IEEE Std 802.11-2012
344  // corresponds to T_{SYM} in the table)
345  uint32_t symbolDurationUs;
346 
347  switch (payloadMode.GetBandwidth ())
348  {
349  case 20000000:
350  default:
351  symbolDurationUs = 4;
352  break;
353  case 10000000:
354  symbolDurationUs = 8;
355  break;
356  case 5000000:
357  symbolDurationUs = 16;
358  break;
359  }
360 
361  // (Section 18.3.2.3 "Modulation-dependent parameters" Table 18-4 "Modulation-dependent parameters"; IEEE Std 802.11-2012)
362  // corresponds to N_{DBPS} in the table
363  double numDataBitsPerSymbol = payloadMode.GetDataRate () * symbolDurationUs / 1e6;
364 
365  // (Section 18.3.5.4 "Pad bits (PAD)" Equation 18-11; IEEE Std 802.11-2012)
366  uint32_t numSymbols = lrint (ceil ((16 + size * 8.0 + 6.0) / numDataBitsPerSymbol));
367 
368  // Add signal extension for ERP PHY
369  if (payloadMode.GetModulationClass () == WIFI_MOD_CLASS_ERP_OFDM)
370  {
371  return numSymbols * symbolDurationUs + 6;
372  }
373  else
374  {
375  return numSymbols * symbolDurationUs;
376  }
377  }
378  case WIFI_MOD_CLASS_HT:
379  {
380  double symbolDurationUs;
381  double m_Stbc;
382  //if short GI data rate is used then symbol duration is 3.6us else symbol duration is 4us
383  //In the future has to create a stationmanager that only uses these data rates if sender and reciever support GI
384  if (payloadMode.GetUniqueName() == "OfdmRate135MbpsBW40MHzShGi" || payloadMode.GetUniqueName() == "OfdmRate65MbpsBW20MHzShGi" )
385  {
386  symbolDurationUs=3.6;
387  }
388  else
389  {
390  switch (payloadMode.GetDataRate ()/ (txvector.GetNss()))
391  { //shortGi
392  case 7200000:
393  case 14400000:
394  case 21700000:
395  case 28900000:
396  case 43300000:
397  case 57800000:
398  case 72200000:
399  case 15000000:
400  case 30000000:
401  case 45000000:
402  case 60000000:
403  case 90000000:
404  case 120000000:
405  case 150000000:
406  symbolDurationUs=3.6;
407  break;
408  default:
409  symbolDurationUs=4;
410  }
411  }
412  if (txvector.IsStbc())
413  m_Stbc=2;
414  else
415  m_Stbc=1;
416  double numDataBitsPerSymbol = payloadMode.GetDataRate () *txvector.GetNss() * symbolDurationUs / 1e6;
417  //check tables 20-35 and 20-36 in the standard to get cases when nes =2
418  double Nes=1;
419  // IEEE Std 802.11n, section 20.3.11, equation (20-32)
420  uint32_t numSymbols = lrint (m_Stbc*ceil ((16 + size * 8.0 + 6.0*Nes) / (m_Stbc* numDataBitsPerSymbol)));
421 
422  return numSymbols * symbolDurationUs;
423 
424  }
425  case WIFI_MOD_CLASS_DSSS:
426  // (Section 17.2.3.6 "Long PLCP LENGTH field"; IEEE Std 802.11-2012)
427  NS_LOG_LOGIC (" size=" << size
428  << " mode=" << payloadMode
429  << " rate=" << payloadMode.GetDataRate () );
430  return lrint (ceil ((size * 8.0) / (payloadMode.GetDataRate () / 1.0e6)));
431 
432  default:
433  NS_FATAL_ERROR ("unsupported modulation class");
434  return 0;
435  }
436 }
437 
438 Time
439 WifiPhy::CalculateTxDuration (uint32_t size, WifiTxVector txvector, WifiPreamble preamble)
440 {
441  WifiMode payloadMode=txvector.GetMode();
442  double duration = GetPlcpPreambleDurationMicroSeconds (payloadMode, preamble)
443  + GetPlcpHeaderDurationMicroSeconds (payloadMode, preamble)
444  + GetPlcpHtSigHeaderDurationMicroSeconds (payloadMode, preamble)
445  + GetPlcpHtTrainingSymbolDurationMicroSeconds (payloadMode, preamble,txvector)
446  + GetPayloadDurationMicroSeconds (size, txvector);
447  return MicroSeconds (duration);
448 }
449 
450 
451 
452 void
454 {
455  m_phyTxBeginTrace (packet);
456 }
457 
458 void
460 {
461  m_phyTxEndTrace (packet);
462 }
463 
464 void
466 {
467  m_phyTxDropTrace (packet);
468 }
469 
470 void
472 {
473  m_phyRxBeginTrace (packet);
474 }
475 
476 void
478 {
479  m_phyRxEndTrace (packet);
480 }
481 
482 void
484 {
485  m_phyRxDropTrace (packet);
486 }
487 
488 void
489 WifiPhy::NotifyMonitorSniffRx (Ptr<const Packet> packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble, double signalDbm, double noiseDbm)
490 {
491  m_phyMonitorSniffRxTrace (packet, channelFreqMhz, channelNumber, rate, isShortPreamble, signalDbm, noiseDbm);
492 }
493 
494 void
495 WifiPhy::NotifyMonitorSniffTx (Ptr<const Packet> packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble, uint8_t txPower)
496 {
497  m_phyMonitorSniffTxTrace (packet, channelFreqMhz, channelNumber, rate, isShortPreamble, txPower);
498 }
499 
500 
501 // Clause 15 rates (DSSS)
502 
503 WifiMode
505 {
506  static WifiMode mode =
507  WifiModeFactory::CreateWifiMode ("DsssRate1Mbps",
509  true,
510  22000000, 1000000,
512  2);
513  return mode;
514 }
515 
516 WifiMode
518 {
519  static WifiMode mode =
520  WifiModeFactory::CreateWifiMode ("DsssRate2Mbps",
522  true,
523  22000000, 2000000,
525  4);
526  return mode;
527 }
528 
529 
530 // Clause 18 rates (HR/DSSS)
531 
532 WifiMode
534 {
535  static WifiMode mode =
536  WifiModeFactory::CreateWifiMode ("DsssRate5_5Mbps",
538  true,
539  22000000, 5500000,
541  4);
542  return mode;
543 }
544 
545 WifiMode
547 {
548  static WifiMode mode =
549  WifiModeFactory::CreateWifiMode ("DsssRate11Mbps",
551  true,
552  22000000, 11000000,
554  4);
555  return mode;
556 }
557 
558 
559 // Clause 19.5 rates (ERP-OFDM)
560 
561 WifiMode
563 {
564  static WifiMode mode =
565  WifiModeFactory::CreateWifiMode ("ErpOfdmRate6Mbps",
567  true,
568  20000000, 6000000,
570  2);
571  return mode;
572 }
573 
574 WifiMode
576 {
577  static WifiMode mode =
578  WifiModeFactory::CreateWifiMode ("ErpOfdmRate9Mbps",
580  false,
581  20000000, 9000000,
583  2);
584  return mode;
585 }
586 
587 WifiMode
589 {
590  static WifiMode mode =
591  WifiModeFactory::CreateWifiMode ("ErpOfdmRate12Mbps",
593  true,
594  20000000, 12000000,
596  4);
597  return mode;
598 }
599 
600 WifiMode
602 {
603  static WifiMode mode =
604  WifiModeFactory::CreateWifiMode ("ErpOfdmRate18Mbps",
606  false,
607  20000000, 18000000,
609  4);
610  return mode;
611 }
612 
613 WifiMode
615 {
616  static WifiMode mode =
617  WifiModeFactory::CreateWifiMode ("ErpOfdmRate24Mbps",
619  true,
620  20000000, 24000000,
622  16);
623  return mode;
624 }
625 
626 WifiMode
628 {
629  static WifiMode mode =
630  WifiModeFactory::CreateWifiMode ("ErpOfdmRate36Mbps",
632  false,
633  20000000, 36000000,
635  16);
636  return mode;
637 }
638 
639 WifiMode
641 {
642  static WifiMode mode =
643  WifiModeFactory::CreateWifiMode ("ErpOfdmRate48Mbps",
645  false,
646  20000000, 48000000,
648  64);
649  return mode;
650 }
651 
652 WifiMode
654 {
655  static WifiMode mode =
656  WifiModeFactory::CreateWifiMode ("ErpOfdmRate54Mbps",
658  false,
659  20000000, 54000000,
661  64);
662  return mode;
663 }
664 
665 
666 // Clause 17 rates (OFDM)
667 
668 WifiMode
670 {
671  static WifiMode mode =
672  WifiModeFactory::CreateWifiMode ("OfdmRate6Mbps",
674  true,
675  20000000, 6000000,
677  2);
678  return mode;
679 }
680 
681 WifiMode
683 {
684  static WifiMode mode =
685  WifiModeFactory::CreateWifiMode ("OfdmRate9Mbps",
687  false,
688  20000000, 9000000,
690  2);
691  return mode;
692 }
693 
694 WifiMode
696 {
697  static WifiMode mode =
698  WifiModeFactory::CreateWifiMode ("OfdmRate12Mbps",
700  true,
701  20000000, 12000000,
703  4);
704  return mode;
705 }
706 
707 WifiMode
709 {
710  static WifiMode mode =
711  WifiModeFactory::CreateWifiMode ("OfdmRate18Mbps",
713  false,
714  20000000, 18000000,
716  4);
717  return mode;
718 }
719 
720 WifiMode
722 {
723  static WifiMode mode =
724  WifiModeFactory::CreateWifiMode ("OfdmRate24Mbps",
726  true,
727  20000000, 24000000,
729  16);
730  return mode;
731 }
732 
733 WifiMode
735 {
736  static WifiMode mode =
737  WifiModeFactory::CreateWifiMode ("OfdmRate36Mbps",
739  false,
740  20000000, 36000000,
742  16);
743  return mode;
744 }
745 
746 WifiMode
748 {
749  static WifiMode mode =
750  WifiModeFactory::CreateWifiMode ("OfdmRate48Mbps",
752  false,
753  20000000, 48000000,
755  64);
756  return mode;
757 }
758 
759 WifiMode
761 {
762  static WifiMode mode =
763  WifiModeFactory::CreateWifiMode ("OfdmRate54Mbps",
765  false,
766  20000000, 54000000,
768  64);
769  return mode;
770 }
771 
772 // 10 MHz channel rates
773 
774 WifiMode
776 {
777  static WifiMode mode =
778  WifiModeFactory::CreateWifiMode ("OfdmRate3MbpsBW10MHz",
780  true,
781  10000000, 3000000,
783  2);
784  return mode;
785 }
786 
787 WifiMode
789 {
790  static WifiMode mode =
791  WifiModeFactory::CreateWifiMode ("OfdmRate4_5MbpsBW10MHz",
793  false,
794  10000000, 4500000,
796  2);
797  return mode;
798 }
799 
800 WifiMode
802 {
803  static WifiMode mode =
804  WifiModeFactory::CreateWifiMode ("OfdmRate6MbpsBW10MHz",
806  true,
807  10000000, 6000000,
809  4);
810  return mode;
811 }
812 
813 WifiMode
815 {
816  static WifiMode mode =
817  WifiModeFactory::CreateWifiMode ("OfdmRate9MbpsBW10MHz",
819  false,
820  10000000, 9000000,
822  4);
823  return mode;
824 }
825 
826 WifiMode
828 {
829  static WifiMode mode =
830  WifiModeFactory::CreateWifiMode ("OfdmRate12MbpsBW10MHz",
832  true,
833  10000000, 12000000,
835  16);
836  return mode;
837 }
838 
839 WifiMode
841 {
842  static WifiMode mode =
843  WifiModeFactory::CreateWifiMode ("OfdmRate18MbpsBW10MHz",
845  false,
846  10000000, 18000000,
848  16);
849  return mode;
850 }
851 
852 WifiMode
854 {
855  static WifiMode mode =
856  WifiModeFactory::CreateWifiMode ("OfdmRate24MbpsBW10MHz",
858  false,
859  10000000, 24000000,
861  64);
862  return mode;
863 }
864 
865 WifiMode
867 {
868  static WifiMode mode =
869  WifiModeFactory::CreateWifiMode ("OfdmRate27MbpsBW10MHz",
871  false,
872  10000000, 27000000,
874  64);
875  return mode;
876 }
877 
878 // 5 MHz channel rates
879 
880 WifiMode
882 {
883  static WifiMode mode =
884  WifiModeFactory::CreateWifiMode ("OfdmRate1_5MbpsBW5MHz",
886  true,
887  5000000, 1500000,
889  2);
890  return mode;
891 }
892 
893 WifiMode
895 {
896  static WifiMode mode =
897  WifiModeFactory::CreateWifiMode ("OfdmRate2_25MbpsBW5MHz",
899  false,
900  5000000, 2250000,
902  2);
903  return mode;
904 }
905 
906 WifiMode
908 {
909  static WifiMode mode =
910  WifiModeFactory::CreateWifiMode ("OfdmRate3MbpsBW5MHz",
912  true,
913  5000000, 3000000,
915  4);
916  return mode;
917 }
918 
919 WifiMode
921 {
922  static WifiMode mode =
923  WifiModeFactory::CreateWifiMode ("OfdmRate4_5MbpsBW5MHz",
925  false,
926  5000000, 4500000,
928  4);
929  return mode;
930 }
931 
932 WifiMode
934 {
935  static WifiMode mode =
936  WifiModeFactory::CreateWifiMode ("OfdmRate6MbpsBW5MHz",
938  true,
939  5000000, 6000000,
941  16);
942  return mode;
943 }
944 
945 WifiMode
947 {
948  static WifiMode mode =
949  WifiModeFactory::CreateWifiMode ("OfdmRate9MbpsBW5MHz",
951  false,
952  5000000, 9000000,
954  16);
955  return mode;
956 }
957 
958 WifiMode
960 {
961  static WifiMode mode =
962  WifiModeFactory::CreateWifiMode ("OfdmRate12MbpsBW5MHz",
964  false,
965  5000000, 12000000,
967  64);
968  return mode;
969 }
970 
971 WifiMode
973 {
974  static WifiMode mode =
975  WifiModeFactory::CreateWifiMode ("OfdmRate13_5MbpsBW5MHz",
977  false,
978  5000000, 13500000,
980  64);
981  return mode;
982 }
983 
984 // Clause 20
985 
986 WifiMode
988 {
989  static WifiMode mode =
990  WifiModeFactory::CreateWifiMode ("OfdmRate6_5MbpsBW20MHz",
992  true,
993  20000000, 6500000,
995  2);
996  return mode;
997 }
998 WifiMode
1000 {
1001  static WifiMode mode =
1002  WifiModeFactory::CreateWifiMode ("OfdmRate7_2MbpsBW20MHz",
1004  false,
1005  20000000, 7200000,
1007  2);
1008  return mode;
1009 }
1010 
1011 WifiMode
1013 {
1014  static WifiMode mode =
1015  WifiModeFactory::CreateWifiMode ("OfdmRate13MbpsBW20MHz",
1017  true,
1018  20000000, 13000000,
1020  4);
1021  return mode;
1022 }
1023 
1024 WifiMode
1026 {
1027  static WifiMode mode =
1028  WifiModeFactory::CreateWifiMode ("OfdmRate14_4MbpsBW20MHz",
1030  false,
1031  20000000, 14400000,
1033  4);
1034  return mode;
1035 }
1036 WifiMode
1038 {
1039  static WifiMode mode =
1040  WifiModeFactory::CreateWifiMode ("OfdmRate19_5MbpsBW20MHz",
1042  true,
1043  20000000, 19500000,
1045  4);
1046  return mode;
1047 }
1048 
1049 WifiMode
1051 {
1052  static WifiMode mode =
1053  WifiModeFactory::CreateWifiMode ("OfdmRate21_7MbpsBW20MHz",
1055  false,
1056  20000000, 21700000,
1058  4);
1059  return mode;
1060 }
1061 
1062 
1063 WifiMode
1065 {
1066  static WifiMode mode =
1067  WifiModeFactory::CreateWifiMode ("OfdmRate26MbpsBW20MHz",
1069  true,
1070  20000000, 26000000,
1072  16);
1073  return mode;
1074 }
1075 
1076 WifiMode
1078 {
1079  static WifiMode mode =
1080  WifiModeFactory::CreateWifiMode ("OfdmRate28_9MbpsBW20MHz",
1082  false,
1083  20000000, 28900000,
1085  16);
1086  return mode;
1087 }
1088 
1089 WifiMode
1091 {
1092  static WifiMode mode =
1093  WifiModeFactory::CreateWifiMode ("OfdmRate39MbpsBW20MHz",
1095  true,
1096  20000000, 39000000,
1098  16);
1099  return mode;
1100 }
1101 
1102 WifiMode
1104 {
1105  static WifiMode mode =
1106  WifiModeFactory::CreateWifiMode ("OfdmRate43_3MbpsBW20MHz",
1108  false,
1109  20000000, 43300000,
1111  16);
1112  return mode;
1113 }
1114 
1115 WifiMode
1117 {
1118  static WifiMode mode =
1119  WifiModeFactory::CreateWifiMode ("OfdmRate52MbpsBW20MHz",
1121  true,
1122  20000000, 52000000,
1124  64);
1125  return mode;
1126 }
1127 
1128 WifiMode
1130 {
1131  static WifiMode mode =
1132  WifiModeFactory::CreateWifiMode ("OfdmRate57_8MbpsBW20MHz",
1134  false,
1135  20000000, 57800000,
1137  64);
1138  return mode;
1139 }
1140 
1141 
1142 WifiMode
1144 {
1145  static WifiMode mode =
1146  WifiModeFactory::CreateWifiMode ("OfdmRate58_5MbpsBW20MHz",
1148  true,
1149  20000000, 58500000,
1151  64);
1152  return mode;
1153 }
1154 
1155 WifiMode
1157 {
1158  static WifiMode mode =
1159  WifiModeFactory::CreateWifiMode ("OfdmRate65MbpsBW20MHzShGi",
1161  false,
1162  20000000, 65000000,
1164  64);
1165  return mode;
1166 }
1167 
1168 WifiMode
1170 {
1171  static WifiMode mode =
1172  WifiModeFactory::CreateWifiMode ("OfdmRate65MbpsBW20MHz",
1174  true,
1175  20000000, 65000000,
1177  64);
1178  return mode;
1179 }
1180 
1181 WifiMode
1183 {
1184  static WifiMode mode =
1185  WifiModeFactory::CreateWifiMode ("OfdmRate72_2MbpsBW20MHz",
1187  false,
1188  20000000, 72200000,
1190  64);
1191  return mode;
1192 }
1193 
1194 WifiMode
1196 {
1197  static WifiMode mode =
1198  WifiModeFactory::CreateWifiMode ("OfdmRate13_5MbpsBW40MHz",
1200  false,
1201  40000000, 13500000,
1203  2);
1204  return mode;
1205 }
1206 
1207 WifiMode
1209 {
1210  static WifiMode mode =
1211  WifiModeFactory::CreateWifiMode ("OfdmRate15MbpsBW40MHz",
1213  false,
1214  40000000, 15000000,
1216  2);
1217  return mode;
1218 }
1219 
1220 WifiMode
1222 {
1223  static WifiMode mode =
1224  WifiModeFactory::CreateWifiMode ("OfdmRate27MbpsBW40MHz",
1226  false,
1227  40000000, 27000000,
1229  4);
1230  return mode;
1231 }
1232 WifiMode
1234 {
1235  static WifiMode mode =
1236  WifiModeFactory::CreateWifiMode ("OfdmRate30MbpsBW40MHz",
1238  false,
1239  40000000, 30000000,
1241  4);
1242  return mode;
1243 }
1244 
1245 WifiMode
1247 {
1248  static WifiMode mode =
1249  WifiModeFactory::CreateWifiMode ("OfdmRate40_5MbpsBW40MHz",
1251  false,
1252  40000000, 40500000,
1254  4);
1255  return mode;
1256 }
1257 WifiMode
1259 {
1260  static WifiMode mode =
1261  WifiModeFactory::CreateWifiMode ("OfdmRate45MbpsBW40MHz",
1263  false,
1264  40000000, 45000000,
1266  4);
1267  return mode;
1268 }
1269 
1270 WifiMode
1272 {
1273  static WifiMode mode =
1274  WifiModeFactory::CreateWifiMode ("OfdmRate54MbpsBW40MHz",
1276  false,
1277  40000000, 54000000,
1279  16);
1280  return mode;
1281 }
1282 
1283 WifiMode
1285 {
1286  static WifiMode mode =
1287  WifiModeFactory::CreateWifiMode ("OfdmRate60MbpsBW40MHz",
1289  false,
1290  40000000, 60000000,
1292  16);
1293  return mode;
1294 }
1295 
1296 WifiMode
1298 {
1299  static WifiMode mode =
1300  WifiModeFactory::CreateWifiMode ("OfdmRate81MbpsBW40MHz",
1302  false,
1303  40000000, 81000000,
1305  16);
1306  return mode;
1307 }
1308 WifiMode
1310 {
1311  static WifiMode mode =
1312  WifiModeFactory::CreateWifiMode ("OfdmRate90MbpsBW40MHz",
1314  false,
1315  40000000, 90000000,
1317  16);
1318  return mode;
1319 }
1320 
1321 WifiMode
1323 {
1324  static WifiMode mode =
1325  WifiModeFactory::CreateWifiMode ("OfdmRate108MbpsBW40MHz",
1327  false,
1328  40000000, 108000000,
1330  64);
1331  return mode;
1332 }
1333 WifiMode
1335 {
1336  static WifiMode mode =
1337  WifiModeFactory::CreateWifiMode ("OfdmRate120MbpsBW40MHz",
1339  false,
1340  40000000, 120000000,
1342  64);
1343  return mode;
1344 }
1345 WifiMode
1347 {
1348  static WifiMode mode =
1349  WifiModeFactory::CreateWifiMode ("OfdmRate121_5MbpsBW40MHz",
1351  false,
1352  40000000, 121500000,
1354  64);
1355  return mode;
1356 }
1357 WifiMode
1359 {
1360  static WifiMode mode =
1361  WifiModeFactory::CreateWifiMode ("OfdmRate135MbpsBW40MHzShGi",
1363  false,
1364  40000000, 135000000,
1366  64);
1367  return mode;
1368 }
1369 WifiMode
1371 {
1372  static WifiMode mode =
1373  WifiModeFactory::CreateWifiMode ("OfdmRate135MbpsBW40MHz",
1375  false,
1376  40000000, 135000000,
1378  64);
1379  return mode;
1380 }
1381 
1382 WifiMode
1384 {
1385  static WifiMode mode =
1386  WifiModeFactory::CreateWifiMode ("OfdmRate150MbpsBW40MHz",
1388  false,
1389  40000000, 150000000,
1391  64);
1392  return mode;
1393 }
1394 
1395 
1396 
1397 std::ostream& operator<< (std::ostream& os, enum WifiPhy::State state)
1398 {
1399  switch (state)
1400  {
1401  case WifiPhy::IDLE:
1402  return (os << "IDLE");
1403  case WifiPhy::CCA_BUSY:
1404  return (os << "CCA_BUSY");
1405  case WifiPhy::TX:
1406  return (os << "TX");
1407  case WifiPhy::RX:
1408  return (os << "RX");
1409  case WifiPhy::SWITCHING:
1410  return (os << "SWITCHING");
1411  default:
1412  NS_FATAL_ERROR ("Invalid WifiPhy state");
1413  return (os << "INVALID");
1414  }
1415 }
1416 
1417 
1418 
1419 } // namespace ns3
1420 
1421 namespace {
1422 
1423 static class Constructor
1424 {
1425 public:
1427  {
1488 
1489  }
1490 } g_constructor;
1491 }
static class anonymous_namespace{wifi-phy.cc}::Constructor g_constructor
static WifiMode GetOfdmRate9MbpsBW5MHz()
Return a WifiMode for ODFM at 9Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:946
TracedCallback< Ptr< const Packet > > m_phyRxBeginTrace
The trace source fired when a packet begins the reception process from the medium.
Definition: wifi-phy.h:1095
static WifiMode GetErpOfdmRate24Mbps()
Return a WifiMode for ERP-ODFM at 24Mbps.
Definition: wifi-phy.cc:614
static WifiMode GetDsssRate11Mbps()
Return a WifiMode for DSSS at 11Mbps.
Definition: wifi-phy.cc:546
static uint32_t GetPlcpHeaderDurationMicroSeconds(WifiMode payloadMode, WifiPreamble preamble)
Definition: wifi-phy.cc:221
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:79
static WifiMode GetErpOfdmRate36Mbps()
Return a WifiMode for ERP-ODFM at 36Mbps.
Definition: wifi-phy.cc:627
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
static WifiMode GetOfdmRate26MbpsBW20MHz()
Return a WifiMode for ODFM at 26Mbps with 20MHz channel spacing.
Definition: wifi-phy.cc:1064
ERP-OFDM PHY (19.5)
Definition: wifi-mode.h:52
static WifiMode GetOfdmRate9Mbps()
Return a WifiMode for ODFM at 9Mbps.
Definition: wifi-phy.cc:682
static WifiMode GetOfdmRate7_2MbpsBW20MHz()
Return a WifiMode for ODFM at 7.2Mbps with 20MHz channel spacing.
Definition: wifi-phy.cc:999
static WifiMode GetOfdmRate18MbpsBW10MHz()
Return a WifiMode for ODFM at 18Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:840
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 ODFM at 27Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:866
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register the class in the ns-3 factory.
Definition: object-base.h:38
static WifiMode GetOfdmRate3MbpsBW5MHz()
Return a WifiMode for ODFM at 3Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:907
virtual ~WifiPhy()
Definition: wifi-phy.cc:91
static WifiMode GetDsssRate1Mbps()
Return a WifiMode for DSSS at 1Mbps.
Definition: wifi-phy.cc:504
void NotifyMonitorSniffTx(Ptr< const Packet > packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble, uint8_t txPower)
Public method used to fire a MonitorSniffer trace for a wifi packet being transmitted.
Definition: wifi-phy.cc:495
static WifiMode GetOfdmRate81MbpsBW40MHz()
Return a WifiMode for ODFM at 81Mbps with 40MHz channel spacing.
Definition: wifi-phy.cc:1297
802.11 PHY layer model
Definition: wifi-phy.h:117
static WifiMode GetErpOfdmRate18Mbps()
Return a WifiMode for ERP-ODFM at 18Mbps.
Definition: wifi-phy.cc:601
State
The state of the PHY layer.
Definition: wifi-phy.h:123
static WifiMode GetOfdmRate12Mbps()
Return a WifiMode for ODFM at 12Mbps.
Definition: wifi-phy.cc:695
TracedCallback< Ptr< const Packet > > m_phyRxEndTrace
The trace source fired when a packet ends the reception process from the medium.
Definition: wifi-phy.h:1103
enum WifiModulationClass GetModulationClass() const
Definition: wifi-mode.cc:115
static WifiMode GetOfdmRate43_3MbpsBW20MHz()
Return a WifiMode for ODFM at 43.3Mbps with 20MHz channel spacing.
Definition: wifi-phy.cc:1103
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:170
static WifiMode GetOfdmRate60MbpsBW40MHz()
Return a WifiMode for ODFM at 60Mbps with 40MHz channel spacing.
Definition: wifi-phy.cc:1284
static WifiMode GetOfdmRate1_5MbpsBW5MHz()
Return a WifiMode for ODFM at 1.5Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:881
static WifiMode GetOfdmRate4_5MbpsBW10MHz()
Return a WifiMode for ODFM at 4.5Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:788
static WifiMode GetMFPlcpHeaderMode(WifiMode payloadMode, WifiPreamble preamble)
Definition: wifi-phy.cc:100
static WifiMode GetOfdmRate54Mbps()
Return a WifiMode for ODFM at 54Mbps.
Definition: wifi-phy.cc:760
#define NS_FATAL_ERROR(msg)
fatal error handling
Definition: fatal-error.h:95
void NotifyTxDrop(Ptr< const Packet > packet)
Public method used to fire a PhyTxDrop trace.
Definition: wifi-phy.cc:465
static WifiMode GetOfdmRate108MbpsBW40MHz()
Return a WifiMode for ODFM at 108Mbps with 40MHz channel spacing.
Definition: wifi-phy.cc:1322
static WifiMode GetOfdmRate21_7MbpsBW20MHz()
Return a WifiMode for ODFM at 21.7Mbps with 20MHz channel spacing.
Definition: wifi-phy.cc:1050
void NotifyTxBegin(Ptr< const Packet > packet)
Public method used to fire a PhyTxBegin trace.
Definition: wifi-phy.cc:453
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
Definition: wifi-mode.h:91
static WifiMode GetOfdmRate135MbpsBW40MHz()
Return a WifiMode for ODFM at 135Mbps with 40MHz channel spacing.
Definition: wifi-phy.cc:1370
static WifiMode GetOfdmRate36Mbps()
Return a WifiMode for ODFM at 36Mbps.
Definition: wifi-phy.cc:734
static WifiMode GetOfdmRate6MbpsBW5MHz()
Return a WifiMode for ODFM at 6Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:933
The PHY layer is switching to other channel.
Definition: wifi-phy.h:144
static WifiMode GetErpOfdmRate54Mbps()
Return a WifiMode for ERP-ODFM at 54Mbps.
Definition: wifi-phy.cc:653
void NotifyRxDrop(Ptr< const Packet > packet)
Public method used to fire a PhyRxDrop trace.
Definition: wifi-phy.cc:483
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
Definition: wifi-preamble.h:29
static WifiMode GetOfdmRate6_5MbpsBW20MHz()
Return a WifiMode for ODFM at 6.5Mbps with 20MHz channel spacing.
Definition: wifi-phy.cc:987
static double GetPayloadDurationMicroSeconds(uint32_t size, WifiTxVector txvector)
Definition: wifi-phy.cc:332
static WifiMode GetOfdmRate135MbpsBW40MHzShGi()
Return a WifiMode for ODFM at 135Mbps with 40MHz channel spacing.
Definition: wifi-phy.cc:1358
TracedCallback< Ptr< const Packet >, uint16_t, uint16_t, uint32_t, bool, uint8_t > m_phyMonitorSniffTxTrace
A trace source that emulates a wifi device in monitor mode sniffing a packet being transmitted...
Definition: wifi-phy.h:1134
TracedCallback< Ptr< const Packet > > m_phyTxDropTrace
The trace source fired when the phy layer drops a packet as it tries to transmit it.
Definition: wifi-phy.h:1087
static WifiMode GetErpOfdmRate48Mbps()
Return a WifiMode for ERP-ODFM at 48Mbps.
Definition: wifi-phy.cc:640
static WifiMode GetPlcpHeaderMode(WifiMode payloadMode, WifiPreamble preamble)
Definition: wifi-phy.cc:148
uint8_t GetNess(void) const
static WifiMode GetOfdmRate12MbpsBW10MHz()
Return a WifiMode for ODFM at 12Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:827
HT PHY (Clause 20)
Definition: wifi-mode.h:56
std::string GetUniqueName(void) const
Definition: wifi-mode.cc:97
TracedCallback< Ptr< const Packet > > m_phyRxDropTrace
The trace source fired when the phy layer drops a packet it has received.
Definition: wifi-phy.h:1110
virtual ~WifiPhyListener()
Definition: wifi-phy.cc:43
static WifiMode CreateWifiMode(std::string uniqueName, enum WifiModulationClass modClass, bool isMandatory, uint32_t bandwidth, uint32_t dataRate, enum WifiCodeRate codingRate, uint8_t constellationSize)
Definition: wifi-mode.cc:141
void NotifyRxBegin(Ptr< const Packet > packet)
Public method used to fire a PhyRxBegin trace.
Definition: wifi-phy.cc:471
static WifiMode GetOfdmRate19_5MbpsBW20MHz()
Return a WifiMode for ODFM at 19.5Mbps with 20MHz channel spacing.
Definition: wifi-phy.cc:1037
static WifiMode GetOfdmRate18Mbps()
Return a WifiMode for ODFM at 18Mbps.
Definition: wifi-phy.cc:708
static WifiMode GetOfdmRate9MbpsBW10MHz()
Return a WifiMode for ODFM at 9Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:814
TracedCallback< Ptr< const Packet >, uint16_t, uint16_t, uint32_t, bool, double, double > m_phyMonitorSniffRxTrace
A trace source that emulates a wifi device in monitor mode sniffing a packet being received...
Definition: wifi-phy.h:1122
bool IsStbc(void) const
Check if STBC is used or not.
static WifiMode GetOfdmRate12MbpsBW5MHz()
Return a WifiMode for ODFM at 12Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:959
static WifiMode GetOfdmRate52MbpsBW20MHz()
Return a WifiMode for ODFM at 52Mbps with 20MHz channel spacing.
Definition: wifi-phy.cc:1116
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Definition: log.h:233
static WifiMode GetOfdmRate40_5MbpsBW40MHz()
Return a WifiMode for ODFM at 40.5Mbps with 40MHz channel spacing.
Definition: wifi-phy.cc:1246
uint32_t GetBandwidth(void) const
Definition: wifi-mode.cc:67
TracedCallback< Ptr< const Packet > > m_phyTxBeginTrace
The trace source fired when a packet begins the transmission process on the medium.
Definition: wifi-phy.h:1071
static WifiMode GetOfdmRate72_2MbpsBW20MHz()
Return a WifiMode for ODFM at 72.2Mbps with 20MHz channel spacing.
Definition: wifi-phy.cc:1182
static WifiMode GetOfdmRate65MbpsBW20MHzShGi()
Return a WifiMode for ODFM at 65Mbps with 20MHz channel spacing.
Definition: wifi-phy.cc:1156
static WifiMode GetOfdmRate48Mbps()
Return a WifiMode for ODFM at 48Mbps.
Definition: wifi-phy.cc:747
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
Definition: angles.cc:43
void NotifyMonitorSniffRx(Ptr< const Packet > packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble, double signalDbm, double noiseDbm)
Public method used to fire a MonitorSniffer trace for a wifi packet being received.
Definition: wifi-phy.cc:489
The PHY layer is IDLE.
Definition: wifi-phy.h:128
static TypeId GetTypeId(void)
Definition: wifi-phy.cc:54
static WifiMode GetOfdmRate57_8MbpsBW20MHz()
Return a WifiMode for ODFM at 57.8Mbps with 20MHz channel spacing.
Definition: wifi-phy.cc:1129
static WifiMode GetOfdmRate24Mbps()
Return a WifiMode for ODFM at 24Mbps.
Definition: wifi-phy.cc:721
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
static WifiMode GetOfdmRate13MbpsBW20MHz()
Return a WifiMode for ODFM at 13Mbps with 20MHz channel spacing.
Definition: wifi-phy.cc:1012
static WifiMode GetOfdmRate65MbpsBW20MHz()
Return a WifiMode for ODFM at 65Mbps with 20MHz channel spacing.
Definition: wifi-phy.cc:1169
static uint32_t GetPlcpHtTrainingSymbolDurationMicroSeconds(WifiMode payloadMode, WifiPreamble preamble, WifiTxVector txvector)
Definition: wifi-phy.cc:113
static WifiMode GetOfdmRate58_5MbpsBW20MHz()
Return a WifiMode for ODFM at 58.5Mbps with 20MHz channel spacing.
Definition: wifi-phy.cc:1143
static WifiMode GetDsssRate5_5Mbps()
Return a WifiMode for DSSS at 5.5Mbps.
Definition: wifi-phy.cc:533
static WifiMode GetOfdmRate2_25MbpsBW5MHz()
Return a WifiMode for ODFM at 2.25Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:894
static WifiMode GetErpOfdmRate9Mbps()
Return a WifiMode for ERP-ODFM at 9Mbps.
Definition: wifi-phy.cc:575
void NotifyTxEnd(Ptr< const Packet > packet)
Public method used to fire a PhyTxEnd trace.
Definition: wifi-phy.cc:459
static WifiMode GetOfdmRate15MbpsBW40MHz()
Return a WifiMode for ODFM at 15Mbps with 40MHz channel spacing.
Definition: wifi-phy.cc:1208
static WifiMode GetOfdmRate121_5MbpsBW40MHz()
Return a WifiMode for ODFM at 121.5Mbps with 40MHz channel spacing.
Definition: wifi-phy.cc:1346
static WifiMode GetOfdmRate28_9MbpsBW20MHz()
Return a WifiMode for ODFM at 28.9Mbps with 20MHz channel spacing.
Definition: wifi-phy.cc:1077
No explicit coding (e.g., DSSS rates)
Definition: wifi-mode.h:70
static WifiMode GetErpOfdmRate6Mbps()
Return a WifiMode for ERP-ODFM at 6Mbps.
Definition: wifi-phy.cc:562
static Time CalculateTxDuration(uint32_t size, WifiTxVector txvector, enum WifiPreamble preamble)
Definition: wifi-phy.cc:439
uint8_t GetNss(void) const
static WifiMode GetErpOfdmRate12Mbps()
Return a WifiMode for ERP-ODFM at 12Mbps.
Definition: wifi-phy.cc:588
void NotifyRxEnd(Ptr< const Packet > packet)
Public method used to fire a PhyRxEnd trace.
Definition: wifi-phy.cc:477
static WifiMode GetOfdmRate13_5MbpsBW40MHz()
Return a WifiMode for ODFM at 13.5Mbps with 40MHz channel spacing.
Definition: wifi-phy.cc:1195
static WifiMode GetOfdmRate30MbpsBW40MHz()
Return a WifiMode for ODFM at 30Mbps with 40MHz channel spacing.
Definition: wifi-phy.cc:1233
static WifiMode GetOfdmRate54MbpsBW40MHz()
Return a WifiMode for ODFM at 54Mbps with 40MHz channel spacing.
Definition: wifi-phy.cc:1271
OFDM PHY (Clause 17)
Definition: wifi-mode.h:54
static WifiMode GetOfdmRate90MbpsBW40MHz()
Return a WifiMode for ODFM at 90Mbps with 40MHz channel spacing.
Definition: wifi-phy.cc:1309
static WifiMode GetOfdmRate45MbpsBW40MHz()
Return a WifiMode for ODFM at 45Mbps with 40MHz channel spacing.
Definition: wifi-phy.cc:1258
static WifiMode GetOfdmRate120MbpsBW40MHz()
Return a WifiMode for ODFM at 120Mbps with 40MHz channel spacing.
Definition: wifi-phy.cc:1334
static WifiMode GetOfdmRate39MbpsBW20MHz()
Return a WifiMode for ODFM at 39Mbps with 20MHz channel spacing.
Definition: wifi-phy.cc:1090
a base class which provides memory management and object aggregation
Definition: object.h:64
static WifiMode GetDsssRate2Mbps()
Return a WifiMode for DSSS at 2Mbps.
Definition: wifi-phy.cc:517
static WifiMode GetOfdmRate6MbpsBW10MHz()
Return a WifiMode for ODFM at 6Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:801
WifiMode GetMode(void) const
The PHY layer is receiving a packet.
Definition: wifi-phy.h:140
static WifiMode GetOfdmRate24MbpsBW10MHz()
Return a WifiMode for ODFM at 24Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:853
The PHY layer has sense the medium busy through the CCA mechanism.
Definition: wifi-phy.h:132
static WifiMode GetOfdmRate13_5MbpsBW5MHz()
Return a WifiMode for ODFM at 13.5Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:972
a unique identifier for an interface.
Definition: type-id.h:49
static uint32_t GetPlcpPreambleDurationMicroSeconds(WifiMode payloadMode, WifiPreamble preamble)
Definition: wifi-phy.cc:284
The PHY layer is sending a packet.
Definition: wifi-phy.h:136
uint64_t GetDataRate(void) const
Definition: wifi-mode.cc:79
TypeId SetParent(TypeId tid)
Definition: type-id.cc:610
static WifiMode GetOfdmRate6Mbps()
Return a WifiMode for ODFM at 6Mbps.
Definition: wifi-phy.cc:669
static WifiMode GetOfdmRate27MbpsBW40MHz()
Return a WifiMode for ODFM at 27Mbps with 40MHz channel spacing.
Definition: wifi-phy.cc:1221
DSSS PHY (Clause 15) and HR/DSSS PHY (Clause 18)
Definition: wifi-mode.h:46
static WifiMode GetOfdmRate4_5MbpsBW5MHz()
Return a WifiMode for ODFM at 4.5Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:920
static WifiMode GetOfdmRate14_4MbpsBW20MHz()
Return a WifiMode for ODFM at 14.4Mbps with 20MHz channel spacing.
Definition: wifi-phy.cc:1025
static uint32_t GetPlcpHtSigHeaderDurationMicroSeconds(WifiMode payloadMode, WifiPreamble preamble)
Definition: wifi-phy.cc:129
static WifiMode GetOfdmRate3MbpsBW10MHz()
Return a WifiMode for ODFM at 3Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:775
TracedCallback< Ptr< const Packet > > m_phyTxEndTrace
The trace source fired when a packet ends the transmission process on the medium. ...
Definition: wifi-phy.h:1079
static WifiMode GetOfdmRate150MbpsBW40MHz()
Return a WifiMode for ODFM at 150Mbps with 40MHz channel spacing.
Definition: wifi-phy.cc:1383