A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
wifi-phy.cc
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2005,2006 INRIA
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19
*/
20
21
#include "
wifi-phy.h
"
22
#include "
wifi-mode.h
"
23
#include "
wifi-channel.h
"
24
#include "
wifi-preamble.h
"
25
#include "ns3/simulator.h"
26
#include "ns3/packet.h"
27
#include "ns3/assert.h"
28
#include "ns3/log.h"
29
#include "ns3/double.h"
30
#include "ns3/uinteger.h"
31
#include "ns3/enum.h"
32
#include "ns3/trace-source-accessor.h"
33
#include <cmath>
34
35
NS_LOG_COMPONENT_DEFINE
(
"WifiPhy"
);
36
37
namespace
ns3 {
38
39
/****************************************************************
40
* This destructor is needed.
41
****************************************************************/
42
43
WifiPhyListener::~WifiPhyListener
()
44
{
45
}
46
47
/****************************************************************
48
* The actual WifiPhy class
49
****************************************************************/
50
51
NS_OBJECT_ENSURE_REGISTERED
(
WifiPhy
);
52
53
TypeId
54
WifiPhy::GetTypeId
(
void
)
55
{
56
static
TypeId
tid =
TypeId
(
"ns3::WifiPhy"
)
57
.
SetParent
<
Object
> ()
58
.AddTraceSource (
"PhyTxBegin"
,
59
"Trace source indicating a packet has begun transmitting over the channel medium"
,
60
MakeTraceSourceAccessor
(&
WifiPhy::m_phyTxBeginTrace
))
61
.AddTraceSource (
"PhyTxEnd"
,
62
"Trace source indicating a packet has been completely transmitted over the channel. NOTE: the only official WifiPhy implementation available to this date (YansWifiPhy) never fires this trace source."
,
63
MakeTraceSourceAccessor
(&
WifiPhy::m_phyTxEndTrace
))
64
.AddTraceSource (
"PhyTxDrop"
,
65
"Trace source indicating a packet has been dropped by the device during transmission"
,
66
MakeTraceSourceAccessor
(&
WifiPhy::m_phyTxDropTrace
))
67
.AddTraceSource (
"PhyRxBegin"
,
68
"Trace source indicating a packet has begun being received from the channel medium by the device"
,
69
MakeTraceSourceAccessor
(&
WifiPhy::m_phyRxBeginTrace
))
70
.AddTraceSource (
"PhyRxEnd"
,
71
"Trace source indicating a packet has been completely received from the channel medium by the device"
,
72
MakeTraceSourceAccessor
(&
WifiPhy::m_phyRxEndTrace
))
73
.AddTraceSource (
"PhyRxDrop"
,
74
"Trace source indicating a packet has been dropped by the device during reception"
,
75
MakeTraceSourceAccessor
(&
WifiPhy::m_phyRxDropTrace
))
76
.AddTraceSource (
"MonitorSnifferRx"
,
77
"Trace source simulating a wifi device in monitor mode sniffing all received frames"
,
78
MakeTraceSourceAccessor
(&
WifiPhy::m_phyMonitorSniffRxTrace
))
79
.AddTraceSource (
"MonitorSnifferTx"
,
80
"Trace source simulating the capability of a wifi device in monitor mode to sniff all frames being transmitted"
,
81
MakeTraceSourceAccessor
(&
WifiPhy::m_phyMonitorSniffTxTrace
))
82
;
83
return
tid;
84
}
85
86
WifiPhy::WifiPhy
()
87
{
88
NS_LOG_FUNCTION
(
this
);
89
}
90
91
WifiPhy::~WifiPhy
()
92
{
93
NS_LOG_FUNCTION
(
this
);
94
}
95
96
//Added by Ghada to support 11n
97
98
//return the L-SIG
99
WifiMode
100
WifiPhy::GetMFPlcpHeaderMode
(
WifiMode
payloadMode,
WifiPreamble
preamble)
101
{
102
switch
(payloadMode.
GetBandwidth
())
103
{
104
case
20000000:
105
return
WifiPhy::GetOfdmRate6_5MbpsBW20MHz
();
106
case
40000000:
107
return
WifiPhy::GetOfdmRate13_5MbpsBW40MHz
();
108
default
:
109
return
WifiPhy::GetOfdmRate6_5MbpsBW20MHz
();
110
}
111
}
112
uint32_t
113
WifiPhy::GetPlcpHtTrainingSymbolDurationMicroSeconds
(
WifiMode
payloadMode,
WifiPreamble
preamble,
WifiTxVector
txvector)
114
{
115
switch
(preamble)
116
{
117
case
WIFI_PREAMBLE_HT_MF
:
118
return
4+ (4* txvector.
GetNss
());
119
case
WIFI_PREAMBLE_HT_GF
:
120
return
(4*txvector.
GetNss
())+(4*txvector.
GetNess
());
121
default
:
122
// no training for non HT
123
return
0;
124
}
125
}
126
127
//return L-SIG
128
uint32_t
129
WifiPhy::GetPlcpHtSigHeaderDurationMicroSeconds
(
WifiMode
payloadMode,
WifiPreamble
preamble)
130
{
131
switch
(preamble)
132
{
133
case
WIFI_PREAMBLE_HT_MF
:
134
// HT-SIG
135
return
8;
136
case
WIFI_PREAMBLE_HT_GF
:
137
//HT-SIG
138
return
8;
139
default
:
140
// no HT-SIG for non HT
141
return
0;
142
}
143
144
}
145
//end added by Ghada
146
147
WifiMode
148
WifiPhy::GetPlcpHeaderMode
(
WifiMode
payloadMode,
WifiPreamble
preamble)
149
{
150
switch
(payloadMode.
GetModulationClass
())
151
{
152
case
WIFI_MOD_CLASS_OFDM
:
153
{
154
switch
(payloadMode.
GetBandwidth
())
155
{
156
case
5000000:
157
return
WifiPhy::GetOfdmRate1_5MbpsBW5MHz
();
158
case
10000000:
159
return
WifiPhy::GetOfdmRate3MbpsBW10MHz
();
160
default
:
161
// IEEE Std 802.11-2007, 17.3.2
162
// actually this is only the first part of the PlcpHeader,
163
// because the last 16 bits of the PlcpHeader are using the
164
// same mode of the payload
165
return
WifiPhy::GetOfdmRate6Mbps
();
166
}
167
}
168
//Added by Ghada to support 11n
169
case
WIFI_MOD_CLASS_HT
:
170
{
//return the HT-SIG
171
// IEEE Std 802.11n, 20.3.23
172
switch
(preamble)
173
{
174
case
WIFI_PREAMBLE_HT_MF
:
175
switch
(payloadMode.
GetBandwidth
())
176
{
177
case
20000000:
178
return
WifiPhy::GetOfdmRate13MbpsBW20MHz
();
179
case
40000000:
180
return
WifiPhy::GetOfdmRate27MbpsBW40MHz
();
181
default
:
182
return
WifiPhy::GetOfdmRate13MbpsBW20MHz
();
183
}
184
case
WIFI_PREAMBLE_HT_GF
:
185
switch
(payloadMode.
GetBandwidth
())
186
{
187
case
20000000:
188
return
WifiPhy::GetOfdmRate13MbpsBW20MHz
();
189
case
40000000:
190
return
WifiPhy::GetOfdmRate27MbpsBW40MHz
();
191
default
:
192
return
WifiPhy::GetOfdmRate13MbpsBW20MHz
();
193
}
194
default
:
195
return
WifiPhy::GetOfdmRate6Mbps
();
196
}
197
}
198
case
WIFI_MOD_CLASS_ERP_OFDM
:
199
return
WifiPhy::GetErpOfdmRate6Mbps
();
200
201
case
WIFI_MOD_CLASS_DSSS
:
202
if
(preamble ==
WIFI_PREAMBLE_LONG
)
203
{
204
// IEEE Std 802.11-2007, sections 15.2.3 and 18.2.2.1
205
return
WifiPhy::GetDsssRate1Mbps
();
206
}
207
else
// WIFI_PREAMBLE_SHORT
208
{
209
// IEEE Std 802.11-2007, section 18.2.2.2
210
return
WifiPhy::GetDsssRate2Mbps
();
211
}
212
213
default
:
214
NS_FATAL_ERROR
(
"unsupported modulation class"
);
215
return
WifiMode
();
216
}
217
}
218
219
220
uint32_t
221
WifiPhy::GetPlcpHeaderDurationMicroSeconds
(
WifiMode
payloadMode,
WifiPreamble
preamble)
222
{
223
switch
(payloadMode.
GetModulationClass
())
224
{
225
case
WIFI_MOD_CLASS_OFDM
:
226
{
227
switch
(payloadMode.
GetBandwidth
())
228
{
229
case
20000000:
230
default
:
231
// IEEE Std 802.11-2007, section 17.3.3 and figure 17-4
232
// also section 17.3.2.3, table 17-4
233
// We return the duration of the SIGNAL field only, since the
234
// SERVICE field (which strictly speaking belongs to the PLCP
235
// header, see section 17.3.2 and figure 17-1) is sent using the
236
// payload mode.
237
return
4;
238
case
10000000:
239
// IEEE Std 802.11-2007, section 17.3.2.3, table 17-4
240
return
8;
241
case
5000000:
242
// IEEE Std 802.11-2007, section 17.3.2.3, table 17-4
243
return
16;
244
}
245
}
246
//Added by Ghada to support 11n
247
case
WIFI_MOD_CLASS_HT
:
248
{
//IEEE 802.11n Figure 20.1
249
switch
(preamble)
250
{
251
case
WIFI_PREAMBLE_HT_MF
:
252
// L-SIG
253
return
4;
254
case
WIFI_PREAMBLE_HT_GF
:
255
//L-SIG
256
return
0;
257
default
:
258
// L-SIG
259
return
4;
260
}
261
}
262
case
WIFI_MOD_CLASS_ERP_OFDM
:
263
return
16;
264
265
case
WIFI_MOD_CLASS_DSSS
:
266
if
(preamble ==
WIFI_PREAMBLE_SHORT
)
267
{
268
// IEEE Std 802.11-2007, section 18.2.2.2 and figure 18-2
269
return
24;
270
}
271
else
// WIFI_PREAMBLE_LONG
272
{
273
// IEEE Std 802.11-2007, sections 18.2.2.1 and figure 18-1
274
return
48;
275
}
276
277
default
:
278
NS_FATAL_ERROR
(
"unsupported modulation class"
);
279
return
0;
280
}
281
}
282
283
uint32_t
284
WifiPhy::GetPlcpPreambleDurationMicroSeconds
(
WifiMode
payloadMode,
WifiPreamble
preamble)
285
{
286
switch
(payloadMode.
GetModulationClass
())
287
{
288
case
WIFI_MOD_CLASS_OFDM
:
289
{
290
switch
(payloadMode.
GetBandwidth
())
291
{
292
case
20000000:
293
default
:
294
// IEEE Std 802.11-2007, section 17.3.3, figure 17-4
295
// also section 17.3.2.3, table 17-4
296
return
16;
297
case
10000000:
298
// IEEE Std 802.11-2007, section 17.3.3, table 17-4
299
// also section 17.3.2.3, table 17-4
300
return
32;
301
case
5000000:
302
// IEEE Std 802.11-2007, section 17.3.3
303
// also section 17.3.2.3, table 17-4
304
return
64;
305
}
306
}
307
case
WIFI_MOD_CLASS_HT
:
308
{
//IEEE 802.11n Figure 20.1 the training symbols before L_SIG or HT_SIG
309
return
16;
310
}
311
case
WIFI_MOD_CLASS_ERP_OFDM
:
312
return
4;
313
314
case
WIFI_MOD_CLASS_DSSS
:
315
if
(preamble ==
WIFI_PREAMBLE_SHORT
)
316
{
317
// IEEE Std 802.11-2007, section 18.2.2.2 and figure 18-2
318
return
72;
319
}
320
else
// WIFI_PREAMBLE_LONG
321
{
322
// IEEE Std 802.11-2007, sections 18.2.2.1 and figure 18-1
323
return
144;
324
}
325
default
:
326
NS_FATAL_ERROR
(
"unsupported modulation class"
);
327
return
0;
328
}
329
}
330
331
double
332
WifiPhy::GetPayloadDurationMicroSeconds
(uint32_t size,
WifiTxVector
txvector)
333
{
334
WifiMode
payloadMode=txvector.
GetMode
();
335
336
NS_LOG_FUNCTION
(size << payloadMode);
337
338
switch
(payloadMode.
GetModulationClass
())
339
{
340
case
WIFI_MOD_CLASS_OFDM
:
341
case
WIFI_MOD_CLASS_ERP_OFDM
:
342
{
343
// IEEE Std 802.11-2007, section 17.3.2.3, table 17-4
344
// corresponds to T_{SYM} in the table
345
uint32_t symbolDurationUs;
346
347
switch
(payloadMode.
GetBandwidth
())
348
{
349
case
20000000:
350
default
:
351
symbolDurationUs = 4;
352
break
;
353
case
10000000:
354
symbolDurationUs = 8;
355
break
;
356
case
5000000:
357
symbolDurationUs = 16;
358
break
;
359
}
360
361
// IEEE Std 802.11-2007, section 17.3.2.2, table 17-3
362
// corresponds to N_{DBPS} in the table
363
double
numDataBitsPerSymbol = payloadMode.
GetDataRate
() * symbolDurationUs / 1e6;
364
365
// IEEE Std 802.11-2007, section 17.3.5.3, equation (17-11)
366
uint32_t numSymbols = lrint (ceil ((16 + size * 8.0 + 6.0) / numDataBitsPerSymbol));
367
368
// Add signal extension for ERP PHY
369
if
(payloadMode.
GetModulationClass
() ==
WIFI_MOD_CLASS_ERP_OFDM
)
370
{
371
return
numSymbols * symbolDurationUs + 6;
372
}
373
else
374
{
375
return
numSymbols * symbolDurationUs;
376
}
377
}
378
case
WIFI_MOD_CLASS_HT
:
379
{
380
double
symbolDurationUs;
381
double
m_Stbc;
382
//if short GI data rate is used then symbol duration is 3.6us else symbol duration is 4us
383
//In the future has to create a stationmanager that only uses these data rates if sender and reciever support GI
384
if
(payloadMode.
GetUniqueName
() ==
"OfdmRate135MbpsBW40MHzShGi"
|| payloadMode.
GetUniqueName
() ==
"OfdmRate65MbpsBW20MHzShGi"
)
385
{
386
symbolDurationUs=3.6;
387
}
388
else
389
{
390
switch
(payloadMode.
GetDataRate
()/ (txvector.
GetNss
()))
391
{
//shortGi
392
case
7200000:
393
case
14400000:
394
case
21700000:
395
case
28900000:
396
case
43300000:
397
case
57800000:
398
case
72200000:
399
case
15000000:
400
case
30000000:
401
case
45000000:
402
case
60000000:
403
case
90000000:
404
case
120000000:
405
case
150000000:
406
symbolDurationUs=3.6;
407
break
;
408
default
:
409
symbolDurationUs=4;
410
}
411
}
412
if
(txvector.
IsStbc
())
413
m_Stbc=2;
414
else
415
m_Stbc=1;
416
double
numDataBitsPerSymbol = payloadMode.
GetDataRate
() *txvector.
GetNss
() * symbolDurationUs / 1e6;
417
//check tables 20-35 and 20-36 in the standard to get cases when nes =2
418
double
Nes=1;
419
// IEEE Std 802.11n, section 20.3.11, equation (20-32)
420
uint32_t numSymbols = lrint (m_Stbc*ceil ((16 + size * 8.0 + 6.0*Nes) / (m_Stbc* numDataBitsPerSymbol)));
421
422
return
numSymbols * symbolDurationUs;
423
424
}
425
case
WIFI_MOD_CLASS_DSSS
:
426
// IEEE Std 802.11-2007, section 18.2.3.5
427
NS_LOG_LOGIC
(
" size="
<< size
428
<<
" mode="
<< payloadMode
429
<<
" rate="
<< payloadMode.
GetDataRate
() );
430
return
lrint (ceil ((size * 8.0) / (payloadMode.
GetDataRate
() / 1.0e6)));
431
432
default
:
433
NS_FATAL_ERROR
(
"unsupported modulation class"
);
434
return
0;
435
}
436
}
437
438
Time
439
WifiPhy::CalculateTxDuration
(uint32_t size,
WifiTxVector
txvector,
WifiPreamble
preamble)
440
{
441
WifiMode
payloadMode=txvector.
GetMode
();
442
double
duration =
GetPlcpPreambleDurationMicroSeconds
(payloadMode, preamble)
443
+
GetPlcpHeaderDurationMicroSeconds
(payloadMode, preamble)
444
+
GetPlcpHtSigHeaderDurationMicroSeconds
(payloadMode, preamble)
445
+
GetPlcpHtTrainingSymbolDurationMicroSeconds
(payloadMode, preamble,txvector)
446
+
GetPayloadDurationMicroSeconds
(size, txvector);
447
return
MicroSeconds (duration);
448
}
449
450
451
452
void
453
WifiPhy::NotifyTxBegin
(
Ptr<const Packet>
packet)
454
{
455
m_phyTxBeginTrace
(packet);
456
}
457
458
void
459
WifiPhy::NotifyTxEnd
(
Ptr<const Packet>
packet)
460
{
461
m_phyTxEndTrace
(packet);
462
}
463
464
void
465
WifiPhy::NotifyTxDrop
(
Ptr<const Packet>
packet)
466
{
467
m_phyTxDropTrace
(packet);
468
}
469
470
void
471
WifiPhy::NotifyRxBegin
(
Ptr<const Packet>
packet)
472
{
473
m_phyRxBeginTrace
(packet);
474
}
475
476
void
477
WifiPhy::NotifyRxEnd
(
Ptr<const Packet>
packet)
478
{
479
m_phyRxEndTrace
(packet);
480
}
481
482
void
483
WifiPhy::NotifyRxDrop
(
Ptr<const Packet>
packet)
484
{
485
m_phyRxDropTrace
(packet);
486
}
487
488
void
489
WifiPhy::NotifyMonitorSniffRx
(
Ptr<const Packet>
packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate,
bool
isShortPreamble,
double
signalDbm,
double
noiseDbm)
490
{
491
m_phyMonitorSniffRxTrace
(packet, channelFreqMhz, channelNumber, rate, isShortPreamble, signalDbm, noiseDbm);
492
}
493
494
void
495
WifiPhy::NotifyMonitorSniffTx
(
Ptr<const Packet>
packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate,
bool
isShortPreamble, uint8_t txPower)
496
{
497
m_phyMonitorSniffTxTrace
(packet, channelFreqMhz, channelNumber, rate, isShortPreamble, txPower);
498
}
499
500
505
WifiMode
506
WifiPhy::GetDsssRate1Mbps
()
507
{
508
static
WifiMode
mode =
509
WifiModeFactory::CreateWifiMode
(
"DsssRate1Mbps"
,
510
WIFI_MOD_CLASS_DSSS
,
511
true
,
512
22000000, 1000000,
513
WIFI_CODE_RATE_UNDEFINED
,
514
2);
515
return
mode;
516
}
517
518
WifiMode
519
WifiPhy::GetDsssRate2Mbps
()
520
{
521
static
WifiMode
mode =
522
WifiModeFactory::CreateWifiMode
(
"DsssRate2Mbps"
,
523
WIFI_MOD_CLASS_DSSS
,
524
true
,
525
22000000, 2000000,
526
WIFI_CODE_RATE_UNDEFINED
,
527
4);
528
return
mode;
529
}
530
531
535
WifiMode
536
WifiPhy::GetDsssRate5_5Mbps
()
537
{
538
static
WifiMode
mode =
539
WifiModeFactory::CreateWifiMode
(
"DsssRate5_5Mbps"
,
540
WIFI_MOD_CLASS_DSSS
,
541
true
,
542
22000000, 5500000,
543
WIFI_CODE_RATE_UNDEFINED
,
544
4);
545
return
mode;
546
}
547
548
WifiMode
549
WifiPhy::GetDsssRate11Mbps
()
550
{
551
static
WifiMode
mode =
552
WifiModeFactory::CreateWifiMode
(
"DsssRate11Mbps"
,
553
WIFI_MOD_CLASS_DSSS
,
554
true
,
555
22000000, 11000000,
556
WIFI_CODE_RATE_UNDEFINED
,
557
4);
558
return
mode;
559
}
560
561
565
WifiMode
566
WifiPhy::GetErpOfdmRate6Mbps
()
567
{
568
static
WifiMode
mode =
569
WifiModeFactory::CreateWifiMode
(
"ErpOfdmRate6Mbps"
,
570
WIFI_MOD_CLASS_ERP_OFDM
,
571
true
,
572
20000000, 6000000,
573
WIFI_CODE_RATE_1_2
,
574
2);
575
return
mode;
576
}
577
578
WifiMode
579
WifiPhy::GetErpOfdmRate9Mbps
()
580
{
581
static
WifiMode
mode =
582
WifiModeFactory::CreateWifiMode
(
"ErpOfdmRate9Mbps"
,
583
WIFI_MOD_CLASS_ERP_OFDM
,
584
false
,
585
20000000, 9000000,
586
WIFI_CODE_RATE_3_4
,
587
2);
588
return
mode;
589
}
590
591
WifiMode
592
WifiPhy::GetErpOfdmRate12Mbps
()
593
{
594
static
WifiMode
mode =
595
WifiModeFactory::CreateWifiMode
(
"ErpOfdmRate12Mbps"
,
596
WIFI_MOD_CLASS_ERP_OFDM
,
597
true
,
598
20000000, 12000000,
599
WIFI_CODE_RATE_1_2
,
600
4);
601
return
mode;
602
}
603
604
WifiMode
605
WifiPhy::GetErpOfdmRate18Mbps
()
606
{
607
static
WifiMode
mode =
608
WifiModeFactory::CreateWifiMode
(
"ErpOfdmRate18Mbps"
,
609
WIFI_MOD_CLASS_ERP_OFDM
,
610
false
,
611
20000000, 18000000,
612
WIFI_CODE_RATE_3_4
,
613
4);
614
return
mode;
615
}
616
617
WifiMode
618
WifiPhy::GetErpOfdmRate24Mbps
()
619
{
620
static
WifiMode
mode =
621
WifiModeFactory::CreateWifiMode
(
"ErpOfdmRate24Mbps"
,
622
WIFI_MOD_CLASS_ERP_OFDM
,
623
true
,
624
20000000, 24000000,
625
WIFI_CODE_RATE_1_2
,
626
16);
627
return
mode;
628
}
629
630
WifiMode
631
WifiPhy::GetErpOfdmRate36Mbps
()
632
{
633
static
WifiMode
mode =
634
WifiModeFactory::CreateWifiMode
(
"ErpOfdmRate36Mbps"
,
635
WIFI_MOD_CLASS_ERP_OFDM
,
636
false
,
637
20000000, 36000000,
638
WIFI_CODE_RATE_3_4
,
639
16);
640
return
mode;
641
}
642
643
WifiMode
644
WifiPhy::GetErpOfdmRate48Mbps
()
645
{
646
static
WifiMode
mode =
647
WifiModeFactory::CreateWifiMode
(
"ErpOfdmRate48Mbps"
,
648
WIFI_MOD_CLASS_ERP_OFDM
,
649
false
,
650
20000000, 48000000,
651
WIFI_CODE_RATE_2_3
,
652
64);
653
return
mode;
654
}
655
656
WifiMode
657
WifiPhy::GetErpOfdmRate54Mbps
()
658
{
659
static
WifiMode
mode =
660
WifiModeFactory::CreateWifiMode
(
"ErpOfdmRate54Mbps"
,
661
WIFI_MOD_CLASS_ERP_OFDM
,
662
false
,
663
20000000, 54000000,
664
WIFI_CODE_RATE_3_4
,
665
64);
666
return
mode;
667
}
668
669
673
WifiMode
674
WifiPhy::GetOfdmRate6Mbps
()
675
{
676
static
WifiMode
mode =
677
WifiModeFactory::CreateWifiMode
(
"OfdmRate6Mbps"
,
678
WIFI_MOD_CLASS_OFDM
,
679
true
,
680
20000000, 6000000,
681
WIFI_CODE_RATE_1_2
,
682
2);
683
return
mode;
684
}
685
686
WifiMode
687
WifiPhy::GetOfdmRate9Mbps
()
688
{
689
static
WifiMode
mode =
690
WifiModeFactory::CreateWifiMode
(
"OfdmRate9Mbps"
,
691
WIFI_MOD_CLASS_OFDM
,
692
false
,
693
20000000, 9000000,
694
WIFI_CODE_RATE_3_4
,
695
2);
696
return
mode;
697
}
698
699
WifiMode
700
WifiPhy::GetOfdmRate12Mbps
()
701
{
702
static
WifiMode
mode =
703
WifiModeFactory::CreateWifiMode
(
"OfdmRate12Mbps"
,
704
WIFI_MOD_CLASS_OFDM
,
705
true
,
706
20000000, 12000000,
707
WIFI_CODE_RATE_1_2
,
708
4);
709
return
mode;
710
}
711
712
WifiMode
713
WifiPhy::GetOfdmRate18Mbps
()
714
{
715
static
WifiMode
mode =
716
WifiModeFactory::CreateWifiMode
(
"OfdmRate18Mbps"
,
717
WIFI_MOD_CLASS_OFDM
,
718
false
,
719
20000000, 18000000,
720
WIFI_CODE_RATE_3_4
,
721
4);
722
return
mode;
723
}
724
725
WifiMode
726
WifiPhy::GetOfdmRate24Mbps
()
727
{
728
static
WifiMode
mode =
729
WifiModeFactory::CreateWifiMode
(
"OfdmRate24Mbps"
,
730
WIFI_MOD_CLASS_OFDM
,
731
true
,
732
20000000, 24000000,
733
WIFI_CODE_RATE_1_2
,
734
16);
735
return
mode;
736
}
737
738
WifiMode
739
WifiPhy::GetOfdmRate36Mbps
()
740
{
741
static
WifiMode
mode =
742
WifiModeFactory::CreateWifiMode
(
"OfdmRate36Mbps"
,
743
WIFI_MOD_CLASS_OFDM
,
744
false
,
745
20000000, 36000000,
746
WIFI_CODE_RATE_3_4
,
747
16);
748
return
mode;
749
}
750
751
WifiMode
752
WifiPhy::GetOfdmRate48Mbps
()
753
{
754
static
WifiMode
mode =
755
WifiModeFactory::CreateWifiMode
(
"OfdmRate48Mbps"
,
756
WIFI_MOD_CLASS_OFDM
,
757
false
,
758
20000000, 48000000,
759
WIFI_CODE_RATE_2_3
,
760
64);
761
return
mode;
762
}
763
764
WifiMode
765
WifiPhy::GetOfdmRate54Mbps
()
766
{
767
static
WifiMode
mode =
768
WifiModeFactory::CreateWifiMode
(
"OfdmRate54Mbps"
,
769
WIFI_MOD_CLASS_OFDM
,
770
false
,
771
20000000, 54000000,
772
WIFI_CODE_RATE_3_4
,
773
64);
774
return
mode;
775
}
776
777
/* 10 MHz channel rates */
778
WifiMode
779
WifiPhy::GetOfdmRate3MbpsBW10MHz
()
780
{
781
static
WifiMode
mode =
782
WifiModeFactory::CreateWifiMode
(
"OfdmRate3MbpsBW10MHz"
,
783
WIFI_MOD_CLASS_OFDM
,
784
true
,
785
10000000, 3000000,
786
WIFI_CODE_RATE_1_2
,
787
2);
788
return
mode;
789
}
790
791
WifiMode
792
WifiPhy::GetOfdmRate4_5MbpsBW10MHz
()
793
{
794
static
WifiMode
mode =
795
WifiModeFactory::CreateWifiMode
(
"OfdmRate4_5MbpsBW10MHz"
,
796
WIFI_MOD_CLASS_OFDM
,
797
false
,
798
10000000, 4500000,
799
WIFI_CODE_RATE_3_4
,
800
2);
801
return
mode;
802
}
803
804
WifiMode
805
WifiPhy::GetOfdmRate6MbpsBW10MHz
()
806
{
807
static
WifiMode
mode =
808
WifiModeFactory::CreateWifiMode
(
"OfdmRate6MbpsBW10MHz"
,
809
WIFI_MOD_CLASS_OFDM
,
810
true
,
811
10000000, 6000000,
812
WIFI_CODE_RATE_1_2
,
813
4);
814
return
mode;
815
}
816
817
WifiMode
818
WifiPhy::GetOfdmRate9MbpsBW10MHz
()
819
{
820
static
WifiMode
mode =
821
WifiModeFactory::CreateWifiMode
(
"OfdmRate9MbpsBW10MHz"
,
822
WIFI_MOD_CLASS_OFDM
,
823
false
,
824
10000000, 9000000,
825
WIFI_CODE_RATE_3_4
,
826
4);
827
return
mode;
828
}
829
830
WifiMode
831
WifiPhy::GetOfdmRate12MbpsBW10MHz
()
832
{
833
static
WifiMode
mode =
834
WifiModeFactory::CreateWifiMode
(
"OfdmRate12MbpsBW10MHz"
,
835
WIFI_MOD_CLASS_OFDM
,
836
true
,
837
10000000, 12000000,
838
WIFI_CODE_RATE_1_2
,
839
16);
840
return
mode;
841
}
842
843
WifiMode
844
WifiPhy::GetOfdmRate18MbpsBW10MHz
()
845
{
846
static
WifiMode
mode =
847
WifiModeFactory::CreateWifiMode
(
"OfdmRate18MbpsBW10MHz"
,
848
WIFI_MOD_CLASS_OFDM
,
849
false
,
850
10000000, 18000000,
851
WIFI_CODE_RATE_3_4
,
852
16);
853
return
mode;
854
}
855
856
WifiMode
857
WifiPhy::GetOfdmRate24MbpsBW10MHz
()
858
{
859
static
WifiMode
mode =
860
WifiModeFactory::CreateWifiMode
(
"OfdmRate24MbpsBW10MHz"
,
861
WIFI_MOD_CLASS_OFDM
,
862
false
,
863
10000000, 24000000,
864
WIFI_CODE_RATE_2_3
,
865
64);
866
return
mode;
867
}
868
869
WifiMode
870
WifiPhy::GetOfdmRate27MbpsBW10MHz
()
871
{
872
static
WifiMode
mode =
873
WifiModeFactory::CreateWifiMode
(
"OfdmRate27MbpsBW10MHz"
,
874
WIFI_MOD_CLASS_OFDM
,
875
false
,
876
10000000, 27000000,
877
WIFI_CODE_RATE_3_4
,
878
64);
879
return
mode;
880
}
881
882
/* 5 MHz channel rates */
883
WifiMode
884
WifiPhy::GetOfdmRate1_5MbpsBW5MHz
()
885
{
886
static
WifiMode
mode =
887
WifiModeFactory::CreateWifiMode
(
"OfdmRate1_5MbpsBW5MHz"
,
888
WIFI_MOD_CLASS_OFDM
,
889
true
,
890
5000000, 1500000,
891
WIFI_CODE_RATE_1_2
,
892
2);
893
return
mode;
894
}
895
896
WifiMode
897
WifiPhy::GetOfdmRate2_25MbpsBW5MHz
()
898
{
899
static
WifiMode
mode =
900
WifiModeFactory::CreateWifiMode
(
"OfdmRate2_25MbpsBW5MHz"
,
901
WIFI_MOD_CLASS_OFDM
,
902
false
,
903
5000000, 2250000,
904
WIFI_CODE_RATE_3_4
,
905
2);
906
return
mode;
907
}
908
909
WifiMode
910
WifiPhy::GetOfdmRate3MbpsBW5MHz
()
911
{
912
static
WifiMode
mode =
913
WifiModeFactory::CreateWifiMode
(
"OfdmRate3MbpsBW5MHz"
,
914
WIFI_MOD_CLASS_OFDM
,
915
true
,
916
5000000, 3000000,
917
WIFI_CODE_RATE_1_2
,
918
4);
919
return
mode;
920
}
921
922
WifiMode
923
WifiPhy::GetOfdmRate4_5MbpsBW5MHz
()
924
{
925
static
WifiMode
mode =
926
WifiModeFactory::CreateWifiMode
(
"OfdmRate4_5MbpsBW5MHz"
,
927
WIFI_MOD_CLASS_OFDM
,
928
false
,
929
5000000, 4500000,
930
WIFI_CODE_RATE_3_4
,
931
4);
932
return
mode;
933
}
934
935
WifiMode
936
WifiPhy::GetOfdmRate6MbpsBW5MHz
()
937
{
938
static
WifiMode
mode =
939
WifiModeFactory::CreateWifiMode
(
"OfdmRate6MbpsBW5MHz"
,
940
WIFI_MOD_CLASS_OFDM
,
941
true
,
942
5000000, 6000000,
943
WIFI_CODE_RATE_1_2
,
944
16);
945
return
mode;
946
}
947
948
WifiMode
949
WifiPhy::GetOfdmRate9MbpsBW5MHz
()
950
{
951
static
WifiMode
mode =
952
WifiModeFactory::CreateWifiMode
(
"OfdmRate9MbpsBW5MHz"
,
953
WIFI_MOD_CLASS_OFDM
,
954
false
,
955
5000000, 9000000,
956
WIFI_CODE_RATE_3_4
,
957
16);
958
return
mode;
959
}
960
961
WifiMode
962
WifiPhy::GetOfdmRate12MbpsBW5MHz
()
963
{
964
static
WifiMode
mode =
965
WifiModeFactory::CreateWifiMode
(
"OfdmRate12MbpsBW5MHz"
,
966
WIFI_MOD_CLASS_OFDM
,
967
false
,
968
5000000, 12000000,
969
WIFI_CODE_RATE_2_3
,
970
64);
971
return
mode;
972
}
973
974
WifiMode
975
WifiPhy::GetOfdmRate13_5MbpsBW5MHz
()
976
{
977
static
WifiMode
mode =
978
WifiModeFactory::CreateWifiMode
(
"OfdmRate13_5MbpsBW5MHz"
,
979
WIFI_MOD_CLASS_OFDM
,
980
false
,
981
5000000, 13500000,
982
WIFI_CODE_RATE_3_4
,
983
64);
984
return
mode;
985
}
986
987
/*Clause 20*/
988
989
WifiMode
990
WifiPhy::GetOfdmRate6_5MbpsBW20MHz
()
991
{
992
static
WifiMode
mode =
993
WifiModeFactory::CreateWifiMode
(
"OfdmRate6_5MbpsBW20MHz"
,
994
WIFI_MOD_CLASS_HT
,
995
true
,
996
20000000, 6500000,
997
WIFI_CODE_RATE_1_2
,
998
2);
999
return
mode;
1000
}
1001
WifiMode
1002
WifiPhy::GetOfdmRate7_2MbpsBW20MHz
()
1003
{
1004
static
WifiMode
mode =
1005
WifiModeFactory::CreateWifiMode
(
"OfdmRate7_2MbpsBW20MHz"
,
1006
WIFI_MOD_CLASS_HT
,
1007
false
,
1008
20000000, 7200000,
1009
WIFI_CODE_RATE_1_2
,
1010
2);
1011
return
mode;
1012
}
1013
1014
WifiMode
1015
WifiPhy::GetOfdmRate13MbpsBW20MHz
()
1016
{
1017
static
WifiMode
mode =
1018
WifiModeFactory::CreateWifiMode
(
"OfdmRate13MbpsBW20MHz"
,
1019
WIFI_MOD_CLASS_HT
,
1020
true
,
1021
20000000, 13000000,
1022
WIFI_CODE_RATE_1_2
,
1023
4);
1024
return
mode;
1025
}
1026
1027
WifiMode
1028
WifiPhy::GetOfdmRate14_4MbpsBW20MHz
()
1029
{
1030
static
WifiMode
mode =
1031
WifiModeFactory::CreateWifiMode
(
"OfdmRate14_4MbpsBW20MHz"
,
1032
WIFI_MOD_CLASS_HT
,
1033
false
,
1034
20000000, 14400000,
1035
WIFI_CODE_RATE_1_2
,
1036
4);
1037
return
mode;
1038
}
1039
WifiMode
1040
WifiPhy::GetOfdmRate19_5MbpsBW20MHz
()
1041
{
1042
static
WifiMode
mode =
1043
WifiModeFactory::CreateWifiMode
(
"OfdmRate19_5MbpsBW20MHz"
,
1044
WIFI_MOD_CLASS_HT
,
1045
true
,
1046
20000000, 19500000,
1047
WIFI_CODE_RATE_3_4
,
1048
4);
1049
return
mode;
1050
}
1051
1052
WifiMode
1053
WifiPhy::GetOfdmRate21_7MbpsBW20MHz
()
1054
{
1055
static
WifiMode
mode =
1056
WifiModeFactory::CreateWifiMode
(
"OfdmRate21_7MbpsBW20MHz"
,
1057
WIFI_MOD_CLASS_HT
,
1058
false
,
1059
20000000, 21700000,
1060
WIFI_CODE_RATE_3_4
,
1061
4);
1062
return
mode;
1063
}
1064
1065
1066
WifiMode
1067
WifiPhy::GetOfdmRate26MbpsBW20MHz
()
1068
{
1069
static
WifiMode
mode =
1070
WifiModeFactory::CreateWifiMode
(
"OfdmRate26MbpsBW20MHz"
,
1071
WIFI_MOD_CLASS_HT
,
1072
true
,
1073
20000000, 26000000,
1074
WIFI_CODE_RATE_1_2
,
1075
16);
1076
return
mode;
1077
}
1078
1079
WifiMode
1080
WifiPhy::GetOfdmRate28_9MbpsBW20MHz
()
1081
{
1082
static
WifiMode
mode =
1083
WifiModeFactory::CreateWifiMode
(
"OfdmRate28_9MbpsBW20MHz"
,
1084
WIFI_MOD_CLASS_HT
,
1085
false
,
1086
20000000, 28900000,
1087
WIFI_CODE_RATE_1_2
,
1088
16);
1089
return
mode;
1090
}
1091
1092
WifiMode
1093
WifiPhy::GetOfdmRate39MbpsBW20MHz
()
1094
{
1095
static
WifiMode
mode =
1096
WifiModeFactory::CreateWifiMode
(
"OfdmRate39MbpsBW20MHz"
,
1097
WIFI_MOD_CLASS_HT
,
1098
true
,
1099
20000000, 39000000,
1100
WIFI_CODE_RATE_3_4
,
1101
16);
1102
return
mode;
1103
}
1104
1105
WifiMode
1106
WifiPhy::GetOfdmRate43_3MbpsBW20MHz
()
1107
{
1108
static
WifiMode
mode =
1109
WifiModeFactory::CreateWifiMode
(
"OfdmRate43_3MbpsBW20MHz"
,
1110
WIFI_MOD_CLASS_HT
,
1111
false
,
1112
20000000, 43300000,
1113
WIFI_CODE_RATE_3_4
,
1114
16);
1115
return
mode;
1116
}
1117
1118
WifiMode
1119
WifiPhy::GetOfdmRate52MbpsBW20MHz
()
1120
{
1121
static
WifiMode
mode =
1122
WifiModeFactory::CreateWifiMode
(
"OfdmRate52MbpsBW20MHz"
,
1123
WIFI_MOD_CLASS_HT
,
1124
true
,
1125
20000000, 52000000,
1126
WIFI_CODE_RATE_2_3
,
1127
64);
1128
return
mode;
1129
}
1130
1131
WifiMode
1132
WifiPhy::GetOfdmRate57_8MbpsBW20MHz
()
1133
{
1134
static
WifiMode
mode =
1135
WifiModeFactory::CreateWifiMode
(
"OfdmRate57_8MbpsBW20MHz"
,
1136
WIFI_MOD_CLASS_HT
,
1137
false
,
1138
20000000, 57800000,
1139
WIFI_CODE_RATE_2_3
,
1140
64);
1141
return
mode;
1142
}
1143
1144
1145
WifiMode
1146
WifiPhy::GetOfdmRate58_5MbpsBW20MHz
()
1147
{
1148
static
WifiMode
mode =
1149
WifiModeFactory::CreateWifiMode
(
"OfdmRate58_5MbpsBW20MHz"
,
1150
WIFI_MOD_CLASS_HT
,
1151
true
,
1152
20000000, 58500000,
1153
WIFI_CODE_RATE_3_4
,
1154
64);
1155
return
mode;
1156
}
1157
1158
WifiMode
1159
WifiPhy::GetOfdmRate65MbpsBW20MHzShGi
()
1160
{
1161
static
WifiMode
mode =
1162
WifiModeFactory::CreateWifiMode
(
"OfdmRate65MbpsBW20MHzShGi"
,
1163
WIFI_MOD_CLASS_HT
,
1164
false
,
1165
20000000, 65000000,
1166
WIFI_CODE_RATE_3_4
,
1167
64);
1168
return
mode;
1169
}
1170
1171
WifiMode
1172
WifiPhy::GetOfdmRate65MbpsBW20MHz
()
1173
{
1174
static
WifiMode
mode =
1175
WifiModeFactory::CreateWifiMode
(
"OfdmRate65MbpsBW20MHz"
,
1176
WIFI_MOD_CLASS_HT
,
1177
true
,
1178
20000000, 65000000,
1179
WIFI_CODE_RATE_5_6
,
1180
64);
1181
return
mode;
1182
}
1183
1184
WifiMode
1185
WifiPhy::GetOfdmRate72_2MbpsBW20MHz
()
1186
{
1187
static
WifiMode
mode =
1188
WifiModeFactory::CreateWifiMode
(
"OfdmRate72_2MbpsBW20MHz"
,
1189
WIFI_MOD_CLASS_HT
,
1190
false
,
1191
20000000, 72200000,
1192
WIFI_CODE_RATE_5_6
,
1193
64);
1194
return
mode;
1195
}
1196
1197
WifiMode
1198
WifiPhy::GetOfdmRate13_5MbpsBW40MHz
()
1199
{
1200
static
WifiMode
mode =
1201
WifiModeFactory::CreateWifiMode
(
"OfdmRate13_5MbpsBW40MHz"
,
1202
WIFI_MOD_CLASS_HT
,
1203
false
,
1204
40000000, 13500000,
1205
WIFI_CODE_RATE_1_2
,
1206
2);
1207
return
mode;
1208
}
1209
1210
WifiMode
1211
WifiPhy::GetOfdmRate15MbpsBW40MHz
()
1212
{
1213
static
WifiMode
mode =
1214
WifiModeFactory::CreateWifiMode
(
"OfdmRate15MbpsBW40MHz"
,
1215
WIFI_MOD_CLASS_HT
,
1216
false
,
1217
40000000, 15000000,
1218
WIFI_CODE_RATE_1_2
,
1219
2);
1220
return
mode;
1221
}
1222
1223
WifiMode
1224
WifiPhy::GetOfdmRate27MbpsBW40MHz
()
1225
{
1226
static
WifiMode
mode =
1227
WifiModeFactory::CreateWifiMode
(
"OfdmRate27MbpsBW40MHz"
,
1228
WIFI_MOD_CLASS_HT
,
1229
false
,
1230
40000000, 27000000,
1231
WIFI_CODE_RATE_1_2
,
1232
4);
1233
return
mode;
1234
}
1235
WifiMode
1236
WifiPhy::GetOfdmRate30MbpsBW40MHz
()
1237
{
1238
static
WifiMode
mode =
1239
WifiModeFactory::CreateWifiMode
(
"OfdmRate30MbpsBW40MHz"
,
1240
WIFI_MOD_CLASS_HT
,
1241
false
,
1242
40000000, 30000000,
1243
WIFI_CODE_RATE_1_2
,
1244
4);
1245
return
mode;
1246
}
1247
1248
WifiMode
1249
WifiPhy::GetOfdmRate40_5MbpsBW40MHz
()
1250
{
1251
static
WifiMode
mode =
1252
WifiModeFactory::CreateWifiMode
(
"OfdmRate40_5MbpsBW40MHz"
,
1253
WIFI_MOD_CLASS_HT
,
1254
false
,
1255
40000000, 40500000,
1256
WIFI_CODE_RATE_3_4
,
1257
4);
1258
return
mode;
1259
}
1260
WifiMode
1261
WifiPhy::GetOfdmRate45MbpsBW40MHz
()
1262
{
1263
static
WifiMode
mode =
1264
WifiModeFactory::CreateWifiMode
(
"OfdmRate45MbpsBW40MHz"
,
1265
WIFI_MOD_CLASS_HT
,
1266
false
,
1267
40000000, 45000000,
1268
WIFI_CODE_RATE_3_4
,
1269
4);
1270
return
mode;
1271
}
1272
1273
WifiMode
1274
WifiPhy::GetOfdmRate54MbpsBW40MHz
()
1275
{
1276
static
WifiMode
mode =
1277
WifiModeFactory::CreateWifiMode
(
"OfdmRate54MbpsBW40MHz"
,
1278
WIFI_MOD_CLASS_HT
,
1279
false
,
1280
40000000, 54000000,
1281
WIFI_CODE_RATE_1_2
,
1282
16);
1283
return
mode;
1284
}
1285
1286
WifiMode
1287
WifiPhy::GetOfdmRate60MbpsBW40MHz
()
1288
{
1289
static
WifiMode
mode =
1290
WifiModeFactory::CreateWifiMode
(
"OfdmRate60MbpsBW40MHz"
,
1291
WIFI_MOD_CLASS_HT
,
1292
false
,
1293
40000000, 60000000,
1294
WIFI_CODE_RATE_1_2
,
1295
16);
1296
return
mode;
1297
}
1298
1299
WifiMode
1300
WifiPhy::GetOfdmRate81MbpsBW40MHz
()
1301
{
1302
static
WifiMode
mode =
1303
WifiModeFactory::CreateWifiMode
(
"OfdmRate81MbpsBW40MHz"
,
1304
WIFI_MOD_CLASS_HT
,
1305
false
,
1306
40000000, 81000000,
1307
WIFI_CODE_RATE_3_4
,
1308
16);
1309
return
mode;
1310
}
1311
WifiMode
1312
WifiPhy::GetOfdmRate90MbpsBW40MHz
()
1313
{
1314
static
WifiMode
mode =
1315
WifiModeFactory::CreateWifiMode
(
"OfdmRate90MbpsBW40MHz"
,
1316
WIFI_MOD_CLASS_HT
,
1317
false
,
1318
40000000, 90000000,
1319
WIFI_CODE_RATE_3_4
,
1320
16);
1321
return
mode;
1322
}
1323
1324
WifiMode
1325
WifiPhy::GetOfdmRate108MbpsBW40MHz
()
1326
{
1327
static
WifiMode
mode =
1328
WifiModeFactory::CreateWifiMode
(
"OfdmRate108MbpsBW40MHz"
,
1329
WIFI_MOD_CLASS_HT
,
1330
false
,
1331
40000000, 108000000,
1332
WIFI_CODE_RATE_2_3
,
1333
64);
1334
return
mode;
1335
}
1336
WifiMode
1337
WifiPhy::GetOfdmRate120MbpsBW40MHz
()
1338
{
1339
static
WifiMode
mode =
1340
WifiModeFactory::CreateWifiMode
(
"OfdmRate120MbpsBW40MHz"
,
1341
WIFI_MOD_CLASS_HT
,
1342
false
,
1343
40000000, 120000000,
1344
WIFI_CODE_RATE_2_3
,
1345
64);
1346
return
mode;
1347
}
1348
WifiMode
1349
WifiPhy::GetOfdmRate121_5MbpsBW40MHz
()
1350
{
1351
static
WifiMode
mode =
1352
WifiModeFactory::CreateWifiMode
(
"OfdmRate121_5MbpsBW40MHz"
,
1353
WIFI_MOD_CLASS_HT
,
1354
false
,
1355
40000000, 121500000,
1356
WIFI_CODE_RATE_3_4
,
1357
64);
1358
return
mode;
1359
}
1360
WifiMode
1361
WifiPhy::GetOfdmRate135MbpsBW40MHzShGi
()
1362
{
1363
static
WifiMode
mode =
1364
WifiModeFactory::CreateWifiMode
(
"OfdmRate135MbpsBW40MHzShGi"
,
1365
WIFI_MOD_CLASS_HT
,
1366
false
,
1367
40000000, 135000000,
1368
WIFI_CODE_RATE_3_4
,
1369
64);
1370
return
mode;
1371
}
1372
WifiMode
1373
WifiPhy::GetOfdmRate135MbpsBW40MHz
()
1374
{
1375
static
WifiMode
mode =
1376
WifiModeFactory::CreateWifiMode
(
"OfdmRate135MbpsBW40MHz"
,
1377
WIFI_MOD_CLASS_HT
,
1378
false
,
1379
40000000, 135000000,
1380
WIFI_CODE_RATE_5_6
,
1381
64);
1382
return
mode;
1383
}
1384
1385
WifiMode
1386
WifiPhy::GetOfdmRate150MbpsBW40MHz
()
1387
{
1388
static
WifiMode
mode =
1389
WifiModeFactory::CreateWifiMode
(
"OfdmRate150MbpsBW40MHz"
,
1390
WIFI_MOD_CLASS_HT
,
1391
false
,
1392
40000000, 150000000,
1393
WIFI_CODE_RATE_5_6
,
1394
64);
1395
return
mode;
1396
}
1397
1398
1399
1400
std::ostream&
operator<<
(std::ostream& os,
enum
WifiPhy::State
state)
1401
{
1402
switch
(state)
1403
{
1404
case
WifiPhy::IDLE
:
1405
return
(os <<
"IDLE"
);
1406
case
WifiPhy::CCA_BUSY
:
1407
return
(os <<
"CCA_BUSY"
);
1408
case
WifiPhy::TX
:
1409
return
(os <<
"TX"
);
1410
case
WifiPhy::RX
:
1411
return
(os <<
"RX"
);
1412
case
WifiPhy::SWITCHING
:
1413
return
(os <<
"SWITCHING"
);
1414
default
:
1415
NS_FATAL_ERROR
(
"Invalid WifiPhy state"
);
1416
return
(os <<
"INVALID"
);
1417
}
1418
}
1419
1420
1421
1422
}
// namespace ns3
1423
1424
namespace
{
1425
1426
static
class
Constructor
1427
{
1428
public
:
1429
Constructor
()
1430
{
1431
ns3::WifiPhy::GetDsssRate1Mbps
();
1432
ns3::WifiPhy::GetDsssRate2Mbps
();
1433
ns3::WifiPhy::GetDsssRate5_5Mbps
();
1434
ns3::WifiPhy::GetDsssRate11Mbps
();
1435
ns3::WifiPhy::GetErpOfdmRate6Mbps
();
1436
ns3::WifiPhy::GetErpOfdmRate9Mbps
();
1437
ns3::WifiPhy::GetErpOfdmRate12Mbps
();
1438
ns3::WifiPhy::GetErpOfdmRate18Mbps
();
1439
ns3::WifiPhy::GetErpOfdmRate24Mbps
();
1440
ns3::WifiPhy::GetErpOfdmRate36Mbps
();
1441
ns3::WifiPhy::GetErpOfdmRate48Mbps
();
1442
ns3::WifiPhy::GetErpOfdmRate54Mbps
();
1443
ns3::WifiPhy::GetOfdmRate6Mbps
();
1444
ns3::WifiPhy::GetOfdmRate9Mbps
();
1445
ns3::WifiPhy::GetOfdmRate12Mbps
();
1446
ns3::WifiPhy::GetOfdmRate18Mbps
();
1447
ns3::WifiPhy::GetOfdmRate24Mbps
();
1448
ns3::WifiPhy::GetOfdmRate36Mbps
();
1449
ns3::WifiPhy::GetOfdmRate48Mbps
();
1450
ns3::WifiPhy::GetOfdmRate54Mbps
();
1451
ns3::WifiPhy::GetOfdmRate3MbpsBW10MHz
();
1452
ns3::WifiPhy::GetOfdmRate4_5MbpsBW10MHz
();
1453
ns3::WifiPhy::GetOfdmRate6MbpsBW10MHz
();
1454
ns3::WifiPhy::GetOfdmRate9MbpsBW10MHz
();
1455
ns3::WifiPhy::GetOfdmRate12MbpsBW10MHz
();
1456
ns3::WifiPhy::GetOfdmRate18MbpsBW10MHz
();
1457
ns3::WifiPhy::GetOfdmRate24MbpsBW10MHz
();
1458
ns3::WifiPhy::GetOfdmRate27MbpsBW10MHz
();
1459
ns3::WifiPhy::GetOfdmRate1_5MbpsBW5MHz
();
1460
ns3::WifiPhy::GetOfdmRate2_25MbpsBW5MHz
();
1461
ns3::WifiPhy::GetOfdmRate3MbpsBW5MHz
();
1462
ns3::WifiPhy::GetOfdmRate4_5MbpsBW5MHz
();
1463
ns3::WifiPhy::GetOfdmRate6MbpsBW5MHz
();
1464
ns3::WifiPhy::GetOfdmRate9MbpsBW5MHz
();
1465
ns3::WifiPhy::GetOfdmRate12MbpsBW5MHz
();
1466
ns3::WifiPhy::GetOfdmRate13_5MbpsBW5MHz
();
1467
ns3::WifiPhy::GetOfdmRate6_5MbpsBW20MHz
();
1468
ns3::WifiPhy::GetOfdmRate13MbpsBW20MHz
();
1469
ns3::WifiPhy::GetOfdmRate19_5MbpsBW20MHz
();
1470
ns3::WifiPhy::GetOfdmRate26MbpsBW20MHz
();
1471
ns3::WifiPhy::GetOfdmRate39MbpsBW20MHz
();
1472
ns3::WifiPhy::GetOfdmRate52MbpsBW20MHz
();
1473
ns3::WifiPhy::GetOfdmRate58_5MbpsBW20MHz
();
1474
ns3::WifiPhy::GetOfdmRate65MbpsBW20MHz
();
1475
ns3::WifiPhy::GetOfdmRate13_5MbpsBW40MHz
();
1476
ns3::WifiPhy::GetOfdmRate27MbpsBW40MHz
();
1477
ns3::WifiPhy::GetOfdmRate40_5MbpsBW40MHz
();
1478
ns3::WifiPhy::GetOfdmRate54MbpsBW40MHz
();
1479
ns3::WifiPhy::GetOfdmRate81MbpsBW40MHz
();
1480
ns3::WifiPhy::GetOfdmRate108MbpsBW40MHz
();
1481
ns3::WifiPhy::GetOfdmRate121_5MbpsBW40MHz
();
1482
ns3::WifiPhy::GetOfdmRate135MbpsBW40MHz
();
1483
ns3::WifiPhy::GetOfdmRate7_2MbpsBW20MHz
();
1484
ns3::WifiPhy::GetOfdmRate14_4MbpsBW20MHz
();
1485
ns3::WifiPhy::GetOfdmRate21_7MbpsBW20MHz
();
1486
ns3::WifiPhy::GetOfdmRate28_9MbpsBW20MHz
();
1487
ns3::WifiPhy::GetOfdmRate43_3MbpsBW20MHz
();
1488
ns3::WifiPhy::GetOfdmRate57_8MbpsBW20MHz
();
1489
ns3::WifiPhy::GetOfdmRate65MbpsBW20MHzShGi
();
1490
ns3::WifiPhy::GetOfdmRate72_2MbpsBW20MHz
();
1491
1492
}
1493
}
g_constructor
;
1494
}
src
wifi
model
wifi-phy.cc
Generated on Fri Aug 30 2013 01:43:05 for ns-3 by
1.8.1.2