On NS3 < 3.30 there was a constraint on NSS value vs MCS value, which was lifted since.
Add an explicit message and bail out before crashing.
And use a supported value for the example file, in order not to fail tests. This does not seem to affect tests.
<zone id="SSID_1" routing="WIFI">
<prop id="access_point" value="alice"/>
<prop id="mcs" value="2"/> <!-- Optionnal: default = 3 -->
- <prop id="nss" value="2"/> <!-- Optionnal: default = 1 -->
+ <prop id="nss" value="1"/> <!-- Optionnal: default = 1 -->
<host id="alice" speed="1Gf"/>
const char* nss = wifizone->get_property("nss");
int mcs_value = mcs ? atoi(mcs) : 3;
int nss_value = nss ? atoi(nss) : 1;
+#if NS3_MINOR_VERSION < 30
+ if(nss_value != 1+(mcs_value/8))
+ xbt_die("On NS3 < 3.30, NSS value has to satisfy NSS == 1+(MCS/8) constraint. Bailing out");
+#endif
wifi.SetRemoteStationManager("ns3::ConstantRateWifiManager",
"ControlMode", ns3::StringValue("HtMcs0"),
"DataMode", ns3::StringValue("HtMcs" + std::to_string(mcs_value)));