From 0dfe8fa5df3386f628875ea1800766c81b3b0a26 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Mar 2008 13:49:45 -0700 Subject: [PATCH] use static method syntax to setup tracing --- examples/simple-global-routing.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/examples/simple-global-routing.cc b/examples/simple-global-routing.cc index 64ba1d1d9..0e9652b50 100644 --- a/examples/simple-global-routing.cc +++ b/examples/simple-global-routing.cc @@ -93,9 +93,6 @@ main (int argc, char *argv[]) CommandLine cmd; cmd.Parse (argc, argv); - std::ofstream ascii; - ascii.open ("simple-global-routing.tr"); - // Here, we will explicitly create four nodes. In more sophisticated // topologies, we could configure a node factory. NS_LOG_INFO ("Create nodes."); @@ -111,8 +108,6 @@ main (int argc, char *argv[]) // We create the channels first without any IP addressing information NS_LOG_INFO ("Create channels."); PointToPointHelper p2p; - p2p.EnablePcap ("simple-global-routing.pcap"); - p2p.EnableAscii (ascii); p2p.SetChannelParameter ("BitRate", DataRate (5000000)); p2p.SetChannelParameter ("Delay", MilliSeconds (2)); NetDeviceContainer d0d2 = p2p.Build (n0n2); @@ -169,6 +164,10 @@ main (int argc, char *argv[]) apps.Start (Seconds (1.1)); apps.Stop (Seconds (10.0)); + std::ofstream ascii; + ascii.open ("simple-global-routing.tr"); + PointToPointHelper::EnablePcap ("simple-global-routing.pcap"); + PointToPointHelper::EnableAscii (ascii); NS_LOG_INFO ("Run Simulation."); Simulator::Run ();