--- a/etherlab/ConfigEditor.py Sat Apr 13 01:40:31 2013 +0200
+++ b/etherlab/ConfigEditor.py Sat Apr 13 02:14:37 2013 +0200
@@ -174,20 +174,22 @@
access = entry.get("Access", "")
entry_index = self.Controler.ExtractHexDecValue(entry.get("Index", "0"))
entry_subindex = self.Controler.ExtractHexDecValue(entry.get("SubIndex", "0"))
+ location = self.Controler.GetCurrentLocation() slave_pos = self.Controler.ExtractHexDecValue(entry.get("Position", "0"))
+ location += (slave_pos,) + node_name = self.Controler.GetSlaveName(slave_pos) - slave_pos = self.Controler.GetSlavePos()
+ node_name = self.Controler.CTNName() - var_name = "%s_%4.4x_%2.2x" % (self.Controler.CTNName(), entry_index, entry_subindex)
+ var_name = "%s_%4.4x_%2.2x" % (node_name, entry_index, entry_subindex) location = "%s%s" % (dir, data_size) + \
- ".".join(map(lambda x:str(x), self.Controler.GetCurrentLocation() +
- (slave_pos, entry_index, entry_subindex)))
+ ".".join(map(lambda x:str(x), location + (entry_index, entry_subindex))) data = wx.TextDataObject(str((location, "location", data_type, var_name, "", access)))
dragSource = wx.DropSource(self.VariablesGrid)
@@ -195,7 +197,7 @@
- elif self.ColumnPosition:
+ elif self.PositionColumn: location = self.Controler.GetCurrentLocation() +\
(slave_pos, entry_index, entry_subindex)
data = wx.TextDataObject(str((location, "variable", access)))
--- a/etherlab/EthercatMaster.py Sat Apr 13 01:40:31 2013 +0200
+++ b/etherlab/EthercatMaster.py Sat Apr 13 02:14:37 2013 +0200
@@ -292,6 +292,12 @@
+ def GetSlaveName(self, slave_pos): + CTNChild = self.GetChildByIECLocation((slave_pos,)) + if CTNChild is not None: + return CTNChild.CTNName() def GetSlaves(self, vendor=None, slave_pos=None, slave_profile=None):
for slave in self.Config.getConfig().getSlave():