541 |
541 |
542 Experiment experiment; |
542 Experiment experiment; |
543 experiment = Experiment ("multirate"); |
543 experiment = Experiment ("multirate"); |
544 |
544 |
545 //for commandline input |
545 //for commandline input |
546 if (!experiment.CommandSetup(argc, argv)) |
546 NS_ASSERT_MSG (experiment.CommandSetup(argc, argv), |
547 { |
547 "Configuration failed..."); |
548 std::cout << "Configuration failed..." << std::endl; |
|
549 exit(1); |
|
550 } |
|
551 |
548 |
552 // disable fragmentation |
549 // disable fragmentation |
553 // set value to 0 for enabling fragmentation |
550 // set value to 0 for enabling fragmentation |
554 Config::SetDefault ("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue ("2200")); |
551 Config::SetDefault ("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue ("2200")); |
555 Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue (experiment.GetRtsThreshold())); |
552 Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue (experiment.GetRtsThreshold())); |
569 wifiMac.SetType ("ns3::AdhocWifiMac", "Ssid", SsidValue(ssid)); |
566 wifiMac.SetType ("ns3::AdhocWifiMac", "Ssid", SsidValue(ssid)); |
570 wifi.SetStandard (WIFI_PHY_STANDARD_holland); |
567 wifi.SetStandard (WIFI_PHY_STANDARD_holland); |
571 wifi.SetRemoteStationManager (experiment.GetRateManager()); |
568 wifi.SetRemoteStationManager (experiment.GetRateManager()); |
572 |
569 |
573 //printing out selection confirmation |
570 //printing out selection confirmation |
574 std::cout << "Scenario: " << experiment.GetScenario () << std::endl; |
571 NS_LOG_INFO ("Scenario: " << experiment.GetScenario ()); |
575 std::cout << "Rts Threshold: " << experiment.GetRtsThreshold() << std::endl; |
572 NS_LOG_INFO ("Rts Threshold: " << experiment.GetRtsThreshold()); |
576 std::cout << "Name: " << experiment.GetOutputFileName() << std::endl; |
573 NS_LOG_INFO ("Name: " << experiment.GetOutputFileName()); |
577 std::cout << "Rate: " << experiment.GetRateManager() << std::endl; |
574 NS_LOG_INFO ("Rate: " << experiment.GetRateManager()); |
578 std::cout << "Routing: " << experiment.IsRouting() << std::endl; |
575 NS_LOG_INFO ("Routing: " << experiment.IsRouting()); |
579 std::cout << "Mobility: " << experiment.IsMobility() << std::endl; |
576 NS_LOG_INFO ("Mobility: " << experiment.IsMobility()); |
580 |
577 |
581 dataset = experiment.Run (wifi, wifiPhy, wifiMac, wifiChannel, mobility); |
578 dataset = experiment.Run (wifi, wifiPhy, wifiMac, wifiChannel, mobility); |
582 |
579 |
583 gnuplot.AddDataset (dataset); |
580 gnuplot.AddDataset (dataset); |
584 gnuplot.GenerateOutput (outfile); |
581 gnuplot.GenerateOutput (outfile); |