A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
wifi-standards.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2007 INRIA
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
18 */
19
20#ifndef WIFI_STANDARD_H
21#define WIFI_STANDARD_H
22
23#include "wifi-phy-band.h"
24
25#include "ns3/abort.h"
26
27#include <list>
28#include <map>
29
30namespace ns3
31{
32
38{
49};
50
58inline std::ostream&
59operator<<(std::ostream& os, WifiStandard standard)
60{
61 switch (standard)
62 {
64 return (os << "802.11a");
66 return (os << "802.11b");
68 return (os << "802.11g");
70 return (os << "802.11p");
72 return (os << "802.11n");
74 return (os << "802.11ac");
76 return (os << "802.11ad");
78 return (os << "802.11ax");
80 return (os << "802.11be");
81 default:
82 return (os << "UNSPECIFIED");
83 }
84}
85
89const std::map<WifiStandard, std::list<WifiPhyBand>> wifiStandards = {
99};
100
106{
111
120{
121 switch (standard)
122 {
127 default:
129 }
130}
131
139inline uint16_t
141{
142 switch (standard)
143 {
145 return 22;
147 return 10;
149 return 80;
151 return 2160;
154 return (band == WIFI_PHY_BAND_2_4GHZ ? 20 : 80);
155 default:
156 return 20;
157 }
158}
159
166inline WifiPhyBand
168{
169 switch (standard)
170 {
176 return WIFI_PHY_BAND_5GHZ;
178 return WIFI_PHY_BAND_60GHZ;
179 default:
181 }
182}
183
184} // namespace ns3
185
186#endif /* WIFI_STANDARD_H */
WifiStandard
Identifies the IEEE 802.11 specifications that a Wifi device can be configured to use.
FrequencyChannelType
Enumeration of frequency channel types.
WifiPhyBand
Identifies the PHY band.
Definition: wifi-phy-band.h:33
@ WIFI_STANDARD_80211a
@ WIFI_STANDARD_80211ad
@ WIFI_STANDARD_80211p
@ WIFI_STANDARD_80211be
@ WIFI_STANDARD_80211n
@ WIFI_STANDARD_80211g
@ WIFI_STANDARD_80211ax
@ WIFI_STANDARD_UNSPECIFIED
@ WIFI_STANDARD_80211ac
@ WIFI_STANDARD_80211b
@ WIFI_PHY_80211p_CHANNEL
@ WIFI_PHY_OFDM_CHANNEL
@ WIFI_PHY_DSSS_CHANNEL
@ WIFI_PHY_BAND_6GHZ
The 6 GHz band.
Definition: wifi-phy-band.h:39
@ WIFI_PHY_BAND_2_4GHZ
The 2.4 GHz band.
Definition: wifi-phy-band.h:35
@ WIFI_PHY_BAND_60GHZ
The 60 GHz band.
Definition: wifi-phy-band.h:41
@ WIFI_PHY_BAND_5GHZ
The 5 GHz band.
Definition: wifi-phy-band.h:37
Every class exported by the ns3 library is enclosed in the ns3 namespace.
const std::map< WifiStandard, std::list< WifiPhyBand > > wifiStandards
map a given standard configured by the user to the allowed PHY bands
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition: angles.cc:129
WifiPhyBand GetDefaultPhyBand(WifiStandard standard)
Get the default PHY band for the given standard.
uint16_t GetDefaultChannelWidth(WifiStandard standard, WifiPhyBand band)
Get the default channel width for the given PHY standard and band.
FrequencyChannelType GetFrequencyChannelType(WifiStandard standard)
Get the type of the frequency channel for the given standard.