examples: Use fatal error in wifi network examples when incorrect configuration is provided
This commit is contained in:
committed by
Sébastien Deronne
parent
b6a05a83d2
commit
8fdb3a6fa0
@@ -318,8 +318,7 @@ main(int argc, char* argv[])
|
||||
if (frequency2 == frequency || frequency3 == frequency ||
|
||||
(frequency3 != 0 && frequency3 == frequency2))
|
||||
{
|
||||
std::cout << "Frequency values must be unique!" << std::endl;
|
||||
return 0;
|
||||
NS_FATAL_ERROR("Frequency values must be unique!");
|
||||
}
|
||||
|
||||
for (auto freq : {frequency, frequency2, frequency3})
|
||||
@@ -370,8 +369,7 @@ main(int argc, char* argv[])
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Wrong frequency value!" << std::endl;
|
||||
return 0;
|
||||
NS_FATAL_ERROR("Wrong frequency value!");
|
||||
}
|
||||
nLinks++;
|
||||
}
|
||||
|
||||
@@ -242,8 +242,7 @@ main(int argc, char* argv[])
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Wrong frequency value!" << std::endl;
|
||||
return 0;
|
||||
NS_FATAL_ERROR("Wrong frequency value!");
|
||||
}
|
||||
|
||||
wifi.SetRemoteStationManager("ns3::ConstantRateWifiManager",
|
||||
|
||||
@@ -159,8 +159,7 @@ main(int argc, char* argv[])
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Wrong frequency value!" << std::endl;
|
||||
return 0;
|
||||
NS_FATAL_ERROR("Wrong frequency value!");
|
||||
}
|
||||
|
||||
auto nonHtRefRateMbps = HtPhy::GetNonHtReferenceRate(mcs) / 1e6;
|
||||
|
||||
Reference in New Issue
Block a user