wifi: Rework FrequencyChannelInfo as a struct
This commit is contained in:
@@ -283,10 +283,10 @@ ReducedNeighborReport::GetOperatingChannel(std::size_t nbrApInfoId) const
|
||||
|
||||
for (const auto& channel : WifiPhyOperatingChannel::m_frequencyChannels)
|
||||
{
|
||||
if (std::get<2>(channel) == width && std::get<3>(channel) == FrequencyChannelType::OFDM &&
|
||||
std::get<4>(channel) == band &&
|
||||
primaryChannelCenterFrequency > std::get<1>(channel) - width / 2 &&
|
||||
primaryChannelCenterFrequency < std::get<1>(channel) + width / 2)
|
||||
if (channel.width == width && channel.type == FrequencyChannelType::OFDM &&
|
||||
channel.band == band &&
|
||||
primaryChannelCenterFrequency > (channel.frequency - (width / 2)) &&
|
||||
primaryChannelCenterFrequency < (channel.frequency + (width / 2)))
|
||||
{
|
||||
// the center frequency of the primary channel falls into the frequency
|
||||
// range of this channel
|
||||
@@ -304,14 +304,14 @@ ReducedNeighborReport::GetOperatingChannel(std::size_t nbrApInfoId) const
|
||||
switch (width)
|
||||
{
|
||||
case 20:
|
||||
if (std::get<1>(channel) == primaryChannelCenterFrequency)
|
||||
if (channel.frequency == primaryChannelCenterFrequency)
|
||||
{
|
||||
found = true;
|
||||
}
|
||||
break;
|
||||
case 40:
|
||||
if (std::get<1>(channel) == primaryChannelCenterFrequency + 10 ||
|
||||
std::get<1>(channel) == primaryChannelCenterFrequency - 10)
|
||||
if ((channel.frequency == primaryChannelCenterFrequency + 10) ||
|
||||
(channel.frequency == primaryChannelCenterFrequency - 10))
|
||||
{
|
||||
found = true;
|
||||
}
|
||||
@@ -323,8 +323,8 @@ ReducedNeighborReport::GetOperatingChannel(std::size_t nbrApInfoId) const
|
||||
|
||||
if (found)
|
||||
{
|
||||
channelNumber = std::get<0>(channel);
|
||||
frequency = std::get<1>(channel);
|
||||
channelNumber = channel.number;
|
||||
frequency = channel.frequency;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,241 +32,241 @@ namespace ns3
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE("WifiPhyOperatingChannel");
|
||||
|
||||
const std::set<FrequencyChannelInfo> WifiPhyOperatingChannel::m_frequencyChannels = {
|
||||
const std::set<FrequencyChannelInfo> WifiPhyOperatingChannel::m_frequencyChannels = {{
|
||||
// 2.4 GHz channels
|
||||
// 802.11b uses width of 22, while OFDM modes use width of 20
|
||||
{std::make_tuple(1, 2412, 22, FrequencyChannelType::DSSS, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(1, 2412, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(2, 2417, 22, FrequencyChannelType::DSSS, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(2, 2417, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(3, 2422, 22, FrequencyChannelType::DSSS, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(3, 2422, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(4, 2427, 22, FrequencyChannelType::DSSS, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(4, 2427, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(5, 2432, 22, FrequencyChannelType::DSSS, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(5, 2432, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(6, 2437, 22, FrequencyChannelType::DSSS, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(6, 2437, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(7, 2442, 22, FrequencyChannelType::DSSS, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(7, 2442, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(8, 2447, 22, FrequencyChannelType::DSSS, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(8, 2447, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(9, 2452, 22, FrequencyChannelType::DSSS, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(9, 2452, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(10, 2457, 22, FrequencyChannelType::DSSS, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(10, 2457, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(11, 2462, 22, FrequencyChannelType::DSSS, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(11, 2462, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(12, 2467, 22, FrequencyChannelType::DSSS, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(12, 2467, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(13, 2472, 22, FrequencyChannelType::DSSS, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(13, 2472, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{1, 2412, 22, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::DSSS},
|
||||
{1, 2412, 20, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::OFDM},
|
||||
{2, 2417, 22, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::DSSS},
|
||||
{2, 2417, 20, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::OFDM},
|
||||
{3, 2422, 22, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::DSSS},
|
||||
{3, 2422, 20, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::OFDM},
|
||||
{4, 2427, 22, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::DSSS},
|
||||
{4, 2427, 20, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::OFDM},
|
||||
{5, 2432, 22, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::DSSS},
|
||||
{5, 2432, 20, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::OFDM},
|
||||
{6, 2437, 22, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::DSSS},
|
||||
{6, 2437, 20, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::OFDM},
|
||||
{7, 2442, 22, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::DSSS},
|
||||
{7, 2442, 20, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::OFDM},
|
||||
{8, 2447, 22, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::DSSS},
|
||||
{8, 2447, 20, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::OFDM},
|
||||
{9, 2452, 22, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::DSSS},
|
||||
{9, 2452, 20, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::OFDM},
|
||||
{10, 2457, 22, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::DSSS},
|
||||
{10, 2457, 20, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::OFDM},
|
||||
{11, 2462, 22, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::DSSS},
|
||||
{11, 2462, 20, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::OFDM},
|
||||
{12, 2467, 22, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::DSSS},
|
||||
{12, 2467, 20, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::OFDM},
|
||||
{13, 2472, 22, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::DSSS},
|
||||
{13, 2472, 20, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::OFDM},
|
||||
// Only defined for 802.11b
|
||||
{std::make_tuple(14, 2484, 22, FrequencyChannelType::DSSS, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{14, 2484, 22, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::DSSS},
|
||||
// 40 MHz channels
|
||||
{std::make_tuple(3, 2422, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(4, 2427, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(5, 2432, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(6, 2437, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(7, 2442, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(8, 2447, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(9, 2452, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(10, 2457, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{std::make_tuple(11, 2462, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_2_4GHZ)},
|
||||
{3, 2422, 40, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::OFDM},
|
||||
{4, 2427, 40, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::OFDM},
|
||||
{5, 2432, 40, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::OFDM},
|
||||
{6, 2437, 40, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::OFDM},
|
||||
{7, 2442, 40, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::OFDM},
|
||||
{8, 2447, 40, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::OFDM},
|
||||
{9, 2452, 40, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::OFDM},
|
||||
{10, 2457, 40, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::OFDM},
|
||||
{11, 2462, 40, WIFI_PHY_BAND_2_4GHZ, FrequencyChannelType::OFDM},
|
||||
|
||||
// Now the 5 GHz channels used for 802.11a/n/ac/ax/be
|
||||
// 20 MHz channels
|
||||
{std::make_tuple(36, 5180, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(40, 5200, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(44, 5220, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(48, 5240, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(52, 5260, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(56, 5280, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(60, 5300, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(64, 5320, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(100, 5500, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(104, 5520, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(108, 5540, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(112, 5560, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(116, 5580, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(120, 5600, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(124, 5620, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(128, 5640, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(132, 5660, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(136, 5680, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(140, 5700, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(144, 5720, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(149, 5745, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(153, 5765, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(157, 5785, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(161, 5805, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(165, 5825, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(169, 5845, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(173, 5865, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(177, 5885, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(181, 5905, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{36, 5180, 20, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{40, 5200, 20, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{44, 5220, 20, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{48, 5240, 20, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{52, 5260, 20, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{56, 5280, 20, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{60, 5300, 20, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{64, 5320, 20, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{100, 5500, 20, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{104, 5520, 20, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{108, 5540, 20, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{112, 5560, 20, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{116, 5580, 20, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{120, 5600, 20, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{124, 5620, 20, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{128, 5640, 20, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{132, 5660, 20, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{136, 5680, 20, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{140, 5700, 20, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{144, 5720, 20, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{149, 5745, 20, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{153, 5765, 20, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{157, 5785, 20, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{161, 5805, 20, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{165, 5825, 20, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{169, 5845, 20, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{173, 5865, 20, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{177, 5885, 20, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{181, 5905, 20, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
// 40 MHz channels
|
||||
{std::make_tuple(38, 5190, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(46, 5230, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(54, 5270, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(62, 5310, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(102, 5510, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(110, 5550, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(118, 5590, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(126, 5630, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(134, 5670, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(142, 5710, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(151, 5755, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(159, 5795, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(167, 5835, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(175, 5875, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{38, 5190, 40, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{46, 5230, 40, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{54, 5270, 40, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{62, 5310, 40, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{102, 5510, 40, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{110, 5550, 40, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{118, 5590, 40, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{126, 5630, 40, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{134, 5670, 40, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{142, 5710, 40, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{151, 5755, 40, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{159, 5795, 40, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{167, 5835, 40, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{175, 5875, 40, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
// 80 MHz channels
|
||||
{std::make_tuple(42, 5210, 80, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(58, 5290, 80, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(106, 5530, 80, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(122, 5610, 80, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(138, 5690, 80, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(155, 5775, 80, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(171, 5855, 80, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{42, 5210, 80, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{58, 5290, 80, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{106, 5530, 80, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{122, 5610, 80, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{138, 5690, 80, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{155, 5775, 80, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{171, 5855, 80, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
// 160 MHz channels
|
||||
{std::make_tuple(50, 5250, 160, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(114, 5570, 160, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(163, 5815, 160, FrequencyChannelType::OFDM, WIFI_PHY_BAND_5GHZ)},
|
||||
{50, 5250, 160, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{114, 5570, 160, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
{163, 5815, 160, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::OFDM},
|
||||
|
||||
// 802.11p 10 MHz channels at the 5.855-5.925 band
|
||||
{std::make_tuple(172, 5860, 10, FrequencyChannelType::CH_80211P, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(174, 5870, 10, FrequencyChannelType::CH_80211P, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(176, 5880, 10, FrequencyChannelType::CH_80211P, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(178, 5890, 10, FrequencyChannelType::CH_80211P, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(180, 5900, 10, FrequencyChannelType::CH_80211P, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(182, 5910, 10, FrequencyChannelType::CH_80211P, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(184, 5920, 10, FrequencyChannelType::CH_80211P, WIFI_PHY_BAND_5GHZ)},
|
||||
{172, 5860, 10, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::CH_80211P},
|
||||
{174, 5870, 10, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::CH_80211P},
|
||||
{176, 5880, 10, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::CH_80211P},
|
||||
{178, 5890, 10, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::CH_80211P},
|
||||
{180, 5900, 10, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::CH_80211P},
|
||||
{182, 5910, 10, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::CH_80211P},
|
||||
{184, 5920, 10, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::CH_80211P},
|
||||
|
||||
// 802.11p 5 MHz channels at the 5.855-5.925 band (for simplification, we consider the same
|
||||
// center frequencies as the 10 MHz channels)
|
||||
{std::make_tuple(171, 5860, 5, FrequencyChannelType::CH_80211P, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(173, 5870, 5, FrequencyChannelType::CH_80211P, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(175, 5880, 5, FrequencyChannelType::CH_80211P, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(177, 5890, 5, FrequencyChannelType::CH_80211P, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(179, 5900, 5, FrequencyChannelType::CH_80211P, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(181, 5910, 5, FrequencyChannelType::CH_80211P, WIFI_PHY_BAND_5GHZ)},
|
||||
{std::make_tuple(183, 5920, 5, FrequencyChannelType::CH_80211P, WIFI_PHY_BAND_5GHZ)},
|
||||
{171, 5860, 5, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::CH_80211P},
|
||||
{173, 5870, 5, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::CH_80211P},
|
||||
{175, 5880, 5, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::CH_80211P},
|
||||
{177, 5890, 5, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::CH_80211P},
|
||||
{179, 5900, 5, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::CH_80211P},
|
||||
{181, 5910, 5, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::CH_80211P},
|
||||
{183, 5920, 5, WIFI_PHY_BAND_5GHZ, FrequencyChannelType::CH_80211P},
|
||||
|
||||
// Now the 6 GHz channels for 802.11ax/be
|
||||
// 20 MHz channels
|
||||
{std::make_tuple(1, 5955, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(5, 5975, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(9, 5995, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(13, 6015, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(17, 6035, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(21, 6055, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(25, 6075, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(29, 6095, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(33, 6115, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(37, 6135, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(41, 6155, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(45, 6175, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(49, 6195, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(53, 6215, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(57, 6235, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(61, 6255, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(65, 6275, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(69, 6295, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(73, 6315, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(77, 6335, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(81, 6355, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(85, 6375, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(89, 6395, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(93, 6415, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(97, 6435, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(101, 6455, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(105, 6475, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(109, 6495, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(113, 6515, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(117, 6535, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(121, 6555, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(125, 6575, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(129, 6595, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(133, 6615, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(137, 6635, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(141, 6655, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(145, 6675, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(149, 6695, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(153, 6715, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(157, 6735, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(161, 6755, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(165, 6775, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(169, 6795, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(173, 6815, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(177, 6835, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(181, 6855, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(185, 6875, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(189, 6895, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(193, 6915, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(197, 6935, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(201, 6955, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(205, 6975, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(209, 6995, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(213, 7015, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(217, 7035, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(221, 7055, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(225, 7075, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(229, 7095, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(233, 7115, 20, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{1, 5955, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{5, 5975, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{9, 5995, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{13, 6015, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{17, 6035, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{21, 6055, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{25, 6075, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{29, 6095, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{33, 6115, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{37, 6135, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{41, 6155, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{45, 6175, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{49, 6195, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{53, 6215, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{57, 6235, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{61, 6255, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{65, 6275, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{69, 6295, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{73, 6315, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{77, 6335, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{81, 6355, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{85, 6375, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{89, 6395, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{93, 6415, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{97, 6435, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{101, 6455, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{105, 6475, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{109, 6495, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{113, 6515, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{117, 6535, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{121, 6555, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{125, 6575, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{129, 6595, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{133, 6615, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{137, 6635, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{141, 6655, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{145, 6675, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{149, 6695, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{153, 6715, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{157, 6735, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{161, 6755, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{165, 6775, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{169, 6795, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{173, 6815, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{177, 6835, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{181, 6855, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{185, 6875, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{189, 6895, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{193, 6915, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{197, 6935, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{201, 6955, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{205, 6975, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{209, 6995, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{213, 7015, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{217, 7035, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{221, 7055, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{225, 7075, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{229, 7095, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{233, 7115, 20, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
// 40 MHz channels
|
||||
{std::make_tuple(3, 5965, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(11, 6005, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(19, 6045, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(27, 6085, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(35, 6125, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(43, 6165, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(51, 6205, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(59, 6245, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(67, 6285, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(75, 6325, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(83, 6365, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(91, 6405, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(99, 6445, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(107, 6485, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(115, 6525, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(123, 6565, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(131, 6605, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(139, 6645, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(147, 6685, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(155, 6725, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(163, 6765, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(171, 6805, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(179, 6845, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(187, 6885, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(195, 6925, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(203, 6965, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(211, 7005, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(219, 7045, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(227, 7085, 40, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{3, 5965, 40, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{11, 6005, 40, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{19, 6045, 40, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{27, 6085, 40, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{35, 6125, 40, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{43, 6165, 40, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{51, 6205, 40, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{59, 6245, 40, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{67, 6285, 40, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{75, 6325, 40, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{83, 6365, 40, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{91, 6405, 40, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{99, 6445, 40, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{107, 6485, 40, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{115, 6525, 40, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{123, 6565, 40, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{131, 6605, 40, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{139, 6645, 40, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{147, 6685, 40, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{155, 6725, 40, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{163, 6765, 40, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{171, 6805, 40, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{179, 6845, 40, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{187, 6885, 40, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{195, 6925, 40, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{203, 6965, 40, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{211, 7005, 40, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{219, 7045, 40, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{227, 7085, 40, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
// 80 MHz channels
|
||||
{std::make_tuple(7, 5985, 80, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(23, 6065, 80, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(39, 6145, 80, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(55, 6225, 80, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(71, 6305, 80, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(87, 6385, 80, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(103, 6465, 80, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(119, 6545, 80, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(135, 6625, 80, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(151, 6705, 80, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(167, 6785, 80, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(183, 6865, 80, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(199, 6945, 80, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(215, 7025, 80, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{7, 5985, 80, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{23, 6065, 80, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{39, 6145, 80, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{55, 6225, 80, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{71, 6305, 80, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{87, 6385, 80, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{103, 6465, 80, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{119, 6545, 80, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{135, 6625, 80, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{151, 6705, 80, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{167, 6785, 80, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{183, 6865, 80, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{199, 6945, 80, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{215, 7025, 80, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
// 160 MHz channels
|
||||
{std::make_tuple(15, 6025, 160, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(47, 6185, 160, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(79, 6345, 160, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(111, 6505, 160, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(143, 6665, 160, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(175, 6825, 160, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
{std::make_tuple(207, 6985, 160, FrequencyChannelType::OFDM, WIFI_PHY_BAND_6GHZ)},
|
||||
};
|
||||
{15, 6025, 160, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{47, 6185, 160, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{79, 6345, 160, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{111, 6505, 160, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{143, 6665, 160, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{175, 6825, 160, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
{207, 6985, 160, WIFI_PHY_BAND_6GHZ, FrequencyChannelType::OFDM},
|
||||
}};
|
||||
|
||||
WifiPhyOperatingChannel::WifiPhyOperatingChannel()
|
||||
: WifiPhyOperatingChannel(m_frequencyChannels.end())
|
||||
@@ -335,7 +335,7 @@ WifiPhyOperatingChannel::GetDefaultChannelNumber(ChannelWidthMhz width,
|
||||
if (channelIt != m_frequencyChannels.end())
|
||||
{
|
||||
// a channel matches the specified criteria
|
||||
return std::get<0>(*channelIt);
|
||||
return channelIt->number;
|
||||
}
|
||||
|
||||
// if a default channel was not found, throw an exception (mainly for unit testing this code)
|
||||
@@ -353,24 +353,24 @@ WifiPhyOperatingChannel::FindFirst(uint8_t number,
|
||||
{
|
||||
// lambda used to match channels against the specified criteria
|
||||
auto predicate = [&](const FrequencyChannelInfo& channel) {
|
||||
if (number != 0 && std::get<0>(channel) != number)
|
||||
if (number != 0 && channel.number != number)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (frequency != 0 && std::get<1>(channel) != frequency)
|
||||
if (frequency != 0 && channel.frequency != frequency)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (width != 0 && std::get<2>(channel) != width)
|
||||
if (width != 0 && channel.width != width)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (standard != WIFI_STANDARD_UNSPECIFIED &&
|
||||
std::get<3>(channel) != GetFrequencyChannelType(standard))
|
||||
channel.type != GetFrequencyChannelType(standard))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (std::get<4>(channel) != band)
|
||||
if (channel.band != band)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -396,49 +396,49 @@ uint8_t
|
||||
WifiPhyOperatingChannel::GetNumber() const
|
||||
{
|
||||
NS_ASSERT(IsSet());
|
||||
return std::get<0>(*m_channelIt);
|
||||
return m_channelIt->number;
|
||||
}
|
||||
|
||||
uint16_t
|
||||
WifiPhyOperatingChannel::GetFrequency() const
|
||||
{
|
||||
NS_ASSERT(IsSet());
|
||||
return std::get<1>(*m_channelIt);
|
||||
return m_channelIt->frequency;
|
||||
}
|
||||
|
||||
ChannelWidthMhz
|
||||
WifiPhyOperatingChannel::GetWidth() const
|
||||
{
|
||||
NS_ASSERT(IsSet());
|
||||
return std::get<2>(*m_channelIt);
|
||||
return m_channelIt->width;
|
||||
}
|
||||
|
||||
WifiPhyBand
|
||||
WifiPhyOperatingChannel::GetPhyBand() const
|
||||
{
|
||||
NS_ASSERT(IsSet());
|
||||
return std::get<4>(*m_channelIt);
|
||||
return m_channelIt->band;
|
||||
}
|
||||
|
||||
bool
|
||||
WifiPhyOperatingChannel::IsOfdm() const
|
||||
{
|
||||
NS_ASSERT(IsSet());
|
||||
return std::get<FrequencyChannelType>(*m_channelIt) == FrequencyChannelType::OFDM;
|
||||
return (m_channelIt->type == FrequencyChannelType::OFDM);
|
||||
}
|
||||
|
||||
bool
|
||||
WifiPhyOperatingChannel::IsDsss() const
|
||||
{
|
||||
NS_ASSERT(IsSet());
|
||||
return std::get<FrequencyChannelType>(*m_channelIt) == FrequencyChannelType::DSSS;
|
||||
return (m_channelIt->type == FrequencyChannelType::DSSS);
|
||||
}
|
||||
|
||||
bool
|
||||
WifiPhyOperatingChannel::Is80211p() const
|
||||
{
|
||||
NS_ASSERT(IsSet());
|
||||
return std::get<FrequencyChannelType>(*m_channelIt) == FrequencyChannelType::CH_80211P;
|
||||
return (m_channelIt->type == FrequencyChannelType::CH_80211P);
|
||||
}
|
||||
|
||||
WifiChannelWidthType
|
||||
@@ -539,7 +539,7 @@ WifiPhyOperatingChannel::GetPrimaryChannelNumber(ChannelWidthMhz primaryChannelW
|
||||
NS_ASSERT_MSG(IsSet(), "No channel set");
|
||||
auto primaryChanIt = FindFirst(0, frequency, primaryChannelWidth, standard, GetPhyBand());
|
||||
NS_ASSERT_MSG(primaryChanIt != m_frequencyChannels.end(), "Primary channel number not found");
|
||||
return std::get<0>(*primaryChanIt);
|
||||
return primaryChanIt->number;
|
||||
}
|
||||
|
||||
std::set<uint8_t>
|
||||
|
||||
@@ -33,10 +33,25 @@ namespace ns3
|
||||
{
|
||||
|
||||
/**
|
||||
* A tuple (number, frequency, width, type, band) identifying a frequency channel
|
||||
* A structure containing the information about a frequency channel
|
||||
*/
|
||||
using FrequencyChannelInfo =
|
||||
std::tuple<uint8_t, uint16_t, ChannelWidthMhz, FrequencyChannelType, WifiPhyBand>;
|
||||
struct FrequencyChannelInfo
|
||||
{
|
||||
/**
|
||||
* \brief spaceship operator.
|
||||
*
|
||||
* \param info the frequency channel info
|
||||
* \returns -1 if the provided channel info is located at a lower channel number, 0 if the
|
||||
* provided channel info is identical or 1 if the provided channel info is located at a higher
|
||||
* channel number
|
||||
*/
|
||||
auto operator<=>(const FrequencyChannelInfo& info) const = default;
|
||||
uint8_t number{0}; ///< the channel number
|
||||
uint16_t frequency{0}; ///< the center frequency
|
||||
ChannelWidthMhz width{0}; ///< the channel width in MHz
|
||||
WifiPhyBand band{WifiPhyBand::WIFI_PHY_BAND_UNSPECIFIED}; ///< the PHY band
|
||||
FrequencyChannelType type{FrequencyChannelType::OFDM}; ///< the frequency channel type
|
||||
};
|
||||
|
||||
/**
|
||||
* \ingroup wifi
|
||||
|
||||
@@ -664,11 +664,12 @@ SpectrumWifiPhyFilterTest::RunOne()
|
||||
txFrequency = 5250;
|
||||
break;
|
||||
}
|
||||
auto txChannelNum = std::get<0>(*WifiPhyOperatingChannel::FindFirst(0,
|
||||
txFrequency,
|
||||
m_txChannelWidth,
|
||||
WIFI_STANDARD_80211ax,
|
||||
WIFI_PHY_BAND_5GHZ));
|
||||
auto txChannelNum = WifiPhyOperatingChannel::FindFirst(0,
|
||||
txFrequency,
|
||||
m_txChannelWidth,
|
||||
WIFI_STANDARD_80211ax,
|
||||
WIFI_PHY_BAND_5GHZ)
|
||||
->number;
|
||||
m_txPhy->SetOperatingChannel(
|
||||
WifiPhy::ChannelTuple{txChannelNum, m_txChannelWidth, WIFI_PHY_BAND_5GHZ, 0});
|
||||
|
||||
@@ -689,11 +690,12 @@ SpectrumWifiPhyFilterTest::RunOne()
|
||||
rxFrequency = 5250;
|
||||
break;
|
||||
}
|
||||
auto rxChannelNum = std::get<0>(*WifiPhyOperatingChannel::FindFirst(0,
|
||||
rxFrequency,
|
||||
m_rxChannelWidth,
|
||||
WIFI_STANDARD_80211ax,
|
||||
WIFI_PHY_BAND_5GHZ));
|
||||
auto rxChannelNum = WifiPhyOperatingChannel::FindFirst(0,
|
||||
rxFrequency,
|
||||
m_rxChannelWidth,
|
||||
WIFI_STANDARD_80211ax,
|
||||
WIFI_PHY_BAND_5GHZ)
|
||||
->number;
|
||||
m_rxPhy->SetOperatingChannel(
|
||||
WifiPhy::ChannelTuple{rxChannelNum, m_rxChannelWidth, WIFI_PHY_BAND_5GHZ, 0});
|
||||
|
||||
@@ -1276,20 +1278,12 @@ SpectrumWifiPhyMultipleInterfacesTest::DoSetup()
|
||||
for (std::size_t i = 0; i < interfaces.size(); ++i)
|
||||
{
|
||||
auto spectrumChannel = CreateObject<MultiModelSpectrumChannel>();
|
||||
[[maybe_unused]] const auto [channel, frequency, channelWidth, type, band] =
|
||||
(*WifiPhyOperatingChannel::FindFirst(interfaces.at(i).number,
|
||||
0,
|
||||
0,
|
||||
WIFI_STANDARD_80211be,
|
||||
interfaces.at(i).band));
|
||||
|
||||
auto delayModel = CreateObject<ConstantSpeedPropagationDelayModel>();
|
||||
spectrumChannel->SetPropagationDelayModel(delayModel);
|
||||
std::ostringstream oss;
|
||||
oss << "{" << +interfaces.at(i).number << ", 0, " << interfaces.at(i).bandName << ", 0}";
|
||||
phyHelper.Set(i, "ChannelSettings", StringValue(oss.str()));
|
||||
phyHelper.AddChannel(spectrumChannel, interfaces.at(i).range);
|
||||
|
||||
m_spectrumChannels.emplace_back(spectrumChannel);
|
||||
}
|
||||
|
||||
@@ -1552,7 +1546,7 @@ SpectrumWifiPhyMultipleInterfacesTest::DoRun()
|
||||
txPpduPhy->GetPhyBand());
|
||||
for (auto bw = txPpduPhy->GetChannelWidth(); bw >= 20; bw /= 2)
|
||||
{
|
||||
[[maybe_unused]] const auto [channel, frequency, channelWidth, type, band] =
|
||||
const auto& channelInfo =
|
||||
(*WifiPhyOperatingChannel::FindFirst(0,
|
||||
0,
|
||||
bw,
|
||||
@@ -1570,9 +1564,9 @@ SpectrumWifiPhyMultipleInterfacesTest::DoRun()
|
||||
&SpectrumWifiPhyMultipleInterfacesTest::SwitchChannel,
|
||||
this,
|
||||
m_rxPhys.at(j),
|
||||
band,
|
||||
channel,
|
||||
channelWidth,
|
||||
channelInfo.band,
|
||||
channelInfo.number,
|
||||
channelInfo.width,
|
||||
j);
|
||||
for (std::size_t k = 0; k < 4; ++k)
|
||||
{
|
||||
|
||||
@@ -474,13 +474,12 @@ TestNonHtDuplicatePhyReception::DoSetup()
|
||||
|
||||
if (!m_per20MhzInterference.empty())
|
||||
{
|
||||
[[maybe_unused]] auto [channelNum, centerFreq, apChannelWidth, type, phyBand] =
|
||||
(*WifiPhyOperatingChannel::FindFirst(0,
|
||||
m_apFrequency,
|
||||
0,
|
||||
m_apStandard,
|
||||
WIFI_PHY_BAND_5GHZ));
|
||||
NS_ASSERT(m_per20MhzInterference.size() == (apChannelWidth / 20));
|
||||
const auto& channelInfo = (*WifiPhyOperatingChannel::FindFirst(0,
|
||||
m_apFrequency,
|
||||
0,
|
||||
m_apStandard,
|
||||
WIFI_PHY_BAND_5GHZ));
|
||||
NS_ASSERT(m_per20MhzInterference.size() == (channelInfo.width / 20));
|
||||
for (std::size_t i = 0; i < m_per20MhzInterference.size(); ++i)
|
||||
{
|
||||
auto interfererNode = CreateObject<Node>();
|
||||
@@ -524,32 +523,34 @@ TestNonHtDuplicatePhyReception::DoRun()
|
||||
phySta->AssignStreams(streamNumber);
|
||||
}
|
||||
|
||||
[[maybe_unused]] auto [apChannelNum, centerFreq, apChannelWidth, type, phyBand] =
|
||||
(*WifiPhyOperatingChannel::FindFirst(0,
|
||||
m_apFrequency,
|
||||
0,
|
||||
m_apStandard,
|
||||
WIFI_PHY_BAND_5GHZ));
|
||||
m_phyAp->SetOperatingChannel(
|
||||
WifiPhy::ChannelTuple{apChannelNum, apChannelWidth, WIFI_PHY_BAND_5GHZ, m_apP20Index});
|
||||
const auto& apchannelInfo = (*WifiPhyOperatingChannel::FindFirst(0,
|
||||
m_apFrequency,
|
||||
0,
|
||||
m_apStandard,
|
||||
WIFI_PHY_BAND_5GHZ));
|
||||
m_phyAp->SetOperatingChannel(WifiPhy::ChannelTuple{apchannelInfo.number,
|
||||
apchannelInfo.width,
|
||||
WIFI_PHY_BAND_5GHZ,
|
||||
m_apP20Index});
|
||||
|
||||
auto index = 0;
|
||||
for (const auto& [staStandard, staFrequency, staP20Index] : m_stasParams)
|
||||
{
|
||||
[[maybe_unused]] auto [staChannelNum, centerFreq, staChannelWidth, type, phyBand] =
|
||||
(*WifiPhyOperatingChannel::FindFirst(0,
|
||||
staFrequency,
|
||||
0,
|
||||
staStandard,
|
||||
WIFI_PHY_BAND_5GHZ));
|
||||
m_phyStas.at(index++)->SetOperatingChannel(
|
||||
WifiPhy::ChannelTuple{staChannelNum, staChannelWidth, WIFI_PHY_BAND_5GHZ, staP20Index});
|
||||
const auto& stachannelInfo = (*WifiPhyOperatingChannel::FindFirst(0,
|
||||
staFrequency,
|
||||
0,
|
||||
staStandard,
|
||||
WIFI_PHY_BAND_5GHZ));
|
||||
m_phyStas.at(index++)->SetOperatingChannel(WifiPhy::ChannelTuple{stachannelInfo.number,
|
||||
stachannelInfo.width,
|
||||
WIFI_PHY_BAND_5GHZ,
|
||||
staP20Index});
|
||||
}
|
||||
|
||||
index = 0;
|
||||
const auto minApCenterFrequency =
|
||||
m_phyAp->GetFrequency() - (m_phyAp->GetChannelWidth() / 2) + (20 / 2);
|
||||
for (auto channelWidth = 20; channelWidth <= apChannelWidth; channelWidth *= 2, ++index)
|
||||
for (auto channelWidth = 20; channelWidth <= apchannelInfo.width; channelWidth *= 2, ++index)
|
||||
{
|
||||
if (!m_phyInterferers.empty())
|
||||
{
|
||||
@@ -899,8 +900,9 @@ TestMultipleCtsResponsesFromMuRts::DoSetup()
|
||||
m_ctsTxInfosPerSta.cend(),
|
||||
[](const auto& lhs, const auto& rhs) { return lhs.bw < rhs.bw; })
|
||||
->bw;
|
||||
auto apChannelNum = std::get<0>(
|
||||
*WifiPhyOperatingChannel::FindFirst(0, 0, apBw, WIFI_STANDARD_80211ac, WIFI_PHY_BAND_5GHZ));
|
||||
auto apChannelNum =
|
||||
WifiPhyOperatingChannel::FindFirst(0, 0, apBw, WIFI_STANDARD_80211ac, WIFI_PHY_BAND_5GHZ)
|
||||
->number;
|
||||
|
||||
m_phyAp->SetOperatingChannel(WifiPhy::ChannelTuple{apChannelNum, apBw, WIFI_PHY_BAND_5GHZ, 0});
|
||||
|
||||
@@ -929,12 +931,12 @@ TestMultipleCtsResponsesFromMuRts::DoSetup()
|
||||
phySta->SetTxPowerStart(m_stasTxPowerDbm);
|
||||
phySta->SetTxPowerEnd(m_stasTxPowerDbm);
|
||||
|
||||
auto channelNum =
|
||||
std::get<0>(*WifiPhyOperatingChannel::FindFirst(0,
|
||||
0,
|
||||
m_ctsTxInfosPerSta.at(i).bw,
|
||||
WIFI_STANDARD_80211ac,
|
||||
WIFI_PHY_BAND_5GHZ));
|
||||
auto channelNum = WifiPhyOperatingChannel::FindFirst(0,
|
||||
0,
|
||||
m_ctsTxInfosPerSta.at(i).bw,
|
||||
WIFI_STANDARD_80211ac,
|
||||
WIFI_PHY_BAND_5GHZ)
|
||||
->number;
|
||||
|
||||
phySta->SetOperatingChannel(
|
||||
WifiPhy::ChannelTuple{channelNum, m_ctsTxInfosPerSta.at(i).bw, WIFI_PHY_BAND_5GHZ, 0});
|
||||
|
||||
@@ -249,8 +249,9 @@ WifiPhyCcaThresholdsTest::DoSetup()
|
||||
m_phy->SetInterferenceHelper(CreateObject<InterferenceHelper>());
|
||||
m_phy->AddChannel(CreateObject<MultiModelSpectrumChannel>());
|
||||
|
||||
auto channelNum = std::get<0>(
|
||||
*WifiPhyOperatingChannel::FindFirst(0, 0, 160, WIFI_STANDARD_80211ax, WIFI_PHY_BAND_5GHZ));
|
||||
auto channelNum =
|
||||
WifiPhyOperatingChannel::FindFirst(0, 0, 160, WIFI_STANDARD_80211ax, WIFI_PHY_BAND_5GHZ)
|
||||
->number;
|
||||
m_phy->SetOperatingChannel(WifiPhy::ChannelTuple{channelNum, 160, WIFI_PHY_BAND_5GHZ, 0});
|
||||
m_phy->ConfigureStandard(WIFI_STANDARD_80211ax);
|
||||
|
||||
@@ -870,11 +871,12 @@ WifiPhyCcaIndicationTest::SendHeSuPpdu(double txPowerDbm,
|
||||
{
|
||||
NS_LOG_FUNCTION(this << txPowerDbm);
|
||||
|
||||
auto channelNum = std::get<0>(*WifiPhyOperatingChannel::FindFirst(0,
|
||||
frequency,
|
||||
bandwidth,
|
||||
WIFI_STANDARD_80211ax,
|
||||
WIFI_PHY_BAND_5GHZ));
|
||||
auto channelNum = WifiPhyOperatingChannel::FindFirst(0,
|
||||
frequency,
|
||||
bandwidth,
|
||||
WIFI_STANDARD_80211ax,
|
||||
WIFI_PHY_BAND_5GHZ)
|
||||
->number;
|
||||
m_txPhy->SetOperatingChannel(
|
||||
WifiPhy::ChannelTuple{channelNum, bandwidth, WIFI_PHY_BAND_5GHZ, 0});
|
||||
|
||||
@@ -1074,11 +1076,12 @@ WifiPhyCcaIndicationTest::RunOne()
|
||||
m_rxPhy->AssignStreams(streamNumber);
|
||||
m_txPhy->AssignStreams(streamNumber);
|
||||
|
||||
auto channelNum = std::get<0>(*WifiPhyOperatingChannel::FindFirst(0,
|
||||
m_frequency,
|
||||
m_channelWidth,
|
||||
WIFI_STANDARD_80211ax,
|
||||
WIFI_PHY_BAND_5GHZ));
|
||||
auto channelNum = WifiPhyOperatingChannel::FindFirst(0,
|
||||
m_frequency,
|
||||
m_channelWidth,
|
||||
WIFI_STANDARD_80211ax,
|
||||
WIFI_PHY_BAND_5GHZ)
|
||||
->number;
|
||||
|
||||
m_rxPhy->SetOperatingChannel(
|
||||
WifiPhy::ChannelTuple{channelNum, m_channelWidth, WIFI_PHY_BAND_5GHZ, 0});
|
||||
|
||||
@@ -800,11 +800,12 @@ TestDlMuMimoPhyTransmission::RunOne()
|
||||
m_phySta1->AssignStreams(streamNumber);
|
||||
m_phySta2->AssignStreams(streamNumber);
|
||||
|
||||
auto channelNum = std::get<0>(*WifiPhyOperatingChannel::FindFirst(0,
|
||||
m_frequency,
|
||||
m_channelWidth,
|
||||
WIFI_STANDARD_80211ax,
|
||||
WIFI_PHY_BAND_5GHZ));
|
||||
auto channelNum = WifiPhyOperatingChannel::FindFirst(0,
|
||||
m_frequency,
|
||||
m_channelWidth,
|
||||
WIFI_STANDARD_80211ax,
|
||||
WIFI_PHY_BAND_5GHZ)
|
||||
->number;
|
||||
|
||||
m_phyAp->SetOperatingChannel(
|
||||
WifiPhy::ChannelTuple{channelNum, m_channelWidth, WIFI_PHY_BAND_5GHZ, 0});
|
||||
@@ -1708,11 +1709,12 @@ TestUlMuMimoPhyTransmission::RunOne()
|
||||
phy->AssignStreams(streamNumber);
|
||||
}
|
||||
|
||||
auto channelNum = std::get<0>(*WifiPhyOperatingChannel::FindFirst(0,
|
||||
m_frequency,
|
||||
m_channelWidth,
|
||||
WIFI_STANDARD_80211ax,
|
||||
WIFI_PHY_BAND_5GHZ));
|
||||
auto channelNum = WifiPhyOperatingChannel::FindFirst(0,
|
||||
m_frequency,
|
||||
m_channelWidth,
|
||||
WIFI_STANDARD_80211ax,
|
||||
WIFI_PHY_BAND_5GHZ)
|
||||
->number;
|
||||
|
||||
m_phyAp->SetOperatingChannel(
|
||||
WifiPhy::ChannelTuple{channelNum, m_channelWidth, WIFI_PHY_BAND_5GHZ, 0});
|
||||
|
||||
@@ -816,11 +816,12 @@ TestDlOfdmaPhyTransmission::RunOne()
|
||||
m_phySta2->AssignStreams(streamNumber);
|
||||
m_phySta3->AssignStreams(streamNumber);
|
||||
|
||||
auto channelNum = std::get<0>(*WifiPhyOperatingChannel::FindFirst(0,
|
||||
m_frequency,
|
||||
m_channelWidth,
|
||||
WIFI_STANDARD_80211ax,
|
||||
WIFI_PHY_BAND_5GHZ));
|
||||
auto channelNum = WifiPhyOperatingChannel::FindFirst(0,
|
||||
m_frequency,
|
||||
m_channelWidth,
|
||||
WIFI_STANDARD_80211ax,
|
||||
WIFI_PHY_BAND_5GHZ)
|
||||
->number;
|
||||
|
||||
m_phyAp->SetOperatingChannel(
|
||||
WifiPhy::ChannelTuple{channelNum, m_channelWidth, WIFI_PHY_BAND_5GHZ, 0});
|
||||
@@ -1636,11 +1637,12 @@ TestDlOfdmaPhyPuncturing::RunOne()
|
||||
m_phySta1->AssignStreams(streamNumber);
|
||||
m_phySta2->AssignStreams(streamNumber);
|
||||
|
||||
auto channelNum = std::get<0>(*WifiPhyOperatingChannel::FindFirst(0,
|
||||
m_frequency,
|
||||
m_channelWidth,
|
||||
WIFI_STANDARD_80211ax,
|
||||
WIFI_PHY_BAND_5GHZ));
|
||||
auto channelNum = WifiPhyOperatingChannel::FindFirst(0,
|
||||
m_frequency,
|
||||
m_channelWidth,
|
||||
WIFI_STANDARD_80211ax,
|
||||
WIFI_PHY_BAND_5GHZ)
|
||||
->number;
|
||||
|
||||
m_phyAp->SetOperatingChannel(
|
||||
WifiPhy::ChannelTuple{channelNum, m_channelWidth, WIFI_PHY_BAND_5GHZ, 0});
|
||||
@@ -1917,11 +1919,12 @@ TestUlOfdmaPpduUid::DoSetup()
|
||||
m_phyAp->SetErrorRateModel(apErrorModel);
|
||||
m_phyAp->AddChannel(spectrumChannel);
|
||||
m_phyAp->ConfigureStandard(WIFI_STANDARD_80211ax);
|
||||
auto channelNum = std::get<0>(*WifiPhyOperatingChannel::FindFirst(0,
|
||||
DEFAULT_FREQUENCY,
|
||||
DEFAULT_CHANNEL_WIDTH,
|
||||
WIFI_STANDARD_80211ax,
|
||||
WIFI_PHY_BAND_5GHZ));
|
||||
auto channelNum = WifiPhyOperatingChannel::FindFirst(0,
|
||||
DEFAULT_FREQUENCY,
|
||||
DEFAULT_CHANNEL_WIDTH,
|
||||
WIFI_STANDARD_80211ax,
|
||||
WIFI_PHY_BAND_5GHZ)
|
||||
->number;
|
||||
m_phyAp->SetOperatingChannel(
|
||||
WifiPhy::ChannelTuple{channelNum, DEFAULT_CHANNEL_WIDTH, WIFI_PHY_BAND_5GHZ, 0});
|
||||
m_phyAp->SetDevice(apDev);
|
||||
@@ -4122,11 +4125,12 @@ TestUlOfdmaPhyTransmission::RunOne()
|
||||
m_phySta2->AssignStreams(streamNumber);
|
||||
m_phySta3->AssignStreams(streamNumber);
|
||||
|
||||
auto channelNum = std::get<0>(*WifiPhyOperatingChannel::FindFirst(0,
|
||||
m_frequency,
|
||||
m_channelWidth,
|
||||
WIFI_STANDARD_80211ax,
|
||||
WIFI_PHY_BAND_5GHZ));
|
||||
auto channelNum = WifiPhyOperatingChannel::FindFirst(0,
|
||||
m_frequency,
|
||||
m_channelWidth,
|
||||
WIFI_STANDARD_80211ax,
|
||||
WIFI_PHY_BAND_5GHZ)
|
||||
->number;
|
||||
|
||||
m_phyAp->SetOperatingChannel(
|
||||
WifiPhy::ChannelTuple{channelNum, m_channelWidth, WIFI_PHY_BAND_5GHZ, 0});
|
||||
@@ -5095,11 +5099,12 @@ TestPhyPaddingExclusion::DoSetup()
|
||||
m_phyAp->AddChannel(spectrumChannel);
|
||||
m_phyAp->ConfigureStandard(WIFI_STANDARD_80211ax);
|
||||
m_phyAp->AssignStreams(streamNumber);
|
||||
auto channelNum = std::get<0>(*WifiPhyOperatingChannel::FindFirst(0,
|
||||
DEFAULT_FREQUENCY,
|
||||
DEFAULT_CHANNEL_WIDTH,
|
||||
WIFI_STANDARD_80211ax,
|
||||
WIFI_PHY_BAND_5GHZ));
|
||||
auto channelNum = WifiPhyOperatingChannel::FindFirst(0,
|
||||
DEFAULT_FREQUENCY,
|
||||
DEFAULT_CHANNEL_WIDTH,
|
||||
WIFI_STANDARD_80211ax,
|
||||
WIFI_PHY_BAND_5GHZ)
|
||||
->number;
|
||||
|
||||
m_phyAp->SetOperatingChannel(
|
||||
WifiPhy::ChannelTuple{channelNum, DEFAULT_CHANNEL_WIDTH, WIFI_PHY_BAND_5GHZ, 0});
|
||||
|
||||
@@ -4543,21 +4543,28 @@ TestPrimary20CoveredByPpdu::TestPrimary20CoveredByPpdu()
|
||||
Ptr<HePpdu>
|
||||
TestPrimary20CoveredByPpdu::CreatePpdu(uint16_t ppduCenterFreqMhz)
|
||||
{
|
||||
[[maybe_unused]] auto [channelNumber, centerFreq, channelWidth, type, phyBand] =
|
||||
(*WifiPhyOperatingChannel::FindFirst(0,
|
||||
ppduCenterFreqMhz,
|
||||
0,
|
||||
WIFI_STANDARD_80211ax,
|
||||
m_rxPhy->GetPhyBand()));
|
||||
m_txPhy->SetOperatingChannel(WifiPhy::ChannelTuple{channelNumber, channelWidth, phyBand, 0});
|
||||
auto txVector =
|
||||
WifiTxVector(HePhy::GetHeMcs7(), 0, WIFI_PREAMBLE_HE_SU, 800, 1, 1, 0, channelWidth, false);
|
||||
const auto& channelInfo = (*WifiPhyOperatingChannel::FindFirst(0,
|
||||
ppduCenterFreqMhz,
|
||||
0,
|
||||
WIFI_STANDARD_80211ax,
|
||||
m_rxPhy->GetPhyBand()));
|
||||
m_txPhy->SetOperatingChannel(
|
||||
WifiPhy::ChannelTuple{channelInfo.number, channelInfo.width, channelInfo.band, 0});
|
||||
auto txVector = WifiTxVector(HePhy::GetHeMcs7(),
|
||||
0,
|
||||
WIFI_PREAMBLE_HE_SU,
|
||||
800,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
channelInfo.width,
|
||||
false);
|
||||
|
||||
auto pkt = Create<Packet>(1000);
|
||||
WifiMacHeader hdr(WIFI_MAC_QOSDATA);
|
||||
|
||||
auto psdu = Create<WifiPsdu>(pkt, hdr);
|
||||
auto txDuration = m_txPhy->CalculateTxDuration(psdu->GetSize(), txVector, phyBand);
|
||||
auto txDuration = m_txPhy->CalculateTxDuration(psdu->GetSize(), txVector, channelInfo.band);
|
||||
|
||||
return Create<HePpdu>(psdu, txVector, m_txPhy->GetOperatingChannel(), txDuration, 0);
|
||||
}
|
||||
@@ -4599,11 +4606,11 @@ TestPrimary20CoveredByPpdu::RunOne(WifiPhyBand band,
|
||||
bool expectedP20Overlap,
|
||||
bool expectedP20Covered)
|
||||
{
|
||||
[[maybe_unused]] const auto [channelNumber, centerFreq, channelWidth, type, phyBand] =
|
||||
const auto& channelInfo =
|
||||
(*WifiPhyOperatingChannel::FindFirst(0, phyCenterFreqMhz, 0, WIFI_STANDARD_80211ax, band));
|
||||
|
||||
m_rxPhy->SetOperatingChannel(
|
||||
WifiPhy::ChannelTuple{channelNumber, channelWidth, band, p20Index});
|
||||
WifiPhy::ChannelTuple{channelInfo.number, channelInfo.width, channelInfo.band, p20Index});
|
||||
auto p20CenterFreq = m_rxPhy->GetOperatingChannel().GetPrimaryChannelCenterFrequency(20);
|
||||
auto p20MinFreq = p20CenterFreq - 10;
|
||||
auto p20MaxFreq = p20CenterFreq + 10;
|
||||
|
||||
Reference in New Issue
Block a user