mixed-wireless was not instantiating a stationManager in helper
authorTom Henderson <tomh@tomh.org>
Tue, 30 Dec 2008 12:14:54 -0800
changeset 4035 749cf964666a
parent 4034 ca0ea1ed6fc8
child 4036 a17503f15f8c
mixed-wireless was not instantiating a stationManager in helper
examples/mixed-wireless.cc
--- a/examples/mixed-wireless.cc	Sun Dec 28 12:34:28 2008 +0000
+++ b/examples/mixed-wireless.cc	Tue Dec 30 12:14:54 2008 -0800
@@ -132,11 +132,13 @@
   // Create the backbone wifi net devices and install them into the nodes in 
   // our container
   //
+  WifiHelper wifi;
+  wifi.SetMac ("ns3::AdhocWifiMac");
+  wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
+                                "DataMode", StringValue ("wifia-54mbs"));
   YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
   YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
   wifiPhy.SetChannel (wifiChannel.Create ());
-  WifiHelper wifi;
-  wifi.SetMac ("ns3::AdhocWifiMac");
   NetDeviceContainer backboneDevices = wifi.Install (wifiPhy, backbone);
   //
   // Add the IPv4 protocol stack to the nodes in our container
@@ -244,8 +246,7 @@
       //
       // Create another ad hoc network and devices
       //
-      WifiHelper wifiInfra;
-      wifiInfra.SetMac ("ns3::AdhocWifiMac");
+      WifiHelper wifiInfra = WifiHelper::Default ();
       wifiPhy.SetChannel (wifiChannel.Create ());
       NetDeviceContainer infraDevices = wifiInfra.Install (wifiPhy, infra);