diff --git a/DG_PY_FOFBTool/DG_PY_FOFBTool.py b/DG_PY_FOFBTool/DG_PY_FOFBTool.py index 2a73822e1677bef09981f16c0f3bff933d6590a9..cd8d2c85c0f40a37eab2835fce014a756687ccf8 100644 --- a/DG_PY_FOFBTool/DG_PY_FOFBTool.py +++ b/DG_PY_FOFBTool/DG_PY_FOFBTool.py @@ -174,6 +174,10 @@ class DG_PY_FOFBTool(Device): logger.addHandler(fh) logger.setLevel(logging.DEBUG) + if not hasattr(self, "_include_lbp"): + self._include_lbp= False + + #----- PROTECTED REGION END -----# // DG_PY_FOFBTool.init_device def always_executed_hook(self): @@ -205,7 +209,7 @@ class DG_PY_FOFBTool(Device): def write_includeLBP(self, value): # PROTECTED REGION ID(DG_PY_FOFBTool.includeLBP_write) ENABLED START # """Set the includeLBP attribute.""" - pass + self._include_lbp = value # PROTECTED REGION END # // DG_PY_FOFBTool.includeLBP_write def read_FofbToolVersion(self): @@ -276,7 +280,20 @@ class DG_PY_FOFBTool(Device): :return:None """ - pass + + self.info_stream("Stopping all") + + self.debug_stream("Stopping combpm and comlbp") + for cn in self.tangopath_cellnode: + FofbTool.Operation.stop_combpm(cn) + FofbTool.Operation.stop_comlbp(cn) + + self.debug_stream("Stopping ccn") + for cn in self.tangopath_cellnode: + FofbTool.Operation.stop_ccn(cn) + FofbTool.Operation.reset_ccn(cn) + + # PROTECTED REGION END # // DG_PY_FOFBTool.stop @command( @@ -288,7 +305,24 @@ class DG_PY_FOFBTool(Device): :return:None """ - pass + self.info_stream("Starting all") + + if self._include_lbp: + self.debug_stream("Starting comlbp") + for cn in self.tangopath_cellnode: + FofbTool.Operation.start_comlbp(cn) + else: + self.debug_stream("Skipping comlbp") + + self.debug_stream("Starting combpm") + for cn in self.tangopath_cellnode: + FofbTool.Operation.start_combpm(cn) + + self.debug_stream("Starting ccn") + for cn in self.tangopath_cellnode: + FofbTool.Operation.start_ccn(cn) + FofbTool.Operation.start_ccn(self.tangopath_centralnode) + # PROTECTED REGION END # // DG_PY_FOFBTool.start @command(