equal
deleted
inserted
replaced
235 return ((["svghmi"], [(gen_svghmi_c_path, IECCFLAGS)], True), "", |
235 return ((["svghmi"], [(gen_svghmi_c_path, IECCFLAGS)], True), "", |
236 ("runtime_00_svghmi.py", open(runtimefile_path, "rb"))) |
236 ("runtime_00_svghmi.py", open(runtimefile_path, "rb"))) |
237 # ^ |
237 # ^ |
238 # note the double zero after "runtime_", |
238 # note the double zero after "runtime_", |
239 # to ensure placement before other CTN generated code in execution order |
239 # to ensure placement before other CTN generated code in execution order |
|
240 |
|
241 def GlobalInstances(self): |
|
242 """ Adds HMI tree root and hearbeat to PLC Configuration's globals """ |
|
243 return [(name, iec_type, "") for name, iec_type in SPECIAL_NODES] |
|
244 |
240 |
245 |
241 |
246 |
242 def Register_SVGHMI_UI_for_HMI_tree_updates(ref): |
247 def Register_SVGHMI_UI_for_HMI_tree_updates(ref): |
243 global on_hmitree_update |
248 global on_hmitree_update |
244 def HMITreeUpdate(_hmi_tree_root): |
249 def HMITreeUpdate(_hmi_tree_root): |
697 _("Font to remove %s is not in %s\n") % (fontfile,fontdir)) |
702 _("Font to remove %s is not in %s\n") % (fontfile,fontdir)) |
698 else: |
703 else: |
699 self.GetCTRoot().logger.write_error( |
704 self.GetCTRoot().logger.write_error( |
700 _("Font file does not exist: %s\n") % fontfile) |
705 _("Font file does not exist: %s\n") % fontfile) |
701 |
706 |
702 def CTNGlobalInstances(self): |
707 ## In case one day we support more than one heartbeat |
703 # view_name = self.BaseParams.getName() |
708 # def CTNGlobalInstances(self): |
704 # return [ (view_name + "_" + name, iec_type, "") for name, iec_type in SPECIAL_NODES] |
709 # view_name = self.BaseParams.getName() |
705 # TODO : move to library level for multiple hmi |
710 # return [(view_name + "_HEARTBEAT", "HMI_INT", "")] |
706 return [(name, iec_type, "") for name, iec_type in SPECIAL_NODES] |
|
707 |
711 |
708 def GetIconName(self): |
712 def GetIconName(self): |
709 return "SVGHMI" |
713 return "SVGHMI" |