7 from nodemanager import NodeManager |
7 from nodemanager import NodeManager |
8 import config_utils, gen_cfile |
8 import config_utils, gen_cfile |
9 from networkedit import networkedit |
9 from networkedit import networkedit |
10 from objdictedit import objdictedit |
10 from objdictedit import objdictedit |
11 import canfestival_config |
11 import canfestival_config |
|
12 from plugger import PlugTemplate |
12 |
13 |
13 from gnosis.xml.pickle import * |
14 from gnosis.xml.pickle import * |
14 from gnosis.xml.pickle.util import setParanoia |
15 from gnosis.xml.pickle.util import setParanoia |
15 setParanoia(0) |
16 setParanoia(0) |
16 |
17 |
129 <xsd:attribute name="CAN_Driver" type="xsd:string" use="required"/> |
130 <xsd:attribute name="CAN_Driver" type="xsd:string" use="required"/> |
130 </xsd:complexType> |
131 </xsd:complexType> |
131 </xsd:element> |
132 </xsd:element> |
132 </xsd:schema> |
133 </xsd:schema> |
133 """ |
134 """ |
|
135 PlugChildsTypes = [("CanOpenNode",_NodeListPlug)] |
|
136 def GetParamsAttributes(self, path = None): |
|
137 infos = PlugTemplate.GetParamsAttributes(self, path = None) |
|
138 for element in infos: |
|
139 if element["name"] == "CanFestivalInstance": |
|
140 for child in element["children"]: |
|
141 if child["name"] == "CAN_Driver": |
|
142 DLL_LIST= getattr(canfestival_config,"DLL_LIST",None) |
|
143 if DLL_LIST is not None: |
|
144 child["type"] = DLL_LIST |
|
145 return infos |
|
146 return infos |
134 |
147 |
135 PlugChildsTypes = [("CanOpenNode",_NodeListPlug)] |
|
136 |
|
137 def PlugGenerate_C(self, buildpath, locations, logger): |
148 def PlugGenerate_C(self, buildpath, locations, logger): |
138 |
149 |
139 format_dict = {"locstr" : "_".join(map(str,self.GetCurrentLocation())), |
150 format_dict = {"locstr" : "_".join(map(str,self.GetCurrentLocation())), |
140 "candriver" : self.CanFestivalInstance.getCAN_Driver(), |
151 "candriver" : self.CanFestivalInstance.getCAN_Driver(), |
141 "nodes_includes" : "", |
152 "nodes_includes" : "", |