Disable EmuNetDevice Python bindings if the netdevice is not compiled in (bug #413)
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Mon, 24 Nov 2008 12:09:47 +0000
changeset 3916 a1e72a0595a6
parent 3915 c798f3d5cb2e
child 3917 fe95a4f9d423
Disable EmuNetDevice Python bindings if the netdevice is not compiled in (bug #413)
bindings/python/ns3modulegen.py
src/devices/emu/wscript
--- a/bindings/python/ns3modulegen.py	Mon Nov 24 06:45:13 2008 +0100
+++ b/bindings/python/ns3modulegen.py	Mon Nov 24 12:09:47 2008 +0000
@@ -131,6 +131,11 @@
         for clsname in ['SystemThread', 'SystemMutex', 'SystemCondition', 'CriticalSection']:
             root_module.classes.remove(root_module['ns3::%s' % clsname])
 
+
+    if 'EmuNetDevice' not in enabled_features:
+        for clsname in ['EmuNetDevice', 'EmuHelper']:
+            root_module.classes.remove(root_module['ns3::%s' % clsname])
+
     if 'RealTime' not in enabled_features:
         for clsname in ['WallClockSynchronizer', 'RealtimeSimulatorImpl', 'RealtimeEventLock']:
             root_module.classes.remove(root_module['ns3::%s' % clsname])
--- a/src/devices/emu/wscript	Mon Nov 24 06:45:13 2008 +0100
+++ b/src/devices/emu/wscript	Mon Nov 24 12:09:47 2008 +0000
@@ -6,7 +6,7 @@
     e.name = 'linux/if_ether.h'
     e.define = 'HAVE_IF_ETHER_H'
     conf.env['ENABLE_EMU'] = e.run()
-    conf.report_optional_feature("Low Level Ethernet Defintions", "Emulated Net Device",
+    conf.report_optional_feature("EmuNetDevice", "Emulated Net Device",
                                  conf.env['ENABLE_EMU'],
                                  "<linux/if_ether.h> include not detected")