equal
deleted
inserted
replaced
230 "location": self.GetFullIEC_Channel(), |
230 "location": self.GetFullIEC_Channel(), |
231 "children": children, |
231 "children": children, |
232 } |
232 } |
233 |
233 |
234 def _getCIA402AxisRef(self): |
234 def _getCIA402AxisRef(self): |
235 data = wx.TextDataObject(str(("%IW%s.0" % ".".join(map(str, self.GetCurrentLocation())), |
235 data = wx.TextDataObject(str(("%%IW%s.0" % ".".join(map(str, self.GetCurrentLocation())), |
236 "location", "AXIS_REF", self.CTNName(), ""))) |
236 "location", "AXIS_REF", self.CTNName(), ""))) |
237 dragSource = wx.DropSource(self.GetCTRoot().AppFrame) |
237 dragSource = wx.DropSource(self.GetCTRoot().AppFrame) |
238 dragSource.SetData(data) |
238 dragSource.SetData(data) |
239 dragSource.DoDragDrop() |
239 dragSource.DoDragDrop() |
240 |
240 |
1147 # Ethercat ConfNode |
1147 # Ethercat ConfNode |
1148 #-------------------------------------------------- |
1148 #-------------------------------------------------- |
1149 |
1149 |
1150 EtherCATInfoClasses = GenerateClassesFromXSD(os.path.join(os.path.dirname(__file__), "EtherCATInfo.xsd")) |
1150 EtherCATInfoClasses = GenerateClassesFromXSD(os.path.join(os.path.dirname(__file__), "EtherCATInfo.xsd")) |
1151 |
1151 |
|
1152 cls = EtherCATInfoClasses["EtherCATBase.xsd"].get("DictionaryType", None) |
|
1153 if cls: |
|
1154 cls.loadXMLTreeArgs = None |
|
1155 |
|
1156 setattr(cls, "_loadXMLTree", getattr(cls, "loadXMLTree")) |
|
1157 |
|
1158 def loadXMLTree(self, *args): |
|
1159 self.loadXMLTreeArgs = args |
|
1160 setattr(cls, "loadXMLTree", loadXMLTree) |
|
1161 |
|
1162 def load(self): |
|
1163 if self.loadXMLTreeArgs is not None: |
|
1164 self._loadXMLTree(*self.loadXMLTreeArgs) |
|
1165 self.loadXMLTreeArgs = None |
|
1166 setattr(cls, "load", load) |
|
1167 |
1152 cls = EtherCATInfoClasses["EtherCATInfo.xsd"].get("DeviceType", None) |
1168 cls = EtherCATInfoClasses["EtherCATInfo.xsd"].get("DeviceType", None) |
1153 if cls: |
1169 if cls: |
1154 cls.DataTypes = None |
1170 cls.DataTypes = None |
1155 |
1171 |
1156 def GetProfileNumbers(self): |
1172 def GetProfileNumbers(self): |
1218 self.ExtractDataTypes() |
1234 self.ExtractDataTypes() |
1219 |
1235 |
1220 entries = {} |
1236 entries = {} |
1221 |
1237 |
1222 for dictionary in self.GetProfileDictionaries(): |
1238 for dictionary in self.GetProfileDictionaries(): |
|
1239 dictionary.load() |
1223 |
1240 |
1224 for object in dictionary.getObjects().getObject(): |
1241 for object in dictionary.getObjects().getObject(): |
1225 entry_index = object.getIndex().getcontent() |
1242 entry_index = object.getIndex().getcontent() |
1226 index = ExtractHexDecValue(entry_index) |
1243 index = ExtractHexDecValue(entry_index) |
1227 entry_type = object.getType() |
1244 entry_type = object.getType() |