# HG changeset patch # User greg # Date 1201853870 -3600 # Node ID 646a44a12e2adaea47cf54ee3b29c791c5302699 # Parent c7fac98c93512752d5f52aa482e1d093a4f51212 add GetParamsAttributes to canfestival.py to allow dll list in beremiz diff -r c7fac98c9351 -r 646a44a12e2a plugins/canfestival/canfestival.py --- 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 @@ """ + 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())),