PLCControler.py
changeset 1390 0f4d32a033e0
parent 1379 086f52b2feac
child 1406 82db84fe88ea
equal deleted inserted replaced
1389:fb19c6226ff5 1390:0f4d32a033e0
   115         if lib_name in ["project", "stdlib", "extensions"]:
   115         if lib_name in ["project", "stdlib", "extensions"]:
   116             lib_el = etree.Element(lib_name)
   116             lib_el = etree.Element(lib_name)
   117             if lib_name == "project":
   117             if lib_name == "project":
   118                 lib_el.append(deepcopy(self.Controller.GetProject(self.Debug)))
   118                 lib_el.append(deepcopy(self.Controller.GetProject(self.Debug)))
   119             elif lib_name == "stdlib":
   119             elif lib_name == "stdlib":
   120                 for lib in [StdBlockLibrary, AddnlBlockLibrary]:
   120                 for lib in StdBlckLibs.values():
   121                     lib_el.append(deepcopy(lib))
   121                     lib_el.append(deepcopy(lib))
   122             else:
   122             else:
   123                 for ctn in self.Controller.ConfNodeTypes:
   123                 for ctn in self.Controller.ConfNodeTypes:
   124                     lib_el.append(deepcopy(ctn["types"]))
   124                     lib_el.append(deepcopy(ctn["types"]))
   125             return self.resolve_string(etree.tostring(lib_el), context)
   125             return self.resolve_string(etree.tostring(lib_el), context)
  1687         project = self.GetProject(debug)
  1687         project = self.GetProject(debug)
  1688         if project is not None:
  1688         if project is not None:
  1689             result = project.getpou(typename)
  1689             result = project.getpou(typename)
  1690             if result is not None:
  1690             if result is not None:
  1691                 return result
  1691                 return result
  1692         for standardlibrary in [StdBlockLibrary, AddnlBlockLibrary]:
  1692         for standardlibrary in StdBlckLibs.values():
  1693             result = standardlibrary.getpou(typename)
  1693             result = standardlibrary.getpou(typename)
  1694             if result is not None:
  1694             if result is not None:
  1695                 return result
  1695                 return result
  1696         for confnodetype in self.ConfNodeTypes:
  1696         for confnodetype in self.ConfNodeTypes:
  1697             result = confnodetype["types"].getpou(typename)
  1697             result = confnodetype["types"].getpou(typename)