wifi: Separate wifi standard and PHY band
This commit is contained in:
@@ -179,13 +179,6 @@ MeshHelper::CreateInterface (const WifiPhyHelper &phyHelper, Ptr<Node> node, uin
|
||||
{
|
||||
Ptr<WifiNetDevice> device = CreateObject<WifiNetDevice> ();
|
||||
|
||||
auto it = wifiStandards.find (m_standard);
|
||||
if (it == wifiStandards.end ())
|
||||
{
|
||||
NS_FATAL_ERROR ("Selected standard is not defined!");
|
||||
return device;
|
||||
}
|
||||
|
||||
// this is a const method, but we need to force the correct QoS setting
|
||||
ObjectFactory macObjectFactory = m_mac;
|
||||
macObjectFactory.Set ("QosSupported", BooleanValue (true)); // a mesh station is a QoS station
|
||||
@@ -210,7 +203,7 @@ MeshHelper::CreateInterface (const WifiPhyHelper &phyHelper, Ptr<Node> node, uin
|
||||
ackManager->SetWifiMac (wifiMac);
|
||||
fem->SetAckManager (ackManager);
|
||||
}
|
||||
phy->ConfigureStandard (it->second.phyStandard);
|
||||
phy->ConfigureStandard (m_standard);
|
||||
device->SetMac (mac);
|
||||
device->SetPhy (phy);
|
||||
device->SetRemoteStationManager (manager);
|
||||
|
||||
@@ -128,7 +128,7 @@ Issue211Test::DoRun (void)
|
||||
phy.SetChannel (spectrumChannel);
|
||||
|
||||
WifiHelper wifi;
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n);
|
||||
wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
|
||||
"DataMode", StringValue ("HtMcs0"),
|
||||
"ControlMode", StringValue ("HtMcs0"));
|
||||
|
||||
@@ -382,7 +382,7 @@ WaveHelper::Install (const WifiPhyHelper &phyHelper, const WifiMacHelper &macHe
|
||||
for (uint32_t j = 0; j != m_physNumber; ++j)
|
||||
{
|
||||
Ptr<WifiPhy> phy = phyHelper.Create (node, device);
|
||||
phy->ConfigureStandard (WIFI_PHY_STANDARD_80211p);
|
||||
phy->ConfigureStandard (WIFI_STANDARD_80211p);
|
||||
phy->SetOperatingChannel (WifiPhy::ChannelTuple {ChannelManager::GetCch (), 0,
|
||||
WIFI_PHY_BAND_5GHZ, 0});
|
||||
device->AddPhy (phy);
|
||||
|
||||
@@ -1210,11 +1210,11 @@ int main (int argc, char *argv[])
|
||||
{
|
||||
if (frequency == 2.4)
|
||||
{
|
||||
wifiStandard = WIFI_STANDARD_80211n_2_4GHZ;
|
||||
wifiStandard = WIFI_STANDARD_80211n;
|
||||
}
|
||||
else if (frequency == 5)
|
||||
{
|
||||
wifiStandard = WIFI_STANDARD_80211n_5GHZ;
|
||||
wifiStandard = WIFI_STANDARD_80211n;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1230,15 +1230,15 @@ int main (int argc, char *argv[])
|
||||
{
|
||||
if (frequency == 2.4)
|
||||
{
|
||||
wifiStandard = WIFI_STANDARD_80211ax_2_4GHZ;
|
||||
wifiStandard = WIFI_STANDARD_80211ax;
|
||||
}
|
||||
else if (frequency == 5)
|
||||
{
|
||||
wifiStandard = WIFI_STANDARD_80211ax_5GHZ;
|
||||
wifiStandard = WIFI_STANDARD_80211ax;
|
||||
}
|
||||
else if (frequency == 6)
|
||||
{
|
||||
wifiStandard = WIFI_STANDARD_80211ax_6GHZ;
|
||||
wifiStandard = WIFI_STANDARD_80211ax;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -212,13 +212,13 @@ int main (int argc, char *argv[])
|
||||
{
|
||||
if (serverChannelWidth == 0)
|
||||
{
|
||||
serverChannelWidth = GetDefaultChannelWidth (WIFI_PHY_STANDARD_80211b, WIFI_PHY_BAND_2_4GHZ);
|
||||
serverChannelWidth = GetDefaultChannelWidth (WIFI_STANDARD_80211b, WIFI_PHY_BAND_2_4GHZ);
|
||||
}
|
||||
NS_ABORT_MSG_IF (serverChannelWidth != 22 && serverChannelWidth != 22, "Invalid channel width for standard " << standard);
|
||||
NS_ABORT_MSG_IF (serverNss != 1, "Invalid nss for standard " << standard);
|
||||
if (clientChannelWidth == 0)
|
||||
{
|
||||
clientChannelWidth = GetDefaultChannelWidth (WIFI_PHY_STANDARD_80211b, WIFI_PHY_BAND_2_4GHZ);
|
||||
clientChannelWidth = GetDefaultChannelWidth (WIFI_STANDARD_80211b, WIFI_PHY_BAND_2_4GHZ);
|
||||
}
|
||||
NS_ABORT_MSG_IF (clientChannelWidth != 22 && clientChannelWidth != 22, "Invalid channel width for standard " << standard);
|
||||
NS_ABORT_MSG_IF (clientNss != 1, "Invalid nss for standard " << standard);
|
||||
@@ -227,13 +227,13 @@ int main (int argc, char *argv[])
|
||||
{
|
||||
if (serverChannelWidth == 0)
|
||||
{
|
||||
serverChannelWidth = GetDefaultChannelWidth (WIFI_PHY_STANDARD_80211g, WIFI_PHY_BAND_2_4GHZ);
|
||||
serverChannelWidth = GetDefaultChannelWidth (WIFI_STANDARD_80211g, WIFI_PHY_BAND_2_4GHZ);
|
||||
}
|
||||
NS_ABORT_MSG_IF (serverChannelWidth != 20, "Invalid channel width for standard " << standard);
|
||||
NS_ABORT_MSG_IF (serverNss != 1, "Invalid nss for standard " << standard);
|
||||
if (clientChannelWidth == 0)
|
||||
{
|
||||
clientChannelWidth = GetDefaultChannelWidth (WIFI_PHY_STANDARD_80211g, WIFI_PHY_BAND_2_4GHZ);
|
||||
clientChannelWidth = GetDefaultChannelWidth (WIFI_STANDARD_80211g, WIFI_PHY_BAND_2_4GHZ);
|
||||
}
|
||||
NS_ABORT_MSG_IF (clientChannelWidth != 20, "Invalid channel width for standard " << standard);
|
||||
NS_ABORT_MSG_IF (clientNss != 1, "Invalid nss for standard " << standard);
|
||||
@@ -243,13 +243,13 @@ int main (int argc, char *argv[])
|
||||
WifiPhyBand band = (standard == "802.11n-2.4GHz" ? WIFI_PHY_BAND_2_4GHZ : WIFI_PHY_BAND_5GHZ);
|
||||
if (serverChannelWidth == 0)
|
||||
{
|
||||
serverChannelWidth = GetDefaultChannelWidth (WIFI_PHY_STANDARD_80211n, band);
|
||||
serverChannelWidth = GetDefaultChannelWidth (WIFI_STANDARD_80211n, band);
|
||||
}
|
||||
NS_ABORT_MSG_IF (serverChannelWidth != 20 && serverChannelWidth != 40, "Invalid channel width for standard " << standard);
|
||||
NS_ABORT_MSG_IF (serverNss == 0 || serverNss > 4, "Invalid nss " << serverNss << " for standard " << standard);
|
||||
if (clientChannelWidth == 0)
|
||||
{
|
||||
clientChannelWidth = GetDefaultChannelWidth (WIFI_PHY_STANDARD_80211n, band);
|
||||
clientChannelWidth = GetDefaultChannelWidth (WIFI_STANDARD_80211n, band);
|
||||
}
|
||||
NS_ABORT_MSG_IF (clientChannelWidth != 20 && clientChannelWidth != 40, "Invalid channel width for standard " << standard);
|
||||
NS_ABORT_MSG_IF (clientNss == 0 || clientNss > 4, "Invalid nss " << clientNss << " for standard " << standard);
|
||||
@@ -258,13 +258,13 @@ int main (int argc, char *argv[])
|
||||
{
|
||||
if (serverChannelWidth == 0)
|
||||
{
|
||||
serverChannelWidth = GetDefaultChannelWidth (WIFI_PHY_STANDARD_80211ac, WIFI_PHY_BAND_5GHZ);
|
||||
serverChannelWidth = GetDefaultChannelWidth (WIFI_STANDARD_80211ac, WIFI_PHY_BAND_5GHZ);
|
||||
}
|
||||
NS_ABORT_MSG_IF (serverChannelWidth != 20 && serverChannelWidth != 40 && serverChannelWidth != 80 && serverChannelWidth != 160, "Invalid channel width for standard " << standard);
|
||||
NS_ABORT_MSG_IF (serverNss == 0 || serverNss > 4, "Invalid nss " << serverNss << " for standard " << standard);
|
||||
if (clientChannelWidth == 0)
|
||||
{
|
||||
clientChannelWidth = GetDefaultChannelWidth (WIFI_PHY_STANDARD_80211ac, WIFI_PHY_BAND_5GHZ);
|
||||
clientChannelWidth = GetDefaultChannelWidth (WIFI_STANDARD_80211ac, WIFI_PHY_BAND_5GHZ);
|
||||
}
|
||||
NS_ABORT_MSG_IF (clientChannelWidth != 20 && clientChannelWidth != 40 && clientChannelWidth != 80 && clientChannelWidth != 160, "Invalid channel width for standard " << standard);
|
||||
NS_ABORT_MSG_IF (clientNss == 0 || clientNss > 4, "Invalid nss " << clientNss << " for standard " << standard);
|
||||
@@ -274,13 +274,13 @@ int main (int argc, char *argv[])
|
||||
WifiPhyBand band = (standard == "802.11ax-2.4GHz" ? WIFI_PHY_BAND_2_4GHZ : standard == "802.11ax-6GHz" ? WIFI_PHY_BAND_6GHZ : WIFI_PHY_BAND_5GHZ);
|
||||
if (serverChannelWidth == 0)
|
||||
{
|
||||
serverChannelWidth = GetDefaultChannelWidth (WIFI_PHY_STANDARD_80211ax, band);
|
||||
serverChannelWidth = GetDefaultChannelWidth (WIFI_STANDARD_80211ax, band);
|
||||
}
|
||||
NS_ABORT_MSG_IF (serverChannelWidth != 20 && serverChannelWidth != 40 && serverChannelWidth != 80 && serverChannelWidth != 160, "Invalid channel width for standard " << standard);
|
||||
NS_ABORT_MSG_IF (serverNss == 0 || serverNss > 4, "Invalid nss " << serverNss << " for standard " << standard);
|
||||
if (clientChannelWidth == 0)
|
||||
{
|
||||
clientChannelWidth = GetDefaultChannelWidth (WIFI_PHY_STANDARD_80211ax, band);
|
||||
clientChannelWidth = GetDefaultChannelWidth (WIFI_STANDARD_80211ax, band);
|
||||
}
|
||||
NS_ABORT_MSG_IF (clientChannelWidth != 20 && clientChannelWidth != 40 && clientChannelWidth != 80 && clientChannelWidth != 160, "Invalid channel width for standard " << standard);
|
||||
NS_ABORT_MSG_IF (clientNss == 0 || clientNss > 4, "Invalid nss " << clientNss << " for standard " << standard);
|
||||
@@ -296,26 +296,26 @@ int main (int argc, char *argv[])
|
||||
serverStandards.push_back (StandardInfo ("802.11a", WIFI_STANDARD_80211a, WIFI_PHY_BAND_5GHZ, 20, 3, 27, 0, 30, 60));
|
||||
serverStandards.push_back (StandardInfo ("802.11b", WIFI_STANDARD_80211b, WIFI_PHY_BAND_2_4GHZ, 22, -5, 11, -6, 15, 15));
|
||||
serverStandards.push_back (StandardInfo ("802.11g", WIFI_STANDARD_80211g, WIFI_PHY_BAND_2_4GHZ, 20, -5, 27, -6, 30, 60));
|
||||
serverStandards.push_back (StandardInfo ("802.11n-5GHz", WIFI_STANDARD_80211n_5GHZ, WIFI_PHY_BAND_5GHZ, serverChannelWidth, 3, 30, 0, 35, 80 * channelRateFactor));
|
||||
serverStandards.push_back (StandardInfo ("802.11n-2.4GHz", WIFI_STANDARD_80211n_2_4GHZ, WIFI_PHY_BAND_2_4GHZ, serverChannelWidth, 3, 30, 0, 35, 80 * channelRateFactor));
|
||||
serverStandards.push_back (StandardInfo ("802.11n-5GHz", WIFI_STANDARD_80211n, WIFI_PHY_BAND_5GHZ, serverChannelWidth, 3, 30, 0, 35, 80 * channelRateFactor));
|
||||
serverStandards.push_back (StandardInfo ("802.11n-2.4GHz", WIFI_STANDARD_80211n, WIFI_PHY_BAND_2_4GHZ, serverChannelWidth, 3, 30, 0, 35, 80 * channelRateFactor));
|
||||
serverStandards.push_back (StandardInfo ("802.11ac", WIFI_STANDARD_80211ac, WIFI_PHY_BAND_5GHZ, serverChannelWidth, 5, 50, 0, 55, 120 * channelRateFactor));
|
||||
serverStandards.push_back (StandardInfo ("802.11p-10MHz", WIFI_STANDARD_80211p, WIFI_PHY_BAND_5GHZ, 10, 3, 27, 0, 30, 60));
|
||||
serverStandards.push_back (StandardInfo ("802.11p-5MHz", WIFI_STANDARD_80211p, WIFI_PHY_BAND_5GHZ, 5, 3, 27, 0, 30, 60));
|
||||
serverStandards.push_back (StandardInfo ("802.11ax-6GHz", WIFI_STANDARD_80211ax_6GHZ, WIFI_PHY_BAND_6GHZ, serverChannelWidth, 5, 55, 0, 60, 120 * channelRateFactor));
|
||||
serverStandards.push_back (StandardInfo ("802.11ax-5GHz", WIFI_STANDARD_80211ax_5GHZ, WIFI_PHY_BAND_5GHZ, serverChannelWidth, 5, 55, 0, 60, 120 * channelRateFactor));
|
||||
serverStandards.push_back (StandardInfo ("802.11ax-2.4GHz", WIFI_STANDARD_80211ax_2_4GHZ, WIFI_PHY_BAND_2_4GHZ, serverChannelWidth, 5, 55, 0, 60, 120 * channelRateFactor));
|
||||
serverStandards.push_back (StandardInfo ("802.11ax-6GHz", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_6GHZ, serverChannelWidth, 5, 55, 0, 60, 120 * channelRateFactor));
|
||||
serverStandards.push_back (StandardInfo ("802.11ax-5GHz", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_5GHZ, serverChannelWidth, 5, 55, 0, 60, 120 * channelRateFactor));
|
||||
serverStandards.push_back (StandardInfo ("802.11ax-2.4GHz", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_2_4GHZ, serverChannelWidth, 5, 55, 0, 60, 120 * channelRateFactor));
|
||||
|
||||
clientStandards.push_back (StandardInfo ("802.11a", WIFI_STANDARD_80211a, WIFI_PHY_BAND_5GHZ, 20, 3, 27, 0, 30, 60));
|
||||
clientStandards.push_back (StandardInfo ("802.11b", WIFI_STANDARD_80211b, WIFI_PHY_BAND_2_4GHZ, 22, -5, 11, -6, 15, 15));
|
||||
clientStandards.push_back (StandardInfo ("802.11g", WIFI_STANDARD_80211g, WIFI_PHY_BAND_2_4GHZ, 20, -5, 27, -6, 30, 60));
|
||||
clientStandards.push_back (StandardInfo ("802.11n-5GHz", WIFI_STANDARD_80211n_5GHZ, WIFI_PHY_BAND_5GHZ, clientChannelWidth, 3, 30, 0, 35, 80 * channelRateFactor));
|
||||
clientStandards.push_back (StandardInfo ("802.11n-2.4GHz", WIFI_STANDARD_80211n_2_4GHZ, WIFI_PHY_BAND_2_4GHZ, clientChannelWidth, 3, 30, 0, 35, 80 * channelRateFactor));
|
||||
clientStandards.push_back (StandardInfo ("802.11n-5GHz", WIFI_STANDARD_80211n, WIFI_PHY_BAND_5GHZ, clientChannelWidth, 3, 30, 0, 35, 80 * channelRateFactor));
|
||||
clientStandards.push_back (StandardInfo ("802.11n-2.4GHz", WIFI_STANDARD_80211n, WIFI_PHY_BAND_2_4GHZ, clientChannelWidth, 3, 30, 0, 35, 80 * channelRateFactor));
|
||||
clientStandards.push_back (StandardInfo ("802.11ac", WIFI_STANDARD_80211ac, WIFI_PHY_BAND_5GHZ, clientChannelWidth, 5, 50, 0, 55, 120 * channelRateFactor));
|
||||
clientStandards.push_back (StandardInfo ("802.11p-10MHz", WIFI_STANDARD_80211p, WIFI_PHY_BAND_5GHZ, 10, 3, 27, 0, 30, 60));
|
||||
clientStandards.push_back (StandardInfo ("802.11p-5MHz", WIFI_STANDARD_80211p, WIFI_PHY_BAND_5GHZ, 5, 3, 27, 0, 30, 60));
|
||||
clientStandards.push_back (StandardInfo ("802.11ax-6GHz", WIFI_STANDARD_80211ax_6GHZ, WIFI_PHY_BAND_6GHZ, clientChannelWidth, 5, 55, 0, 60, 160 * channelRateFactor));
|
||||
clientStandards.push_back (StandardInfo ("802.11ax-5GHz", WIFI_STANDARD_80211ax_5GHZ, WIFI_PHY_BAND_5GHZ, clientChannelWidth, 5, 55, 0, 60, 160 * channelRateFactor));
|
||||
clientStandards.push_back (StandardInfo ("802.11ax-2.4GHz", WIFI_STANDARD_80211ax_2_4GHZ, WIFI_PHY_BAND_2_4GHZ, clientChannelWidth, 5, 55, 0, 60, 160 * channelRateFactor));
|
||||
clientStandards.push_back (StandardInfo ("802.11ax-6GHz", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_6GHZ, clientChannelWidth, 5, 55, 0, 60, 160 * channelRateFactor));
|
||||
clientStandards.push_back (StandardInfo ("802.11ax-5GHz", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_5GHZ, clientChannelWidth, 5, 55, 0, 60, 160 * channelRateFactor));
|
||||
clientStandards.push_back (StandardInfo ("802.11ax-2.4GHz", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_2_4GHZ, clientChannelWidth, 5, 55, 0, 60, 160 * channelRateFactor));
|
||||
|
||||
for (std::vector<StandardInfo>::size_type i = 0; i != serverStandards.size (); i++)
|
||||
{
|
||||
|
||||
@@ -145,7 +145,7 @@ int main (int argc, char *argv[])
|
||||
PrintAttributesIfEnabled (printAttributes);
|
||||
break;
|
||||
case 4:
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n);
|
||||
phy.Set ("ChannelSettings", StringValue ("{0, 0, BAND_5GHZ, 0}"));
|
||||
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
|
||||
apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
|
||||
@@ -157,7 +157,7 @@ int main (int argc, char *argv[])
|
||||
PrintAttributesIfEnabled (printAttributes);
|
||||
break;
|
||||
case 5:
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n_2_4GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n);
|
||||
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
|
||||
apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
|
||||
phySta = GetYansWifiPhyPtr (staDevice);
|
||||
@@ -179,7 +179,7 @@ int main (int argc, char *argv[])
|
||||
PrintAttributesIfEnabled (printAttributes);
|
||||
break;
|
||||
case 7:
|
||||
wifi.SetStandard (WIFI_STANDARD_80211ax_2_4GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211ax);
|
||||
phy.Set ("ChannelSettings", StringValue ("{0, 0, BAND_2_4GHZ, 0}"));
|
||||
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
|
||||
apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
|
||||
@@ -191,7 +191,7 @@ int main (int argc, char *argv[])
|
||||
PrintAttributesIfEnabled (printAttributes);
|
||||
break;
|
||||
case 8:
|
||||
wifi.SetStandard (WIFI_STANDARD_80211ax_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211ax);
|
||||
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
|
||||
apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
|
||||
phySta = GetYansWifiPhyPtr (staDevice);
|
||||
@@ -202,7 +202,7 @@ int main (int argc, char *argv[])
|
||||
PrintAttributesIfEnabled (printAttributes);
|
||||
break;
|
||||
case 9:
|
||||
wifi.SetStandard (WIFI_STANDARD_80211ax_6GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211ax);
|
||||
phy.Set ("ChannelSettings", StringValue ("{0, 0, BAND_6GHZ, 0}"));
|
||||
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
|
||||
apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
|
||||
@@ -238,7 +238,7 @@ int main (int argc, char *argv[])
|
||||
PrintAttributesIfEnabled (printAttributes);
|
||||
break;
|
||||
case 12:
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n);
|
||||
phy.Set ("ChannelSettings", StringValue ("{44, 20, BAND_5GHZ, 0}"));
|
||||
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
|
||||
apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
|
||||
@@ -250,7 +250,7 @@ int main (int argc, char *argv[])
|
||||
PrintAttributesIfEnabled (printAttributes);
|
||||
break;
|
||||
case 13:
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n);
|
||||
phy.Set ("ChannelSettings", StringValue ("{44, 0, BAND_5GHZ, 0}"));
|
||||
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
|
||||
apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
|
||||
@@ -265,7 +265,7 @@ int main (int argc, char *argv[])
|
||||
PrintAttributesIfEnabled (printAttributes);
|
||||
break;
|
||||
case 14:
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n);
|
||||
phy.Set ("ChannelSettings", StringValue ("{44, 0, BAND_5GHZ, 0}"));
|
||||
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
|
||||
apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
|
||||
@@ -280,7 +280,7 @@ int main (int argc, char *argv[])
|
||||
break;
|
||||
case 15:
|
||||
Config::SetDefault ("ns3::WifiPhy::ChannelSettings", StringValue ("{44, 0, BAND_5GHZ, 0}"));
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n);
|
||||
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
|
||||
apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
|
||||
phySta = GetYansWifiPhyPtr (staDevice);
|
||||
@@ -295,7 +295,7 @@ int main (int argc, char *argv[])
|
||||
case 16:
|
||||
// Test that setting channel number to a non-standard value will throw an exception
|
||||
Config::SetDefault ("ns3::WifiPhy::ChannelSettings", StringValue ("{45, 0, BAND_5GHZ, 0}"));
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n);
|
||||
exceptionThrown = false;
|
||||
try
|
||||
{
|
||||
@@ -322,7 +322,7 @@ int main (int argc, char *argv[])
|
||||
// Test that setting Frequency to a standard value will set the
|
||||
// channel number correctly
|
||||
Config::SetDefault ("ns3::WifiPhy::ChannelSettings", StringValue ("{100, 0, BAND_5GHZ, 0}"));
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n);
|
||||
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
|
||||
apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
|
||||
phySta = GetYansWifiPhyPtr (staDevice);
|
||||
@@ -334,7 +334,7 @@ int main (int argc, char *argv[])
|
||||
break;
|
||||
case 18:
|
||||
// Set a wrong channel after initialization
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n);
|
||||
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
|
||||
apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
|
||||
phySta = GetYansWifiPhyPtr (staDevice);
|
||||
@@ -352,7 +352,7 @@ int main (int argc, char *argv[])
|
||||
break;
|
||||
case 19:
|
||||
// Test how channel number behaves when frequency is non-standard
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n);
|
||||
phy.Set ("ChannelSettings", StringValue ("{44, 0, BAND_5GHZ, 0}"));
|
||||
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
|
||||
apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
|
||||
@@ -393,7 +393,7 @@ int main (int argc, char *argv[])
|
||||
case 20:
|
||||
// Set both channel and frequency to consistent values before initialization
|
||||
Config::SetDefault ("ns3::WifiPhy::ChannelSettings", StringValue ("{40, 0, BAND_5GHZ, 0}"));
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n);
|
||||
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
|
||||
apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
|
||||
phySta = GetYansWifiPhyPtr (staDevice);
|
||||
@@ -401,7 +401,7 @@ int main (int argc, char *argv[])
|
||||
NS_ASSERT (phySta->GetChannelWidth () == 20);
|
||||
NS_ASSERT (phySta->GetFrequency () == 5200);
|
||||
// Set both channel and frequency to consistent values after initialization
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n);
|
||||
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
|
||||
apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
|
||||
phySta = GetYansWifiPhyPtr (staDevice);
|
||||
|
||||
@@ -134,8 +134,8 @@ PsrExperiment::Run (struct PsrExperiment::Input input)
|
||||
tx->SetMobility (posTx);
|
||||
rx->SetMobility (posRx);
|
||||
|
||||
tx->ConfigureStandard (WIFI_PHY_STANDARD_80211a);
|
||||
rx->ConfigureStandard (WIFI_PHY_STANDARD_80211a);
|
||||
tx->ConfigureStandard (WIFI_STANDARD_80211a);
|
||||
rx->ConfigureStandard (WIFI_STANDARD_80211a);
|
||||
|
||||
rx->SetReceiveOkCallback (MakeCallback (&PsrExperiment::Receive, this));
|
||||
|
||||
@@ -300,9 +300,9 @@ CollisionExperiment::Run (struct CollisionExperiment::Input input)
|
||||
txB->SetMobility (posTxB);
|
||||
rx->SetMobility (posRx);
|
||||
|
||||
txA->ConfigureStandard (WIFI_PHY_STANDARD_80211a);
|
||||
txB->ConfigureStandard (WIFI_PHY_STANDARD_80211a);
|
||||
rx->ConfigureStandard (WIFI_PHY_STANDARD_80211a);
|
||||
txA->ConfigureStandard (WIFI_STANDARD_80211a);
|
||||
txB->ConfigureStandard (WIFI_STANDARD_80211a);
|
||||
rx->ConfigureStandard (WIFI_STANDARD_80211a);
|
||||
|
||||
rx->SetReceiveOkCallback (MakeCallback (&CollisionExperiment::Receive, this));
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ public:
|
||||
uint16_t channelB; ///< channel number B
|
||||
uint16_t widthA; ///< channel width A
|
||||
uint16_t widthB; ///< channel width B
|
||||
WifiPhyStandard standard; ///< standard
|
||||
WifiStandard standard; ///< standard
|
||||
WifiPhyBand band; ///< band
|
||||
WifiPreamble preamble; ///< preamble
|
||||
bool captureEnabled; ///< whether physical layer capture is enabled
|
||||
@@ -202,7 +202,7 @@ InterferenceExperiment::Input::Input ()
|
||||
channelB (36),
|
||||
widthA (20),
|
||||
widthB (20),
|
||||
standard (WIFI_PHY_STANDARD_80211a),
|
||||
standard (WIFI_STANDARD_80211a),
|
||||
band (WIFI_PHY_BAND_5GHZ),
|
||||
preamble (WIFI_PREAMBLE_LONG),
|
||||
captureEnabled (false),
|
||||
@@ -343,62 +343,62 @@ int main (int argc, char *argv[])
|
||||
|
||||
if (str_standard == "WIFI_PHY_STANDARD_80211a")
|
||||
{
|
||||
input.standard = WIFI_PHY_STANDARD_80211a;
|
||||
input.standard = WIFI_STANDARD_80211a;
|
||||
input.band = WIFI_PHY_BAND_5GHZ;
|
||||
}
|
||||
else if (str_standard == "WIFI_PHY_STANDARD_80211b")
|
||||
{
|
||||
input.standard = WIFI_PHY_STANDARD_80211b;
|
||||
input.standard = WIFI_STANDARD_80211b;
|
||||
input.band = WIFI_PHY_BAND_2_4GHZ;
|
||||
}
|
||||
else if (str_standard == "WIFI_PHY_STANDARD_80211g")
|
||||
{
|
||||
input.standard = WIFI_PHY_STANDARD_80211g;
|
||||
input.standard = WIFI_STANDARD_80211g;
|
||||
input.band = WIFI_PHY_BAND_2_4GHZ;
|
||||
}
|
||||
else if (str_standard == "WIFI_PHY_STANDARD_80211n_2_4GHZ")
|
||||
{
|
||||
input.standard = WIFI_PHY_STANDARD_80211n;
|
||||
input.standard = WIFI_STANDARD_80211n;
|
||||
input.band = WIFI_PHY_BAND_2_4GHZ;
|
||||
}
|
||||
else if (str_standard == "WIFI_PHY_STANDARD_80211n_5GHZ")
|
||||
{
|
||||
input.standard = WIFI_PHY_STANDARD_80211n;
|
||||
input.standard = WIFI_STANDARD_80211n;
|
||||
input.band = WIFI_PHY_BAND_5GHZ;
|
||||
}
|
||||
else if (str_standard == "WIFI_PHY_STANDARD_80211ac")
|
||||
{
|
||||
input.standard = WIFI_PHY_STANDARD_80211ac;
|
||||
input.standard = WIFI_STANDARD_80211ac;
|
||||
input.band = WIFI_PHY_BAND_5GHZ;
|
||||
}
|
||||
else if (str_standard == "WIFI_PHY_STANDARD_80211ax_2_4GHZ")
|
||||
{
|
||||
input.standard = WIFI_PHY_STANDARD_80211ax;
|
||||
input.standard = WIFI_STANDARD_80211ax;
|
||||
input.band = WIFI_PHY_BAND_2_4GHZ;
|
||||
}
|
||||
else if (str_standard == "WIFI_PHY_STANDARD_80211ax_5GHZ")
|
||||
{
|
||||
input.standard = WIFI_PHY_STANDARD_80211ax;
|
||||
input.standard = WIFI_STANDARD_80211ax;
|
||||
input.band = WIFI_PHY_BAND_5GHZ;
|
||||
}
|
||||
|
||||
if (str_preamble == "WIFI_PREAMBLE_LONG" && (input.standard == WIFI_PHY_STANDARD_80211a || input.standard == WIFI_PHY_STANDARD_80211b || input.standard == WIFI_PHY_STANDARD_80211g))
|
||||
if (str_preamble == "WIFI_PREAMBLE_LONG" && (input.standard == WIFI_STANDARD_80211a || input.standard == WIFI_STANDARD_80211b || input.standard == WIFI_STANDARD_80211g))
|
||||
{
|
||||
input.preamble = WIFI_PREAMBLE_LONG;
|
||||
}
|
||||
else if (str_preamble == "WIFI_PREAMBLE_SHORT" && (input.standard == WIFI_PHY_STANDARD_80211b || input.standard == WIFI_PHY_STANDARD_80211g))
|
||||
else if (str_preamble == "WIFI_PREAMBLE_SHORT" && (input.standard == WIFI_STANDARD_80211b || input.standard == WIFI_STANDARD_80211g))
|
||||
{
|
||||
input.preamble = WIFI_PREAMBLE_SHORT;
|
||||
}
|
||||
else if (str_preamble == "WIFI_PREAMBLE_HT_MF" && input.standard == WIFI_PHY_STANDARD_80211n)
|
||||
else if (str_preamble == "WIFI_PREAMBLE_HT_MF" && input.standard == WIFI_STANDARD_80211n)
|
||||
{
|
||||
input.preamble = WIFI_PREAMBLE_HT_MF;
|
||||
}
|
||||
else if (str_preamble == "WIFI_PREAMBLE_VHT_SU" && input.standard == WIFI_PHY_STANDARD_80211ac)
|
||||
else if (str_preamble == "WIFI_PREAMBLE_VHT_SU" && input.standard == WIFI_STANDARD_80211ac)
|
||||
{
|
||||
input.preamble = WIFI_PREAMBLE_VHT_SU;
|
||||
}
|
||||
else if (str_preamble == "WIFI_PREAMBLE_HE_SU" && input.standard == WIFI_PHY_STANDARD_80211ax)
|
||||
else if (str_preamble == "WIFI_PREAMBLE_HE_SU" && input.standard == WIFI_STANDARD_80211ax)
|
||||
{
|
||||
input.preamble = WIFI_PREAMBLE_HE_SU;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ int main (int argc, char** argv)
|
||||
}
|
||||
else if (standard == "11n_2_4GHZ")
|
||||
{
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n_2_4GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n);
|
||||
ssid = Ssid ("ns380211n_2_4GHZ");
|
||||
dataRate = "HtMcs0";
|
||||
freq = 2402 + (bw / 2); //so as to have 2412/2422 for 20/40
|
||||
@@ -128,7 +128,7 @@ int main (int argc, char** argv)
|
||||
}
|
||||
else if (standard == "11n_5GHZ")
|
||||
{
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n);
|
||||
ssid = Ssid ("ns380211n_5GHZ");
|
||||
dataRate = "HtMcs0";
|
||||
freq = 5170 + (bw / 2); //so as to have 5180/5190 for 20/40
|
||||
@@ -155,7 +155,7 @@ int main (int argc, char** argv)
|
||||
}
|
||||
else if (standard == "11ax_2_4GHZ")
|
||||
{
|
||||
wifi.SetStandard (WIFI_STANDARD_80211ax_2_4GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211ax);
|
||||
ssid = Ssid ("ns380211ax_2_4GHZ");
|
||||
dataRate = "HeMcs0";
|
||||
freq = 2402 + (bw / 2); //so as to have 2412/2422/2442 for 20/40/80
|
||||
@@ -169,7 +169,7 @@ int main (int argc, char** argv)
|
||||
}
|
||||
else if (standard == "11ax_5GHZ")
|
||||
{
|
||||
wifi.SetStandard (WIFI_STANDARD_80211ax_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211ax);
|
||||
ssid = Ssid ("ns380211ax_5GHZ");
|
||||
dataRate = "HeMcs0";
|
||||
freq = 5170 + (bw / 2); //so as to have 5180/5190/5210/5250 for 20/40/80/160
|
||||
|
||||
@@ -794,18 +794,17 @@ WifiHelper::Install (const WifiPhyHelper &phyHelper,
|
||||
Ptr<Node> node = *i;
|
||||
Ptr<WifiNetDevice> device = CreateObject<WifiNetDevice> ();
|
||||
device->SetStandard (m_standard);
|
||||
auto it = wifiStandards.find (m_standard);
|
||||
if (it == wifiStandards.end ())
|
||||
if (m_standard == WIFI_STANDARD_UNSPECIFIED)
|
||||
{
|
||||
NS_FATAL_ERROR ("Selected standard is not defined!");
|
||||
NS_FATAL_ERROR ("No standard specified!");
|
||||
return devices;
|
||||
}
|
||||
if (it->second.phyStandard >= WIFI_PHY_STANDARD_80211n)
|
||||
if (m_standard >= WIFI_STANDARD_80211n)
|
||||
{
|
||||
Ptr<HtConfiguration> htConfiguration = CreateObject<HtConfiguration> ();
|
||||
device->SetHtConfiguration (htConfiguration);
|
||||
}
|
||||
if (it->second.phyStandard >= WIFI_PHY_STANDARD_80211ac)
|
||||
if (m_standard >= WIFI_STANDARD_80211ac)
|
||||
{
|
||||
// Create the VHT Configuration object even if the PHY band is 2.4GHz
|
||||
// (WifiNetDevice::GetVhtConfiguration() checks the PHY band being used).
|
||||
@@ -815,20 +814,20 @@ WifiHelper::Install (const WifiPhyHelper &phyHelper,
|
||||
Ptr<VhtConfiguration> vhtConfiguration = CreateObject<VhtConfiguration> ();
|
||||
device->SetVhtConfiguration (vhtConfiguration);
|
||||
}
|
||||
if (it->second.phyStandard >= WIFI_PHY_STANDARD_80211ax)
|
||||
if (m_standard >= WIFI_STANDARD_80211ax)
|
||||
{
|
||||
Ptr<HeConfiguration> heConfiguration = CreateObject<HeConfiguration> ();
|
||||
device->SetHeConfiguration (heConfiguration);
|
||||
}
|
||||
Ptr<WifiRemoteStationManager> manager = m_stationManager.Create<WifiRemoteStationManager> ();
|
||||
Ptr<WifiPhy> phy = phyHelper.Create (node, device);
|
||||
phy->ConfigureStandard (it->second.phyStandard);
|
||||
phy->ConfigureStandard (m_standard);
|
||||
device->SetPhy (phy);
|
||||
Ptr<WifiMac> mac = macHelper.Create (device, m_standard);
|
||||
device->SetMac (mac);
|
||||
device->SetRemoteStationManager (manager);
|
||||
node->AddDevice (device);
|
||||
if ((it->second.phyStandard >= WIFI_PHY_STANDARD_80211ax) && (m_obssPdAlgorithm.IsTypeIdSet ()))
|
||||
if ((m_standard >= WIFI_STANDARD_80211ax) && (m_obssPdAlgorithm.IsTypeIdSet ()))
|
||||
{
|
||||
Ptr<ObssPdAlgorithm> obssPdAlgorithm = m_obssPdAlgorithm.Create<ObssPdAlgorithm> ();
|
||||
device->AggregateObject (obssPdAlgorithm);
|
||||
|
||||
@@ -44,12 +44,11 @@ WifiMacHelper::~WifiMacHelper ()
|
||||
Ptr<WifiMac>
|
||||
WifiMacHelper::Create (Ptr<WifiNetDevice> device, WifiStandard standard) const
|
||||
{
|
||||
auto standardIt = wifiStandards.find (standard);
|
||||
NS_ABORT_MSG_IF (standardIt == wifiStandards.end (), "Selected standard is not defined!");
|
||||
NS_ABORT_MSG_IF (standard == WIFI_STANDARD_UNSPECIFIED, "No standard specified!");
|
||||
|
||||
// this is a const method, but we need to force the correct QoS setting
|
||||
ObjectFactory macObjectFactory = m_mac;
|
||||
if (standard >= WIFI_STANDARD_80211n_2_4GHZ)
|
||||
if (standard >= WIFI_STANDARD_80211n)
|
||||
{
|
||||
macObjectFactory.Set ("QosSupported", BooleanValue (true));
|
||||
}
|
||||
@@ -74,7 +73,7 @@ WifiMacHelper::Create (Ptr<WifiNetDevice> device, WifiStandard standard) const
|
||||
|
||||
// create and install the Multi User Scheduler if this is an HE AP
|
||||
Ptr<ApWifiMac> apMac = DynamicCast<ApWifiMac> (mac);
|
||||
if (apMac != nullptr && standardIt->second.macStandard >= WIFI_MAC_STANDARD_80211ax
|
||||
if (apMac != nullptr && standard >= WIFI_STANDARD_80211ax
|
||||
&& m_muScheduler.IsTypeIdSet ())
|
||||
{
|
||||
Ptr<MultiUserScheduler> muScheduler = m_muScheduler.Create<MultiUserScheduler> ();
|
||||
|
||||
@@ -119,7 +119,7 @@ RegularWifiMac::SetupFrameExchangeManager (WifiStandard standard)
|
||||
NS_LOG_FUNCTION (this);
|
||||
NS_ABORT_MSG_IF (standard == WIFI_STANDARD_UNSPECIFIED, "Wifi standard not set");
|
||||
|
||||
if (standard >= WIFI_STANDARD_80211ax_2_4GHZ)
|
||||
if (standard >= WIFI_STANDARD_80211ax)
|
||||
{
|
||||
m_feManager = CreateObject<HeFrameExchangeManager> ();
|
||||
}
|
||||
@@ -127,7 +127,7 @@ RegularWifiMac::SetupFrameExchangeManager (WifiStandard standard)
|
||||
{
|
||||
m_feManager = CreateObject<VhtFrameExchangeManager> ();
|
||||
}
|
||||
else if (standard >= WIFI_STANDARD_80211n_2_4GHZ)
|
||||
else if (standard >= WIFI_STANDARD_80211n)
|
||||
{
|
||||
m_feManager = CreateObject<HtFrameExchangeManager> ();
|
||||
}
|
||||
@@ -1147,8 +1147,7 @@ RegularWifiMac::ConfigureStandard (WifiStandard standard)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << standard);
|
||||
|
||||
NS_ABORT_IF (standard >= WIFI_STANDARD_80211n_2_4GHZ && !m_qosSupported);
|
||||
SetDsssSupported (standard == WIFI_STANDARD_80211b);
|
||||
NS_ABORT_IF (standard >= WIFI_STANDARD_80211n && !m_qosSupported);
|
||||
|
||||
SetupFrameExchangeManager (standard);
|
||||
}
|
||||
@@ -1176,45 +1175,26 @@ RegularWifiMac::ConfigurePhyDependentParameters (void)
|
||||
|
||||
uint32_t cwmin = 0;
|
||||
uint32_t cwmax = 0;
|
||||
// NOTE the distinction between wifi standard and wifi PHY standard will be removed soon...
|
||||
NS_ASSERT (m_phy != 0);
|
||||
WifiPhyStandard phyStandard = m_phy->GetPhyStandard ();
|
||||
|
||||
auto standardIt = std::find_if (wifiStandards.cbegin (), wifiStandards.cend (),
|
||||
[&phyStandard, &band](auto& pair)
|
||||
{
|
||||
return (pair.second.phyStandard == phyStandard
|
||||
&& pair.second.phyBand == band);
|
||||
});
|
||||
NS_ASSERT (standardIt != wifiStandards.cend ());
|
||||
switch (standardIt->first)
|
||||
NS_ASSERT (m_phy != 0);
|
||||
WifiStandard standard = m_phy->GetStandard ();
|
||||
|
||||
if (standard == WIFI_STANDARD_80211b)
|
||||
{
|
||||
case WIFI_STANDARD_80211n_5GHZ:
|
||||
case WIFI_STANDARD_80211ac:
|
||||
case WIFI_STANDARD_80211ax_5GHZ:
|
||||
case WIFI_STANDARD_80211ax_6GHZ:
|
||||
{
|
||||
cwmin = 15;
|
||||
cwmax = 1023;
|
||||
break;
|
||||
}
|
||||
case WIFI_STANDARD_80211ax_2_4GHZ:
|
||||
case WIFI_STANDARD_80211n_2_4GHZ:
|
||||
case WIFI_STANDARD_80211g:
|
||||
SetErpSupported (true);
|
||||
case WIFI_STANDARD_80211a:
|
||||
case WIFI_STANDARD_80211p:
|
||||
cwmin = 15;
|
||||
cwmax = 1023;
|
||||
break;
|
||||
case WIFI_STANDARD_80211b:
|
||||
SetDsssSupported (true);
|
||||
cwmin = 31;
|
||||
cwmax = 1023;
|
||||
break;
|
||||
default:
|
||||
NS_FATAL_ERROR ("Unsupported WifiPhyStandard in RegularWifiMac::FinishConfigureStandard ()");
|
||||
return;
|
||||
}
|
||||
|
||||
if (standard >= WIFI_STANDARD_80211g && band == WIFI_PHY_BAND_2_4GHZ)
|
||||
{
|
||||
SetErpSupported (true);
|
||||
}
|
||||
|
||||
cwmin = 15;
|
||||
cwmax = 1023;
|
||||
|
||||
ConfigureContentionWindow (cwmin, cwmax);
|
||||
}
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ SpectrumWifiPhy::UpdateInterferenceHelperBands (void)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (GetPhyStandard () >= WIFI_PHY_STANDARD_80211ax)
|
||||
if (GetStandard () >= WIFI_STANDARD_80211ax)
|
||||
{
|
||||
// For a given RU type, some RUs over a channel occupy the same tones as
|
||||
// the corresponding RUs over a subchannel, while some others not. For instance,
|
||||
@@ -305,7 +305,7 @@ SpectrumWifiPhy::StartRx (Ptr<SpectrumSignalParameters> rxParams)
|
||||
NS_LOG_DEBUG ("Signal power received after antenna gain for 20 MHz channel band " << +i << ": " << rxPowerPerBandW << " W (" << WToDbm (rxPowerPerBandW) << " dBm)");
|
||||
}
|
||||
|
||||
if (GetPhyStandard () >= WIFI_PHY_STANDARD_80211ax)
|
||||
if (GetStandard () >= WIFI_STANDARD_80211ax)
|
||||
{
|
||||
NS_ASSERT (!m_ruBands[channelWidth].empty ());
|
||||
for (const auto& bandRuPair : m_ruBands[channelWidth])
|
||||
@@ -431,17 +431,17 @@ uint32_t
|
||||
SpectrumWifiPhy::GetBandBandwidth (void) const
|
||||
{
|
||||
uint32_t bandBandwidth = 0;
|
||||
switch (GetPhyStandard ())
|
||||
switch (GetStandard ())
|
||||
{
|
||||
case WIFI_PHY_STANDARD_80211a:
|
||||
case WIFI_PHY_STANDARD_80211g:
|
||||
case WIFI_PHY_STANDARD_80211b:
|
||||
case WIFI_PHY_STANDARD_80211n:
|
||||
case WIFI_PHY_STANDARD_80211ac:
|
||||
case WIFI_STANDARD_80211a:
|
||||
case WIFI_STANDARD_80211g:
|
||||
case WIFI_STANDARD_80211b:
|
||||
case WIFI_STANDARD_80211n:
|
||||
case WIFI_STANDARD_80211ac:
|
||||
// Use OFDM subcarrier width of 312.5 KHz as band granularity
|
||||
bandBandwidth = 312500;
|
||||
break;
|
||||
case WIFI_PHY_STANDARD_80211p:
|
||||
case WIFI_STANDARD_80211p:
|
||||
if (GetChannelWidth () == 5)
|
||||
{
|
||||
// Use OFDM subcarrier width of 78.125 KHz as band granularity
|
||||
@@ -453,12 +453,12 @@ SpectrumWifiPhy::GetBandBandwidth (void) const
|
||||
bandBandwidth = 156250;
|
||||
}
|
||||
break;
|
||||
case WIFI_PHY_STANDARD_80211ax:
|
||||
case WIFI_STANDARD_80211ax:
|
||||
// Use OFDM subcarrier width of 78.125 KHz as band granularity
|
||||
bandBandwidth = 78125;
|
||||
break;
|
||||
default:
|
||||
NS_FATAL_ERROR ("Standard unknown: " << GetPhyStandard ());
|
||||
NS_FATAL_ERROR ("Standard unknown: " << GetStandard ());
|
||||
break;
|
||||
}
|
||||
return bandBandwidth;
|
||||
|
||||
@@ -469,7 +469,7 @@ WifiNetDevice::SetHtConfiguration (Ptr<HtConfiguration> htConfiguration)
|
||||
Ptr<HtConfiguration>
|
||||
WifiNetDevice::GetHtConfiguration (void) const
|
||||
{
|
||||
return (m_standard >= WIFI_STANDARD_80211n_2_4GHZ ? m_htConfiguration : nullptr);
|
||||
return (m_standard >= WIFI_STANDARD_80211n ? m_htConfiguration : nullptr);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -494,7 +494,7 @@ WifiNetDevice::SetHeConfiguration (Ptr<HeConfiguration> heConfiguration)
|
||||
Ptr<HeConfiguration>
|
||||
WifiNetDevice::GetHeConfiguration (void) const
|
||||
{
|
||||
return (m_standard >= WIFI_STANDARD_80211ax_2_4GHZ ? m_heConfiguration : nullptr);
|
||||
return (m_standard >= WIFI_STANDARD_80211ax ? m_heConfiguration : nullptr);
|
||||
}
|
||||
|
||||
} //namespace ns3
|
||||
|
||||
@@ -284,7 +284,7 @@ WifiPhyOperatingChannel::IsSet (void) const
|
||||
|
||||
void
|
||||
WifiPhyOperatingChannel::Set (uint8_t number, uint16_t frequency, uint16_t width,
|
||||
WifiPhyStandard standard, WifiPhyBand band)
|
||||
WifiStandard standard, WifiPhyBand band)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << +number << frequency << width << standard << band);
|
||||
|
||||
@@ -305,7 +305,7 @@ WifiPhyOperatingChannel::Set (uint8_t number, uint16_t frequency, uint16_t width
|
||||
}
|
||||
|
||||
void
|
||||
WifiPhyOperatingChannel::SetDefault (uint16_t width, WifiPhyStandard standard, WifiPhyBand band)
|
||||
WifiPhyOperatingChannel::SetDefault (uint16_t width, WifiStandard standard, WifiPhyBand band)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << width << standard << band);
|
||||
|
||||
@@ -313,7 +313,7 @@ WifiPhyOperatingChannel::SetDefault (uint16_t width, WifiPhyStandard standard, W
|
||||
}
|
||||
|
||||
uint8_t
|
||||
WifiPhyOperatingChannel::GetDefaultChannelNumber (uint16_t width, WifiPhyStandard standard, WifiPhyBand band)
|
||||
WifiPhyOperatingChannel::GetDefaultChannelNumber (uint16_t width, WifiStandard standard, WifiPhyBand band)
|
||||
{
|
||||
auto channelIt = FindFirst (0, 0, width, standard, band);
|
||||
|
||||
@@ -329,7 +329,7 @@ WifiPhyOperatingChannel::GetDefaultChannelNumber (uint16_t width, WifiPhyStandar
|
||||
|
||||
WifiPhyOperatingChannel::ConstIterator
|
||||
WifiPhyOperatingChannel::FindFirst (uint8_t number, uint16_t frequency, uint16_t width,
|
||||
WifiPhyStandard standard, WifiPhyBand band,
|
||||
WifiStandard standard, WifiPhyBand band,
|
||||
ConstIterator start)
|
||||
{
|
||||
// lambda used to match channels against the specified criteria
|
||||
|
||||
@@ -68,32 +68,32 @@ public:
|
||||
* \param number the channel number (use 0 to leave it unspecified)
|
||||
* \param frequency the channel center frequency in MHz (use 0 to leave it unspecified)
|
||||
* \param width the channel width in MHz (use 0 to leave it unspecified)
|
||||
* \param standard the PHY standard
|
||||
* \param standard the standard
|
||||
* \param band the PHY band
|
||||
*/
|
||||
void Set (uint8_t number, uint16_t frequency, uint16_t width,
|
||||
WifiPhyStandard standard, WifiPhyBand band);
|
||||
WifiStandard standard, WifiPhyBand band);
|
||||
/**
|
||||
* Set the default channel of the given width and for the given PHY standard and band.
|
||||
* Set the default channel of the given width and for the given standard and band.
|
||||
* If the channel width is a multiple of 20 MHz, the primary 20 MHz channel
|
||||
* is set to the 20 MHz subchannel with the lowest center frequency.
|
||||
*
|
||||
* \param width the channel width in MHz
|
||||
* \param standard the PHY standard
|
||||
* \param standard the standard
|
||||
* \param band the PHY band
|
||||
*/
|
||||
void SetDefault (uint16_t width, WifiPhyStandard standard, WifiPhyBand band);
|
||||
void SetDefault (uint16_t width, WifiStandard standard, WifiPhyBand band);
|
||||
|
||||
/**
|
||||
* Get the default channel number of the given width and for the given PHY standard
|
||||
* Get the default channel number of the given width and for the given standard
|
||||
* and band.
|
||||
*
|
||||
* \param width the channel width in MHz
|
||||
* \param standard the PHY standard
|
||||
* \param standard the standard
|
||||
* \param band the PHY band
|
||||
* \return the default channel number
|
||||
*/
|
||||
static uint8_t GetDefaultChannelNumber (uint16_t width, WifiPhyStandard standard, WifiPhyBand band);
|
||||
static uint8_t GetDefaultChannelNumber (uint16_t width, WifiStandard standard, WifiPhyBand band);
|
||||
|
||||
/**
|
||||
* Return the channel number identifying the whole operating channel.
|
||||
@@ -147,14 +147,14 @@ public:
|
||||
* \param number the channel number (use 0 to leave it unspecified)
|
||||
* \param frequency the channel center frequency in MHz (use 0 to leave it unspecified)
|
||||
* \param width the channel width in MHz (use 0 to leave it unspecified)
|
||||
* \param standard the PHY standard
|
||||
* \param standard the standard
|
||||
* \param band the PHY band
|
||||
* \param start an iterator pointing to the channel to start the search with
|
||||
* \return an iterator pointing to the found channel, if any, or to past-the-end
|
||||
* of the set of available channels
|
||||
*/
|
||||
static ConstIterator FindFirst (uint8_t number, uint16_t frequency, uint16_t width,
|
||||
WifiPhyStandard standard, WifiPhyBand band,
|
||||
WifiStandard standard, WifiPhyBand band,
|
||||
ConstIterator start = m_frequencyChannels.begin ());
|
||||
|
||||
private:
|
||||
|
||||
@@ -310,7 +310,7 @@ WifiPhy::WifiPhy ()
|
||||
m_endTxEvent (),
|
||||
m_currentEvent (0),
|
||||
m_previouslyRxPpduUid (UINT64_MAX),
|
||||
m_standard (WIFI_PHY_STANDARD_UNSPECIFIED),
|
||||
m_standard (WIFI_STANDARD_UNSPECIFIED),
|
||||
m_band (WIFI_PHY_BAND_UNSPECIFIED),
|
||||
m_initialFrequency (0),
|
||||
m_initialChannelNumber (0),
|
||||
@@ -819,7 +819,7 @@ WifiPhy::Configure80211ax (void)
|
||||
}
|
||||
|
||||
void
|
||||
WifiPhy::ConfigureStandardAndBand (WifiPhyStandard standard, WifiPhyBand band)
|
||||
WifiPhy::ConfigureStandardAndBand (WifiStandard standard, WifiPhyBand band)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << standard << band);
|
||||
m_standard = standard;
|
||||
@@ -845,28 +845,28 @@ WifiPhy::ConfigureStandardAndBand (WifiPhyStandard standard, WifiPhyBand band)
|
||||
|
||||
switch (standard)
|
||||
{
|
||||
case WIFI_PHY_STANDARD_80211a:
|
||||
case WIFI_STANDARD_80211a:
|
||||
Configure80211a ();
|
||||
break;
|
||||
case WIFI_PHY_STANDARD_80211b:
|
||||
case WIFI_STANDARD_80211b:
|
||||
Configure80211b ();
|
||||
break;
|
||||
case WIFI_PHY_STANDARD_80211g:
|
||||
case WIFI_STANDARD_80211g:
|
||||
Configure80211g ();
|
||||
break;
|
||||
case WIFI_PHY_STANDARD_80211p:
|
||||
case WIFI_STANDARD_80211p:
|
||||
Configure80211p ();
|
||||
break;
|
||||
case WIFI_PHY_STANDARD_80211n:
|
||||
case WIFI_STANDARD_80211n:
|
||||
Configure80211n ();
|
||||
break;
|
||||
case WIFI_PHY_STANDARD_80211ac:
|
||||
case WIFI_STANDARD_80211ac:
|
||||
Configure80211ac ();
|
||||
break;
|
||||
case WIFI_PHY_STANDARD_80211ax:
|
||||
case WIFI_STANDARD_80211ax:
|
||||
Configure80211ax ();
|
||||
break;
|
||||
case WIFI_PHY_STANDARD_UNSPECIFIED:
|
||||
case WIFI_STANDARD_UNSPECIFIED:
|
||||
default:
|
||||
NS_ASSERT_MSG (false, "Unsupported standard");
|
||||
break;
|
||||
@@ -874,11 +874,11 @@ WifiPhy::ConfigureStandardAndBand (WifiPhyStandard standard, WifiPhyBand band)
|
||||
}
|
||||
|
||||
void
|
||||
WifiPhy::ConfigureStandard (WifiPhyStandard standard)
|
||||
WifiPhy::ConfigureStandard (WifiStandard standard)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << standard);
|
||||
|
||||
NS_ABORT_MSG_IF (m_standard != WIFI_PHY_STANDARD_UNSPECIFIED && standard != m_standard,
|
||||
NS_ABORT_MSG_IF (m_standard != WIFI_STANDARD_UNSPECIFIED && standard != m_standard,
|
||||
"Cannot change standard");
|
||||
|
||||
m_standard = standard;
|
||||
@@ -897,28 +897,28 @@ WifiPhy::ConfigureStandard (WifiPhyStandard standard)
|
||||
|
||||
switch (standard)
|
||||
{
|
||||
case WIFI_PHY_STANDARD_80211a:
|
||||
case WIFI_STANDARD_80211a:
|
||||
Configure80211a ();
|
||||
break;
|
||||
case WIFI_PHY_STANDARD_80211b:
|
||||
case WIFI_STANDARD_80211b:
|
||||
Configure80211b ();
|
||||
break;
|
||||
case WIFI_PHY_STANDARD_80211g:
|
||||
case WIFI_STANDARD_80211g:
|
||||
Configure80211g ();
|
||||
break;
|
||||
case WIFI_PHY_STANDARD_80211p:
|
||||
case WIFI_STANDARD_80211p:
|
||||
Configure80211p ();
|
||||
break;
|
||||
case WIFI_PHY_STANDARD_80211n:
|
||||
case WIFI_STANDARD_80211n:
|
||||
Configure80211n ();
|
||||
break;
|
||||
case WIFI_PHY_STANDARD_80211ac:
|
||||
case WIFI_STANDARD_80211ac:
|
||||
Configure80211ac ();
|
||||
break;
|
||||
case WIFI_PHY_STANDARD_80211ax:
|
||||
case WIFI_STANDARD_80211ax:
|
||||
Configure80211ax ();
|
||||
break;
|
||||
case WIFI_PHY_STANDARD_UNSPECIFIED:
|
||||
case WIFI_STANDARD_UNSPECIFIED:
|
||||
default:
|
||||
NS_ASSERT_MSG (false, "Unsupported standard");
|
||||
break;
|
||||
@@ -932,8 +932,8 @@ WifiPhy::GetPhyBand (void) const
|
||||
}
|
||||
|
||||
|
||||
WifiPhyStandard
|
||||
WifiPhy::GetPhyStandard (void) const
|
||||
WifiStandard
|
||||
WifiPhy::GetStandard (void) const
|
||||
{
|
||||
return m_standard;
|
||||
}
|
||||
@@ -1117,7 +1117,7 @@ WifiPhy::SetOperatingChannel (const ChannelTuple& channelTuple)
|
||||
|
||||
m_channelSettings = channelTuple;
|
||||
|
||||
if (m_standard == WIFI_PHY_STANDARD_UNSPECIFIED)
|
||||
if (m_standard == WIFI_STANDARD_UNSPECIFIED)
|
||||
{
|
||||
NS_LOG_DEBUG ("Channel information will be applied when a standard is configured");
|
||||
return;
|
||||
|
||||
@@ -511,21 +511,21 @@ public:
|
||||
* \param band the Wi-Fi band
|
||||
*/
|
||||
NS_DEPRECATED_3_35
|
||||
virtual void ConfigureStandardAndBand (WifiPhyStandard standard, WifiPhyBand band);
|
||||
virtual void ConfigureStandardAndBand (WifiStandard standard, WifiPhyBand band);
|
||||
|
||||
/**
|
||||
* Configure the PHY-level parameters for different Wi-Fi standard.
|
||||
*
|
||||
* \param standard the Wi-Fi standard
|
||||
*/
|
||||
virtual void ConfigureStandard (WifiPhyStandard standard);
|
||||
virtual void ConfigureStandard (WifiStandard standard);
|
||||
|
||||
/**
|
||||
* Get the configured Wi-Fi standard
|
||||
*
|
||||
* \return the Wi-Fi standard that has been configured
|
||||
*/
|
||||
WifiPhyStandard GetPhyStandard (void) const;
|
||||
WifiStandard GetStandard (void) const;
|
||||
|
||||
/**
|
||||
* Get the configured Wi-Fi band
|
||||
@@ -1418,7 +1418,7 @@ private:
|
||||
*/
|
||||
static std::map<WifiModulationClass, Ptr<PhyEntity> > & GetStaticPhyEntities (void);
|
||||
|
||||
WifiPhyStandard m_standard; //!< WifiPhyStandard
|
||||
WifiStandard m_standard; //!< WifiStandard
|
||||
WifiPhyBand m_band; //!< WifiPhyBand
|
||||
uint16_t m_initialFrequency; //!< Store frequency until initialization (MHz)
|
||||
uint8_t m_initialChannelNumber; //!< Store channel number until initialization
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#define WIFI_STANDARD_H
|
||||
|
||||
#include <map>
|
||||
#include <list>
|
||||
#include "wifi-phy-band.h"
|
||||
#include "ns3/abort.h"
|
||||
|
||||
@@ -29,98 +30,7 @@ namespace ns3 {
|
||||
|
||||
/**
|
||||
* \ingroup wifi
|
||||
* Identifies the PHY specification that a Wifi device is configured to use.
|
||||
*/
|
||||
enum WifiPhyStandard
|
||||
{
|
||||
/** OFDM PHY (Clause 17) */
|
||||
WIFI_PHY_STANDARD_80211a,
|
||||
/** DSSS PHY (Clause 15) and HR/DSSS PHY (Clause 18) */
|
||||
WIFI_PHY_STANDARD_80211b,
|
||||
/** ERP-OFDM PHY (Clause 19, Section 19.5) */
|
||||
WIFI_PHY_STANDARD_80211g,
|
||||
/** OFDM PHY (Clause 17 - amendment for 10 MHz and 5 MHz channels) */
|
||||
WIFI_PHY_STANDARD_80211p,
|
||||
/** HT PHY (clause 20) */
|
||||
WIFI_PHY_STANDARD_80211n,
|
||||
/** VHT PHY (clause 22) */
|
||||
WIFI_PHY_STANDARD_80211ac,
|
||||
/** HE PHY (clause 26) */
|
||||
WIFI_PHY_STANDARD_80211ax,
|
||||
/** Unspecified */
|
||||
WIFI_PHY_STANDARD_UNSPECIFIED
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Stream insertion operator.
|
||||
*
|
||||
* \param os the stream
|
||||
* \param standard the PHY standard
|
||||
* \returns a reference to the stream
|
||||
*/
|
||||
inline std::ostream& operator<< (std::ostream& os, WifiPhyStandard standard)
|
||||
{
|
||||
switch (standard)
|
||||
{
|
||||
case WIFI_PHY_STANDARD_80211a:
|
||||
return (os << "802.11a");
|
||||
case WIFI_PHY_STANDARD_80211b:
|
||||
return (os << "802.11b");
|
||||
case WIFI_PHY_STANDARD_80211g:
|
||||
return (os << "802.11g");
|
||||
case WIFI_PHY_STANDARD_80211p:
|
||||
return (os << "802.11p");
|
||||
case WIFI_PHY_STANDARD_80211n:
|
||||
return (os << "802.11n");
|
||||
case WIFI_PHY_STANDARD_80211ac:
|
||||
return (os << "802.11ac");
|
||||
case WIFI_PHY_STANDARD_80211ax:
|
||||
return (os << "802.11ax");
|
||||
case WIFI_PHY_STANDARD_UNSPECIFIED:
|
||||
default:
|
||||
return (os << "UNSPECIFIED");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \ingroup wifi
|
||||
* Identifies the MAC specification that a Wifi device is configured to use.
|
||||
*/
|
||||
enum WifiMacStandard
|
||||
{
|
||||
WIFI_MAC_STANDARD_80211,
|
||||
WIFI_MAC_STANDARD_80211n,
|
||||
WIFI_MAC_STANDARD_80211ac,
|
||||
WIFI_MAC_STANDARD_80211ax
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Stream insertion operator.
|
||||
*
|
||||
* \param os the stream
|
||||
* \param standard the MAC standard
|
||||
* \returns a reference to the stream
|
||||
*/
|
||||
inline std::ostream& operator<< (std::ostream& os, WifiMacStandard standard)
|
||||
{
|
||||
switch (standard)
|
||||
{
|
||||
case WIFI_MAC_STANDARD_80211:
|
||||
return (os << "802.11");
|
||||
case WIFI_MAC_STANDARD_80211n:
|
||||
return (os << "802.11n");
|
||||
case WIFI_MAC_STANDARD_80211ac:
|
||||
return (os << "802.11ac");
|
||||
case WIFI_MAC_STANDARD_80211ax:
|
||||
return (os << "802.11ax");
|
||||
default:
|
||||
return (os << "UNSPECIFIED");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \ingroup wifi
|
||||
* Identifies the allowed configurations that a Wifi device is configured to use.
|
||||
* Identifies the IEEE 802.11 specifications that a Wifi device can be configured to use.
|
||||
*/
|
||||
enum WifiStandard
|
||||
{
|
||||
@@ -129,12 +39,9 @@ enum WifiStandard
|
||||
WIFI_STANDARD_80211b,
|
||||
WIFI_STANDARD_80211g,
|
||||
WIFI_STANDARD_80211p,
|
||||
WIFI_STANDARD_80211n_2_4GHZ,
|
||||
WIFI_STANDARD_80211n_5GHZ,
|
||||
WIFI_STANDARD_80211n,
|
||||
WIFI_STANDARD_80211ac,
|
||||
WIFI_STANDARD_80211ax_2_4GHZ,
|
||||
WIFI_STANDARD_80211ax_5GHZ,
|
||||
WIFI_STANDARD_80211ax_6GHZ
|
||||
WIFI_STANDARD_80211ax
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -156,48 +63,30 @@ inline std::ostream& operator<< (std::ostream& os, WifiStandard standard)
|
||||
return (os << "802.11g");
|
||||
case WIFI_STANDARD_80211p:
|
||||
return (os << "802.11p");
|
||||
case WIFI_STANDARD_80211n_2_4GHZ:
|
||||
return (os << "802.11n-2.4GHz");
|
||||
case WIFI_STANDARD_80211n_5GHZ:
|
||||
return (os << "802.11n-5GHz");
|
||||
case WIFI_STANDARD_80211n:
|
||||
return (os << "802.11n");
|
||||
case WIFI_STANDARD_80211ac:
|
||||
return (os << "802.11ac");
|
||||
case WIFI_STANDARD_80211ax_2_4GHZ:
|
||||
return (os << "802.11ax-2.4GHz");
|
||||
case WIFI_STANDARD_80211ax_5GHZ:
|
||||
return (os << "802.11ax-5GHz");
|
||||
case WIFI_STANDARD_80211ax_6GHZ:
|
||||
return (os << "802.11ax-6GHz");
|
||||
case WIFI_STANDARD_80211ax:
|
||||
return (os << "802.11ax");
|
||||
default:
|
||||
return (os << "UNSPECIFIED");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief hold PHY and MAC information based on the selected standard.
|
||||
*/
|
||||
struct WifiStandardInfo
|
||||
{
|
||||
WifiPhyStandard phyStandard; //!< the PHY standard
|
||||
WifiPhyBand phyBand; //!< the PHY band
|
||||
WifiMacStandard macStandard; //!< the MAC standard
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief map a given standard configured by the user to the corresponding WifiStandardInfo
|
||||
* \brief map a given standard configured by the user to the allowed PHY bands
|
||||
*/
|
||||
const std::map<WifiStandard, WifiStandardInfo> wifiStandards =
|
||||
const std::map<WifiStandard, std::list<WifiPhyBand>> wifiStandards =
|
||||
{
|
||||
{ WIFI_STANDARD_80211a, { WIFI_PHY_STANDARD_80211a, WIFI_PHY_BAND_5GHZ, WIFI_MAC_STANDARD_80211 } },
|
||||
{ WIFI_STANDARD_80211b, { WIFI_PHY_STANDARD_80211b, WIFI_PHY_BAND_2_4GHZ, WIFI_MAC_STANDARD_80211 } },
|
||||
{ WIFI_STANDARD_80211g, { WIFI_PHY_STANDARD_80211g, WIFI_PHY_BAND_2_4GHZ, WIFI_MAC_STANDARD_80211 } },
|
||||
{ WIFI_STANDARD_80211p, { WIFI_PHY_STANDARD_80211p, WIFI_PHY_BAND_5GHZ, WIFI_MAC_STANDARD_80211 } },
|
||||
{ WIFI_STANDARD_80211n_2_4GHZ, { WIFI_PHY_STANDARD_80211n, WIFI_PHY_BAND_2_4GHZ, WIFI_MAC_STANDARD_80211n } },
|
||||
{ WIFI_STANDARD_80211n_5GHZ, { WIFI_PHY_STANDARD_80211n, WIFI_PHY_BAND_5GHZ, WIFI_MAC_STANDARD_80211n } },
|
||||
{ WIFI_STANDARD_80211ac, { WIFI_PHY_STANDARD_80211ac, WIFI_PHY_BAND_5GHZ, WIFI_MAC_STANDARD_80211ac } },
|
||||
{ WIFI_STANDARD_80211ax_2_4GHZ, { WIFI_PHY_STANDARD_80211ax, WIFI_PHY_BAND_2_4GHZ, WIFI_MAC_STANDARD_80211ax } },
|
||||
{ WIFI_STANDARD_80211ax_5GHZ, { WIFI_PHY_STANDARD_80211ax, WIFI_PHY_BAND_5GHZ, WIFI_MAC_STANDARD_80211ax } },
|
||||
{ WIFI_STANDARD_80211ax_6GHZ, { WIFI_PHY_STANDARD_80211ax, WIFI_PHY_BAND_6GHZ, WIFI_MAC_STANDARD_80211ax } }
|
||||
{ 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_80211ax, { WIFI_PHY_BAND_2_4GHZ, WIFI_PHY_BAND_5GHZ, WIFI_PHY_BAND_6GHZ } }
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -212,18 +101,18 @@ enum FrequencyChannelType : uint8_t
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the type of the frequency channel for the given PHY standard
|
||||
* Get the type of the frequency channel for the given standard
|
||||
*
|
||||
* \param standard the PHY standard
|
||||
* \return the type of the frequency channel for the given PHY standard
|
||||
* \param standard the standard
|
||||
* \return the type of the frequency channel for the given standard
|
||||
*/
|
||||
inline FrequencyChannelType GetFrequencyChannelType (WifiPhyStandard standard)
|
||||
inline FrequencyChannelType GetFrequencyChannelType (WifiStandard standard)
|
||||
{
|
||||
switch (standard)
|
||||
{
|
||||
case WIFI_PHY_STANDARD_80211b:
|
||||
case WIFI_STANDARD_80211b:
|
||||
return WIFI_PHY_DSSS_CHANNEL;
|
||||
case WIFI_PHY_STANDARD_80211p:
|
||||
case WIFI_STANDARD_80211p:
|
||||
return WIFI_PHY_80211p_CHANNEL;
|
||||
default:
|
||||
return WIFI_PHY_OFDM_CHANNEL;
|
||||
@@ -231,26 +120,26 @@ inline FrequencyChannelType GetFrequencyChannelType (WifiPhyStandard standard)
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the maximum channel width in MHz allowed for the given PHY standard.
|
||||
* Get the maximum channel width in MHz allowed for the given standard.
|
||||
*
|
||||
* \param standard the PHY standard
|
||||
* \return the maximum channel width in MHz allowed for the given PHY standard
|
||||
* \param standard the standard
|
||||
* \return the maximum channel width in MHz allowed for the given standard
|
||||
*/
|
||||
inline uint16_t GetMaximumChannelWidth (WifiPhyStandard standard)
|
||||
inline uint16_t GetMaximumChannelWidth (WifiStandard standard)
|
||||
{
|
||||
switch (standard)
|
||||
{
|
||||
case WIFI_PHY_STANDARD_80211b:
|
||||
case WIFI_STANDARD_80211b:
|
||||
return 22;
|
||||
case WIFI_PHY_STANDARD_80211p:
|
||||
case WIFI_STANDARD_80211p:
|
||||
return 10;
|
||||
case WIFI_PHY_STANDARD_80211a:
|
||||
case WIFI_PHY_STANDARD_80211g:
|
||||
case WIFI_STANDARD_80211a:
|
||||
case WIFI_STANDARD_80211g:
|
||||
return 20;
|
||||
case WIFI_PHY_STANDARD_80211n:
|
||||
case WIFI_STANDARD_80211n:
|
||||
return 40;
|
||||
case WIFI_PHY_STANDARD_80211ac:
|
||||
case WIFI_PHY_STANDARD_80211ax:
|
||||
case WIFI_STANDARD_80211ac:
|
||||
case WIFI_STANDARD_80211ax:
|
||||
return 160;
|
||||
default:
|
||||
NS_ABORT_MSG ("Unknown standard: " << standard);
|
||||
@@ -261,21 +150,21 @@ inline uint16_t GetMaximumChannelWidth (WifiPhyStandard standard)
|
||||
/**
|
||||
* Get the default channel width for the given PHY standard and band.
|
||||
*
|
||||
* \param standard the given PHY standard
|
||||
* \param standard the given standard
|
||||
* \param band the given PHY band
|
||||
* \return the default channel width (MHz) for the given PHY standard
|
||||
* \return the default channel width (MHz) for the given standard
|
||||
*/
|
||||
inline uint16_t GetDefaultChannelWidth (WifiPhyStandard standard, WifiPhyBand band)
|
||||
inline uint16_t GetDefaultChannelWidth (WifiStandard standard, WifiPhyBand band)
|
||||
{
|
||||
switch (standard)
|
||||
{
|
||||
case WIFI_PHY_STANDARD_80211b:
|
||||
case WIFI_STANDARD_80211b:
|
||||
return 22;
|
||||
case WIFI_PHY_STANDARD_80211p:
|
||||
case WIFI_STANDARD_80211p:
|
||||
return 10;
|
||||
case WIFI_PHY_STANDARD_80211ac:
|
||||
case WIFI_STANDARD_80211ac:
|
||||
return 80;
|
||||
case WIFI_PHY_STANDARD_80211ax:
|
||||
case WIFI_STANDARD_80211ax:
|
||||
return (band == WIFI_PHY_BAND_2_4GHZ ? 20 : 80);
|
||||
default:
|
||||
return 20;
|
||||
@@ -283,19 +172,19 @@ inline uint16_t GetDefaultChannelWidth (WifiPhyStandard standard, WifiPhyBand ba
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the default PHY band for the given PHY standard.
|
||||
* Get the default PHY band for the given standard.
|
||||
*
|
||||
* \param standard the given PHY standard
|
||||
* \return the default PHY band for the given PHY standard
|
||||
* \param standard the given standard
|
||||
* \return the default PHY band for the given standard
|
||||
*/
|
||||
inline WifiPhyBand GetDefaultPhyBand (WifiPhyStandard standard)
|
||||
inline WifiPhyBand GetDefaultPhyBand (WifiStandard standard)
|
||||
{
|
||||
switch (standard)
|
||||
{
|
||||
case WIFI_PHY_STANDARD_80211p:
|
||||
case WIFI_PHY_STANDARD_80211a:
|
||||
case WIFI_PHY_STANDARD_80211ac:
|
||||
case WIFI_PHY_STANDARD_80211ax:
|
||||
case WIFI_STANDARD_80211p:
|
||||
case WIFI_STANDARD_80211a:
|
||||
case WIFI_STANDARD_80211ac:
|
||||
case WIFI_STANDARD_80211ax:
|
||||
return WIFI_PHY_BAND_5GHZ;
|
||||
default:
|
||||
return WIFI_PHY_BAND_2_4GHZ;
|
||||
|
||||
@@ -1495,7 +1495,7 @@ BlockAckAggregationDisabledTest::DoRun (void)
|
||||
phy.SetChannel (channel.Create ());
|
||||
|
||||
WifiHelper wifi;
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n);
|
||||
Config::SetDefault ("ns3::WifiDefaultAckManager::BaThreshold", DoubleValue (0.125));
|
||||
wifi.SetRemoteStationManager ("ns3::IdealWifiManager");
|
||||
|
||||
|
||||
@@ -572,7 +572,7 @@ TestInterBssConstantObssPdAlgo::RunOne (void)
|
||||
phy.Set ("ChannelSettings", StringValue ("{36, 20, BAND_5GHZ, 0}"));
|
||||
|
||||
WifiHelper wifi;
|
||||
wifi.SetStandard (WIFI_STANDARD_80211ax_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211ax);
|
||||
wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
|
||||
"DataMode", StringValue ("HeMcs5"),
|
||||
"ControlMode", StringValue ("HeMcs0"));
|
||||
|
||||
@@ -102,7 +102,7 @@ PowerRateAdaptationTest::ConfigureNode ()
|
||||
phy->SetChannel (channel);
|
||||
phy->SetDevice (dev);
|
||||
phy->SetMobility (mobility);
|
||||
phy->ConfigureStandard (WIFI_PHY_STANDARD_80211a);
|
||||
phy->ConfigureStandard (WIFI_STANDARD_80211a);
|
||||
|
||||
/*
|
||||
* Configure power control parameters.
|
||||
|
||||
@@ -176,7 +176,7 @@ SpectrumWifiPhyBasicTest::DoSetup (void)
|
||||
{
|
||||
m_phy = CreateObject<SpectrumWifiPhy> ();
|
||||
m_phy->SetOperatingChannel (WifiPhy::ChannelTuple {CHANNEL_NUMBER, 0, WIFI_PHY_BAND_5GHZ, 0});
|
||||
m_phy->ConfigureStandard (WIFI_PHY_STANDARD_80211n);
|
||||
m_phy->ConfigureStandard (WIFI_STANDARD_80211n);
|
||||
Ptr<ErrorRateModel> error = CreateObject<NistErrorRateModel> ();
|
||||
m_phy->SetErrorRateModel (error);
|
||||
m_phy->SetReceiveOkCallback (MakeCallback (&SpectrumWifiPhyBasicTest::SpectrumWifiPhyRxSuccess, this));
|
||||
@@ -470,7 +470,7 @@ SpectrumWifiPhyFilterTest::DoSetup (void)
|
||||
Ptr<WifiNetDevice> txDev = CreateObject<WifiNetDevice> ();
|
||||
m_txPhy = CreateObject<ExtSpectrumWifiPhy> ();
|
||||
m_txPhy->CreateWifiSpectrumPhyInterface (txDev);
|
||||
m_txPhy->ConfigureStandard (WIFI_PHY_STANDARD_80211ax);
|
||||
m_txPhy->ConfigureStandard (WIFI_STANDARD_80211ax);
|
||||
Ptr<ErrorRateModel> error = CreateObject<NistErrorRateModel> ();
|
||||
m_txPhy->SetErrorRateModel (error);
|
||||
m_txPhy->SetDevice (txDev);
|
||||
@@ -485,7 +485,7 @@ SpectrumWifiPhyFilterTest::DoSetup (void)
|
||||
Ptr<WifiNetDevice> rxDev = CreateObject<WifiNetDevice> ();
|
||||
m_rxPhy = CreateObject<ExtSpectrumWifiPhy> ();
|
||||
m_rxPhy->CreateWifiSpectrumPhyInterface (rxDev);
|
||||
m_rxPhy->ConfigureStandard (WIFI_PHY_STANDARD_80211ax);
|
||||
m_rxPhy->ConfigureStandard (WIFI_STANDARD_80211ax);
|
||||
m_rxPhy->SetErrorRateModel (error);
|
||||
m_rxPhy->SetChannel (spectrumChannel);
|
||||
Ptr<ConstantPositionMobilityModel> sta1Mobility = CreateObject<ConstantPositionMobilityModel> ();
|
||||
@@ -526,7 +526,7 @@ SpectrumWifiPhyFilterTest::RunOne (void)
|
||||
break;
|
||||
}
|
||||
auto txChannelNum = std::get<0> (*WifiPhyOperatingChannel::FindFirst (0, txFrequency, m_txChannelWidth,
|
||||
WIFI_PHY_STANDARD_80211ax,
|
||||
WIFI_STANDARD_80211ax,
|
||||
WIFI_PHY_BAND_5GHZ));
|
||||
m_txPhy->SetOperatingChannel (WifiPhy::ChannelTuple {txChannelNum, m_txChannelWidth,
|
||||
(int)(WIFI_PHY_BAND_5GHZ), 0});
|
||||
@@ -549,7 +549,7 @@ SpectrumWifiPhyFilterTest::RunOne (void)
|
||||
break;
|
||||
}
|
||||
auto rxChannelNum = std::get<0> (*WifiPhyOperatingChannel::FindFirst (0, rxFrequency, m_rxChannelWidth,
|
||||
WIFI_PHY_STANDARD_80211ax,
|
||||
WIFI_STANDARD_80211ax,
|
||||
WIFI_PHY_BAND_5GHZ));
|
||||
m_rxPhy->SetOperatingChannel (WifiPhy::ChannelTuple {rxChannelNum, m_rxChannelWidth,
|
||||
(int)(WIFI_PHY_BAND_5GHZ), 0});
|
||||
|
||||
@@ -103,7 +103,7 @@ AmpduAggregationTest::DoRun (void)
|
||||
*/
|
||||
m_phy = CreateObject<YansWifiPhy> ();
|
||||
m_phy->SetDevice (m_device);
|
||||
m_phy->ConfigureStandard (WIFI_PHY_STANDARD_80211n);
|
||||
m_phy->ConfigureStandard (WIFI_STANDARD_80211n);
|
||||
m_device->SetPhy (m_phy);
|
||||
|
||||
/*
|
||||
@@ -123,7 +123,7 @@ AmpduAggregationTest::DoRun (void)
|
||||
m_mac->SetDevice (m_device);
|
||||
m_mac->SetWifiRemoteStationManager (m_manager);
|
||||
m_mac->SetAddress (Mac48Address ("00:00:00:00:00:01"));
|
||||
m_mac->ConfigureStandard (WIFI_STANDARD_80211n_5GHZ);
|
||||
m_mac->ConfigureStandard (WIFI_STANDARD_80211n);
|
||||
Ptr<FrameExchangeManager> fem = m_mac->GetFrameExchangeManager ();
|
||||
Ptr<WifiProtectionManager> protectionManager = CreateObject<WifiDefaultProtectionManager> ();
|
||||
protectionManager->SetWifiMac (m_mac);
|
||||
@@ -342,7 +342,7 @@ TwoLevelAggregationTest::DoRun (void)
|
||||
* Create device and attach HT configuration.
|
||||
*/
|
||||
m_device = CreateObject<WifiNetDevice> ();
|
||||
m_device->SetStandard (WIFI_STANDARD_80211n_5GHZ);
|
||||
m_device->SetStandard (WIFI_STANDARD_80211n);
|
||||
Ptr<HtConfiguration> htConfiguration = CreateObject<HtConfiguration> ();
|
||||
m_device->SetHtConfiguration (htConfiguration);
|
||||
|
||||
@@ -351,7 +351,7 @@ TwoLevelAggregationTest::DoRun (void)
|
||||
*/
|
||||
m_phy = CreateObject<YansWifiPhy> ();
|
||||
m_phy->SetDevice (m_device);
|
||||
m_phy->ConfigureStandard (WIFI_PHY_STANDARD_80211n);
|
||||
m_phy->ConfigureStandard (WIFI_STANDARD_80211n);
|
||||
m_device->SetPhy (m_phy);
|
||||
|
||||
/*
|
||||
@@ -371,7 +371,7 @@ TwoLevelAggregationTest::DoRun (void)
|
||||
m_mac->SetDevice (m_device);
|
||||
m_mac->SetWifiRemoteStationManager (m_manager);
|
||||
m_mac->SetAddress (Mac48Address ("00:00:00:00:00:01"));
|
||||
m_mac->ConfigureStandard (WIFI_STANDARD_80211n_5GHZ);
|
||||
m_mac->ConfigureStandard (WIFI_STANDARD_80211n);
|
||||
Ptr<FrameExchangeManager> fem = m_mac->GetFrameExchangeManager ();
|
||||
Ptr<WifiProtectionManager> protectionManager = CreateObject<WifiDefaultProtectionManager> ();
|
||||
protectionManager->SetWifiMac (m_mac);
|
||||
@@ -584,7 +584,7 @@ HeAggregationTest::DoRunSubTest (uint16_t bufferSize)
|
||||
*/
|
||||
m_phy = CreateObject<YansWifiPhy> ();
|
||||
m_phy->SetDevice (m_device);
|
||||
m_phy->ConfigureStandard (WIFI_PHY_STANDARD_80211ax);
|
||||
m_phy->ConfigureStandard (WIFI_STANDARD_80211ax);
|
||||
m_device->SetPhy (m_phy);
|
||||
|
||||
/*
|
||||
@@ -604,7 +604,7 @@ HeAggregationTest::DoRunSubTest (uint16_t bufferSize)
|
||||
m_mac->SetDevice (m_device);
|
||||
m_mac->SetWifiRemoteStationManager (m_manager);
|
||||
m_mac->SetAddress (Mac48Address ("00:00:00:00:00:01"));
|
||||
m_mac->ConfigureStandard (WIFI_STANDARD_80211ax_5GHZ);
|
||||
m_mac->ConfigureStandard (WIFI_STANDARD_80211ax);
|
||||
Ptr<FrameExchangeManager> fem = m_mac->GetFrameExchangeManager ();
|
||||
Ptr<WifiProtectionManager> protectionManager = CreateObject<WifiDefaultProtectionManager> ();
|
||||
protectionManager->SetWifiMac (m_mac);
|
||||
@@ -820,7 +820,7 @@ PreservePacketsInAmpdus::DoRun (void)
|
||||
phy.SetChannel (channel.Create ());
|
||||
|
||||
WifiHelper wifi;
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n);
|
||||
wifi.SetRemoteStationManager ("ns3::IdealWifiManager");
|
||||
|
||||
WifiMacHelper mac;
|
||||
|
||||
@@ -1146,7 +1146,7 @@ OfdmaAckSequenceTest::DoRun (void)
|
||||
Config::SetDefault ("ns3::WifiMacQueue::MaxDelay", TimeValue (Seconds (2)));
|
||||
|
||||
WifiHelper wifi;
|
||||
wifi.SetStandard (WIFI_STANDARD_80211ax_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211ax);
|
||||
wifi.SetRemoteStationManager ("ns3::IdealWifiManager");
|
||||
|
||||
WifiMacHelper mac;
|
||||
|
||||
@@ -655,7 +655,7 @@ TestDlOfdmaPhyTransmission::DoSetup (void)
|
||||
Ptr<WifiNetDevice> apDev = CreateObject<WifiNetDevice> ();
|
||||
m_phyAp = CreateObject<SpectrumWifiPhy> ();
|
||||
m_phyAp->CreateWifiSpectrumPhyInterface (apDev);
|
||||
m_phyAp->ConfigureStandard (WIFI_PHY_STANDARD_80211ax);
|
||||
m_phyAp->ConfigureStandard (WIFI_STANDARD_80211ax);
|
||||
Ptr<ErrorRateModel> error = CreateObject<NistErrorRateModel> ();
|
||||
m_phyAp->SetErrorRateModel (error);
|
||||
m_phyAp->SetDevice (apDev);
|
||||
@@ -670,7 +670,7 @@ TestDlOfdmaPhyTransmission::DoSetup (void)
|
||||
Ptr<WifiNetDevice> sta1Dev = CreateObject<WifiNetDevice> ();
|
||||
m_phySta1 = CreateObject<OfdmaSpectrumWifiPhy> (1);
|
||||
m_phySta1->CreateWifiSpectrumPhyInterface (sta1Dev);
|
||||
m_phySta1->ConfigureStandard (WIFI_PHY_STANDARD_80211ax);
|
||||
m_phySta1->ConfigureStandard (WIFI_STANDARD_80211ax);
|
||||
m_phySta1->SetErrorRateModel (error);
|
||||
m_phySta1->SetDevice (sta1Dev);
|
||||
m_phySta1->SetChannel (spectrumChannel);
|
||||
@@ -686,7 +686,7 @@ TestDlOfdmaPhyTransmission::DoSetup (void)
|
||||
Ptr<WifiNetDevice> sta2Dev = CreateObject<WifiNetDevice> ();
|
||||
m_phySta2 = CreateObject<OfdmaSpectrumWifiPhy> (2);
|
||||
m_phySta2->CreateWifiSpectrumPhyInterface (sta2Dev);
|
||||
m_phySta2->ConfigureStandard (WIFI_PHY_STANDARD_80211ax);
|
||||
m_phySta2->ConfigureStandard (WIFI_STANDARD_80211ax);
|
||||
m_phySta2->SetErrorRateModel (error);
|
||||
m_phySta2->SetDevice (sta2Dev);
|
||||
m_phySta2->SetChannel (spectrumChannel);
|
||||
@@ -702,7 +702,7 @@ TestDlOfdmaPhyTransmission::DoSetup (void)
|
||||
Ptr<WifiNetDevice> sta3Dev = CreateObject<WifiNetDevice> ();
|
||||
m_phySta3 = CreateObject<OfdmaSpectrumWifiPhy> (3);
|
||||
m_phySta3->CreateWifiSpectrumPhyInterface (sta3Dev);
|
||||
m_phySta3->ConfigureStandard (WIFI_PHY_STANDARD_80211ax);
|
||||
m_phySta3->ConfigureStandard (WIFI_STANDARD_80211ax);
|
||||
m_phySta3->SetErrorRateModel (error);
|
||||
m_phySta3->SetDevice (sta3Dev);
|
||||
m_phySta3->SetChannel (spectrumChannel);
|
||||
@@ -750,7 +750,7 @@ TestDlOfdmaPhyTransmission::RunOne (void)
|
||||
m_phySta3->AssignStreams (streamNumber);
|
||||
|
||||
auto channelNum = std::get<0> (*WifiPhyOperatingChannel::FindFirst (0, m_frequency, m_channelWidth,
|
||||
WIFI_PHY_STANDARD_80211ax,
|
||||
WIFI_STANDARD_80211ax,
|
||||
WIFI_PHY_BAND_5GHZ));
|
||||
|
||||
m_phyAp->SetOperatingChannel (WifiPhy::ChannelTuple {channelNum, m_channelWidth,
|
||||
@@ -1041,12 +1041,12 @@ TestUlOfdmaPpduUid::DoSetup (void)
|
||||
Ptr<WifiNetDevice> apDev = CreateObject<WifiNetDevice> ();
|
||||
m_phyAp = CreateObject<OfdmaSpectrumWifiPhy> (0);
|
||||
m_phyAp->CreateWifiSpectrumPhyInterface (apDev);
|
||||
m_phyAp->ConfigureStandard (WIFI_PHY_STANDARD_80211ax);
|
||||
m_phyAp->ConfigureStandard (WIFI_STANDARD_80211ax);
|
||||
Ptr<ErrorRateModel> error = CreateObject<NistErrorRateModel> ();
|
||||
m_phyAp->SetErrorRateModel (error);
|
||||
auto channelNum = std::get<0> (*WifiPhyOperatingChannel::FindFirst (0, DEFAULT_FREQUENCY,
|
||||
DEFAULT_CHANNEL_WIDTH,
|
||||
WIFI_PHY_STANDARD_80211ax,
|
||||
WIFI_STANDARD_80211ax,
|
||||
WIFI_PHY_BAND_5GHZ));
|
||||
m_phyAp->SetOperatingChannel (WifiPhy::ChannelTuple {channelNum, DEFAULT_CHANNEL_WIDTH,
|
||||
(int)(WIFI_PHY_BAND_5GHZ), 0});
|
||||
@@ -1063,7 +1063,7 @@ TestUlOfdmaPpduUid::DoSetup (void)
|
||||
Ptr<WifiNetDevice> sta1Dev = CreateObject<WifiNetDevice> ();
|
||||
m_phySta1 = CreateObject<OfdmaSpectrumWifiPhy> (1);
|
||||
m_phySta1->CreateWifiSpectrumPhyInterface (sta1Dev);
|
||||
m_phySta1->ConfigureStandard (WIFI_PHY_STANDARD_80211ax);
|
||||
m_phySta1->ConfigureStandard (WIFI_STANDARD_80211ax);
|
||||
m_phySta1->SetErrorRateModel (error);
|
||||
m_phySta1->SetOperatingChannel (WifiPhy::ChannelTuple {channelNum, DEFAULT_CHANNEL_WIDTH,
|
||||
(int)(WIFI_PHY_BAND_5GHZ), 0});
|
||||
@@ -1080,7 +1080,7 @@ TestUlOfdmaPpduUid::DoSetup (void)
|
||||
Ptr<WifiNetDevice> sta2Dev = CreateObject<WifiNetDevice> ();
|
||||
m_phySta2 = CreateObject<OfdmaSpectrumWifiPhy> (2);
|
||||
m_phySta2->CreateWifiSpectrumPhyInterface (sta2Dev);
|
||||
m_phySta2->ConfigureStandard (WIFI_PHY_STANDARD_80211ax);
|
||||
m_phySta2->ConfigureStandard (WIFI_STANDARD_80211ax);
|
||||
m_phySta2->SetErrorRateModel (error);
|
||||
m_phySta2->SetOperatingChannel (WifiPhy::ChannelTuple {channelNum, DEFAULT_CHANNEL_WIDTH,
|
||||
(int)(WIFI_PHY_BAND_5GHZ), 0});
|
||||
@@ -1509,7 +1509,7 @@ TestMultipleHeTbPreambles::DoSetup (void)
|
||||
{
|
||||
Ptr<WifiNetDevice> dev = CreateObject<WifiNetDevice> ();
|
||||
m_phy = CreateObject<OfdmaSpectrumWifiPhy> (0);
|
||||
m_phy->ConfigureStandard (WIFI_PHY_STANDARD_80211ax);
|
||||
m_phy->ConfigureStandard (WIFI_STANDARD_80211ax);
|
||||
Ptr<ErrorRateModel> error = CreateObject<NistErrorRateModel> ();
|
||||
Ptr<ApWifiMac> mac = CreateObject<ApWifiMac> ();
|
||||
mac->SetAttribute ("BeaconGeneration", BooleanValue (false));
|
||||
@@ -2134,13 +2134,13 @@ TestUlOfdmaPhyTransmission::DoSetup (void)
|
||||
|
||||
Ptr<Node> apNode = CreateObject<Node> ();
|
||||
Ptr<WifiNetDevice> apDev = CreateObject<WifiNetDevice> ();
|
||||
apDev->SetStandard (WIFI_STANDARD_80211ax_5GHZ);
|
||||
apDev->SetStandard (WIFI_STANDARD_80211ax);
|
||||
Ptr<ApWifiMac> apMac = CreateObject<ApWifiMac> ();
|
||||
apMac->SetAttribute ("BeaconGeneration", BooleanValue (false));
|
||||
apDev->SetMac (apMac);
|
||||
m_phyAp = CreateObject<OfdmaSpectrumWifiPhy> (0);
|
||||
m_phyAp->CreateWifiSpectrumPhyInterface (apDev);
|
||||
m_phyAp->ConfigureStandard (WIFI_PHY_STANDARD_80211ax);
|
||||
m_phyAp->ConfigureStandard (WIFI_STANDARD_80211ax);
|
||||
Ptr<HeConfiguration> heConfiguration = CreateObject<HeConfiguration> ();
|
||||
apDev->SetHeConfiguration (heConfiguration);
|
||||
Ptr<ErrorRateModel> error = CreateObject<NistErrorRateModel> ();
|
||||
@@ -2160,7 +2160,7 @@ TestUlOfdmaPhyTransmission::DoSetup (void)
|
||||
Ptr<WifiNetDevice> sta1Dev = CreateObject<WifiNetDevice> ();
|
||||
m_phySta1 = CreateObject<OfdmaSpectrumWifiPhy> (1);
|
||||
m_phySta1->CreateWifiSpectrumPhyInterface (sta1Dev);
|
||||
m_phySta1->ConfigureStandard (WIFI_PHY_STANDARD_80211ax);
|
||||
m_phySta1->ConfigureStandard (WIFI_STANDARD_80211ax);
|
||||
m_phySta1->SetErrorRateModel (error);
|
||||
m_phySta1->SetDevice (sta1Dev);
|
||||
m_phySta1->SetChannel (spectrumChannel);
|
||||
@@ -2175,7 +2175,7 @@ TestUlOfdmaPhyTransmission::DoSetup (void)
|
||||
Ptr<WifiNetDevice> sta2Dev = CreateObject<WifiNetDevice> ();
|
||||
m_phySta2 = CreateObject<OfdmaSpectrumWifiPhy> (2);
|
||||
m_phySta2->CreateWifiSpectrumPhyInterface (sta2Dev);
|
||||
m_phySta2->ConfigureStandard (WIFI_PHY_STANDARD_80211ax);
|
||||
m_phySta2->ConfigureStandard (WIFI_STANDARD_80211ax);
|
||||
m_phySta2->SetErrorRateModel (error);
|
||||
m_phySta2->SetDevice (sta2Dev);
|
||||
m_phySta2->SetChannel (spectrumChannel);
|
||||
@@ -2190,7 +2190,7 @@ TestUlOfdmaPhyTransmission::DoSetup (void)
|
||||
Ptr<WifiNetDevice> sta3Dev = CreateObject<WifiNetDevice> ();
|
||||
m_phySta3 = CreateObject<OfdmaSpectrumWifiPhy> (3);
|
||||
m_phySta3->CreateWifiSpectrumPhyInterface (sta3Dev);
|
||||
m_phySta3->ConfigureStandard (WIFI_PHY_STANDARD_80211ax);
|
||||
m_phySta3->ConfigureStandard (WIFI_STANDARD_80211ax);
|
||||
m_phySta3->SetErrorRateModel (error);
|
||||
m_phySta3->SetDevice (sta3Dev);
|
||||
m_phySta3->SetChannel (spectrumChannel);
|
||||
@@ -2370,7 +2370,7 @@ TestUlOfdmaPhyTransmission::RunOne (void)
|
||||
m_phySta3->AssignStreams (streamNumber);
|
||||
|
||||
auto channelNum = std::get<0> (*WifiPhyOperatingChannel::FindFirst (0, m_frequency, m_channelWidth,
|
||||
WIFI_PHY_STANDARD_80211ax,
|
||||
WIFI_STANDARD_80211ax,
|
||||
WIFI_PHY_BAND_5GHZ));
|
||||
|
||||
m_phyAp->SetOperatingChannel (WifiPhy::ChannelTuple {channelNum, m_channelWidth,
|
||||
@@ -3058,7 +3058,7 @@ TestPhyPaddingExclusion::DoSetup (void)
|
||||
apDev->SetMac (apMac);
|
||||
m_phyAp = CreateObject<OfdmaSpectrumWifiPhy> (0);
|
||||
m_phyAp->CreateWifiSpectrumPhyInterface (apDev);
|
||||
m_phyAp->ConfigureStandard (WIFI_PHY_STANDARD_80211ax);
|
||||
m_phyAp->ConfigureStandard (WIFI_STANDARD_80211ax);
|
||||
Ptr<HeConfiguration> heConfiguration = CreateObject<HeConfiguration> ();
|
||||
apDev->SetHeConfiguration (heConfiguration);
|
||||
Ptr<ErrorRateModel> error = CreateObject<NistErrorRateModel> ();
|
||||
@@ -3068,7 +3068,7 @@ TestPhyPaddingExclusion::DoSetup (void)
|
||||
m_phyAp->AssignStreams (streamNumber);
|
||||
auto channelNum = std::get<0> (*WifiPhyOperatingChannel::FindFirst (0, DEFAULT_FREQUENCY,
|
||||
DEFAULT_CHANNEL_WIDTH,
|
||||
WIFI_PHY_STANDARD_80211ax,
|
||||
WIFI_STANDARD_80211ax,
|
||||
WIFI_PHY_BAND_5GHZ));
|
||||
|
||||
m_phyAp->SetOperatingChannel (WifiPhy::ChannelTuple {channelNum, DEFAULT_CHANNEL_WIDTH,
|
||||
@@ -3085,7 +3085,7 @@ TestPhyPaddingExclusion::DoSetup (void)
|
||||
Ptr<WifiNetDevice> sta1Dev = CreateObject<WifiNetDevice> ();
|
||||
m_phySta1 = CreateObject<OfdmaSpectrumWifiPhy> (1);
|
||||
m_phySta1->CreateWifiSpectrumPhyInterface (sta1Dev);
|
||||
m_phySta1->ConfigureStandard (WIFI_PHY_STANDARD_80211ax);
|
||||
m_phySta1->ConfigureStandard (WIFI_STANDARD_80211ax);
|
||||
m_phySta1->SetErrorRateModel (error);
|
||||
m_phySta1->SetDevice (sta1Dev);
|
||||
m_phySta1->SetChannel (spectrumChannel);
|
||||
@@ -3102,7 +3102,7 @@ TestPhyPaddingExclusion::DoSetup (void)
|
||||
Ptr<WifiNetDevice> sta2Dev = CreateObject<WifiNetDevice> ();
|
||||
m_phySta2 = CreateObject<OfdmaSpectrumWifiPhy> (2);
|
||||
m_phySta2->CreateWifiSpectrumPhyInterface (sta2Dev);
|
||||
m_phySta2->ConfigureStandard (WIFI_PHY_STANDARD_80211ax);
|
||||
m_phySta2->ConfigureStandard (WIFI_STANDARD_80211ax);
|
||||
m_phySta2->SetErrorRateModel (error);
|
||||
m_phySta2->SetDevice (sta2Dev);
|
||||
m_phySta2->SetChannel (spectrumChannel);
|
||||
@@ -3453,7 +3453,7 @@ TestUlOfdmaPowerControl::DoSetup (void)
|
||||
spectrumPhy.Set ("ChannelSettings", StringValue ("{0, 0, BAND_5GHZ, 0}"));
|
||||
|
||||
WifiHelper wifi;
|
||||
wifi.SetStandard (WIFI_STANDARD_80211ax_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211ax);
|
||||
wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
|
||||
"DataMode", StringValue ("HeMcs7"),
|
||||
"ControlMode", StringValue ("HeMcs7"));
|
||||
|
||||
@@ -203,7 +203,7 @@ void
|
||||
TestThresholdPreambleDetectionWithoutFrameCapture::DoSetup (void)
|
||||
{
|
||||
m_phy = CreateObject<SpectrumWifiPhy> ();
|
||||
m_phy->ConfigureStandard (WIFI_PHY_STANDARD_80211ax);
|
||||
m_phy->ConfigureStandard (WIFI_STANDARD_80211ax);
|
||||
Ptr<ErrorRateModel> error = CreateObject<NistErrorRateModel> ();
|
||||
m_phy->SetErrorRateModel (error);
|
||||
m_phy->SetOperatingChannel (WifiPhy::ChannelTuple {CHANNEL_NUMBER, 0, WIFI_PHY_BAND_5GHZ, 0});
|
||||
@@ -567,7 +567,7 @@ void
|
||||
TestThresholdPreambleDetectionWithFrameCapture::DoSetup (void)
|
||||
{
|
||||
m_phy = CreateObject<SpectrumWifiPhy> ();
|
||||
m_phy->ConfigureStandard (WIFI_PHY_STANDARD_80211ax);
|
||||
m_phy->ConfigureStandard (WIFI_STANDARD_80211ax);
|
||||
Ptr<ErrorRateModel> error = CreateObject<NistErrorRateModel> ();
|
||||
m_phy->SetErrorRateModel (error);
|
||||
m_phy->SetOperatingChannel (WifiPhy::ChannelTuple {CHANNEL_NUMBER, 0, WIFI_PHY_BAND_5GHZ, 0});
|
||||
@@ -1105,7 +1105,7 @@ void
|
||||
TestSimpleFrameCaptureModel::DoSetup (void)
|
||||
{
|
||||
m_phy = CreateObject<SpectrumWifiPhy> ();
|
||||
m_phy->ConfigureStandard (WIFI_PHY_STANDARD_80211ax);
|
||||
m_phy->ConfigureStandard (WIFI_STANDARD_80211ax);
|
||||
Ptr<ErrorRateModel> error = CreateObject<NistErrorRateModel> ();
|
||||
m_phy->SetErrorRateModel (error);
|
||||
m_phy->SetOperatingChannel (WifiPhy::ChannelTuple {CHANNEL_NUMBER, 0, WIFI_PHY_BAND_5GHZ, 0});
|
||||
@@ -1278,7 +1278,7 @@ void
|
||||
TestPhyHeadersReception::DoSetup (void)
|
||||
{
|
||||
m_phy = CreateObject<SpectrumWifiPhy> ();
|
||||
m_phy->ConfigureStandard (WIFI_PHY_STANDARD_80211ax);
|
||||
m_phy->ConfigureStandard (WIFI_STANDARD_80211ax);
|
||||
Ptr<ErrorRateModel> error = CreateObject<NistErrorRateModel> ();
|
||||
m_phy->SetErrorRateModel (error);
|
||||
m_phy->SetOperatingChannel (WifiPhy::ChannelTuple {CHANNEL_NUMBER, 0, WIFI_PHY_BAND_5GHZ, 0});
|
||||
@@ -1775,7 +1775,7 @@ void
|
||||
TestAmpduReception::DoSetup (void)
|
||||
{
|
||||
m_phy = CreateObject<SpectrumWifiPhy> ();
|
||||
m_phy->ConfigureStandard (WIFI_PHY_STANDARD_80211ax);
|
||||
m_phy->ConfigureStandard (WIFI_STANDARD_80211ax);
|
||||
Ptr<ErrorRateModel> error = CreateObject<NistErrorRateModel> ();
|
||||
m_phy->SetErrorRateModel (error);
|
||||
m_phy->SetOperatingChannel (WifiPhy::ChannelTuple {CHANNEL_NUMBER, 0, WIFI_PHY_BAND_5GHZ, 0});
|
||||
@@ -2449,12 +2449,12 @@ TestUnsupportedModulationReception::DoRun (void)
|
||||
mac.SetType ("ns3::StaWifiMac", "QosSupported", BooleanValue (true), "Ssid",
|
||||
SsidValue (Ssid ("non-existent-ssid")));
|
||||
|
||||
wifi.SetStandard (WIFI_STANDARD_80211ax_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211ax);
|
||||
m_staDevices.Add (wifi.Install (phy, mac, wifiStaNodes.Get (0)));
|
||||
wifi.SetStandard (WIFI_STANDARD_80211ac);
|
||||
m_staDevices.Add (wifi.Install (phy, mac, wifiStaNodes.Get (1)));
|
||||
|
||||
wifi.SetStandard (WIFI_STANDARD_80211ax_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211ax);
|
||||
mac.SetType ("ns3::ApWifiMac", "QosSupported", BooleanValue (true), "Ssid",
|
||||
SsidValue (Ssid ("wifi-backoff-ssid")), "BeaconInterval",
|
||||
TimeValue (MicroSeconds (102400)), "EnableBeaconJitter", BooleanValue (false));
|
||||
|
||||
@@ -230,7 +230,7 @@ void
|
||||
WifiPhyThresholdsTest::DoSetup (void)
|
||||
{
|
||||
m_phy = CreateObject<SpectrumWifiPhy> ();
|
||||
m_phy->ConfigureStandard (WIFI_PHY_STANDARD_80211ax);
|
||||
m_phy->ConfigureStandard (WIFI_STANDARD_80211ax);
|
||||
Ptr<ErrorRateModel> error = CreateObject<NistErrorRateModel> ();
|
||||
m_phy->SetErrorRateModel (error);
|
||||
m_phy->SetOperatingChannel (WifiPhy::ChannelTuple {CHANNEL_NUMBER, 0, WIFI_PHY_BAND_5GHZ, 0});
|
||||
|
||||
@@ -343,7 +343,7 @@ WifiPrimaryChannelsTest::DoSetup (void)
|
||||
phy.SetChannel (spectrumChannel);
|
||||
|
||||
WifiHelper wifi;
|
||||
wifi.SetStandard (WIFI_STANDARD_80211ax_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211ax);
|
||||
wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager");
|
||||
|
||||
WifiMacHelper mac;
|
||||
|
||||
@@ -162,7 +162,7 @@ WifiTest::CreateOne (Vector pos, Ptr<YansWifiChannel> channel)
|
||||
phy->SetErrorRateModel (error);
|
||||
phy->SetChannel (channel);
|
||||
phy->SetDevice (dev);
|
||||
phy->ConfigureStandard (WIFI_PHY_STANDARD_80211a);
|
||||
phy->ConfigureStandard (WIFI_STANDARD_80211a);
|
||||
Ptr<WifiRemoteStationManager> manager = m_manager.Create<WifiRemoteStationManager> ();
|
||||
|
||||
mobility->SetPosition (pos);
|
||||
@@ -339,7 +339,7 @@ InterferenceHelperSequenceTest::CreateOne (Vector pos, Ptr<YansWifiChannel> chan
|
||||
phy->SetChannel (channel);
|
||||
phy->SetDevice (dev);
|
||||
phy->SetMobility (mobility);
|
||||
phy->ConfigureStandard (WIFI_PHY_STANDARD_80211a);
|
||||
phy->ConfigureStandard (WIFI_STANDARD_80211a);
|
||||
Ptr<WifiRemoteStationManager> manager = m_manager.Create<WifiRemoteStationManager> ();
|
||||
|
||||
mobility->SetPosition (pos);
|
||||
@@ -547,7 +547,7 @@ DcfImmediateAccessBroadcastTestCase::DoRun (void)
|
||||
txPhy->SetChannel (channel);
|
||||
txPhy->SetDevice (txDev);
|
||||
txPhy->SetMobility (txMobility);
|
||||
txPhy->ConfigureStandard (WIFI_PHY_STANDARD_80211a);
|
||||
txPhy->ConfigureStandard (WIFI_STANDARD_80211a);
|
||||
|
||||
txPhy->TraceConnectWithoutContext ("PhyTxBegin", MakeCallback (&DcfImmediateAccessBroadcastTestCase::NotifyPhyTxBegin, this));
|
||||
|
||||
@@ -811,7 +811,7 @@ QosFragmentationTestCase::DoRun (void)
|
||||
phy.SetChannel (channel.Create ());
|
||||
|
||||
WifiHelper wifi;
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n);
|
||||
wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
|
||||
"DataMode", StringValue ("HtMcs7"));
|
||||
|
||||
@@ -994,7 +994,7 @@ SetChannelFrequencyTest::DoRun ()
|
||||
// case 4:
|
||||
WifiHelper wifi;
|
||||
wifi.SetRemoteStationManager ("ns3::IdealWifiManager");
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n);
|
||||
phy.Set ("ChannelSettings", StringValue ("{0, 0, BAND_5GHZ, 0}"));
|
||||
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
|
||||
phySta = GetYansWifiPhyPtr (staDevice);
|
||||
@@ -1007,7 +1007,7 @@ SetChannelFrequencyTest::DoRun ()
|
||||
// case 5:
|
||||
WifiHelper wifi;
|
||||
wifi.SetRemoteStationManager ("ns3::IdealWifiManager");
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n_2_4GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n);
|
||||
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
|
||||
phySta = GetYansWifiPhyPtr (staDevice);
|
||||
NS_TEST_ASSERT_MSG_EQ (phySta->GetChannelNumber (), 1, "802.11n-2.4GHz configuration");
|
||||
@@ -1029,7 +1029,7 @@ SetChannelFrequencyTest::DoRun ()
|
||||
// case 7:
|
||||
WifiHelper wifi;
|
||||
wifi.SetRemoteStationManager ("ns3::IdealWifiManager");
|
||||
wifi.SetStandard (WIFI_STANDARD_80211ax_2_4GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211ax);
|
||||
phy.Set ("ChannelSettings", StringValue ("{0, 0, BAND_2_4GHZ, 0}"));
|
||||
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
|
||||
phySta = GetYansWifiPhyPtr (staDevice);
|
||||
@@ -1042,7 +1042,7 @@ SetChannelFrequencyTest::DoRun ()
|
||||
// case 8:
|
||||
WifiHelper wifi;
|
||||
wifi.SetRemoteStationManager ("ns3::IdealWifiManager");
|
||||
wifi.SetStandard (WIFI_STANDARD_80211ax_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211ax);
|
||||
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
|
||||
phySta = GetYansWifiPhyPtr (staDevice);
|
||||
NS_TEST_ASSERT_MSG_EQ (phySta->GetChannelNumber (), 42, "802.11ax-5GHz configuration");
|
||||
@@ -1053,7 +1053,7 @@ SetChannelFrequencyTest::DoRun ()
|
||||
// case 9:
|
||||
WifiHelper wifi;
|
||||
wifi.SetRemoteStationManager ("ns3::IdealWifiManager");
|
||||
wifi.SetStandard (WIFI_STANDARD_80211ax_6GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211ax);
|
||||
phy.Set ("ChannelSettings", StringValue ("{0, 0, BAND_6GHZ, 0}"));
|
||||
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
|
||||
phySta = GetYansWifiPhyPtr (staDevice);
|
||||
@@ -1092,7 +1092,7 @@ SetChannelFrequencyTest::DoRun ()
|
||||
// case 12:
|
||||
WifiHelper wifi;
|
||||
wifi.SetRemoteStationManager ("ns3::IdealWifiManager");
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n);
|
||||
phy.Set ("ChannelSettings", StringValue ("{44, 20, BAND_5GHZ, 0}"));
|
||||
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
|
||||
phySta = GetYansWifiPhyPtr (staDevice);
|
||||
@@ -1139,7 +1139,7 @@ SetChannelFrequencyTest::DoRun ()
|
||||
// case 15:
|
||||
WifiHelper wifi;
|
||||
wifi.SetRemoteStationManager ("ns3::IdealWifiManager");
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n_2_4GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n);
|
||||
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
|
||||
phySta = GetYansWifiPhyPtr (staDevice);
|
||||
phySta->SetAttribute ("ChannelSettings", StringValue ("{3, 20, BAND_2_4GHZ, 0}"));
|
||||
@@ -1160,7 +1160,7 @@ SetChannelFrequencyTest::DoRun ()
|
||||
WifiHelper wifi;
|
||||
wifi.SetRemoteStationManager ("ns3::IdealWifiManager");
|
||||
// Test that setting Frequency to a non-standard value will throw an exception
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n);
|
||||
phy.Set ("ChannelSettings", StringValue ("{44, 0, BAND_5GHZ, 0}"));
|
||||
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
|
||||
phySta = GetYansWifiPhyPtr (staDevice);
|
||||
@@ -1180,7 +1180,7 @@ SetChannelFrequencyTest::DoRun ()
|
||||
// case 17:
|
||||
WifiHelper wifi;
|
||||
wifi.SetRemoteStationManager ("ns3::IdealWifiManager");
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n);
|
||||
phy.Set ("ChannelSettings", StringValue ("{44, 0, BAND_5GHZ, 0}"));
|
||||
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
|
||||
phySta = GetYansWifiPhyPtr (staDevice);
|
||||
@@ -1197,7 +1197,7 @@ SetChannelFrequencyTest::DoRun ()
|
||||
// Set a wrong channel after initialization
|
||||
WifiHelper wifi;
|
||||
wifi.SetRemoteStationManager ("ns3::IdealWifiManager");
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n);
|
||||
phy.Set ("ChannelSettings", StringValue ("{44, 0, BAND_5GHZ, 0}"));
|
||||
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
|
||||
phySta = GetYansWifiPhyPtr (staDevice);
|
||||
@@ -1218,7 +1218,7 @@ SetChannelFrequencyTest::DoRun ()
|
||||
WifiHelper wifi;
|
||||
wifi.SetRemoteStationManager ("ns3::IdealWifiManager");
|
||||
// Test how channel number behaves when frequency is non-standard
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n);
|
||||
phy.Set ("ChannelSettings", StringValue ("{44, 0, BAND_5GHZ, 0}"));
|
||||
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
|
||||
phySta = GetYansWifiPhyPtr (staDevice);
|
||||
@@ -1259,14 +1259,14 @@ SetChannelFrequencyTest::DoRun ()
|
||||
WifiHelper wifi;
|
||||
wifi.SetRemoteStationManager ("ns3::IdealWifiManager");
|
||||
phy.Set ("ChannelSettings", StringValue ("{40, 0, BAND_5GHZ, 0}"));
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n);
|
||||
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
|
||||
phySta = GetYansWifiPhyPtr (staDevice);
|
||||
NS_TEST_ASSERT_MSG_EQ (phySta->GetChannelNumber (), 40, "802.11 5GHz configuration");
|
||||
NS_TEST_ASSERT_MSG_EQ (phySta->GetChannelWidth (), 20, "802.11 5GHz configuration");
|
||||
NS_TEST_ASSERT_MSG_EQ (phySta->GetFrequency (), 5200, "802.11 5GHz configuration");
|
||||
// Set both channel and frequency to consistent values after initialization
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n);
|
||||
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
|
||||
phySta = GetYansWifiPhyPtr (staDevice);
|
||||
phySta->SetAttribute ("ChannelSettings", StringValue ("{40, 0, BAND_5GHZ, 0}"));
|
||||
@@ -1731,7 +1731,7 @@ Bug2831TestCase::DoRun (void)
|
||||
|
||||
Ptr<Node> apNode = CreateObject<Node> ();
|
||||
Ptr<WifiNetDevice> apDev = CreateObject<WifiNetDevice> ();
|
||||
apDev->SetStandard (WIFI_STANDARD_80211ax_5GHZ);
|
||||
apDev->SetStandard (WIFI_STANDARD_80211ax);
|
||||
Ptr<HtConfiguration> apHtConfiguration = CreateObject<HtConfiguration> ();
|
||||
apDev->SetHtConfiguration (apHtConfiguration);
|
||||
ObjectFactory mac;
|
||||
@@ -1741,7 +1741,7 @@ Bug2831TestCase::DoRun (void)
|
||||
Ptr<RegularWifiMac> apMac = mac.Create<RegularWifiMac> ();
|
||||
apMac->SetDevice (apDev);
|
||||
apMac->SetAddress (Mac48Address::Allocate ());
|
||||
apMac->ConfigureStandard (WIFI_STANDARD_80211ax_5GHZ);
|
||||
apMac->ConfigureStandard (WIFI_STANDARD_80211ax);
|
||||
Ptr<FrameExchangeManager> fem = apMac->GetFrameExchangeManager ();
|
||||
Ptr<WifiProtectionManager> protectionManager = CreateObject<WifiDefaultProtectionManager> ();
|
||||
protectionManager->SetWifiMac (apMac);
|
||||
@@ -1752,14 +1752,14 @@ Bug2831TestCase::DoRun (void)
|
||||
|
||||
Ptr<Node> staNode = CreateObject<Node> ();
|
||||
Ptr<WifiNetDevice> staDev = CreateObject<WifiNetDevice> ();
|
||||
staDev->SetStandard (WIFI_STANDARD_80211ax_5GHZ);
|
||||
staDev->SetStandard (WIFI_STANDARD_80211ax);
|
||||
Ptr<HtConfiguration> staHtConfiguration = CreateObject<HtConfiguration> ();
|
||||
staDev->SetHtConfiguration (staHtConfiguration);
|
||||
mac.SetTypeId ("ns3::StaWifiMac");
|
||||
Ptr<RegularWifiMac> staMac = mac.Create<RegularWifiMac> ();
|
||||
staMac->SetDevice (staDev);
|
||||
staMac->SetAddress (Mac48Address::Allocate ());
|
||||
staMac->ConfigureStandard (WIFI_STANDARD_80211ax_5GHZ);
|
||||
staMac->ConfigureStandard (WIFI_STANDARD_80211ax);
|
||||
fem = staMac->GetFrameExchangeManager ();
|
||||
protectionManager = CreateObject<WifiDefaultProtectionManager> ();
|
||||
protectionManager->SetWifiMac (staMac);
|
||||
@@ -1778,7 +1778,7 @@ Bug2831TestCase::DoRun (void)
|
||||
m_apPhy->SetChannel (channel);
|
||||
m_apPhy->SetMobility (apMobility);
|
||||
m_apPhy->SetDevice (apDev);
|
||||
m_apPhy->ConfigureStandard (WIFI_PHY_STANDARD_80211ax);
|
||||
m_apPhy->ConfigureStandard (WIFI_STANDARD_80211ax);
|
||||
m_apPhy->SetOperatingChannel (WifiPhy::ChannelTuple {36, 20, (int)(WIFI_PHY_BAND_5GHZ), 0});
|
||||
|
||||
Ptr<ConstantPositionMobilityModel> staMobility = CreateObject<ConstantPositionMobilityModel> ();
|
||||
@@ -1790,7 +1790,7 @@ Bug2831TestCase::DoRun (void)
|
||||
m_staPhy->SetChannel (channel);
|
||||
m_staPhy->SetMobility (staMobility);
|
||||
m_staPhy->SetDevice (apDev);
|
||||
m_staPhy->ConfigureStandard (WIFI_PHY_STANDARD_80211ax);
|
||||
m_staPhy->ConfigureStandard (WIFI_STANDARD_80211ax);
|
||||
m_staPhy->SetOperatingChannel (WifiPhy::ChannelTuple {36, 20, (int)(WIFI_PHY_BAND_5GHZ), 0});
|
||||
|
||||
apDev->SetMac (apMac);
|
||||
@@ -1919,7 +1919,7 @@ StaWifiMacScanningTestCase::Setup (bool nearestApBeaconGeneration, bool staActiv
|
||||
phy.SetChannel (channel.Create ());
|
||||
|
||||
WifiHelper wifi;
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n_2_4GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n);
|
||||
wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager");
|
||||
|
||||
WifiMacHelper mac;
|
||||
@@ -2184,7 +2184,7 @@ Bug2470TestCase::RunSubtest (PointerValue apErrorModel, PointerValue staErrorMod
|
||||
phy.SetChannel (channel.Create ());
|
||||
|
||||
WifiHelper wifi;
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
|
||||
wifi.SetStandard (WIFI_STANDARD_80211n);
|
||||
wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
|
||||
"DataMode", StringValue ("HtMcs7"),
|
||||
"ControlMode", StringValue ("HtMcs7"));
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
* Constructor
|
||||
*
|
||||
* \param str test reference name
|
||||
* \param standard selected PHY standard
|
||||
* \param standard selected standard
|
||||
* \param band selected PHY band
|
||||
* \param bw bandwidth
|
||||
* \param maskRefsLeft vector of expected power values and corresponding indexes of generated PSD
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
* (only start and stop indexes/values given) for right guard bandwidth
|
||||
* \param tol tolerance (in dB)
|
||||
*/
|
||||
WifiOfdmMaskSlopesTestCase (const char* str, WifiPhyStandard standard, WifiPhyBand band, uint8_t bw,
|
||||
WifiOfdmMaskSlopesTestCase (const char* str, WifiStandard standard, WifiPhyBand band, uint8_t bw,
|
||||
IndexPowerVect maskRefsLeft, IndexPowerVect maskRefsRight, double tol);
|
||||
virtual ~WifiOfdmMaskSlopesTestCase ();
|
||||
|
||||
@@ -89,7 +89,7 @@ private:
|
||||
double tol);
|
||||
};
|
||||
|
||||
WifiOfdmMaskSlopesTestCase::WifiOfdmMaskSlopesTestCase (const char* str, WifiPhyStandard standard, WifiPhyBand band, uint8_t bw,
|
||||
WifiOfdmMaskSlopesTestCase::WifiOfdmMaskSlopesTestCase (const char* str, WifiStandard standard, WifiPhyBand band, uint8_t bw,
|
||||
IndexPowerVect maskRefsLeft, IndexPowerVect maskRefsRight, double tol)
|
||||
: TestCase (std::string ("SpectrumValue ") + str)
|
||||
{
|
||||
@@ -102,23 +102,23 @@ WifiOfdmMaskSlopesTestCase::WifiOfdmMaskSlopesTestCase (const char* str, WifiPhy
|
||||
|
||||
switch (standard)
|
||||
{
|
||||
case WIFI_PHY_STANDARD_80211p:
|
||||
case WIFI_STANDARD_80211p:
|
||||
NS_ASSERT ((bw == 5) || (bw == 10));
|
||||
freq = 5860;
|
||||
m_actualSpectrum = WifiSpectrumValueHelper::CreateOfdmTxPowerSpectralDensity (freq, bw, refTxPowerW, bw, -20.0, -28.0, outerBandMaximumRejection);
|
||||
break;
|
||||
|
||||
// 11g and 11a
|
||||
case WIFI_PHY_STANDARD_80211g:
|
||||
case WIFI_STANDARD_80211g:
|
||||
freq = 2412;
|
||||
// no break on purpose
|
||||
case WIFI_PHY_STANDARD_80211a:
|
||||
case WIFI_STANDARD_80211a:
|
||||
NS_ASSERT (bw == 20);
|
||||
m_actualSpectrum = WifiSpectrumValueHelper::CreateOfdmTxPowerSpectralDensity (freq, bw, refTxPowerW, bw, -20.0, -28.0, outerBandMaximumRejection);
|
||||
break;
|
||||
|
||||
// 11n
|
||||
case WIFI_PHY_STANDARD_80211n:
|
||||
case WIFI_STANDARD_80211n:
|
||||
if (band == WIFI_PHY_BAND_2_4GHZ)
|
||||
{
|
||||
freq = 2402 + (bw / 2); //so as to have 2412/2422 for 20/40
|
||||
@@ -129,13 +129,13 @@ WifiOfdmMaskSlopesTestCase::WifiOfdmMaskSlopesTestCase (const char* str, WifiPhy
|
||||
break;
|
||||
|
||||
// 11ac
|
||||
case WIFI_PHY_STANDARD_80211ac:
|
||||
case WIFI_STANDARD_80211ac:
|
||||
NS_ASSERT (bw == 20 || bw == 40 || bw == 80 || bw == 160);
|
||||
m_actualSpectrum = WifiSpectrumValueHelper::CreateHtOfdmTxPowerSpectralDensity (freq, bw, refTxPowerW, bw, -20.0, -28.0, outerBandMaximumRejection);
|
||||
break;
|
||||
|
||||
// 11ax
|
||||
case WIFI_PHY_STANDARD_80211ax:
|
||||
case WIFI_STANDARD_80211ax:
|
||||
if (band == WIFI_PHY_BAND_2_4GHZ)
|
||||
{
|
||||
NS_ASSERT (bw != 160); // not enough space in 2.4 GHz bands
|
||||
@@ -275,7 +275,7 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite ()
|
||||
maskSlopesRight.push_back (std::make_pair (160, -28.000)); // Middle band right (stop)
|
||||
maskSlopesRight.push_back (std::make_pair (161, -28.375)); // Outer band right (start)
|
||||
maskSlopesRight.push_back (std::make_pair (192, -40.0)); // Outer band right (stop)
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11p 5MHz", WIFI_PHY_STANDARD_80211p, WIFI_PHY_BAND_5GHZ,
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11p 5MHz", WIFI_STANDARD_80211p, WIFI_PHY_BAND_5GHZ,
|
||||
5, maskSlopesLeft, maskSlopesRight, tol),
|
||||
TestCase::QUICK);
|
||||
|
||||
@@ -299,7 +299,7 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite ()
|
||||
maskSlopesRight.push_back (std::make_pair (160, -28.000)); // Middle band right (stop)
|
||||
maskSlopesRight.push_back (std::make_pair (161, -28.375)); // Outer band right (start)
|
||||
maskSlopesRight.push_back (std::make_pair (192, -40.0)); // Outer band right (stop)
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11p 10MHz", WIFI_PHY_STANDARD_80211p, WIFI_PHY_BAND_5GHZ,
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11p 10MHz", WIFI_STANDARD_80211p, WIFI_PHY_BAND_5GHZ,
|
||||
10, maskSlopesLeft, maskSlopesRight, tol),
|
||||
TestCase::QUICK);
|
||||
|
||||
@@ -325,14 +325,14 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite ()
|
||||
maskSlopesRight.push_back (std::make_pair (160, -28.000)); // Middle band right (stop)
|
||||
maskSlopesRight.push_back (std::make_pair (161, -28.375)); // Outer band right (start)
|
||||
maskSlopesRight.push_back (std::make_pair (192, -40.0)); // Outer band right (stop)
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11a", WIFI_PHY_STANDARD_80211a, WIFI_PHY_BAND_5GHZ,
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11a", WIFI_STANDARD_80211a, WIFI_PHY_BAND_5GHZ,
|
||||
20, maskSlopesLeft, maskSlopesRight, tol),
|
||||
TestCase::QUICK);
|
||||
|
||||
// 11g
|
||||
NS_LOG_FUNCTION ("Check slopes for 11g");
|
||||
// same slppes as 11g
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11g", WIFI_PHY_STANDARD_80211g, WIFI_PHY_BAND_2_4GHZ,
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11g", WIFI_STANDARD_80211g, WIFI_PHY_BAND_2_4GHZ,
|
||||
20, maskSlopesLeft, maskSlopesRight, tol),
|
||||
TestCase::QUICK);
|
||||
|
||||
@@ -358,7 +358,7 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite ()
|
||||
maskSlopesRight.push_back (std::make_pair (160, -28.000)); // Middle band right (stop)
|
||||
maskSlopesRight.push_back (std::make_pair (161, -28.531)); // Outer band right (start)
|
||||
maskSlopesRight.push_back (std::make_pair (192, -45.000)); // Outer band right (stop)
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11n_2.4GHz 20MHz", WIFI_PHY_STANDARD_80211n, WIFI_PHY_BAND_2_4GHZ,
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11n_2.4GHz 20MHz", WIFI_STANDARD_80211n, WIFI_PHY_BAND_2_4GHZ,
|
||||
20, maskSlopesLeft, maskSlopesRight, tol),
|
||||
TestCase::QUICK);
|
||||
|
||||
@@ -382,7 +382,7 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite ()
|
||||
maskSlopesRight.push_back (std::make_pair (160, -28.000)); // Middle band right (stop)
|
||||
maskSlopesRight.push_back (std::make_pair (161, -28.375)); // Outer band right (start)
|
||||
maskSlopesRight.push_back (std::make_pair (192, -40.0)); // Outer band right (stop)
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11n_5GHz 20MHz", WIFI_PHY_STANDARD_80211n, WIFI_PHY_BAND_5GHZ,
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11n_5GHz 20MHz", WIFI_STANDARD_80211n, WIFI_PHY_BAND_5GHZ,
|
||||
20, maskSlopesLeft, maskSlopesRight, tol),
|
||||
TestCase::QUICK);
|
||||
|
||||
@@ -406,7 +406,7 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite ()
|
||||
maskSlopesRight.push_back (std::make_pair (320, -28.000)); // Middle band right (stop)
|
||||
maskSlopesRight.push_back (std::make_pair (321, -28.266)); // Outer band right (start)
|
||||
maskSlopesRight.push_back (std::make_pair (384, -45.000)); // Outer band right (stop)
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11n_2.4GHz 40MHz", WIFI_PHY_STANDARD_80211n, WIFI_PHY_BAND_2_4GHZ,
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11n_2.4GHz 40MHz", WIFI_STANDARD_80211n, WIFI_PHY_BAND_2_4GHZ,
|
||||
40, maskSlopesLeft, maskSlopesRight, tol),
|
||||
TestCase::QUICK);
|
||||
|
||||
@@ -430,7 +430,7 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite ()
|
||||
maskSlopesRight.push_back (std::make_pair (320, -28.000)); // Middle band right (stop)
|
||||
maskSlopesRight.push_back (std::make_pair (321, -28.188)); // Outer band right (start)
|
||||
maskSlopesRight.push_back (std::make_pair (384, -40.0)); // Outer band right (stop)
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11n_5GHz 40MHz", WIFI_PHY_STANDARD_80211n, WIFI_PHY_BAND_5GHZ,
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11n_5GHz 40MHz", WIFI_STANDARD_80211n, WIFI_PHY_BAND_5GHZ,
|
||||
40, maskSlopesLeft, maskSlopesRight, tol),
|
||||
TestCase::QUICK);
|
||||
|
||||
@@ -456,7 +456,7 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite ()
|
||||
maskSlopesRight.push_back (std::make_pair (160, -28.000)); // Middle band right (stop)
|
||||
maskSlopesRight.push_back (std::make_pair (161, -28.375)); // Outer band right (start)
|
||||
maskSlopesRight.push_back (std::make_pair (192, -40.0)); // Outer band right (stop)
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ac 20MHz", WIFI_PHY_STANDARD_80211ac, WIFI_PHY_BAND_5GHZ,
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ac 20MHz", WIFI_STANDARD_80211ac, WIFI_PHY_BAND_5GHZ,
|
||||
20, maskSlopesLeft, maskSlopesRight, tol),
|
||||
TestCase::QUICK);
|
||||
|
||||
@@ -480,7 +480,7 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite ()
|
||||
maskSlopesRight.push_back (std::make_pair (320, -28.000)); // Middle band right (stop)
|
||||
maskSlopesRight.push_back (std::make_pair (321, -28.188)); // Outer band right (start)
|
||||
maskSlopesRight.push_back (std::make_pair (384, -40.0)); // Outer band right (stop)
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ac 40MHz", WIFI_PHY_STANDARD_80211ac, WIFI_PHY_BAND_5GHZ,
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ac 40MHz", WIFI_STANDARD_80211ac, WIFI_PHY_BAND_5GHZ,
|
||||
40, maskSlopesLeft, maskSlopesRight, tol),
|
||||
TestCase::QUICK);
|
||||
|
||||
@@ -504,7 +504,7 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite ()
|
||||
maskSlopesRight.push_back (std::make_pair (640, -28.000)); // Middle band right (stop)
|
||||
maskSlopesRight.push_back (std::make_pair (641, -28.094)); // Outer band right (start)
|
||||
maskSlopesRight.push_back (std::make_pair (768, -40.0)); // Outer band right (stop)
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ac 80MHz", WIFI_PHY_STANDARD_80211ac, WIFI_PHY_BAND_5GHZ,
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ac 80MHz", WIFI_STANDARD_80211ac, WIFI_PHY_BAND_5GHZ,
|
||||
80, maskSlopesLeft, maskSlopesRight, tol),
|
||||
TestCase::QUICK);
|
||||
|
||||
@@ -528,7 +528,7 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite ()
|
||||
maskSlopesRight.push_back (std::make_pair (1280, -28.000)); // Middle band right (stop)
|
||||
maskSlopesRight.push_back (std::make_pair (1281, -28.047)); // Outer band right (start)
|
||||
maskSlopesRight.push_back (std::make_pair (1536, -40.0)); // Outer band right (stop)
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ac 160MHz", WIFI_PHY_STANDARD_80211ac, WIFI_PHY_BAND_5GHZ,
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ac 160MHz", WIFI_STANDARD_80211ac, WIFI_PHY_BAND_5GHZ,
|
||||
160, maskSlopesLeft, maskSlopesRight, tol),
|
||||
TestCase::QUICK);
|
||||
|
||||
@@ -554,7 +554,7 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite ()
|
||||
maskSlopesRight.push_back (std::make_pair (640, -28.000)); // Middle band right (stop)
|
||||
maskSlopesRight.push_back (std::make_pair (641, -28.133)); // Outer band right (start)
|
||||
maskSlopesRight.push_back (std::make_pair (768, -45.000)); // Outer band right (stop)
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_2.4GHz 20MHz", WIFI_PHY_STANDARD_80211ax, WIFI_PHY_BAND_2_4GHZ,
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_2.4GHz 20MHz", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_2_4GHZ,
|
||||
20, maskSlopesLeft, maskSlopesRight, tol),
|
||||
TestCase::QUICK);
|
||||
|
||||
@@ -578,7 +578,7 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite ()
|
||||
maskSlopesRight.push_back (std::make_pair (640, -28.000)); // Middle band right (stop)
|
||||
maskSlopesRight.push_back (std::make_pair (641, -28.094)); // Outer band right (start)
|
||||
maskSlopesRight.push_back (std::make_pair (768, -40.0)); // Outer band right (stop)
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_5GHz 20MHz", WIFI_PHY_STANDARD_80211ax, WIFI_PHY_BAND_5GHZ,
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_5GHz 20MHz", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_5GHZ,
|
||||
20, maskSlopesLeft, maskSlopesRight, tol),
|
||||
TestCase::QUICK);
|
||||
|
||||
@@ -602,7 +602,7 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite ()
|
||||
maskSlopesRight.push_back (std::make_pair (1280, -28.000)); // Middle band right (stop)
|
||||
maskSlopesRight.push_back (std::make_pair (1281, -28.066)); // Outer band right (start)
|
||||
maskSlopesRight.push_back (std::make_pair (1536, -45.000)); // Outer band right (stop)
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_2.4GHz 40MHz", WIFI_PHY_STANDARD_80211ax, WIFI_PHY_BAND_2_4GHZ,
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_2.4GHz 40MHz", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_2_4GHZ,
|
||||
40, maskSlopesLeft, maskSlopesRight, tol),
|
||||
TestCase::QUICK);
|
||||
|
||||
@@ -626,7 +626,7 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite ()
|
||||
maskSlopesRight.push_back (std::make_pair (1280, -28.000)); // Middle band right (stop)
|
||||
maskSlopesRight.push_back (std::make_pair (1281, -28.047)); // Outer band right (start)
|
||||
maskSlopesRight.push_back (std::make_pair (1536, -40.0)); // Outer band right (stop)
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_5GHz 40MHz", WIFI_PHY_STANDARD_80211ax, WIFI_PHY_BAND_5GHZ,
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_5GHz 40MHz", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_5GHZ,
|
||||
40, maskSlopesLeft, maskSlopesRight, tol),
|
||||
TestCase::QUICK);
|
||||
|
||||
@@ -650,7 +650,7 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite ()
|
||||
maskSlopesRight.push_back (std::make_pair (2560, -28.000)); // Middle band right (stop)
|
||||
maskSlopesRight.push_back (std::make_pair (2561, -28.033)); // Outer band right (start)
|
||||
maskSlopesRight.push_back (std::make_pair (3072, -45.000)); // Outer band right (stop)
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_2.4GHz 80MHz", WIFI_PHY_STANDARD_80211ax, WIFI_PHY_BAND_2_4GHZ,
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_2.4GHz 80MHz", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_2_4GHZ,
|
||||
80, maskSlopesLeft, maskSlopesRight, tol),
|
||||
TestCase::QUICK);
|
||||
|
||||
@@ -674,7 +674,7 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite ()
|
||||
maskSlopesRight.push_back (std::make_pair (2560, -28.000)); // Middle band right (stop)
|
||||
maskSlopesRight.push_back (std::make_pair (2561, -28.023)); // Outer band right (start)
|
||||
maskSlopesRight.push_back (std::make_pair (3072, -40.0)); // Outer band right (stop)
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_5GHz 80MHz", WIFI_PHY_STANDARD_80211ax, WIFI_PHY_BAND_5GHZ,
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_5GHz 80MHz", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_5GHZ,
|
||||
80, maskSlopesLeft, maskSlopesRight, tol),
|
||||
TestCase::QUICK);
|
||||
|
||||
@@ -700,7 +700,7 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite ()
|
||||
maskSlopesRight.push_back (std::make_pair (5120, -28.000)); // Middle band right (stop)
|
||||
maskSlopesRight.push_back (std::make_pair (5121, -28.012)); // Outer band right (start)
|
||||
maskSlopesRight.push_back (std::make_pair (6144, -40.0)); // Outer band right (stop)
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_5GHz 160MHz", WIFI_PHY_STANDARD_80211ax, WIFI_PHY_BAND_5GHZ,
|
||||
AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_5GHz 160MHz", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_5GHZ,
|
||||
160, maskSlopesLeft, maskSlopesRight, tol),
|
||||
TestCase::QUICK);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user