bec_worker.py: added check_is_state and check_current_state

This commit is contained in:
2026-05-22 15:25:34 +02:00
parent 7f22786dc4
commit 50fffd3bd4
+12
View File
@@ -118,6 +118,18 @@ class BECClientWorker:
except Exception as e:
self._raise_bec_error(e, operation=f"planner.move_to:{state.value}")
def check_is_state(self, state: BeamlineState):
if self.simulated:
logger.debug(f"Simulating check_beamline_state: {state.value}")
return True
return self.planner.is_state(state)
def check_current_state(self):
if self.simulated:
logger.debug(f"Simulating check_beamline_state")
return BeamlineState.MAINTENANCE
return self.planner.current_state()
def show_all_devices(self):
return self.dev.show_all