A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
wifi-standards.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2007 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
#ifndef WIFI_STANDARD_H
22
#define WIFI_STANDARD_H
23
24
#include <map>
25
#include "
wifi-phy-band.h
"
26
27
namespace
ns3
{
28
33
enum
WifiPhyStandard
34
{
36
WIFI_PHY_STANDARD_80211a
,
38
WIFI_PHY_STANDARD_80211b
,
40
WIFI_PHY_STANDARD_80211g
,
43
WIFI_PHY_STANDARD_80211_10MHZ
,
46
WIFI_PHY_STANDARD_80211_5MHZ
,
48
WIFI_PHY_STANDARD_80211p
,
51
WIFI_PHY_STANDARD_80211n_2_4GHZ
,
54
WIFI_PHY_STANDARD_80211n_5GHZ
,
56
WIFI_PHY_STANDARD_80211n
,
58
WIFI_PHY_STANDARD_80211ac
,
60
WIFI_PHY_STANDARD_80211ax
,
62
WIFI_PHY_STANDARD_UNSPECIFIED
63
};
64
72
inline
std::ostream&
operator<<
(std::ostream& os,
WifiPhyStandard
standard)
73
{
74
switch
(standard)
75
{
76
case
WIFI_PHY_STANDARD_80211a
:
77
return
(os <<
"802.11a"
);
78
case
WIFI_PHY_STANDARD_80211b
:
79
return
(os <<
"802.11b"
);
80
case
WIFI_PHY_STANDARD_80211g
:
81
return
(os <<
"802.11g"
);
82
case
WIFI_PHY_STANDARD_80211p
:
83
return
(os <<
"802.11p"
);
84
case
WIFI_PHY_STANDARD_80211n
:
85
return
(os <<
"802.11n"
);
86
case
WIFI_PHY_STANDARD_80211ac
:
87
return
(os <<
"802.11ac"
);
88
case
WIFI_PHY_STANDARD_80211ax
:
89
return
(os <<
"802.11ax"
);
90
case
WIFI_PHY_STANDARD_UNSPECIFIED
:
91
default
:
92
return
(os <<
"UNSPECIFIED"
);
93
}
94
}
95
100
enum
WifiMacStandard
101
{
102
WIFI_MAC_STANDARD_80211
,
103
WIFI_MAC_STANDARD_80211n
,
104
WIFI_MAC_STANDARD_80211ac
,
105
WIFI_MAC_STANDARD_80211ax
106
};
107
115
inline
std::ostream&
operator<<
(std::ostream& os,
WifiMacStandard
standard)
116
{
117
switch
(standard)
118
{
119
case
WIFI_MAC_STANDARD_80211
:
120
return
(os <<
"802.11"
);
121
case
WIFI_MAC_STANDARD_80211n
:
122
return
(os <<
"802.11n"
);
123
case
WIFI_MAC_STANDARD_80211ac
:
124
return
(os <<
"802.11ac"
);
125
case
WIFI_MAC_STANDARD_80211ax
:
126
return
(os <<
"802.11ax"
);
127
default
:
128
return
(os <<
"UNSPECIFIED"
);
129
}
130
}
131
136
enum
WifiStandard
137
{
138
WIFI_STANDARD_80211a
,
139
WIFI_STANDARD_80211b
,
140
WIFI_STANDARD_80211g
,
141
WIFI_STANDARD_80211p
,
142
WIFI_STANDARD_80211n_2_4GHZ
,
143
WIFI_STANDARD_80211n_5GHZ
,
144
WIFI_STANDARD_80211ac
,
145
WIFI_STANDARD_80211ax_2_4GHZ
,
146
WIFI_STANDARD_80211ax_5GHZ
,
147
WIFI_STANDARD_80211ax_6GHZ
148
};
149
157
inline
std::ostream&
operator<<
(std::ostream& os,
WifiStandard
standard)
158
{
159
switch
(standard)
160
{
161
case
WIFI_STANDARD_80211a
:
162
return
(os <<
"802.11a"
);
163
case
WIFI_STANDARD_80211b
:
164
return
(os <<
"802.11b"
);
165
case
WIFI_STANDARD_80211g
:
166
return
(os <<
"802.11g"
);
167
case
WIFI_STANDARD_80211p
:
168
return
(os <<
"802.11p"
);
169
case
WIFI_STANDARD_80211n_2_4GHZ
:
170
return
(os <<
"802.11n-2.4GHz"
);
171
case
WIFI_STANDARD_80211n_5GHZ
:
172
return
(os <<
"802.11n-5GHz"
);
173
case
WIFI_STANDARD_80211ac
:
174
return
(os <<
"802.11ac"
);
175
case
WIFI_STANDARD_80211ax_2_4GHZ
:
176
return
(os <<
"802.11ax-2.4GHz"
);
177
case
WIFI_STANDARD_80211ax_5GHZ
:
178
return
(os <<
"802.11ax-5GHz"
);
179
default
:
180
return
(os <<
"UNSPECIFIED"
);
181
}
182
}
183
187
struct
WifiStandardInfo
188
{
189
WifiPhyStandard
phyStandard
;
190
WifiPhyBand
phyBand
;
191
WifiMacStandard
macStandard
;
192
};
193
197
const
std::map<WifiStandard, WifiStandardInfo>
wifiStandards
=
198
{
199
{
WIFI_STANDARD_80211a
, {
WIFI_PHY_STANDARD_80211a
,
WIFI_PHY_BAND_5GHZ
,
WIFI_MAC_STANDARD_80211
} },
200
{
WIFI_STANDARD_80211b
, {
WIFI_PHY_STANDARD_80211b
,
WIFI_PHY_BAND_2_4GHZ
,
WIFI_MAC_STANDARD_80211
} },
201
{
WIFI_STANDARD_80211g
, {
WIFI_PHY_STANDARD_80211g
,
WIFI_PHY_BAND_2_4GHZ
,
WIFI_MAC_STANDARD_80211
} },
202
{
WIFI_STANDARD_80211p
, {
WIFI_PHY_STANDARD_80211p
,
WIFI_PHY_BAND_5GHZ
,
WIFI_MAC_STANDARD_80211
} },
203
{
WIFI_STANDARD_80211n_2_4GHZ
, {
WIFI_PHY_STANDARD_80211n
,
WIFI_PHY_BAND_2_4GHZ
,
WIFI_MAC_STANDARD_80211n
} },
204
{
WIFI_STANDARD_80211n_5GHZ
, {
WIFI_PHY_STANDARD_80211n
,
WIFI_PHY_BAND_5GHZ
,
WIFI_MAC_STANDARD_80211n
} },
205
{
WIFI_STANDARD_80211ac
, {
WIFI_PHY_STANDARD_80211ac
,
WIFI_PHY_BAND_5GHZ
,
WIFI_MAC_STANDARD_80211ac
} },
206
{
WIFI_STANDARD_80211ax_2_4GHZ
, {
WIFI_PHY_STANDARD_80211ax
,
WIFI_PHY_BAND_2_4GHZ
,
WIFI_MAC_STANDARD_80211ax
} },
207
{
WIFI_STANDARD_80211ax_5GHZ
, {
WIFI_PHY_STANDARD_80211ax
,
WIFI_PHY_BAND_5GHZ
,
WIFI_MAC_STANDARD_80211ax
} },
208
{
WIFI_STANDARD_80211ax_6GHZ
, {
WIFI_PHY_STANDARD_80211ax
,
WIFI_PHY_BAND_6GHZ
,
WIFI_MAC_STANDARD_80211ax
} }
209
};
210
211
}
//namespace ns3
212
213
#endif
/* WIFI_STANDARD_H */
ns3::WIFI_PHY_STANDARD_80211g
ERP-OFDM PHY (Clause 19, Section 19.5)
Definition:
wifi-standards.h:40
ns3::WIFI_PHY_STANDARD_80211_5MHZ
OFDM PHY for the 5 GHz band (Clause 17 with 5 MHz channel bandwidth)
Definition:
wifi-standards.h:46
ns3::WIFI_PHY_STANDARD_80211n_5GHZ
HT PHY for the 5 GHz band (clause 20)
Definition:
wifi-standards.h:54
ns3::WIFI_STANDARD_80211g
Definition:
wifi-standards.h:140
ns3::WIFI_MAC_STANDARD_80211ac
Definition:
wifi-standards.h:104
ns3::WIFI_STANDARD_80211p
Definition:
wifi-standards.h:141
ns3::WIFI_STANDARD_80211ax_5GHZ
Definition:
wifi-standards.h:146
ns3::WIFI_PHY_STANDARD_80211_10MHZ
OFDM PHY for the 5 GHz band (Clause 17 with 10 MHz channel bandwidth)
Definition:
wifi-standards.h:43
ns3::WIFI_STANDARD_80211ax_2_4GHZ
Definition:
wifi-standards.h:145
wifi-phy-band.h
ns3::WIFI_PHY_STANDARD_80211n_2_4GHZ
HT PHY for the 2.4 GHz band (clause 20)
Definition:
wifi-standards.h:51
ns3::WIFI_PHY_BAND_5GHZ
The 5 GHz band.
Definition:
wifi-phy-band.h:37
ns3::WifiStandardInfo::phyStandard
WifiPhyStandard phyStandard
Definition:
wifi-standards.h:189
ns3::wifiStandards
const std::map< WifiStandard, WifiStandardInfo > wifiStandards
map a given standard configured by the user to the corresponding WifiStandardInfo ...
Definition:
wifi-standards.h:197
ns3::WIFI_MAC_STANDARD_80211ax
Definition:
wifi-standards.h:105
ns3::WifiPhyStandard
WifiPhyStandard
Identifies the PHY specification that a Wifi device is configured to use.
Definition:
wifi-standards.h:33
ns3::WifiStandardInfo::phyBand
WifiPhyBand phyBand
Definition:
wifi-standards.h:190
ns3::WIFI_PHY_STANDARD_80211ax
HE PHY (clause 26)
Definition:
wifi-standards.h:60
ns3::WIFI_STANDARD_80211a
Definition:
wifi-standards.h:138
ns3::WIFI_PHY_STANDARD_80211p
OFDM PHY (Clause 17 - amendment for 10 MHz and 5 MHz channels)
Definition:
wifi-standards.h:48
ns3::WIFI_STANDARD_80211b
Definition:
wifi-standards.h:139
ns3::WIFI_MAC_STANDARD_80211
Definition:
wifi-standards.h:102
ns3::WIFI_STANDARD_80211ax_6GHZ
Definition:
wifi-standards.h:147
ns3::WifiMacStandard
WifiMacStandard
Identifies the MAC specification that a Wifi device is configured to use.
Definition:
wifi-standards.h:100
ns3::operator<<
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
Definition:
angles.cc:42
ns3::WIFI_PHY_STANDARD_80211a
OFDM PHY (Clause 17)
Definition:
wifi-standards.h:36
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::WifiStandard
WifiStandard
Identifies the allowed configurations that a Wifi device is configured to use.
Definition:
wifi-standards.h:136
ns3::WIFI_PHY_STANDARD_80211ac
VHT PHY (clause 22)
Definition:
wifi-standards.h:58
ns3::WIFI_PHY_STANDARD_80211b
DSSS PHY (Clause 15) and HR/DSSS PHY (Clause 18)
Definition:
wifi-standards.h:38
ns3::WIFI_PHY_BAND_2_4GHZ
The 2.4 GHz band.
Definition:
wifi-phy-band.h:35
ns3::WifiStandardInfo
hold PHY and MAC information based on the selected standard.
Definition:
wifi-standards.h:187
ns3::WIFI_STANDARD_80211ac
Definition:
wifi-standards.h:144
ns3::WIFI_PHY_STANDARD_80211n
HT PHY (clause 20)
Definition:
wifi-standards.h:56
ns3::WIFI_PHY_STANDARD_UNSPECIFIED
Unspecified.
Definition:
wifi-standards.h:62
ns3::WifiStandardInfo::macStandard
WifiMacStandard macStandard
Definition:
wifi-standards.h:191
ns3::WifiPhyBand
WifiPhyBand
Identifies the PHY band.
Definition:
wifi-phy-band.h:32
ns3::WIFI_STANDARD_80211n_2_4GHZ
Definition:
wifi-standards.h:142
ns3::WIFI_MAC_STANDARD_80211n
Definition:
wifi-standards.h:103
ns3::WIFI_PHY_BAND_6GHZ
The 6 GHz band.
Definition:
wifi-phy-band.h:39
ns3::WIFI_STANDARD_80211n_5GHZ
Definition:
wifi-standards.h:143
src
wifi
model
wifi-standards.h
Generated on Fri Mar 5 2021 18:22:10 for ns-3 by
1.8.14