bec_worker.py: added check_is_state and check_current_state
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user