wifi: Simplify rate adaptation example

This commit is contained in:
André Apitzsch
2022-05-30 18:02:31 +02:00
committed by Stefano Avallone
parent ceb714e175
commit 19bf707a1d

View File

@@ -253,15 +253,15 @@ int main (int argc, char *argv[])
"Ssid", SsidValue (ssid));
wifiApDevices.Add (wifi.Install (wifiPhy, wifiMac, wifiApNodes.Get (0)));
}
else if (standard == "802.11n-2.4GHz" || standard == "802.11n-5GHz")
else if (standard == "802.11n-2.4GHz" || standard == "802.11n-5GHz" || standard == "802.11ac")
{
if (standard == "802.11n-2.4GHz")
if (standard == "802.11n-2.4GHz" || standard == "802.11n-5GHz")
{
wifi.SetStandard (WIFI_STANDARD_80211n);
}
else if (standard == "802.11n-5GHz")
else if (standard == "802.11ac")
{
wifi.SetStandard (WIFI_STANDARD_80211n);
wifi.SetStandard (WIFI_STANDARD_80211ac);
}
WifiMacHelper wifiMac;
@@ -282,29 +282,6 @@ int main (int argc, char *argv[])
"Ssid", SsidValue (ssid));
wifiApDevices.Add (wifi.Install (wifiPhy, wifiMac, wifiApNodes.Get (0)));
Config::Set ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/BE_MaxAmpduSize", UintegerValue (BeMaxAmpduSize));
}
else if (standard == "802.11ac")
{
wifi.SetStandard (WIFI_STANDARD_80211ac);
WifiMacHelper wifiMac;
//Configure the STA node
wifi.SetRemoteStationManager (staManager, "RtsCtsThreshold", UintegerValue (rtsThreshold));
Ssid ssid = Ssid ("AP");
wifiMac.SetType ("ns3::StaWifiMac",
"Ssid", SsidValue (ssid));
wifiStaDevices.Add (wifi.Install (wifiPhy, wifiMac, wifiStaNodes.Get (0)));
//Configure the AP node
wifi.SetRemoteStationManager (apManager, "RtsCtsThreshold", UintegerValue (rtsThreshold));
ssid = Ssid ("AP");
wifiMac.SetType ("ns3::ApWifiMac",
"Ssid", SsidValue (ssid));
wifiApDevices.Add (wifi.Install (wifiPhy, wifiMac, wifiApNodes.Get (0)));
Config::Set ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/BE_MaxAmpduSize", UintegerValue (BeMaxAmpduSize));
}