plugins/canfestival/canfestival.py
changeset 95 646a44a12e2a
parent 86 f0a9d74e3b26
child 105 434aed8dc58d
--- a/plugins/canfestival/canfestival.py	Thu Jan 31 16:42:50 2008 +0100
+++ b/plugins/canfestival/canfestival.py	Fri Feb 01 09:17:50 2008 +0100
@@ -9,6 +9,7 @@
 from networkedit import networkedit
 from objdictedit import objdictedit
 import canfestival_config
+from plugger import PlugTemplate
 
 from gnosis.xml.pickle import *
 from gnosis.xml.pickle.util import setParanoia
@@ -131,9 +132,19 @@
       </xsd:element>
     </xsd:schema>
     """
+    PlugChildsTypes = [("CanOpenNode",_NodeListPlug)]
+    def GetParamsAttributes(self, path = None):
+        infos = PlugTemplate.GetParamsAttributes(self, path = None)
+        for element in infos:
+            if element["name"] == "CanFestivalInstance":                         
+                for child in element["children"]:
+                    if child["name"] == "CAN_Driver":
+                        DLL_LIST= getattr(canfestival_config,"DLL_LIST",None)
+                        if DLL_LIST is not None:
+                            child["type"] = DLL_LIST
+                        return infos    
+        return infos
 
-    PlugChildsTypes = [("CanOpenNode",_NodeListPlug)]
-    
     def PlugGenerate_C(self, buildpath, locations, logger):
         
         format_dict = {"locstr" : "_".join(map(str,self.GetCurrentLocation())),