samples/main-adhoc-wifi.cc
changeset 2230 9f13ac3291e0
parent 2169 06af4e3c25a2
child 2231 a5b898c1ee2c
--- a/samples/main-adhoc-wifi.cc	Sun Dec 30 19:36:44 2007 -0800
+++ b/samples/main-adhoc-wifi.cc	Wed Jan 02 09:09:24 2008 +0100
@@ -45,10 +45,10 @@
 CreateAdhocNode (Ptr<WifiChannel> channel,
                  Vector position, const char *address)
 {
-  Ptr<Node> node = Create<Node> ();  
-  Ptr<AdhocWifiNetDevice> device = Create<AdhocWifiNetDevice> (node, Mac48Address (address));
+  Ptr<Node> node = CreateObject<Node> ();  
+  Ptr<AdhocWifiNetDevice> device = CreateObject<AdhocWifiNetDevice> (node, Mac48Address (address));
   device->Attach (channel);
-  Ptr<MobilityModel> mobility = Create<StaticMobilityModel> ();
+  Ptr<MobilityModel> mobility = CreateObject<StaticMobilityModel> ();
   mobility->SetPosition (position);
   node->AddInterface (mobility);
   
@@ -108,7 +108,7 @@
 {
   g_bytesTotal = 0;
 
-  Ptr<WifiChannel> channel = Create<WifiChannel> ();
+  Ptr<WifiChannel> channel = CreateObject<WifiChannel> ();
 
   Ptr<Node> a = CreateAdhocNode (channel, 
                                  Vector (5.0,0.0,0.0),
@@ -121,7 +121,7 @@
   destination.SetProtocol (1);
   destination.SetSingleDevice (0);
   destination.SetPhysicalAddress (Mac48Address ("00:00:00:00:00:02"));
-  Ptr<Application> app = Create<OnOffApplication> (a, destination, 
+  Ptr<Application> app = CreateObject<OnOffApplication> (a, destination, 
                                                    "Packet", 
                                                    ConstantVariable (250),
                                                    ConstantVariable (0),