modbus/modbus.py
branchpython3
changeset 3784 a5f58ca4629b
parent 3752 9f6f46dbe3ae
equal deleted inserted replaced
3783:741d0010b4b2 3784:a5f58ca4629b
    90         infos = ConfigTreeNode.GetParamsAttributes(self, path=path)
    90         infos = ConfigTreeNode.GetParamsAttributes(self, path=path)
    91         for element in infos:
    91         for element in infos:
    92             if element["name"] == "ModbusRequest":
    92             if element["name"] == "ModbusRequest":
    93                 for child in element["children"]:
    93                 for child in element["children"]:
    94                     if child["name"] == "Function":
    94                     if child["name"] == "Function":
    95                         list = list(modbus_function_dict.keys())
    95                         _list = list(modbus_function_dict.keys())
    96                         list.sort()
    96                         _list.sort()
    97                         child["type"] = list
    97                         child["type"] = _list
    98         return infos
    98         return infos
    99 
    99 
   100     def GetVariableLocationTree(self):
   100     def GetVariableLocationTree(self):
   101         current_location = self.GetCurrentLocation()
   101         current_location = self.GetCurrentLocation()
   102         name = self.BaseParams.getName()
   102         name = self.BaseParams.getName()
   236         infos = ConfigTreeNode.GetParamsAttributes(self, path=path)
   236         infos = ConfigTreeNode.GetParamsAttributes(self, path=path)
   237         for element in infos:
   237         for element in infos:
   238             if element["name"] == "MemoryArea":
   238             if element["name"] == "MemoryArea":
   239                 for child in element["children"]:
   239                 for child in element["children"]:
   240                     if child["name"] == "MemoryAreaType":
   240                     if child["name"] == "MemoryAreaType":
   241                         list = list(modbus_memtype_dict.keys())
   241                         _list = list(modbus_memtype_dict.keys())
   242                         list.sort()
   242                         _list.sort()
   243                         child["type"] = list
   243                         child["type"] = _list
   244         return infos
   244         return infos
   245 
   245 
   246     def GetVariableLocationTree(self):
   246     def GetVariableLocationTree(self):
   247         current_location = self.GetCurrentLocation()
   247         current_location = self.GetCurrentLocation()
   248         name = self.BaseParams.getName()
   248         name = self.BaseParams.getName()