Fix arguments to Time and DataRate objects for TCP examples
authorTom Henderson <tomh@tomh.org>
Mon, 20 Dec 2010 15:19:11 -0800
changeset 6698 bc947fbfac80
parent 6697 6f1114f669ff
child 6699 d8909a1fd0ff
Fix arguments to Time and DataRate objects for TCP examples
examples/tcp/tcp-loss-response.cc
examples/tcp/tcp-testcases.cc
--- a/examples/tcp/tcp-loss-response.cc	Sun Dec 19 21:57:21 2010 -0800
+++ b/examples/tcp/tcp-loss-response.cc	Mon Dec 20 15:19:11 2010 -0800
@@ -140,10 +140,10 @@
   // Connect the nodes
   PointToPointHelper p2p;
   p2p.SetDeviceAttribute ("DataRate", DataRateValue (DataRate (8000000)));
-  p2p.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (0.1)));
+  p2p.SetChannelAttribute ("Delay", TimeValue (Seconds (0.0001)));
   NetDeviceContainer dev0 = p2p.Install (s1r1);
   p2p.SetDeviceAttribute ("DataRate", DataRateValue (DataRate (800000)));
-  p2p.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (100)));
+  p2p.SetChannelAttribute ("Delay", TimeValue (Seconds (0.1)));
   NetDeviceContainer dev1 = p2p.Install (r1k1);
 
   // Add IP addresses to each network interfaces
--- a/examples/tcp/tcp-testcases.cc	Sun Dec 19 21:57:21 2010 -0800
+++ b/examples/tcp/tcp-testcases.cc	Mon Dec 20 15:19:11 2010 -0800
@@ -166,8 +166,8 @@
 
   // Connect the nodes
   PointToPointHelper p2p;
-  p2p.SetDeviceAttribute ("DataRate", DataRateValue (DataRate (1e6)));
-  p2p.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (0.1)));
+  p2p.SetDeviceAttribute ("DataRate", DataRateValue (DataRate (1000000)));
+  p2p.SetChannelAttribute ("Delay", TimeValue (Seconds (0.0001)));
   NetDeviceContainer dev0 = p2p.Install (n0n1);
   NetDeviceContainer dev1 = p2p.Install (n1n2);
 
@@ -214,7 +214,7 @@
       totalTxBytes = 1000;
       break;
     case 1: // Verify a bigger (100 pkts) transfer: Sliding window operation, etc.
-      totalTxBytes = 1e5;
+      totalTxBytes = 100*1000;
       break;
     case 2: // Survive a SYN lost
       totalTxBytes = 1000;