svghmi/svghmi.py
branchsvghmi
changeset 2750 2694170cd88e
parent 2749 2769b3aed34d
child 2753 9a7e12e96399
equal deleted inserted replaced
2749:2769b3aed34d 2750:2694170cd88e
    26 
    26 
    27 HMI_TYPES = HMI_TYPES_DESC.keys()
    27 HMI_TYPES = HMI_TYPES_DESC.keys()
    28 
    28 
    29 class SVGHMILibrary(POULibrary):
    29 class SVGHMILibrary(POULibrary):
    30     def GetLibraryPath(self):
    30     def GetLibraryPath(self):
    31         return paths.AbsNeighbourFile(__file__, "pous.xml")
    31          return paths.AbsNeighbourFile(__file__, "pous.xml")
    32 
    32 
    33     def Generate_C(self, buildpath, varlist, IECCFLAGS):
    33     def Generate_C(self, buildpath, varlist, IECCFLAGS):
    34 
    34 
    35         # Filter known HMI types
    35         # Filter known HMI types
    36         hmi_types_instances = [v for v in varlist if v["derived"] in HMI_TYPES]
    36         hmi_types_instances = [v for v in varlist if v["derived"] in HMI_TYPES]
    88 
    88 
    89     def OnCTNSave(self, from_project_path=None):
    89     def OnCTNSave(self, from_project_path=None):
    90         if from_project_path is not None:
    90         if from_project_path is not None:
    91             shutil.copyfile(self._getSVGpath(from_project_path),
    91             shutil.copyfile(self._getSVGpath(from_project_path),
    92                             self._getSVGpath())
    92                             self._getSVGpath())
       
    93         return True
    93 
    94 
    94     def CTNGenerate_C(self, buildpath, locations):
    95     def CTNGenerate_C(self, buildpath, locations):
    95         """
    96         """
    96         Return C code generated by iec2c compiler
    97         Return C code generated by iec2c compiler
    97         when _generate_softPLC have been called
    98         when _generate_softPLC have been called