examples/simple-alternate-routing.cc
changeset 2575 1aae382e65e2
parent 2502 50d0da37f02f
child 2577 5b41cb5c3fcf
--- a/examples/simple-alternate-routing.cc	Sun Mar 09 23:43:29 2008 +0100
+++ b/examples/simple-alternate-routing.cc	Sun Mar 09 23:43:52 2008 +0100
@@ -103,15 +103,14 @@
   // DefaultValue::Bind () technique to tell the system what subclass of 
   // Queue to use, and what the queue limit is
 
-  // The below Bind command tells the queue factory which class to
-  // instantiate, when the queue factory is invoked in the topology code
-  DefaultValue::Bind ("Queue", "DropTailQueue");
 
   Config::SetDefault ("OnOffApplication::PacketSize", Uinteger (210));
   Config::SetDefault ("OnOffApplication::DataRate", DataRate ("300b/s"));
 
   // The below metric, if set to 3 or higher, will cause packets between
   // n1 and n3 to take the 2-hop route through n2
+
+  CommandLine cmd;
   // 
   // Additionally, we plumb this metric into the default value / command 
   // line argument system as well, for exemplary purposes.  This means 
@@ -119,13 +118,13 @@
   // rather than recompiling
   // e.g. waf --run "simple-alternate-routing --AlternateCost=5"
   uint16_t sampleMetric = 1;
-  CommandLine::AddArgValue ("AlternateCost",
-    "This metric is used in the example script between n3 and n1 ", 
-    sampleMetric);
+  cmd.AddValue ("AlternateCost",
+                "This metric is used in the example script between n3 and n1 ", 
+                sampleMetric);
 
   // Allow the user to override any of the defaults and the above
   // DefaultValue::Bind ()s at run-time, via command-line arguments
-  CommandLine::Parse (argc, argv);
+  cmd.Parse (argc, argv);
 
   // Here, we will explicitly create four nodes.  In more sophisticated
   // topologies, we could configure a node factory.