author | Nicola Baldo <nicola@baldo.biz> |
Sat, 07 May 2011 21:49:46 +0200 | |
changeset 7141 | 072fb225b714 |
parent 6852 | 8f1a53d3f6ca |
child 7252 | c8200621e252 |
permissions | -rw-r--r-- |
2034
8664ab76ff85
add missing headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1984
diff
changeset
|
1 |
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
8664ab76ff85
add missing headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1984
diff
changeset
|
2 |
/* |
8664ab76ff85
add missing headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1984
diff
changeset
|
3 |
* Copyright (c) 2005,2006,2007 INRIA |
8664ab76ff85
add missing headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1984
diff
changeset
|
4 |
* |
8664ab76ff85
add missing headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1984
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 |
2034
8664ab76ff85
add missing headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1984
diff
changeset
|
7 |
* published by the Free Software Foundation; |
8664ab76ff85
add missing headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1984
diff
changeset
|
8 |
* |
8664ab76ff85
add missing headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1984
diff
changeset
|
9 |
* This program is distributed in the hope that it will be useful, |
8664ab76ff85
add missing headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1984
diff
changeset
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
8664ab76ff85
add missing headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1984
diff
changeset
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
8664ab76ff85
add missing headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1984
diff
changeset
|
12 |
* GNU General Public License for more details. |
8664ab76ff85
add missing headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1984
diff
changeset
|
13 |
* |
8664ab76ff85
add missing headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1984
diff
changeset
|
14 |
* You should have received a copy of the GNU General Public License |
8664ab76ff85
add missing headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1984
diff
changeset
|
15 |
* along with this program; if not, write to the Free Software |
8664ab76ff85
add missing headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1984
diff
changeset
|
16 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
8664ab76ff85
add missing headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1984
diff
changeset
|
17 |
* |
8664ab76ff85
add missing headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1984
diff
changeset
|
18 |
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
8664ab76ff85
add missing headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1984
diff
changeset
|
19 |
*/ |
1885
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
20 |
#include "wifi-mode.h" |
6360
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
21 |
#include "ns3/simulator.h" |
1887
14b4e0b7870a
add missing implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1885
diff
changeset
|
22 |
#include "ns3/assert.h" |
6360
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
23 |
#include "ns3/log.h" |
1885
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
24 |
|
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
25 |
namespace ns3 { |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
26 |
|
1910
1c1dd3c8c228
add operator == for WifiMode
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1909
diff
changeset
|
27 |
bool operator == (const WifiMode &a, const WifiMode &b) |
1c1dd3c8c228
add operator == for WifiMode
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1909
diff
changeset
|
28 |
{ |
1c1dd3c8c228
add operator == for WifiMode
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1909
diff
changeset
|
29 |
return a.GetUid () == b.GetUid (); |
1c1dd3c8c228
add operator == for WifiMode
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1909
diff
changeset
|
30 |
} |
1981
d2fda7b87289
implement operator << and an assert
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1966
diff
changeset
|
31 |
std::ostream & operator << (std::ostream & os, const WifiMode &mode) |
d2fda7b87289
implement operator << and an assert
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1966
diff
changeset
|
32 |
{ |
d2fda7b87289
implement operator << and an assert
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1966
diff
changeset
|
33 |
os << mode.GetUniqueName (); |
d2fda7b87289
implement operator << and an assert
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1966
diff
changeset
|
34 |
return os; |
d2fda7b87289
implement operator << and an assert
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1966
diff
changeset
|
35 |
} |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2034
diff
changeset
|
36 |
std::istream & operator >> (std::istream &is, WifiMode &mode) |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2034
diff
changeset
|
37 |
{ |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2034
diff
changeset
|
38 |
std::string str; |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2034
diff
changeset
|
39 |
is >> str; |
6360
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
40 |
mode = WifiModeFactory::GetFactory ()->Search (str); |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2034
diff
changeset
|
41 |
return is; |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2034
diff
changeset
|
42 |
} |
1910
1c1dd3c8c228
add operator == for WifiMode
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1909
diff
changeset
|
43 |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
44 |
uint32_t |
1885
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
45 |
WifiMode::GetBandwidth (void) const |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
46 |
{ |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
47 |
struct WifiModeFactory::WifiModeItem *item = WifiModeFactory::GetFactory ()->Get (m_uid); |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
48 |
return item->bandwidth; |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
49 |
} |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
50 |
uint32_t |
1885
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
51 |
WifiMode::GetPhyRate (void) const |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
52 |
{ |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
53 |
struct WifiModeFactory::WifiModeItem *item = WifiModeFactory::GetFactory ()->Get (m_uid); |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
54 |
return item->phyRate; |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
55 |
} |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
56 |
uint32_t |
1885
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
57 |
WifiMode::GetDataRate (void) const |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
58 |
{ |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
59 |
struct WifiModeFactory::WifiModeItem *item = WifiModeFactory::GetFactory ()->Get (m_uid); |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
60 |
return item->dataRate; |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
61 |
} |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
62 |
enum WifiCodeRate |
6360
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
63 |
WifiMode::GetCodeRate (void) const |
1885
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
64 |
{ |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
65 |
struct WifiModeFactory::WifiModeItem *item = WifiModeFactory::GetFactory ()->Get (m_uid); |
6360
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
66 |
return item->codingRate; |
1909
4d1214bb8bc0
add WifiMode mandatory flag
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1887
diff
changeset
|
67 |
} |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
68 |
uint8_t |
1885
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
69 |
WifiMode::GetConstellationSize (void) const |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
70 |
{ |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
71 |
struct WifiModeFactory::WifiModeItem *item = WifiModeFactory::GetFactory ()->Get (m_uid); |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
72 |
return item->constellationSize; |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
73 |
} |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
74 |
std::string |
1981
d2fda7b87289
implement operator << and an assert
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1966
diff
changeset
|
75 |
WifiMode::GetUniqueName (void) const |
d2fda7b87289
implement operator << and an assert
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1966
diff
changeset
|
76 |
{ |
4331
771b9f0005d6
make ./waf check pass again.
Timo Bingmann <timo.bingmann@student.kit.edu>
parents:
3879
diff
changeset
|
77 |
// needed for ostream printing of the invalid mode |
1981
d2fda7b87289
implement operator << and an assert
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1966
diff
changeset
|
78 |
struct WifiModeFactory::WifiModeItem *item = WifiModeFactory::GetFactory ()->Get (m_uid); |
d2fda7b87289
implement operator << and an assert
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1966
diff
changeset
|
79 |
return item->uniqueUid; |
d2fda7b87289
implement operator << and an assert
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1966
diff
changeset
|
80 |
} |
1909
4d1214bb8bc0
add WifiMode mandatory flag
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1887
diff
changeset
|
81 |
bool |
4d1214bb8bc0
add WifiMode mandatory flag
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1887
diff
changeset
|
82 |
WifiMode::IsMandatory (void) const |
4d1214bb8bc0
add WifiMode mandatory flag
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1887
diff
changeset
|
83 |
{ |
4d1214bb8bc0
add WifiMode mandatory flag
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1887
diff
changeset
|
84 |
struct WifiModeFactory::WifiModeItem *item = WifiModeFactory::GetFactory ()->Get (m_uid); |
4d1214bb8bc0
add WifiMode mandatory flag
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1887
diff
changeset
|
85 |
return item->isMandatory; |
4d1214bb8bc0
add WifiMode mandatory flag
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1887
diff
changeset
|
86 |
} |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
87 |
uint32_t |
1885
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
88 |
WifiMode::GetUid (void) const |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
89 |
{ |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
90 |
return m_uid; |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
91 |
} |
6360
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
92 |
enum WifiModulationClass |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
93 |
WifiMode::GetModulationClass () const |
4681
8558474b6149
made InterferenceHelper::CalculateTxDuration () static
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
94 |
{ |
8558474b6149
made InterferenceHelper::CalculateTxDuration () static
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
95 |
struct WifiModeFactory::WifiModeItem *item = WifiModeFactory::GetFactory ()->Get (m_uid); |
6360
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
96 |
return item->modClass; |
4681
8558474b6149
made InterferenceHelper::CalculateTxDuration () static
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
97 |
} |
1885
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
98 |
WifiMode::WifiMode () |
1920
1d4864775cf8
replace header mode with preamble mode
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1910
diff
changeset
|
99 |
: m_uid (0) |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
100 |
{ |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
101 |
} |
1885
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
102 |
WifiMode::WifiMode (uint32_t uid) |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
103 |
: m_uid (uid) |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
104 |
{ |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
105 |
} |
3879
3a887a06b795
add a string-based constructor
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2675
diff
changeset
|
106 |
WifiMode::WifiMode (std::string name) |
3a887a06b795
add a string-based constructor
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2675
diff
changeset
|
107 |
{ |
6360
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
108 |
*this = WifiModeFactory::GetFactory ()->Search (name); |
3879
3a887a06b795
add a string-based constructor
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2675
diff
changeset
|
109 |
} |
1885
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
110 |
|
2582
3e28107b870f
rename old VALUE leftovers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2524
diff
changeset
|
111 |
ATTRIBUTE_HELPER_CPP (WifiMode); |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2034
diff
changeset
|
112 |
|
1887
14b4e0b7870a
add missing implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1885
diff
changeset
|
113 |
WifiModeFactory::WifiModeFactory () |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
114 |
{ |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
115 |
} |
1885
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
116 |
|
5901
a24cd8dce646
bug 767: Incorrect modulation for 802.11a modes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4713
diff
changeset
|
117 |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
118 |
WifiMode |
6360
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
119 |
WifiModeFactory::CreateWifiMode (std::string uniqueName, |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
120 |
enum WifiModulationClass modClass, |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
121 |
bool isMandatory, |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
122 |
uint32_t bandwidth, |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
123 |
uint32_t dataRate, |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
124 |
enum WifiCodeRate codingRate, |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
125 |
uint8_t constellationSize) |
1885
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
126 |
{ |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
127 |
WifiModeFactory *factory = GetFactory (); |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
128 |
uint32_t uid = factory->AllocateUid (uniqueName); |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
129 |
WifiModeItem *item = factory->Get (uid); |
1984
c00b259986bd
initialize uniqueUid field
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1981
diff
changeset
|
130 |
item->uniqueUid = uniqueName; |
6360
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
131 |
item->modClass = modClass; |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
132 |
// The modulation class for this WifiMode must be valid. |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
133 |
NS_ASSERT (modClass != WIFI_MOD_CLASS_UNKNOWN); |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
134 |
|
4470 | 135 |
item->bandwidth = bandwidth; |
136 |
item->dataRate = dataRate; |
|
6360
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
137 |
|
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
138 |
item->codingRate = codingRate; |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
139 |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
140 |
switch (codingRate) |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
141 |
{ |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
142 |
case WIFI_CODE_RATE_3_4: |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
143 |
item->phyRate = dataRate * 4 / 3; |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
144 |
break; |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
145 |
case WIFI_CODE_RATE_2_3: |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
146 |
item->phyRate = dataRate * 3 / 2; |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
147 |
break; |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
148 |
case WIFI_CODE_RATE_1_2: |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
149 |
item->phyRate = dataRate * 2 / 1; |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
150 |
break; |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
151 |
case WIFI_CODE_RATE_UNDEFINED: |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
152 |
default: |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
153 |
item->phyRate = dataRate; |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
154 |
break; |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
155 |
} |
6360
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
156 |
|
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
157 |
// Check for compatibility between modulation class and coding |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
158 |
// rate. If modulation class is DSSS then coding rate must be |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
159 |
// undefined, and vice versa. I could have done this with an |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
160 |
// assertion, but it seems better to always give the error (i.e., |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
161 |
// not only in non-optimised builds) and the cycles that extra test |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
162 |
// here costs are only suffered at simulation setup. |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
163 |
if ((codingRate == WIFI_CODE_RATE_UNDEFINED) != (modClass == WIFI_MOD_CLASS_DSSS)) |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
164 |
{ |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
165 |
NS_FATAL_ERROR ("Error in creation of WifiMode named " << uniqueName << std::endl |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
166 |
<< "Code rate must be WIFI_CODE_RATE_UNDEFINED iff Modulation Class is WIFI_MOD_CLASS_DSSS"); |
6360
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
167 |
} |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
168 |
|
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
169 |
item->constellationSize = constellationSize; |
4470 | 170 |
item->isMandatory = isMandatory; |
6360
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
171 |
|
4470 | 172 |
return WifiMode (uid); |
173 |
} |
|
6360
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
174 |
|
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
175 |
WifiMode |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
176 |
WifiModeFactory::Search (std::string name) |
4470 | 177 |
{ |
6360
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
178 |
WifiModeItemList::const_iterator i; |
4713
3fdb8f60a863
bug 654: avoid segfault with ConfigStore loading
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4681
diff
changeset
|
179 |
uint32_t j = 0; |
6360
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
180 |
for (i = m_itemList.begin (); i != m_itemList.end (); i++) |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2034
diff
changeset
|
181 |
{ |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2034
diff
changeset
|
182 |
if (i->uniqueUid == name) |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
183 |
{ |
6360
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
184 |
return WifiMode (j); |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
185 |
} |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2034
diff
changeset
|
186 |
j++; |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2034
diff
changeset
|
187 |
} |
6360
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
188 |
|
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
189 |
// If we get here then a matching WifiMode was not found above. This |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
190 |
// is a fatal problem, but we try to be helpful by displaying the |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
191 |
// list of WifiModes that are supported. |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
192 |
NS_LOG_UNCOND ("Could not find match for WifiMode named \"" |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
193 |
<< name << "\". Valid options are:"); |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
194 |
for (i = m_itemList.begin (); i != m_itemList.end (); i++) |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
195 |
{ |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
196 |
NS_LOG_UNCOND (" " << i->uniqueUid); |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
197 |
} |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
198 |
// Empty fatal error to die. We've already unconditionally logged |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
199 |
// the helpful information. |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
200 |
NS_FATAL_ERROR (""); |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
201 |
|
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
202 |
// This next line is unreachable because of the fatal error |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
203 |
// immediately above, and that is fortunate, because we have no idea |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
204 |
// what is in WifiMode (0), but we do know it is not what our caller |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
205 |
// has requested by name. It's here only because it's the safest |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
206 |
// thing that'll give valid code. |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
207 |
return WifiMode (0); |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2034
diff
changeset
|
208 |
} |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2034
diff
changeset
|
209 |
|
1885
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
210 |
uint32_t |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
211 |
WifiModeFactory::AllocateUid (std::string uniqueUid) |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
212 |
{ |
4713
3fdb8f60a863
bug 654: avoid segfault with ConfigStore loading
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4681
diff
changeset
|
213 |
uint32_t j = 0; |
1885
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
214 |
for (WifiModeItemList::const_iterator i = m_itemList.begin (); |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
215 |
i != m_itemList.end (); i++) |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
216 |
{ |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
217 |
if (i->uniqueUid == uniqueUid) |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
218 |
{ |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
219 |
return j; |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
220 |
} |
1885
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
221 |
j++; |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
222 |
} |
4713
3fdb8f60a863
bug 654: avoid segfault with ConfigStore loading
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4681
diff
changeset
|
223 |
uint32_t uid = m_itemList.size (); |
1885
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
224 |
m_itemList.push_back (WifiModeItem ()); |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
225 |
return uid; |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
226 |
} |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
227 |
|
1887
14b4e0b7870a
add missing implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1885
diff
changeset
|
228 |
struct WifiModeFactory::WifiModeItem * |
14b4e0b7870a
add missing implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1885
diff
changeset
|
229 |
WifiModeFactory::Get (uint32_t uid) |
14b4e0b7870a
add missing implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1885
diff
changeset
|
230 |
{ |
4713
3fdb8f60a863
bug 654: avoid segfault with ConfigStore loading
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4681
diff
changeset
|
231 |
NS_ASSERT (uid < m_itemList.size ()); |
3fdb8f60a863
bug 654: avoid segfault with ConfigStore loading
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4681
diff
changeset
|
232 |
return &m_itemList[uid]; |
1887
14b4e0b7870a
add missing implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1885
diff
changeset
|
233 |
} |
14b4e0b7870a
add missing implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1885
diff
changeset
|
234 |
|
1885
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
235 |
WifiModeFactory * |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
236 |
WifiModeFactory::GetFactory (void) |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
237 |
{ |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2034
diff
changeset
|
238 |
static bool isFirstTime = true; |
1885
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
239 |
static WifiModeFactory factory; |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2034
diff
changeset
|
240 |
if (isFirstTime) |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2034
diff
changeset
|
241 |
{ |
4713
3fdb8f60a863
bug 654: avoid segfault with ConfigStore loading
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4681
diff
changeset
|
242 |
uint32_t uid = factory.AllocateUid ("Invalid-WifiMode"); |
3fdb8f60a863
bug 654: avoid segfault with ConfigStore loading
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4681
diff
changeset
|
243 |
WifiModeItem *item = factory.Get (uid); |
3fdb8f60a863
bug 654: avoid segfault with ConfigStore loading
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4681
diff
changeset
|
244 |
item->uniqueUid = "Invalid-WifiMode"; |
3fdb8f60a863
bug 654: avoid segfault with ConfigStore loading
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4681
diff
changeset
|
245 |
item->bandwidth = 0; |
3fdb8f60a863
bug 654: avoid segfault with ConfigStore loading
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4681
diff
changeset
|
246 |
item->dataRate = 0; |
3fdb8f60a863
bug 654: avoid segfault with ConfigStore loading
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4681
diff
changeset
|
247 |
item->phyRate = 0; |
6360
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
248 |
item->modClass = WIFI_MOD_CLASS_UNKNOWN; |
4713
3fdb8f60a863
bug 654: avoid segfault with ConfigStore loading
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4681
diff
changeset
|
249 |
item->constellationSize = 0; |
6360
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
5901
diff
changeset
|
250 |
item->codingRate = WIFI_CODE_RATE_UNDEFINED; |
4713
3fdb8f60a863
bug 654: avoid segfault with ConfigStore loading
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4681
diff
changeset
|
251 |
item->isMandatory = false; |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2034
diff
changeset
|
252 |
isFirstTime = false; |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2034
diff
changeset
|
253 |
} |
1885
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
254 |
return &factory; |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
255 |
} |
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
256 |
|
9ccfbfb25477
get a few more files to compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
257 |
} // namespace ns3 |