examples/matrix-topology/matrix-topology.cc
changeset 9000 3ec20a64fd08
parent 8996 d0e0a162a990
child 9270 58b23c49c456
--- a/examples/matrix-topology/matrix-topology.cc	Thu Aug 23 10:52:15 2012 -0700
+++ b/examples/matrix-topology/matrix-topology.cc	Thu Aug 23 16:00:17 2012 -0700
@@ -252,8 +252,7 @@
               Ipv4InterfaceAddress ipv4_int_addr = ipv4->GetAddress (1, 0);
               Ipv4Address ip_addr = ipv4_int_addr.GetLocal ();
               OnOffHelper onoff ("ns3::UdpSocketFactory", InetSocketAddress (ip_addr, port)); // traffic flows from node[i] to node[j]
-              onoff.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1.0]"));
-              onoff.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0.0]"));
+              onoff.SetConstantRate (DataRate (AppPacketRate));
               ApplicationContainer apps = onoff.Install (nodes.Get (i));  // traffic sources are installed on all nodes
               apps.Start (Seconds (AppStartTime + rn));
               apps.Stop (Seconds (AppStopTime));