wifi: Move definition of WIFI_TU and wifiStandards to source files
This commit is contained in:
@@ -151,6 +151,7 @@ set(source_files
|
||||
model/wifi-remote-station-manager.cc
|
||||
model/wifi-spectrum-phy-interface.cc
|
||||
model/wifi-spectrum-signal-parameters.cc
|
||||
model/wifi-standards.cc
|
||||
model/wifi-tx-current-model.cc
|
||||
model/wifi-tx-parameters.cc
|
||||
model/wifi-tx-timer.cc
|
||||
|
||||
37
src/wifi/model/wifi-standards.cc
Normal file
37
src/wifi/model/wifi-standards.cc
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright (c) 2007 INRIA
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
|
||||
*/
|
||||
|
||||
#include "wifi-standards.h"
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
|
||||
const std::map<WifiStandard, std::list<WifiPhyBand>> wifiStandards = {
|
||||
{WIFI_STANDARD_80211a, {WIFI_PHY_BAND_5GHZ}},
|
||||
{WIFI_STANDARD_80211b, {WIFI_PHY_BAND_2_4GHZ}},
|
||||
{WIFI_STANDARD_80211g, {WIFI_PHY_BAND_2_4GHZ}},
|
||||
{WIFI_STANDARD_80211p, {WIFI_PHY_BAND_5GHZ}},
|
||||
{WIFI_STANDARD_80211n, {WIFI_PHY_BAND_2_4GHZ, WIFI_PHY_BAND_5GHZ}},
|
||||
{WIFI_STANDARD_80211ac, {WIFI_PHY_BAND_5GHZ}},
|
||||
{WIFI_STANDARD_80211ad, {WIFI_PHY_BAND_60GHZ}},
|
||||
{WIFI_STANDARD_80211ax, {WIFI_PHY_BAND_2_4GHZ, WIFI_PHY_BAND_5GHZ, WIFI_PHY_BAND_6GHZ}},
|
||||
{WIFI_STANDARD_80211be, {WIFI_PHY_BAND_2_4GHZ, WIFI_PHY_BAND_5GHZ, WIFI_PHY_BAND_6GHZ}},
|
||||
};
|
||||
|
||||
} // namespace ns3
|
||||
@@ -86,17 +86,7 @@ operator<<(std::ostream& os, WifiStandard standard)
|
||||
/**
|
||||
* \brief map a given standard configured by the user to the allowed PHY bands
|
||||
*/
|
||||
const std::map<WifiStandard, std::list<WifiPhyBand>> wifiStandards = {
|
||||
{WIFI_STANDARD_80211a, {WIFI_PHY_BAND_5GHZ}},
|
||||
{WIFI_STANDARD_80211b, {WIFI_PHY_BAND_2_4GHZ}},
|
||||
{WIFI_STANDARD_80211g, {WIFI_PHY_BAND_2_4GHZ}},
|
||||
{WIFI_STANDARD_80211p, {WIFI_PHY_BAND_5GHZ}},
|
||||
{WIFI_STANDARD_80211n, {WIFI_PHY_BAND_2_4GHZ, WIFI_PHY_BAND_5GHZ}},
|
||||
{WIFI_STANDARD_80211ac, {WIFI_PHY_BAND_5GHZ}},
|
||||
{WIFI_STANDARD_80211ad, {WIFI_PHY_BAND_60GHZ}},
|
||||
{WIFI_STANDARD_80211ax, {WIFI_PHY_BAND_2_4GHZ, WIFI_PHY_BAND_5GHZ, WIFI_PHY_BAND_6GHZ}},
|
||||
{WIFI_STANDARD_80211be, {WIFI_PHY_BAND_2_4GHZ, WIFI_PHY_BAND_5GHZ, WIFI_PHY_BAND_6GHZ}},
|
||||
};
|
||||
extern const std::map<WifiStandard, std::list<WifiPhyBand>> wifiStandards;
|
||||
|
||||
/**
|
||||
* \ingroup wifi
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
namespace ns3
|
||||
{
|
||||
|
||||
const Time WIFI_TU = MicroSeconds(1024);
|
||||
|
||||
double
|
||||
DbToRatio(double dB)
|
||||
{
|
||||
|
||||
@@ -196,7 +196,7 @@ static constexpr uint8_t SINGLE_LINK_OP_ID = 0;
|
||||
static constexpr uint8_t WIFI_LINKID_UNDEFINED = 0xff;
|
||||
|
||||
/// Wi-Fi Time Unit (see IEEE 802.11-2020 sec. 3.1)
|
||||
static const Time WIFI_TU = MicroSeconds(1024);
|
||||
extern const Time WIFI_TU;
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
|
||||
Reference in New Issue
Block a user