Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2016 NITK Surathkal | 3 * Copyright (c) 2016 NITK Surathkal |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
130 ApplicationContainer clientApps2; | 130 ApplicationContainer clientApps2; |
131 clientHelper2.SetAttribute ("Remote", remoteAddress); | 131 clientHelper2.SetAttribute ("Remote", remoteAddress); |
132 clientApps2.Add (clientHelper2.Install (n1n2.Get (0))); | 132 clientApps2.Add (clientHelper2.Install (n1n2.Get (0))); |
133 clientApps2.Start (Seconds (client_start_time)); | 133 clientApps2.Start (Seconds (client_start_time)); |
134 clientApps2.Stop (Seconds (client_stop_time)); | 134 clientApps2.Stop (Seconds (client_stop_time)); |
135 } | 135 } |
136 | 136 |
137 int | 137 int |
138 main (int argc, char *argv[]) | 138 main (int argc, char *argv[]) |
139 { | 139 { |
140 #if 0 | |
140 LogComponentEnable ("PieQueueDisc", LOG_LEVEL_INFO); | 141 LogComponentEnable ("PieQueueDisc", LOG_LEVEL_INFO); |
142 #endif | |
141 | 143 |
142 std::string pieLinkDataRate = "1.5Mbps"; | 144 std::string pieLinkDataRate = "1.5Mbps"; |
143 std::string pieLinkDelay = "20ms"; | 145 std::string pieLinkDelay = "20ms"; |
144 | 146 |
145 std::string pathOut; | 147 std::string pathOut; |
146 bool writeForPlot = false; | 148 bool writeForPlot = false; |
147 bool writePcap = false; | 149 bool writePcap = false; |
148 bool flowMonitor = false; | 150 bool flowMonitor = false; |
149 | 151 |
150 bool printPieStats = true; | 152 bool printPieStats = true; |
151 | 153 |
152 global_start_time = 0.0; | 154 global_start_time = 0.0; |
153 sink_start_time = global_start_time; | 155 sink_start_time = global_start_time; |
154 client_start_time = global_start_time + 1.5; | 156 client_start_time = global_start_time + 1.5; |
155 global_stop_time = 7.0; | 157 global_stop_time = 7.0; |
156 sink_stop_time = global_stop_time + 3.0; | 158 sink_stop_time = global_stop_time + 3.0; |
157 client_stop_time = global_stop_time - 2.0; | 159 client_stop_time = global_stop_time - 2.0; |
158 | 160 |
159 // Configuration and command line parameter parsing | 161 // Configuration and command line parameter parsing |
160 // Will only save in the directory if enable opts below | 162 // Will only save in the directory if enable opts below |
161 pathOut = "."; // Current directory | 163 pathOut = "."; // Current directory |
162 | 164 |
Stefano Avallone
2017/12/29 22:56:38
Why?
ammo6818-vandals.uidaho.edu
2017/12/31 05:15:03
changed for formatting. There is other Windows on
| |
163 CommandLine cmd; | 165 CommandLine cmd; |
164 cmd.AddValue ("pathOut", "Path to save results from --writeForPlot/--writePcap /--writeFlowMonitor", pathOut); | 166 cmd.AddValue ("pathOut", "Path to save results from --writeForPlot/--writePcap /--writeFlowMonitor", pathOut); |
165 cmd.AddValue ("writeForPlot", "<0/1> to write results for plot (gnuplot)", wri teForPlot); | 167 cmd.AddValue ("writeForPlot", "<0/1> to write results for plot (gnuplot)", wri teForPlot); |
166 cmd.AddValue ("writePcap", "<0/1> to write results in pcapfile", writePcap); | 168 cmd.AddValue ("writePcap", "<0/1> to write results in pcapfile", writePcap); |
167 cmd.AddValue ("writeFlowMonitor", "<0/1> to enable Flow Monitor and write thei r results", flowMonitor); | 169 cmd.AddValue ("writeFlowMonitor", "<0/1> to enable Flow Monitor and write thei r results", flowMonitor); |
168 | 170 |
169 cmd.Parse (argc, argv); | 171 cmd.Parse (argc, argv); |
170 | 172 |
171 NS_LOG_INFO ("Create nodes"); | 173 NS_LOG_INFO ("Create nodes"); |
172 NodeContainer c; | 174 NodeContainer c; |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
327 std::cout << "\t " << st.GetNDroppedPackets (PieQueueDisc::UNFORCED_DROP) | 329 std::cout << "\t " << st.GetNDroppedPackets (PieQueueDisc::UNFORCED_DROP) |
328 << " drops due to prob mark" << std::endl; | 330 << " drops due to prob mark" << std::endl; |
329 std::cout << "\t " << st.GetNDroppedPackets (PieQueueDisc::FORCED_DROP) | 331 std::cout << "\t " << st.GetNDroppedPackets (PieQueueDisc::FORCED_DROP) |
330 << " drops due to queue limits" << std::endl; | 332 << " drops due to queue limits" << std::endl; |
331 } | 333 } |
332 | 334 |
333 Simulator::Destroy (); | 335 Simulator::Destroy (); |
334 | 336 |
335 return 0; | 337 return 0; |
336 } | 338 } |
LEFT | RIGHT |