mxcubecore.HardwareObjects.StateMachine#

Classes

StateMachine(name)

Finite State Machine (FSM) is a mathematical model of a closed or opened loop discrete-event systems with well defined state.

class mxcubecore.HardwareObjects.StateMachine.StateMachine(name)[source]#

Bases: HardwareObject

Finite State Machine (FSM) is a mathematical model of a closed or opened loop discrete-event systems with well defined state. It is wildly used to define functioning system and control their execution. In the case of MX beamlines and MXCuBE FSM represents different state where certain action from a user is requested. It is possible to describe a sequence of user actions as a discrete state that are logically connected. For example, each MX experiment requires a crystal to be mounted on a goniostat. If not crystal is mounted then it makes no sense to continue an experiment. The actual transition logic is implemented in the update_fsm_state()

condition_changed(condition_name, value)[source]#

Event when condition of a hardware object has been changed

get_condition_list()[source]#

Returns list of conditions

get_state_list()[source]#

Returns list of available state

get_transition_list()[source]#

Returns list of available transitions

init()[source]#

‘public’ post-initialization method. Override as needed.

For ConfiguredObjects called after loading contained objects.

re_emit_values()[source]#

Reemits signals

update_fsm_state()[source]#

Updates state machine We look at the current state and available transitions from it If all conditions of a transition is met then the transition is executed and signal is emitted.