examples: Cleanup useless Config::SetDefault in wireless examples
This commit is contained in:
@@ -588,10 +588,6 @@ int main (int argc, char *argv[])
|
||||
//for commandline input
|
||||
experiment.CommandSetup (argc, argv);
|
||||
|
||||
// set value to 0 for enabling fragmentation
|
||||
Config::SetDefault ("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue ("2200"));
|
||||
Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue (experiment.GetRtsThreshold ()));
|
||||
|
||||
std::ofstream outfile ((experiment.GetOutputFileName () + ".plt").c_str ());
|
||||
|
||||
MobilityHelper mobility;
|
||||
|
||||
@@ -167,10 +167,6 @@ Experiment::Run (const WifiHelper &wifi, const YansWifiPhyHelper &wifiPhy,
|
||||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
// disable fragmentation
|
||||
Config::SetDefault ("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue ("2200"));
|
||||
Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue ("2200"));
|
||||
|
||||
CommandLine cmd;
|
||||
cmd.Parse (argc, argv);
|
||||
|
||||
|
||||
@@ -121,11 +121,6 @@ int main (int argc, char *argv[])
|
||||
|
||||
Packet::EnablePrinting ();
|
||||
|
||||
// enable rts cts all the time.
|
||||
Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue ("0"));
|
||||
// disable fragmentation
|
||||
Config::SetDefault ("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue ("2200"));
|
||||
|
||||
WifiHelper wifi;
|
||||
MobilityHelper mobility;
|
||||
NodeContainer stas;
|
||||
|
||||
@@ -99,11 +99,6 @@ def main(argv):
|
||||
|
||||
ns.network.Packet.EnablePrinting();
|
||||
|
||||
# enable rts cts all the time.
|
||||
ns.core.Config.SetDefault("ns3::WifiRemoteStationManager::RtsCtsThreshold", ns.core.StringValue("0"))
|
||||
# disable fragmentation
|
||||
ns.core.Config.SetDefault("ns3::WifiRemoteStationManager::FragmentationThreshold", ns.core.StringValue("2200"))
|
||||
|
||||
wifi = ns.wifi.WifiHelper()
|
||||
mobility = ns.mobility.MobilityHelper()
|
||||
stas = ns.network.NodeContainer()
|
||||
|
||||
@@ -174,9 +174,6 @@ int main (int argc, char *argv[])
|
||||
modes.push_back ("DsssRate2Mbps");
|
||||
modes.push_back ("DsssRate5_5Mbps");
|
||||
modes.push_back ("DsssRate11Mbps");
|
||||
// disable fragmentation
|
||||
Config::SetDefault ("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue ("2200"));
|
||||
Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue ("2200"));
|
||||
|
||||
CommandLine cmd;
|
||||
cmd.Parse (argc, argv);
|
||||
|
||||
@@ -141,10 +141,6 @@ int main (int argc, char *argv[])
|
||||
// Convert to time object
|
||||
Time interPacketInterval = Seconds (interval);
|
||||
|
||||
// disable fragmentation for frames below 2200 bytes
|
||||
Config::SetDefault ("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue ("2200"));
|
||||
// turn off RTS/CTS for frames below 2200 bytes
|
||||
Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue ("2200"));
|
||||
// Fix non-unicast data rate to be the same as that of unicast
|
||||
Config::SetDefault ("ns3::WifiRemoteStationManager::NonUnicastMode",
|
||||
StringValue (phyMode));
|
||||
|
||||
@@ -109,10 +109,6 @@ int main (int argc, char *argv[])
|
||||
// Convert to time object
|
||||
Time interPacketInterval = Seconds (interval);
|
||||
|
||||
// disable fragmentation for frames below 2200 bytes
|
||||
Config::SetDefault ("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue ("2200"));
|
||||
// turn off RTS/CTS for frames below 2200 bytes
|
||||
Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue ("2200"));
|
||||
// Fix non-unicast data rate to be the same as that of unicast
|
||||
Config::SetDefault ("ns3::WifiRemoteStationManager::NonUnicastMode",
|
||||
StringValue (phyMode));
|
||||
|
||||
@@ -111,10 +111,6 @@ int main (int argc, char *argv[])
|
||||
// Convert to time object
|
||||
Time interPacketInterval = Seconds (interval);
|
||||
|
||||
// disable fragmentation for frames below 2200 bytes
|
||||
Config::SetDefault ("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue ("2200"));
|
||||
// turn off RTS/CTS for frames below 2200 bytes
|
||||
Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue ("2200"));
|
||||
// Fix non-unicast data rate to be the same as that of unicast
|
||||
Config::SetDefault ("ns3::WifiRemoteStationManager::NonUnicastMode",
|
||||
StringValue (phyMode));
|
||||
|
||||
@@ -162,10 +162,6 @@ int main (int argc, char *argv[])
|
||||
// Convert to time object
|
||||
Time interPacketInterval = Seconds (interval);
|
||||
|
||||
// disable fragmentation for frames below 2200 bytes
|
||||
Config::SetDefault ("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue ("2200"));
|
||||
// turn off RTS/CTS for frames below 2200 bytes
|
||||
Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue ("2200"));
|
||||
// Fix non-unicast data rate to be the same as that of unicast
|
||||
Config::SetDefault ("ns3::WifiRemoteStationManager::NonUnicastMode",
|
||||
StringValue (phyMode));
|
||||
|
||||
@@ -89,11 +89,6 @@ main (int argc, char *argv[])
|
||||
cmd.Parse (argc, argv);
|
||||
|
||||
tcpVariant = std::string ("ns3::") + tcpVariant;
|
||||
|
||||
/* No fragmentation and no RTS/CTS */
|
||||
Config::SetDefault ("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue ("999999"));
|
||||
Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue ("999999"));
|
||||
|
||||
// Select TCP variant
|
||||
if (tcpVariant.compare ("ns3::TcpWestwoodPlus") == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user