Add enum class support to EnumValue

This commit is contained in:
André Apitzsch
2023-02-27 16:44:02 +01:00
parent 862c74b055
commit 647149e39a
59 changed files with 458 additions and 462 deletions

View File

@@ -150,7 +150,7 @@ main(int argc, char* argv[])
WifiMacHelper mac;
WifiHelper wifi;
Ssid ssid = Ssid("ns3");
TupleValue<UintegerValue, UintegerValue, EnumValue, UintegerValue> channelValue;
TupleValue<UintegerValue, UintegerValue, EnumValue<WifiPhyBand>, UintegerValue> channelValue;
const auto& [staStandard, staBand] = ConvertStringToStandardAndBand(staVersion);
wifi.SetStandard(staStandard);

View File

@@ -177,7 +177,8 @@ main(int argc, char* argv[])
wifi.ConfigHtOptions("ShortGuardIntervalSupported", BooleanValue(sgi));
Ssid ssid = Ssid("ns3-80211n");
TupleValue<UintegerValue, UintegerValue, EnumValue, UintegerValue> channelValue;
TupleValue<UintegerValue, UintegerValue, EnumValue<WifiPhyBand>, UintegerValue>
channelValue;
WifiPhyBand band = (frequency == 5.0 ? WIFI_PHY_BAND_5GHZ : WIFI_PHY_BAND_2_4GHZ);
channelValue.Set(WifiPhy::ChannelTuple{0, channelWidth, band, 0});