examples/simple-error-model.cc
changeset 2600 6c389d0c717d
parent 2592 3ebf97150166
child 2602 d9262bff6df2
--- a/examples/simple-error-model.cc	Wed Mar 12 11:35:00 2008 -0700
+++ b/examples/simple-error-model.cc	Thu Mar 13 11:10:38 2008 -0700
@@ -143,31 +143,25 @@
   NS_LOG_INFO ("Create Applications.");
   uint16_t port = 9;   // Discard port (RFC 863)
   Ptr<OnOffApplication> ooff = 
-    CreateObject<OnOffApplication> (
-                                        "Node", n0, 
-                                        "Remote", Address (InetSocketAddress ("10.1.3.2", port)), 
-                                        "Protocol", TypeId::LookupByName ("Udp"),
-                                        "OnTime", ConstantVariable(1), 
-                                        "OffTime", ConstantVariable(0));
+    CreateObject<OnOffApplication> ("Remote", Address (InetSocketAddress ("10.1.3.2", port)), 
+                                    "Protocol", TypeId::LookupByName ("Udp"),
+                                    "OnTime", ConstantVariable(1), 
+                                    "OffTime", ConstantVariable(0));
   n0->AddApplication (ooff);
   // Start the application
   ooff->Start(Seconds(1.0));
   ooff->Stop (Seconds(10.0));
 
   // Create an optional packet sink to receive these packets
-  Ptr<PacketSink> sink = CreateObject<PacketSink> (
-                                                       "Node", n3,
-                                                       "Local", Address (InetSocketAddress (Ipv4Address::GetAny (), port)),
-                                                       "Protocol", TypeId::LookupByName ("Udp"));
+  Ptr<PacketSink> sink = CreateObject<PacketSink> ("Local", Address (InetSocketAddress (Ipv4Address::GetAny (), port)),
+                                                   "Protocol", TypeId::LookupByName ("Udp"));
   n3->AddApplication (sink);
   // Start the sink
   sink->Start (Seconds (1.0));
   sink->Stop (Seconds (10.0));
 
   // Create a similar flow from n3 to n1, starting at time 1.1 seconds
-  ooff = CreateObject<OnOffApplication> (
-                                         "Node", n3, 
-                                         "Remote", Address (InetSocketAddress ("10.1.2.1", port)), 
+  ooff = CreateObject<OnOffApplication> ("Remote", Address (InetSocketAddress ("10.1.2.1", port)), 
                                          "Protocol", TypeId::LookupByName ("Udp"),
                                          "OnTime", ConstantVariable(1), 
                                          "OffTime", ConstantVariable(0));
@@ -177,9 +171,7 @@
   ooff->Stop (Seconds(10.0));
 
   // Create a packet sink to receive these packets
-  sink = CreateObject<PacketSink> (
-                                   "Node", n1,
-                                   "Local", Address (InetSocketAddress (Ipv4Address::GetAny (), port)),
+  sink = CreateObject<PacketSink> ("Local", Address (InetSocketAddress (Ipv4Address::GetAny (), port)),
                                    "Protocol", TypeId::LookupByName ("Udp"));
   n1->AddApplication (sink);
   // Start the sink