examples/routing/dynamic-global-routing.cc
changeset 8966 060dba23e9bb
parent 7196 0f12b1572bca
child 9000 3ec20a64fd08
--- a/examples/routing/dynamic-global-routing.cc	Mon Aug 13 10:46:09 2012 -0700
+++ b/examples/routing/dynamic-global-routing.cc	Mon Aug 13 16:08:13 2012 -0700
@@ -151,8 +151,8 @@
   uint16_t port = 9;   // Discard port (RFC 863)
   OnOffHelper onoff ("ns3::UdpSocketFactory",
                      InetSocketAddress (i5i6.GetAddress (1), port));
-  onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
-  onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
+  onoff.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
+  onoff.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
   onoff.SetAttribute ("DataRate", StringValue ("2kbps"));
   onoff.SetAttribute ("PacketSize", UintegerValue (50));
 
@@ -164,8 +164,8 @@
   // 210 bytes at a rate of 448 Kb/s
   OnOffHelper onoff2 ("ns3::UdpSocketFactory",
                       InetSocketAddress (i1i6.GetAddress (1), port));
-  onoff2.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
-  onoff2.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
+  onoff2.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
+  onoff2.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
   onoff2.SetAttribute ("DataRate", StringValue ("2kbps"));
   onoff2.SetAttribute ("PacketSize", UintegerValue (50));