90 uint32_t backboneNodes = 10; |
90 uint32_t backboneNodes = 10; |
91 uint32_t infraNodes = 5; |
91 uint32_t infraNodes = 5; |
92 uint32_t lanNodes = 5; |
92 uint32_t lanNodes = 5; |
93 uint32_t stopTime = 10; |
93 uint32_t stopTime = 10; |
94 |
94 |
95 |
|
96 |
|
97 // |
95 // |
98 // Simulation defaults are typically set next, before command line |
96 // Simulation defaults are typically set next, before command line |
99 // arguments are parsed. |
97 // arguments are parsed. |
100 // |
98 // |
101 Config::SetDefault ("ns3::OnOffApplication::PacketSize", StringValue ("210")); |
99 Config::SetDefault ("ns3::OnOffApplication::PacketSize", StringValue ("210")); |
333 |
331 |
334 NS_LOG_INFO ("Configure Tracing."); |
332 NS_LOG_INFO ("Configure Tracing."); |
335 // |
333 // |
336 // Let's set up some ns-2-like ascii traces, using another helper class |
334 // Let's set up some ns-2-like ascii traces, using another helper class |
337 // |
335 // |
338 // Look at nodes 11, 13 only |
|
339 // XXX todo |
|
340 // asciiTrace.TraceQueues ("/NodeList/11|13/DeviceList/0"); |
|
341 // asciiTrace.TraceNetDeviceRx ("/NodeList/11|13/DeviceList/0"); |
|
342 std::ofstream ascii; |
336 std::ofstream ascii; |
343 ascii.open ("mixed-wireless.tr"); |
337 ascii.open ("mixed-wireless.tr"); |
344 WifiHelper::EnableAsciiAll (ascii); |
338 WifiHelper::EnableAsciiAll (ascii); |
345 CsmaHelper::EnableAsciiAll (ascii); |
339 CsmaHelper::EnableAsciiAll (ascii); |
|
340 // Look at nodes 11, 13 only |
|
341 //WifiHelper::EnableAscii (ascii, 11, 0); |
|
342 //WifiHelper::EnableAscii (ascii, 13, 0); |
346 |
343 |
347 // Let's do a pcap trace on the backbone devices |
344 // Let's do a pcap trace on the backbone devices |
348 WifiHelper::EnablePcap ("mixed-wireless", backboneDevices); |
345 WifiHelper::EnablePcap ("mixed-wireless", backboneDevices); |
349 // Let's additionally trace the application Sink, ifIndex 0 |
346 // Let's additionally trace the application Sink, ifIndex 0 |
350 CsmaHelper::EnablePcap ("mixed-wireless", appSink->GetId (), 0); |
347 CsmaHelper::EnablePcap ("mixed-wireless", appSink->GetId (), 0); |
351 |
348 |
352 #ifdef ENABLE_FOR_TRACING_EXAMPLE |
349 #ifdef ENABLE_FOR_TRACING_EXAMPLE |
353 Config::Connect ("/NodeList/*/$MobilityModelNotifier/CourseChange", |
350 Config::Connect ("/NodeList/*/$MobilityModelNotifier/CourseChange", |
354 MakeCallback (&CourseChangeCallback)); |
351 MakeCallback (&CourseChangeCallback)); |
355 #endif |
352 #endif |
|
353 |
356 |
354 |
357 /////////////////////////////////////////////////////////////////////////// |
355 /////////////////////////////////////////////////////////////////////////// |
358 // // |
356 // // |
359 // Run simulation // |
357 // Run simulation // |
360 // // |
358 // // |