src/wifi/model/wifi-phy.cc
author Vedran Miletić <rivanvx@gmail.com>
Tue, 02 Aug 2011 17:42:33 -0400
changeset 7385 10beb0e53130
parent 7334 21b6b53ba0d5
child 8981 7e1c95c4d1a7
permissions -rw-r--r--
standardize emacs c++ mode comments
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7385
10beb0e53130 standardize emacs c++ mode comments
Vedran Miletić <rivanvx@gmail.com>
parents: 7334
diff changeset
     1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     2
/*
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     3
 * Copyright (c) 2005,2006 INRIA
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     4
 *
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
     6
 * it under the terms of the GNU General Public License version 2 as
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     7
 * published by the Free Software Foundation;
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     8
 *
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    12
 * GNU General Public License for more details.
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    13
 *
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    17
 *
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    18
 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    19
 */
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    20
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    21
#include "wifi-phy.h"
1891
add6fb8761f3 use WifiMode rather than TransmissionMode
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1890
diff changeset
    22
#include "wifi-mode.h"
add6fb8761f3 use WifiMode rather than TransmissionMode
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1890
diff changeset
    23
#include "wifi-channel.h"
1920
1d4864775cf8 replace header mode with preamble mode
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1919
diff changeset
    24
#include "wifi-preamble.h"
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    25
#include "ns3/simulator.h"
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    26
#include "ns3/packet.h"
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    27
#include "ns3/random-variable.h"
1974
0d6b3bead74a replace cassert by ns3/assert.h
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1964
diff changeset
    28
#include "ns3/assert.h"
1979
d535a38b7fc4 convert TRACE to NS_LOG
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1978
diff changeset
    29
#include "ns3/log.h"
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2503
diff changeset
    30
#include "ns3/double.h"
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2503
diff changeset
    31
#include "ns3/uinteger.h"
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2503
diff changeset
    32
#include "ns3/enum.h"
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2503
diff changeset
    33
#include "ns3/trace-source-accessor.h"
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    34
#include <math.h>
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    35
1979
d535a38b7fc4 convert TRACE to NS_LOG
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1978
diff changeset
    36
NS_LOG_COMPONENT_DEFINE ("WifiPhy");
1891
add6fb8761f3 use WifiMode rather than TransmissionMode
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1890
diff changeset
    37
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    38
namespace ns3 {
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    39
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    40
/****************************************************************
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    41
 *       This destructor is needed.
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    42
 ****************************************************************/
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    43
1890
a2b30c6456c9 Phy80211 -> WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1889
diff changeset
    44
WifiPhyListener::~WifiPhyListener ()
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
    45
{
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
    46
}
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    47
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    48
/****************************************************************
1890
a2b30c6456c9 Phy80211 -> WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1889
diff changeset
    49
 *       The actual WifiPhy class
1889
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    50
 ****************************************************************/
41589561e4a7 WifiPhy class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    51
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2503
diff changeset
    52
NS_OBJECT_ENSURE_REGISTERED (WifiPhy);
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2503
diff changeset
    53
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
    54
TypeId
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2503
diff changeset
    55
WifiPhy::GetTypeId (void)
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2503
diff changeset
    56
{
2602
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2530
diff changeset
    57
  static TypeId tid = TypeId ("ns3::WifiPhy")
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2503
diff changeset
    58
    .SetParent<Object> ()
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
    59
    .AddTraceSource ("PhyTxBegin",
4263
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4040
diff changeset
    60
                     "Trace source indicating a packet has begun transmitting over the channel medium",
4264
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
    61
                     MakeTraceSourceAccessor (&WifiPhy::m_phyTxBeginTrace))
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
    62
    .AddTraceSource ("PhyTxEnd",
6217
8f7571fea7cf Bug 805 - WifiPhy PhyTxEnd trace not working
Nicola Baldo <nbaldo@cttc.es>
parents: 5901
diff changeset
    63
                     "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.",
4264
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
    64
                     MakeTraceSourceAccessor (&WifiPhy::m_phyTxEndTrace))
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
    65
    .AddTraceSource ("PhyTxDrop",
4263
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4040
diff changeset
    66
                     "Trace source indicating a packet has been dropped by the device during transmission",
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4040
diff changeset
    67
                     MakeTraceSourceAccessor (&WifiPhy::m_phyTxDropTrace))
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
    68
    .AddTraceSource ("PhyRxBegin",
4263
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4040
diff changeset
    69
                     "Trace source indicating a packet has begun being received from the channel medium by the device",
4264
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
    70
                     MakeTraceSourceAccessor (&WifiPhy::m_phyRxBeginTrace))
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
    71
    .AddTraceSource ("PhyRxEnd",
4263
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4040
diff changeset
    72
                     "Trace source indicating a packet has been completely received from the channel medium by the device",
4264
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
    73
                     MakeTraceSourceAccessor (&WifiPhy::m_phyRxEndTrace))
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
    74
    .AddTraceSource ("PhyRxDrop",
4263
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4040
diff changeset
    75
                     "Trace source indicating a packet has been dropped by the device during reception",
fec2f830d015 trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 4040
diff changeset
    76
                     MakeTraceSourceAccessor (&WifiPhy::m_phyRxDropTrace))
7334
21b6b53ba0d5 [Bug 827] Rename promisc trace to monitor in WifiPhy
Ruben Merz <ruben@net.t-labs.tu-berlin.de>
parents: 7143
diff changeset
    77
    .AddTraceSource ("MonitorSnifferRx",
4492
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
    78
                     "Trace source simulating a wifi device in monitor mode sniffing all received frames",
7334
21b6b53ba0d5 [Bug 827] Rename promisc trace to monitor in WifiPhy
Ruben Merz <ruben@net.t-labs.tu-berlin.de>
parents: 7143
diff changeset
    79
                     MakeTraceSourceAccessor (&WifiPhy::m_phyMonitorSniffRxTrace))
21b6b53ba0d5 [Bug 827] Rename promisc trace to monitor in WifiPhy
Ruben Merz <ruben@net.t-labs.tu-berlin.de>
parents: 7143
diff changeset
    80
    .AddTraceSource ("MonitorSnifferTx",
4492
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
    81
                     "Trace source simulating the capability of a wifi device in monitor mode to sniff all frames being transmitted",
7334
21b6b53ba0d5 [Bug 827] Rename promisc trace to monitor in WifiPhy
Ruben Merz <ruben@net.t-labs.tu-berlin.de>
parents: 7143
diff changeset
    82
                     MakeTraceSourceAccessor (&WifiPhy::m_phyMonitorSniffTxTrace))
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
    83
  ;
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2503
diff changeset
    84
  return tid;
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2503
diff changeset
    85
}
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2503
diff changeset
    86
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2503
diff changeset
    87
WifiPhy::WifiPhy ()
2985
fa0747c4ad5e use function logging macros
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2782
diff changeset
    88
{
fa0747c4ad5e use function logging macros
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2782
diff changeset
    89
  NS_LOG_FUNCTION (this);
fa0747c4ad5e use function logging macros
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2782
diff changeset
    90
}
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2503
diff changeset
    91
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2503
diff changeset
    92
WifiPhy::~WifiPhy ()
2985
fa0747c4ad5e use function logging macros
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2782
diff changeset
    93
{
fa0747c4ad5e use function logging macros
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2782
diff changeset
    94
  NS_LOG_FUNCTION (this);
fa0747c4ad5e use function logging macros
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2782
diff changeset
    95
}
2530
05f9cec44621 avoid memory leaks
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2524
diff changeset
    96
7143
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
    97
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
    98
WifiMode
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
    99
WifiPhy::GetPlcpHeaderMode (WifiMode payloadMode, WifiPreamble preamble)
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   100
{
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   101
  switch (payloadMode.GetModulationClass ())
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   102
    {
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   103
    case WIFI_MOD_CLASS_OFDM:
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   104
      {
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   105
        switch (payloadMode.GetBandwidth ())
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   106
          {
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   107
          case 5000000:
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   108
            return WifiPhy::GetOfdmRate1_5MbpsBW5MHz ();
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   109
          case 10000000:
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   110
            return WifiPhy::GetOfdmRate3MbpsBW10MHz ();
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   111
          default:
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   112
            // IEEE Std 802.11-2007, 17.3.2
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   113
            // actually this is only the first part of the PlcpHeader,
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   114
            // because the last 16 bits of the PlcpHeader are using the
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   115
            // same mode of the payload
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   116
            return WifiPhy::GetOfdmRate6Mbps ();
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   117
          }
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   118
      }
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   119
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   120
    case WIFI_MOD_CLASS_ERP_OFDM:
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   121
      return WifiPhy::GetErpOfdmRate6Mbps ();
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   122
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   123
    case WIFI_MOD_CLASS_DSSS:
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   124
      if (preamble == WIFI_PREAMBLE_LONG)
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   125
        {
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   126
          // IEEE Std 802.11-2007, sections 15.2.3 and 18.2.2.1
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   127
          return WifiPhy::GetDsssRate1Mbps ();
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   128
        }
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   129
      else  //  WIFI_PREAMBLE_SHORT
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   130
        {
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   131
          // IEEE Std 802.11-2007, section 18.2.2.2
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   132
          return WifiPhy::GetDsssRate2Mbps ();
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   133
        }
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   134
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   135
    default:
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   136
      NS_FATAL_ERROR ("unsupported modulation class");
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   137
      return WifiMode ();
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   138
    }
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   139
}
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   140
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   141
uint32_t
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   142
WifiPhy::GetPlcpHeaderDurationMicroSeconds (WifiMode payloadMode, WifiPreamble preamble)
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   143
{
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   144
  switch (payloadMode.GetModulationClass ())
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   145
    {
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   146
    case WIFI_MOD_CLASS_OFDM:
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   147
      {
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   148
        switch (payloadMode.GetBandwidth ())
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   149
          {
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   150
          case 20000000:
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   151
          default:
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   152
            // IEEE Std 802.11-2007, section 17.3.3 and figure 17-4
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   153
            // also section 17.3.2.3, table 17-4
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   154
            // We return the duration of the SIGNAL field only, since the
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   155
            // SERVICE field (which strictly speaking belongs to the PLCP
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   156
            // header, see section 17.3.2 and figure 17-1) is sent using the
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   157
            // payload mode.
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   158
            return 4;
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   159
          case 10000000:
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   160
            // IEEE Std 802.11-2007, section 17.3.2.3, table 17-4
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   161
            return 8;
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   162
          case 5000000:
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   163
            // IEEE Std 802.11-2007, section 17.3.2.3, table 17-4
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   164
            return 16;
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   165
          }
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   166
      }
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   167
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   168
    case WIFI_MOD_CLASS_ERP_OFDM:
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   169
      return 16;
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   170
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   171
    case WIFI_MOD_CLASS_DSSS:
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   172
      if (preamble == WIFI_PREAMBLE_SHORT)
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   173
        {
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   174
          // IEEE Std 802.11-2007, section 18.2.2.2 and figure 18-2
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   175
          return 24;
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   176
        }
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   177
      else // WIFI_PREAMBLE_LONG
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   178
        {
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   179
          // IEEE Std 802.11-2007, sections 18.2.2.1 and figure 18-1
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   180
          return 48;
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   181
        }
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   182
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   183
    default:
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   184
      NS_FATAL_ERROR ("unsupported modulation class");
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   185
      return 0;
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   186
    }
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   187
}
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   188
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   189
uint32_t
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   190
WifiPhy::GetPlcpPreambleDurationMicroSeconds (WifiMode payloadMode, WifiPreamble preamble)
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   191
{
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   192
  switch (payloadMode.GetModulationClass ())
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   193
    {
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   194
    case WIFI_MOD_CLASS_OFDM:
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   195
      {
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   196
        switch (payloadMode.GetBandwidth ())
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   197
          {
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   198
          case 20000000:
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   199
          default:
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   200
            // IEEE Std 802.11-2007, section 17.3.3,  figure 17-4
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   201
            // also section 17.3.2.3, table 17-4
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   202
            return 16;
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   203
          case 10000000:
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   204
            // IEEE Std 802.11-2007, section 17.3.3, table 17-4
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   205
            // also section 17.3.2.3, table 17-4
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   206
            return 32;
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   207
          case 5000000:
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   208
            // IEEE Std 802.11-2007, section 17.3.3
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   209
            // also section 17.3.2.3, table 17-4
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   210
            return 64;
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   211
          }
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   212
      }
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   213
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   214
    case WIFI_MOD_CLASS_ERP_OFDM:
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   215
      return 4;
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   216
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   217
    case WIFI_MOD_CLASS_DSSS:
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   218
      if (preamble == WIFI_PREAMBLE_SHORT)
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   219
        {
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   220
          // IEEE Std 802.11-2007, section 18.2.2.2 and figure 18-2
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   221
          return 72;
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   222
        }
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   223
      else // WIFI_PREAMBLE_LONG
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   224
        {
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   225
          // IEEE Std 802.11-2007, sections 18.2.2.1 and figure 18-1
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   226
          return 144;
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   227
        }
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   228
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   229
    default:
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   230
      NS_FATAL_ERROR ("unsupported modulation class");
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   231
      return 0;
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   232
    }
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   233
}
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   234
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   235
uint32_t
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   236
WifiPhy::GetPayloadDurationMicroSeconds (uint32_t size, WifiMode payloadMode)
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   237
{
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   238
  NS_LOG_FUNCTION (size << payloadMode);
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   239
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   240
  switch (payloadMode.GetModulationClass ())
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   241
    {
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   242
    case WIFI_MOD_CLASS_OFDM:
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   243
    case WIFI_MOD_CLASS_ERP_OFDM:
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   244
      {
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   245
        // IEEE Std 802.11-2007, section 17.3.2.3, table 17-4
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   246
        // corresponds to T_{SYM} in the table
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   247
        uint32_t symbolDurationUs;
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   248
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   249
        switch (payloadMode.GetBandwidth ())
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   250
          {
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   251
          case 20000000:
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   252
          default:
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   253
            symbolDurationUs = 4;
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   254
            break;
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   255
          case 10000000:
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   256
            symbolDurationUs = 8;
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   257
            break;
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   258
          case 5000000:
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   259
            symbolDurationUs = 16;
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   260
            break;
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   261
          }
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   262
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   263
        // IEEE Std 802.11-2007, section 17.3.2.2, table 17-3
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   264
        // corresponds to N_{DBPS} in the table
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   265
        double numDataBitsPerSymbol = payloadMode.GetDataRate ()  * symbolDurationUs / 1e6;
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   266
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   267
        // IEEE Std 802.11-2007, section 17.3.5.3, equation (17-11)
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   268
        uint32_t numSymbols = lrint (ceil ((16 + size * 8.0 + 6.0) / numDataBitsPerSymbol));
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   269
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   270
        // Add signal extension for ERP PHY
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   271
        if (payloadMode.GetModulationClass () == WIFI_MOD_CLASS_ERP_OFDM)
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   272
          {
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   273
            return numSymbols * symbolDurationUs + 6;
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   274
          }
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   275
        else
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   276
          {
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   277
            return numSymbols * symbolDurationUs;
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   278
          }
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   279
      }
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   280
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   281
    case WIFI_MOD_CLASS_DSSS:
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   282
      // IEEE Std 802.11-2007, section 18.2.3.5
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   283
      NS_LOG_LOGIC (" size=" << size
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   284
                             << " mode=" << payloadMode
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   285
                             << " rate=" << payloadMode.GetDataRate () );
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   286
      return lrint (ceil ((size * 8.0) / (payloadMode.GetDataRate () / 1.0e6)));
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   287
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   288
    default:
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   289
      NS_FATAL_ERROR ("unsupported modulation class");
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   290
      return 0;
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   291
    }
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   292
}
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   293
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   294
Time
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   295
WifiPhy::CalculateTxDuration (uint32_t size, WifiMode payloadMode, WifiPreamble preamble)
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   296
{
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   297
  uint32_t duration = GetPlcpPreambleDurationMicroSeconds (payloadMode, preamble)
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   298
    + GetPlcpHeaderDurationMicroSeconds (payloadMode, preamble)
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   299
    + GetPayloadDurationMicroSeconds (size, payloadMode);
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   300
  return MicroSeconds (duration);
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   301
}
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   302
0146b1916bc0 wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents: 7141
diff changeset
   303
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
   304
void
4264
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   305
WifiPhy::NotifyTxBegin (Ptr<const Packet> packet)
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   306
{
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   307
  m_phyTxBeginTrace (packet);
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   308
}
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   309
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
   310
void
4264
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   311
WifiPhy::NotifyTxEnd (Ptr<const Packet> packet)
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   312
{
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   313
  m_phyTxEndTrace (packet);
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   314
}
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   315
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
   316
void
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
   317
WifiPhy::NotifyTxDrop (Ptr<const Packet> packet)
4264
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   318
{
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   319
  m_phyTxDropTrace (packet);
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   320
}
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   321
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
   322
void
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
   323
WifiPhy::NotifyRxBegin (Ptr<const Packet> packet)
4264
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   324
{
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   325
  m_phyRxBeginTrace (packet);
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   326
}
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   327
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
   328
void
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
   329
WifiPhy::NotifyRxEnd (Ptr<const Packet> packet)
4264
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   330
{
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   331
  m_phyRxEndTrace (packet);
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   332
}
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   333
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
   334
void
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
   335
WifiPhy::NotifyRxDrop (Ptr<const Packet> packet)
4264
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   336
{
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   337
  m_phyRxDropTrace (packet);
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   338
}
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   339
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
   340
void
7334
21b6b53ba0d5 [Bug 827] Rename promisc trace to monitor in WifiPhy
Ruben Merz <ruben@net.t-labs.tu-berlin.de>
parents: 7143
diff changeset
   341
WifiPhy::NotifyMonitorSniffRx (Ptr<const Packet> packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble, double signalDbm, double noiseDbm)
4264
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   342
{
7334
21b6b53ba0d5 [Bug 827] Rename promisc trace to monitor in WifiPhy
Ruben Merz <ruben@net.t-labs.tu-berlin.de>
parents: 7143
diff changeset
   343
  m_phyMonitorSniffRxTrace (packet, channelFreqMhz, channelNumber, rate, isShortPreamble, signalDbm, noiseDbm);
4492
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   344
}
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   345
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
   346
void
7334
21b6b53ba0d5 [Bug 827] Rename promisc trace to monitor in WifiPhy
Ruben Merz <ruben@net.t-labs.tu-berlin.de>
parents: 7143
diff changeset
   347
WifiPhy::NotifyMonitorSniffTx (Ptr<const Packet> packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble)
4492
3ebeb7bf3c15 added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents: 4470
diff changeset
   348
{
7334
21b6b53ba0d5 [Bug 827] Rename promisc trace to monitor in WifiPhy
Ruben Merz <ruben@net.t-labs.tu-berlin.de>
parents: 7143
diff changeset
   349
  m_phyMonitorSniffTxTrace (packet, channelFreqMhz, channelNumber, rate, isShortPreamble);
4264
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   350
}
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4263
diff changeset
   351
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   352
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   353
/**
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   354
 * Clause 15 rates (DSSS)
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   355
 */
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   356
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   357
WifiMode
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   358
WifiPhy::GetDsssRate1Mbps ()
4470
51b5c1a272d3 802.11b PHY support
Gary Pei <guangyu.pei@boeing.com>
parents: 4264
diff changeset
   359
{
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   360
  static WifiMode mode =
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   361
    WifiModeFactory::CreateWifiMode ("DsssRate1Mbps",
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   362
                                     WIFI_MOD_CLASS_DSSS,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   363
                                     true,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   364
                                     22000000, 1000000,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   365
                                     WIFI_CODE_RATE_UNDEFINED,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   366
                                     2);
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   367
  return mode;
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   368
}
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   369
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   370
WifiMode
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   371
WifiPhy::GetDsssRate2Mbps ()
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   372
{
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   373
  static WifiMode mode =
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   374
    WifiModeFactory::CreateWifiMode ("DsssRate2Mbps",
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   375
                                     WIFI_MOD_CLASS_DSSS,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   376
                                     true,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   377
                                     22000000, 2000000,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   378
                                     WIFI_CODE_RATE_UNDEFINED,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   379
                                     4);
4470
51b5c1a272d3 802.11b PHY support
Gary Pei <guangyu.pei@boeing.com>
parents: 4264
diff changeset
   380
  return mode;
51b5c1a272d3 802.11b PHY support
Gary Pei <guangyu.pei@boeing.com>
parents: 4264
diff changeset
   381
}
51b5c1a272d3 802.11b PHY support
Gary Pei <guangyu.pei@boeing.com>
parents: 4264
diff changeset
   382
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   383
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   384
/**
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   385
 * Clause 18 rates (HR/DSSS)
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   386
 */
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   387
WifiMode
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   388
WifiPhy::GetDsssRate5_5Mbps ()
4470
51b5c1a272d3 802.11b PHY support
Gary Pei <guangyu.pei@boeing.com>
parents: 4264
diff changeset
   389
{
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   390
  static WifiMode mode =
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   391
    WifiModeFactory::CreateWifiMode ("DsssRate5_5Mbps",
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   392
                                     WIFI_MOD_CLASS_DSSS,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   393
                                     true,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   394
                                     22000000, 5500000,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   395
                                     WIFI_CODE_RATE_UNDEFINED,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   396
                                     4);
4470
51b5c1a272d3 802.11b PHY support
Gary Pei <guangyu.pei@boeing.com>
parents: 4264
diff changeset
   397
  return mode;
51b5c1a272d3 802.11b PHY support
Gary Pei <guangyu.pei@boeing.com>
parents: 4264
diff changeset
   398
}
51b5c1a272d3 802.11b PHY support
Gary Pei <guangyu.pei@boeing.com>
parents: 4264
diff changeset
   399
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   400
WifiMode
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   401
WifiPhy::GetDsssRate11Mbps ()
4470
51b5c1a272d3 802.11b PHY support
Gary Pei <guangyu.pei@boeing.com>
parents: 4264
diff changeset
   402
{
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   403
  static WifiMode mode =
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   404
    WifiModeFactory::CreateWifiMode ("DsssRate11Mbps",
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   405
                                     WIFI_MOD_CLASS_DSSS,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   406
                                     true,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   407
                                     22000000, 11000000,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   408
                                     WIFI_CODE_RATE_UNDEFINED,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   409
                                     4);
4470
51b5c1a272d3 802.11b PHY support
Gary Pei <guangyu.pei@boeing.com>
parents: 4264
diff changeset
   410
  return mode;
51b5c1a272d3 802.11b PHY support
Gary Pei <guangyu.pei@boeing.com>
parents: 4264
diff changeset
   411
}
51b5c1a272d3 802.11b PHY support
Gary Pei <guangyu.pei@boeing.com>
parents: 4264
diff changeset
   412
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   413
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   414
/**
6597
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   415
 * Clause 19.5 rates (ERP-OFDM)
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   416
 */
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   417
WifiMode
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   418
WifiPhy::GetErpOfdmRate6Mbps ()
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   419
{
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   420
  static WifiMode mode =
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   421
    WifiModeFactory::CreateWifiMode ("ErpOfdmRate6Mbps",
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   422
                                     WIFI_MOD_CLASS_ERP_OFDM,
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   423
                                     true,
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   424
                                     20000000, 6000000,
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   425
                                     WIFI_CODE_RATE_1_2,
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   426
                                     2);
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   427
  return mode;
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   428
}
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   429
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   430
WifiMode
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   431
WifiPhy::GetErpOfdmRate9Mbps ()
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   432
{
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   433
  static WifiMode mode =
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   434
    WifiModeFactory::CreateWifiMode ("ErpOfdmRate9Mbps",
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   435
                                     WIFI_MOD_CLASS_ERP_OFDM,
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   436
                                     false,
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   437
                                     20000000, 9000000,
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   438
                                     WIFI_CODE_RATE_3_4,
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   439
                                     2);
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   440
  return mode;
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   441
}
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   442
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   443
WifiMode
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   444
WifiPhy::GetErpOfdmRate12Mbps ()
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   445
{
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   446
  static WifiMode mode =
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   447
    WifiModeFactory::CreateWifiMode ("ErpOfdmRate12Mbps",
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   448
                                     WIFI_MOD_CLASS_ERP_OFDM,
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   449
                                     true,
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   450
                                     20000000, 12000000,
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   451
                                     WIFI_CODE_RATE_1_2,
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   452
                                     4);
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   453
  return mode;
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   454
}
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   455
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   456
WifiMode
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   457
WifiPhy::GetErpOfdmRate18Mbps ()
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   458
{
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   459
  static WifiMode mode =
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   460
    WifiModeFactory::CreateWifiMode ("ErpOfdmRate18Mbps",
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   461
                                     WIFI_MOD_CLASS_ERP_OFDM,
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   462
                                     false,
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   463
                                     20000000, 18000000,
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   464
                                     WIFI_CODE_RATE_3_4,
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   465
                                     4);
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   466
  return mode;
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   467
}
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   468
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   469
WifiMode
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   470
WifiPhy::GetErpOfdmRate24Mbps ()
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   471
{
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   472
  static WifiMode mode =
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   473
    WifiModeFactory::CreateWifiMode ("ErpOfdmRate24Mbps",
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   474
                                     WIFI_MOD_CLASS_ERP_OFDM,
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   475
                                     true,
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   476
                                     20000000, 24000000,
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   477
                                     WIFI_CODE_RATE_1_2,
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   478
                                     16);
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   479
  return mode;
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   480
}
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   481
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   482
WifiMode
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   483
WifiPhy::GetErpOfdmRate36Mbps ()
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   484
{
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   485
  static WifiMode mode =
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   486
    WifiModeFactory::CreateWifiMode ("ErpOfdmRate36Mbps",
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   487
                                     WIFI_MOD_CLASS_ERP_OFDM,
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   488
                                     false,
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   489
                                     20000000, 36000000,
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   490
                                     WIFI_CODE_RATE_3_4,
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   491
                                     16);
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   492
  return mode;
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   493
}
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   494
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   495
WifiMode
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   496
WifiPhy::GetErpOfdmRate48Mbps ()
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   497
{
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   498
  static WifiMode mode =
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   499
    WifiModeFactory::CreateWifiMode ("ErpOfdmRate48Mbps",
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   500
                                     WIFI_MOD_CLASS_ERP_OFDM,
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   501
                                     false,
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   502
                                     20000000, 48000000,
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   503
                                     WIFI_CODE_RATE_2_3,
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   504
                                     64);
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   505
  return mode;
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   506
}
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   507
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   508
WifiMode
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   509
WifiPhy::GetErpOfdmRate54Mbps ()
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   510
{
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   511
  static WifiMode mode =
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   512
    WifiModeFactory::CreateWifiMode ("ErpOfdmRate54Mbps",
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   513
                                     WIFI_MOD_CLASS_ERP_OFDM,
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   514
                                     false,
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   515
                                     20000000, 54000000,
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   516
                                     WIFI_CODE_RATE_3_4,
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   517
                                     64);
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   518
  return mode;
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   519
}
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   520
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   521
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   522
/**
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   523
 * Clause 17 rates (OFDM)
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   524
 */
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   525
WifiMode
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   526
WifiPhy::GetOfdmRate6Mbps ()
4470
51b5c1a272d3 802.11b PHY support
Gary Pei <guangyu.pei@boeing.com>
parents: 4264
diff changeset
   527
{
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   528
  static WifiMode mode =
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   529
    WifiModeFactory::CreateWifiMode ("OfdmRate6Mbps",
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   530
                                     WIFI_MOD_CLASS_OFDM,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   531
                                     true,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   532
                                     20000000, 6000000,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   533
                                     WIFI_CODE_RATE_1_2,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   534
                                     2);
4470
51b5c1a272d3 802.11b PHY support
Gary Pei <guangyu.pei@boeing.com>
parents: 4264
diff changeset
   535
  return mode;
51b5c1a272d3 802.11b PHY support
Gary Pei <guangyu.pei@boeing.com>
parents: 4264
diff changeset
   536
}
51b5c1a272d3 802.11b PHY support
Gary Pei <guangyu.pei@boeing.com>
parents: 4264
diff changeset
   537
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   538
WifiMode
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   539
WifiPhy::GetOfdmRate9Mbps ()
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   540
{
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   541
  static WifiMode mode =
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   542
    WifiModeFactory::CreateWifiMode ("OfdmRate9Mbps",
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   543
                                     WIFI_MOD_CLASS_OFDM,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   544
                                     false,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   545
                                     20000000, 9000000,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   546
                                     WIFI_CODE_RATE_3_4,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   547
                                     2);
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   548
  return mode;
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   549
}
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   550
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   551
WifiMode
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   552
WifiPhy::GetOfdmRate12Mbps ()
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   553
{
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   554
  static WifiMode mode =
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   555
    WifiModeFactory::CreateWifiMode ("OfdmRate12Mbps",
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   556
                                     WIFI_MOD_CLASS_OFDM,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   557
                                     true,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   558
                                     20000000, 12000000,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   559
                                     WIFI_CODE_RATE_1_2,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   560
                                     4);
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   561
  return mode;
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   562
}
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   563
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   564
WifiMode
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   565
WifiPhy::GetOfdmRate18Mbps ()
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   566
{
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   567
  static WifiMode mode =
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   568
    WifiModeFactory::CreateWifiMode ("OfdmRate18Mbps",
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   569
                                     WIFI_MOD_CLASS_OFDM,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   570
                                     false,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   571
                                     20000000, 18000000,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   572
                                     WIFI_CODE_RATE_3_4,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   573
                                     4);
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   574
  return mode;
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   575
}
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   576
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   577
WifiMode
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   578
WifiPhy::GetOfdmRate24Mbps ()
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   579
{
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   580
  static WifiMode mode =
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   581
    WifiModeFactory::CreateWifiMode ("OfdmRate24Mbps",
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   582
                                     WIFI_MOD_CLASS_OFDM,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   583
                                     true,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   584
                                     20000000, 24000000,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   585
                                     WIFI_CODE_RATE_1_2,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   586
                                     16);
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   587
  return mode;
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   588
}
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   589
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   590
WifiMode
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   591
WifiPhy::GetOfdmRate36Mbps ()
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   592
{
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   593
  static WifiMode mode =
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   594
    WifiModeFactory::CreateWifiMode ("OfdmRate36Mbps",
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   595
                                     WIFI_MOD_CLASS_OFDM,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   596
                                     false,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   597
                                     20000000, 36000000,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   598
                                     WIFI_CODE_RATE_3_4,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   599
                                     16);
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   600
  return mode;
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   601
}
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   602
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   603
WifiMode
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   604
WifiPhy::GetOfdmRate48Mbps ()
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   605
{
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   606
  static WifiMode mode =
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   607
    WifiModeFactory::CreateWifiMode ("OfdmRate48Mbps",
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   608
                                     WIFI_MOD_CLASS_OFDM,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   609
                                     false,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   610
                                     20000000, 48000000,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   611
                                     WIFI_CODE_RATE_2_3,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   612
                                     64);
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   613
  return mode;
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   614
}
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   615
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   616
WifiMode
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   617
WifiPhy::GetOfdmRate54Mbps ()
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   618
{
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   619
  static WifiMode mode =
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   620
    WifiModeFactory::CreateWifiMode ("OfdmRate54Mbps",
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   621
                                     WIFI_MOD_CLASS_OFDM,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   622
                                     false,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   623
                                     20000000, 54000000,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   624
                                     WIFI_CODE_RATE_3_4,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   625
                                     64);
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   626
  return mode;
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   627
}
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   628
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   629
/* 10 MHz channel rates */
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   630
WifiMode
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   631
WifiPhy::GetOfdmRate3MbpsBW10MHz ()
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   632
{
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   633
  static WifiMode mode =
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   634
    WifiModeFactory::CreateWifiMode ("OfdmRate3MbpsBW10MHz",
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   635
                                     WIFI_MOD_CLASS_OFDM,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   636
                                     true,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   637
                                     10000000, 3000000,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   638
                                     WIFI_CODE_RATE_1_2,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   639
                                     2);
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   640
  return mode;
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   641
}
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   642
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   643
WifiMode
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   644
WifiPhy::GetOfdmRate4_5MbpsBW10MHz ()
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   645
{
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   646
  static WifiMode mode =
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   647
    WifiModeFactory::CreateWifiMode ("OfdmRate4_5MbpsBW10MHz",
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   648
                                     WIFI_MOD_CLASS_OFDM,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   649
                                     false,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   650
                                     10000000, 4500000,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   651
                                     WIFI_CODE_RATE_3_4,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   652
                                     2);
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   653
  return mode;
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   654
}
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   655
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   656
WifiMode
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   657
WifiPhy::GetOfdmRate6MbpsBW10MHz ()
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   658
{
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   659
  static WifiMode mode =
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   660
    WifiModeFactory::CreateWifiMode ("OfdmRate6MbpsBW10MHz",
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   661
                                     WIFI_MOD_CLASS_OFDM,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   662
                                     true,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   663
                                     10000000, 6000000,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   664
                                     WIFI_CODE_RATE_1_2,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   665
                                     4);
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   666
  return mode;
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   667
}
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   668
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   669
WifiMode
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   670
WifiPhy::GetOfdmRate9MbpsBW10MHz ()
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   671
{
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   672
  static WifiMode mode =
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   673
    WifiModeFactory::CreateWifiMode ("OfdmRate9MbpsBW10MHz",
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   674
                                     WIFI_MOD_CLASS_OFDM,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   675
                                     false,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   676
                                     10000000, 9000000,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   677
                                     WIFI_CODE_RATE_3_4,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   678
                                     4);
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   679
  return mode;
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   680
}
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   681
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   682
WifiMode
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   683
WifiPhy::GetOfdmRate12MbpsBW10MHz ()
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   684
{
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   685
  static WifiMode mode =
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   686
    WifiModeFactory::CreateWifiMode ("OfdmRate12MbpsBW10MHz",
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   687
                                     WIFI_MOD_CLASS_OFDM,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   688
                                     true,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   689
                                     10000000, 12000000,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   690
                                     WIFI_CODE_RATE_1_2,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   691
                                     16);
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   692
  return mode;
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   693
}
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   694
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   695
WifiMode
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   696
WifiPhy::GetOfdmRate18MbpsBW10MHz ()
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   697
{
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   698
  static WifiMode mode =
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   699
    WifiModeFactory::CreateWifiMode ("OfdmRate18MbpsBW10MHz",
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   700
                                     WIFI_MOD_CLASS_OFDM,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   701
                                     false,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   702
                                     10000000, 18000000,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   703
                                     WIFI_CODE_RATE_3_4,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   704
                                     16);
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   705
  return mode;
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   706
}
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   707
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   708
WifiMode
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   709
WifiPhy::GetOfdmRate24MbpsBW10MHz ()
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   710
{
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   711
  static WifiMode mode =
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   712
    WifiModeFactory::CreateWifiMode ("OfdmRate24MbpsBW10MHz",
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   713
                                     WIFI_MOD_CLASS_OFDM,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   714
                                     false,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   715
                                     10000000, 24000000,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   716
                                     WIFI_CODE_RATE_2_3,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   717
                                     64);
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   718
  return mode;
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   719
}
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   720
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   721
WifiMode
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   722
WifiPhy::GetOfdmRate27MbpsBW10MHz ()
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   723
{
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   724
  static WifiMode mode =
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   725
    WifiModeFactory::CreateWifiMode ("OfdmRate27MbpsBW10MHz",
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   726
                                     WIFI_MOD_CLASS_OFDM,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   727
                                     false,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   728
                                     10000000, 27000000,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   729
                                     WIFI_CODE_RATE_3_4,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   730
                                     64);
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   731
  return mode;
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   732
}
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   733
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   734
/* 5 MHz channel rates */
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   735
WifiMode
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   736
WifiPhy::GetOfdmRate1_5MbpsBW5MHz ()
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   737
{
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   738
  static WifiMode mode =
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   739
    WifiModeFactory::CreateWifiMode ("OfdmRate1_5MbpsBW5MHz",
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   740
                                     WIFI_MOD_CLASS_OFDM,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   741
                                     true,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   742
                                     5000000, 1500000,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   743
                                     WIFI_CODE_RATE_1_2,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   744
                                     2);
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   745
  return mode;
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   746
}
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   747
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   748
WifiMode
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   749
WifiPhy::GetOfdmRate2_25MbpsBW5MHz ()
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   750
{
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   751
  static WifiMode mode =
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   752
    WifiModeFactory::CreateWifiMode ("OfdmRate2_25MbpsBW5MHz",
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   753
                                     WIFI_MOD_CLASS_OFDM,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   754
                                     false,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   755
                                     5000000, 2250000,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   756
                                     WIFI_CODE_RATE_3_4,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   757
                                     2);
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   758
  return mode;
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   759
}
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   760
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   761
WifiMode
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   762
WifiPhy::GetOfdmRate3MbpsBW5MHz ()
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   763
{
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   764
  static WifiMode mode =
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   765
    WifiModeFactory::CreateWifiMode ("OfdmRate3MbpsBW5MHz",
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   766
                                     WIFI_MOD_CLASS_OFDM,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   767
                                     true,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   768
                                     5000000, 3000000,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   769
                                     WIFI_CODE_RATE_1_2,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   770
                                     4);
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   771
  return mode;
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   772
}
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   773
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   774
WifiMode
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   775
WifiPhy::GetOfdmRate4_5MbpsBW5MHz ()
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   776
{
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   777
  static WifiMode mode =
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   778
    WifiModeFactory::CreateWifiMode ("OfdmRate4_5MbpsBW5MHz",
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   779
                                     WIFI_MOD_CLASS_OFDM,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   780
                                     false,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   781
                                     5000000, 4500000,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   782
                                     WIFI_CODE_RATE_3_4,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   783
                                     4);
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   784
  return mode;
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   785
}
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   786
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   787
WifiMode
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   788
WifiPhy::GetOfdmRate6MbpsBW5MHz ()
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   789
{
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   790
  static WifiMode mode =
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   791
    WifiModeFactory::CreateWifiMode ("OfdmRate6MbpsBW5MHz",
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   792
                                     WIFI_MOD_CLASS_OFDM,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   793
                                     true,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   794
                                     5000000, 6000000,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   795
                                     WIFI_CODE_RATE_1_2,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   796
                                     16);
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   797
  return mode;
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   798
}
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   799
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   800
WifiMode
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   801
WifiPhy::GetOfdmRate9MbpsBW5MHz ()
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   802
{
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   803
  static WifiMode mode =
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   804
    WifiModeFactory::CreateWifiMode ("OfdmRate9MbpsBW5MHz",
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   805
                                     WIFI_MOD_CLASS_OFDM,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   806
                                     false,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   807
                                     5000000, 9000000,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   808
                                     WIFI_CODE_RATE_3_4,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   809
                                     16);
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   810
  return mode;
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   811
}
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   812
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   813
WifiMode
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   814
WifiPhy::GetOfdmRate12MbpsBW5MHz ()
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   815
{
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   816
  static WifiMode mode =
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   817
    WifiModeFactory::CreateWifiMode ("OfdmRate12MbpsBW5MHz",
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   818
                                     WIFI_MOD_CLASS_OFDM,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   819
                                     false,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   820
                                     5000000, 12000000,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   821
                                     WIFI_CODE_RATE_2_3,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   822
                                     64);
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   823
  return mode;
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   824
}
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   825
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   826
WifiMode
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   827
WifiPhy::GetOfdmRate13_5MbpsBW5MHz ()
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   828
{
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   829
  static WifiMode mode =
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   830
    WifiModeFactory::CreateWifiMode ("OfdmRate13_5MbpsBW5MHz",
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   831
                                     WIFI_MOD_CLASS_OFDM,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   832
                                     false,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   833
                                     5000000, 13500000,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   834
                                     WIFI_CODE_RATE_3_4,
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   835
                                     64);
4680
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   836
  return mode;
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   837
}
a52c39181dd4 Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents: 4492
diff changeset
   838
5820
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5294
diff changeset
   839
std::ostream& operator<< (std::ostream& os, enum WifiPhy::State state)
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5294
diff changeset
   840
{
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
   841
  switch (state)
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
   842
    {
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
   843
    case WifiPhy::IDLE:
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
   844
      return (os << "IDLE");
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
   845
    case WifiPhy::CCA_BUSY:
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
   846
      return (os << "CCA_BUSY");
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
   847
    case WifiPhy::TX:
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
   848
      return (os << "TX");
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
   849
    case WifiPhy::RX:
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
   850
      return (os << "RX");
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
   851
    case WifiPhy::SWITCHING:
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
   852
      return (os << "SWITCHING");
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
   853
    default:
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
   854
      NS_FATAL_ERROR ("Invalid WifiPhy state");
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
   855
      return (os << "INVALID");
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
   856
    }
5820
1c02054740eb Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents: 5294
diff changeset
   857
}
4470
51b5c1a272d3 802.11b PHY support
Gary Pei <guangyu.pei@boeing.com>
parents: 4264
diff changeset
   858
1977
4303409f3d8e remove uneeded trailing ';'
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1974
diff changeset
   859
} // namespace ns3
4040
df2f5e1ea15b ensure that all wifi modes are registered
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4039
diff changeset
   860
df2f5e1ea15b ensure that all wifi modes are registered
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4039
diff changeset
   861
namespace {
df2f5e1ea15b ensure that all wifi modes are registered
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4039
diff changeset
   862
df2f5e1ea15b ensure that all wifi modes are registered
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4039
diff changeset
   863
static class Constructor
df2f5e1ea15b ensure that all wifi modes are registered
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4039
diff changeset
   864
{
df2f5e1ea15b ensure that all wifi modes are registered
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4039
diff changeset
   865
public:
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
   866
  Constructor ()
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 6852
diff changeset
   867
  {
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   868
    ns3::WifiPhy::GetDsssRate1Mbps ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   869
    ns3::WifiPhy::GetDsssRate2Mbps ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   870
    ns3::WifiPhy::GetDsssRate5_5Mbps ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   871
    ns3::WifiPhy::GetDsssRate11Mbps ();
6597
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   872
    ns3::WifiPhy::GetErpOfdmRate6Mbps ();
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   873
    ns3::WifiPhy::GetErpOfdmRate9Mbps ();
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   874
    ns3::WifiPhy::GetErpOfdmRate12Mbps ();
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   875
    ns3::WifiPhy::GetErpOfdmRate18Mbps ();
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   876
    ns3::WifiPhy::GetErpOfdmRate24Mbps ();
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   877
    ns3::WifiPhy::GetErpOfdmRate36Mbps ();
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   878
    ns3::WifiPhy::GetErpOfdmRate48Mbps ();
7fbc895f7361 Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents: 6360
diff changeset
   879
    ns3::WifiPhy::GetErpOfdmRate54Mbps ();
6360
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   880
    ns3::WifiPhy::GetOfdmRate6Mbps ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   881
    ns3::WifiPhy::GetOfdmRate9Mbps ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   882
    ns3::WifiPhy::GetOfdmRate12Mbps ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   883
    ns3::WifiPhy::GetOfdmRate18Mbps ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   884
    ns3::WifiPhy::GetOfdmRate24Mbps ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   885
    ns3::WifiPhy::GetOfdmRate36Mbps ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   886
    ns3::WifiPhy::GetOfdmRate48Mbps ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   887
    ns3::WifiPhy::GetOfdmRate54Mbps ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   888
    ns3::WifiPhy::GetOfdmRate3MbpsBW10MHz ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   889
    ns3::WifiPhy::GetOfdmRate4_5MbpsBW10MHz ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   890
    ns3::WifiPhy::GetOfdmRate6MbpsBW10MHz ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   891
    ns3::WifiPhy::GetOfdmRate9MbpsBW10MHz ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   892
    ns3::WifiPhy::GetOfdmRate12MbpsBW10MHz ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   893
    ns3::WifiPhy::GetOfdmRate18MbpsBW10MHz ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   894
    ns3::WifiPhy::GetOfdmRate24MbpsBW10MHz ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   895
    ns3::WifiPhy::GetOfdmRate27MbpsBW10MHz ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   896
    ns3::WifiPhy::GetOfdmRate1_5MbpsBW5MHz ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   897
    ns3::WifiPhy::GetOfdmRate2_25MbpsBW5MHz ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   898
    ns3::WifiPhy::GetOfdmRate3MbpsBW5MHz ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   899
    ns3::WifiPhy::GetOfdmRate4_5MbpsBW5MHz ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   900
    ns3::WifiPhy::GetOfdmRate6MbpsBW5MHz ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   901
    ns3::WifiPhy::GetOfdmRate9MbpsBW5MHz ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   902
    ns3::WifiPhy::GetOfdmRate12MbpsBW5MHz ();
d8975477ff6a Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents: 6217
diff changeset
   903
    ns3::WifiPhy::GetOfdmRate13_5MbpsBW5MHz ();
4040
df2f5e1ea15b ensure that all wifi modes are registered
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4039
diff changeset
   904
  }
df2f5e1ea15b ensure that all wifi modes are registered
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4039
diff changeset
   905
} g_constructor;
df2f5e1ea15b ensure that all wifi modes are registered
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4039
diff changeset
   906
}