src/devices/wifi/wifi-mode.cc
changeset 3879 3a887a06b795
parent 2675 d71e6cc3a28f
child 4331 771b9f0005d6
--- a/src/devices/wifi/wifi-mode.cc	Tue Jun 10 12:17:34 2008 -0700
+++ b/src/devices/wifi/wifi-mode.cc	Tue Jun 10 13:08:22 2008 -0700
@@ -107,6 +107,13 @@
 WifiMode::WifiMode (uint32_t uid)
   : m_uid (uid)
 {}
+WifiMode::WifiMode (std::string name)
+{
+  if (!WifiModeFactory::GetFactory ()->Search (name, this))
+    {
+      NS_FATAL_ERROR ("Invalid requested wifi mode: " << name);
+    }
+}
 
 ATTRIBUTE_HELPER_CPP (WifiMode);