1.1 --- a/examples/csma-bridge.cc Tue Sep 23 16:14:00 2008 -0700
1.2 +++ b/examples/csma-bridge.cc Tue Sep 23 16:31:54 2008 -0700
1.3 @@ -127,19 +127,21 @@
1.4 // Create an optional packet sink to receive these packets
1.5 PacketSinkHelper sink ("ns3::UdpSocketFactory",
1.6 Address (InetSocketAddress (Ipv4Address::GetAny (), port)));
1.7 - sink.Install (terminals.Get (1));
1.8 + app = sink.Install (terminals.Get (1));
1.9 + app.Start (Seconds (0.0));
1.10
1.11 //
1.12 // Create a similar flow from n3 to n0, starting at time 1.1 seconds
1.13 //
1.14 onoff.SetAttribute ("Remote",
1.15 AddressValue (InetSocketAddress (Ipv4Address ("10.1.1.1"), port)));
1.16 - ApplicationContainer app2 = onoff.Install (terminals.Get (3));
1.17 + app = onoff.Install (terminals.Get (3));
1.18 + app.Start (Seconds (1.1));
1.19 + app.Stop (Seconds (10.0));
1.20
1.21 - sink.Install (terminals.Get (0));
1.22 + app = sink.Install (terminals.Get (0));
1.23 + app.Start (Seconds (0.0));
1.24
1.25 - app2.Start (Seconds (1.1));
1.26 - app2.Stop (Seconds (10.0));
1.27
1.28 //
1.29 // Configure tracing of all enqueue, dequeue, and NetDevice receive events.
2.1 --- a/examples/csma-bridge.py Tue Sep 23 16:14:00 2008 -0700
2.2 +++ b/examples/csma-bridge.py Tue Sep 23 16:31:54 2008 -0700
2.3 @@ -107,19 +107,20 @@
2.4 # Create an optional packet sink to receive these packets
2.5 sink = ns3.PacketSinkHelper("ns3::UdpSocketFactory",
2.6 ns3.Address(ns3.InetSocketAddress(ns3.Ipv4Address.GetAny(), port)))
2.7 - sink.Install(ns3.NodeContainer(terminals.Get(1)))
2.8 + app = sink.Install(ns3.NodeContainer(terminals.Get(1)))
2.9 + app.Start (ns3.Seconds (0.0))
2.10
2.11 #
2.12 # Create a similar flow from n3 to n0, starting at time 1.1 seconds
2.13 #
2.14 onoff.SetAttribute("Remote",
2.15 ns3.AddressValue(ns3.InetSocketAddress(ns3.Ipv4Address("10.1.1.1"), port)))
2.16 - app2 = onoff.Install(ns3.NodeContainer(terminals.Get(3)))
2.17 + app = onoff.Install(ns3.NodeContainer(terminals.Get(3)))
2.18 + app.Start(ns3.Seconds(1.1))
2.19 + app.Stop(ns3.Seconds(10.0))
2.20
2.21 - sink.Install(ns3.NodeContainer(terminals.Get(0)))
2.22 -
2.23 - app2.Start(ns3.Seconds(1.1))
2.24 - app2.Stop(ns3.Seconds(10.0))
2.25 + app = sink.Install(ns3.NodeContainer(terminals.Get(0)))
2.26 + app.Start (ns3.Seconds (0.0))
2.27
2.28 #
2.29 # Configure tracing of all enqueue, dequeue, and NetDevice receive events.