A Discrete-Event Network Simulator
qkdnetsim_etsi_014 @ (+)
Home
Tutorials ▼
English
Documentation ▼
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Enumerations
a
c
d
e
f
h
i
l
m
n
o
p
q
r
s
t
v
w
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
Related Functions
:
a
b
c
d
e
g
h
i
j
l
m
n
o
p
q
r
s
t
u
w
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
Enumerator
c
e
i
l
o
r
s
t
v
Macros
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
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 <list>
26
#include "
wifi-phy-band.h
"
27
#include "ns3/abort.h"
28
29
namespace
ns3
{
30
35
enum
WifiStandard
36
{
37
WIFI_STANDARD_UNSPECIFIED
,
38
WIFI_STANDARD_80211a
,
39
WIFI_STANDARD_80211b
,
40
WIFI_STANDARD_80211g
,
41
WIFI_STANDARD_80211p
,
42
WIFI_STANDARD_80211n
,
43
WIFI_STANDARD_80211ac
,
44
WIFI_STANDARD_80211ax
45
};
46
54
inline
std::ostream&
operator<<
(std::ostream& os,
WifiStandard
standard)
55
{
56
switch
(standard)
57
{
58
case
WIFI_STANDARD_80211a
:
59
return
(os <<
"802.11a"
);
60
case
WIFI_STANDARD_80211b
:
61
return
(os <<
"802.11b"
);
62
case
WIFI_STANDARD_80211g
:
63
return
(os <<
"802.11g"
);
64
case
WIFI_STANDARD_80211p
:
65
return
(os <<
"802.11p"
);
66
case
WIFI_STANDARD_80211n
:
67
return
(os <<
"802.11n"
);
68
case
WIFI_STANDARD_80211ac
:
69
return
(os <<
"802.11ac"
);
70
case
WIFI_STANDARD_80211ax
:
71
return
(os <<
"802.11ax"
);
72
default
:
73
return
(os <<
"UNSPECIFIED"
);
74
}
75
}
76
77
81
const
std::map<WifiStandard, std::list<WifiPhyBand>>
wifiStandards
=
82
{
83
{
WIFI_STANDARD_80211a
, {
WIFI_PHY_BAND_5GHZ
} },
84
{
WIFI_STANDARD_80211b
, {
WIFI_PHY_BAND_2_4GHZ
} },
85
{
WIFI_STANDARD_80211g
, {
WIFI_PHY_BAND_2_4GHZ
} },
86
{
WIFI_STANDARD_80211p
, {
WIFI_PHY_BAND_5GHZ
} },
87
{
WIFI_STANDARD_80211n
, {
WIFI_PHY_BAND_2_4GHZ
,
WIFI_PHY_BAND_5GHZ
} },
88
{
WIFI_STANDARD_80211ac
, {
WIFI_PHY_BAND_5GHZ
} },
89
{
WIFI_STANDARD_80211ax
, {
WIFI_PHY_BAND_2_4GHZ
,
WIFI_PHY_BAND_5GHZ
,
WIFI_PHY_BAND_6GHZ
} }
90
};
91
96
enum
FrequencyChannelType
: uint8_t
97
{
98
WIFI_PHY_DSSS_CHANNEL
= 0,
99
WIFI_PHY_OFDM_CHANNEL
,
100
WIFI_PHY_80211p_CHANNEL
101
};
102
109
inline
FrequencyChannelType
GetFrequencyChannelType
(
WifiStandard
standard)
110
{
111
switch
(standard)
112
{
113
case
WIFI_STANDARD_80211b
:
114
return
WIFI_PHY_DSSS_CHANNEL
;
115
case
WIFI_STANDARD_80211p
:
116
return
WIFI_PHY_80211p_CHANNEL
;
117
default
:
118
return
WIFI_PHY_OFDM_CHANNEL
;
119
}
120
}
121
128
inline
uint16_t
GetMaximumChannelWidth
(
WifiStandard
standard)
129
{
130
switch
(standard)
131
{
132
case
WIFI_STANDARD_80211b
:
133
return
22;
134
case
WIFI_STANDARD_80211p
:
135
return
10;
136
case
WIFI_STANDARD_80211a
:
137
case
WIFI_STANDARD_80211g
:
138
return
20;
139
case
WIFI_STANDARD_80211n
:
140
return
40;
141
case
WIFI_STANDARD_80211ac
:
142
case
WIFI_STANDARD_80211ax
:
143
return
160;
144
default
:
145
NS_ABORT_MSG
(
"Unknown standard: "
<< standard);
146
return
0;
147
}
148
}
149
157
inline
uint16_t
GetDefaultChannelWidth
(
WifiStandard
standard,
WifiPhyBand
band)
158
{
159
switch
(standard)
160
{
161
case
WIFI_STANDARD_80211b
:
162
return
22;
163
case
WIFI_STANDARD_80211p
:
164
return
10;
165
case
WIFI_STANDARD_80211ac
:
166
return
80;
167
case
WIFI_STANDARD_80211ax
:
168
return
(band ==
WIFI_PHY_BAND_2_4GHZ
? 20 : 80);
169
default
:
170
return
20;
171
}
172
}
173
180
inline
WifiPhyBand
GetDefaultPhyBand
(
WifiStandard
standard)
181
{
182
switch
(standard)
183
{
184
case
WIFI_STANDARD_80211p
:
185
case
WIFI_STANDARD_80211a
:
186
case
WIFI_STANDARD_80211ac
:
187
case
WIFI_STANDARD_80211ax
:
188
return
WIFI_PHY_BAND_5GHZ
;
189
default
:
190
return
WIFI_PHY_BAND_2_4GHZ
;
191
}
192
}
193
194
}
//namespace ns3
195
196
#endif
/* WIFI_STANDARD_H */
NS_ABORT_MSG
#define NS_ABORT_MSG(msg)
Unconditional abnormal program termination with a message.
Definition:
abort.h:50
ns3::WifiStandard
WifiStandard
Identifies the IEEE 802.11 specifications that a Wifi device can be configured to use.
Definition:
wifi-standards.h:36
ns3::FrequencyChannelType
FrequencyChannelType
Enumeration of frequency channel types.
Definition:
wifi-standards.h:97
ns3::WifiPhyBand
WifiPhyBand
Identifies the PHY band.
Definition:
wifi-phy-band.h:33
ns3::WIFI_STANDARD_80211a
@ WIFI_STANDARD_80211a
Definition:
wifi-standards.h:38
ns3::WIFI_STANDARD_80211p
@ WIFI_STANDARD_80211p
Definition:
wifi-standards.h:41
ns3::WIFI_STANDARD_80211n
@ WIFI_STANDARD_80211n
Definition:
wifi-standards.h:42
ns3::WIFI_STANDARD_80211g
@ WIFI_STANDARD_80211g
Definition:
wifi-standards.h:40
ns3::WIFI_STANDARD_80211ax
@ WIFI_STANDARD_80211ax
Definition:
wifi-standards.h:44
ns3::WIFI_STANDARD_UNSPECIFIED
@ WIFI_STANDARD_UNSPECIFIED
Definition:
wifi-standards.h:37
ns3::WIFI_STANDARD_80211ac
@ WIFI_STANDARD_80211ac
Definition:
wifi-standards.h:43
ns3::WIFI_STANDARD_80211b
@ WIFI_STANDARD_80211b
Definition:
wifi-standards.h:39
ns3::WIFI_PHY_80211p_CHANNEL
@ WIFI_PHY_80211p_CHANNEL
Definition:
wifi-standards.h:100
ns3::WIFI_PHY_OFDM_CHANNEL
@ WIFI_PHY_OFDM_CHANNEL
Definition:
wifi-standards.h:99
ns3::WIFI_PHY_DSSS_CHANNEL
@ WIFI_PHY_DSSS_CHANNEL
Definition:
wifi-standards.h:98
ns3::WIFI_PHY_BAND_6GHZ
@ WIFI_PHY_BAND_6GHZ
The 6 GHz band.
Definition:
wifi-phy-band.h:39
ns3::WIFI_PHY_BAND_2_4GHZ
@ WIFI_PHY_BAND_2_4GHZ
The 2.4 GHz band.
Definition:
wifi-phy-band.h:35
ns3::WIFI_PHY_BAND_5GHZ
@ WIFI_PHY_BAND_5GHZ
The 5 GHz band.
Definition:
wifi-phy-band.h:37
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::wifiStandards
const std::map< WifiStandard, std::list< WifiPhyBand > > wifiStandards
map a given standard configured by the user to the allowed PHY bands
Definition:
wifi-standards.h:81
ns3::GetDefaultPhyBand
WifiPhyBand GetDefaultPhyBand(WifiStandard standard)
Get the default PHY band for the given standard.
Definition:
wifi-standards.h:180
ns3::GetDefaultChannelWidth
uint16_t GetDefaultChannelWidth(WifiStandard standard, WifiPhyBand band)
Get the default channel width for the given PHY standard and band.
Definition:
wifi-standards.h:157
ns3::operator<<
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition:
angles.cc:139
ns3::GetFrequencyChannelType
FrequencyChannelType GetFrequencyChannelType(WifiStandard standard)
Get the type of the frequency channel for the given standard.
Definition:
wifi-standards.h:109
ns3::GetMaximumChannelWidth
uint16_t GetMaximumChannelWidth(WifiStandard standard)
Get the maximum channel width in MHz allowed for the given standard.
Definition:
wifi-standards.h:128
wifi-phy-band.h
src
wifi
model
wifi-standards.h
Generated on Tue Feb 6 2024 19:21:30 for ns-3 by
1.9.1