Device State¶
The state machine of the Karabo JJAttenuator device inherits from connected motor interfaces. Hence the states “ACTIVE”, “DISABLED”, “ERROR”, “HOMING”, “INTERLOCKED”, “MOVING”, “OFF”, “ON” and “UNKNOWN”are used in this device. For state composition, the most significant state is used, and the significance is evaluated according to the following order:
UNKNOWN:
The device is in UNKNOWN state, e.g. the motor proxy could not connect to the motor device;
ERROR:
The device is in ERROR state indicating a hardware problem;
INTERLOCKED:
The device is in interlocked;
HOMING:
The device is in HOMING state;
MOVING:
The device is in MOVING state;
OFF:
The device is turned OFF;
ACTIVE:
The device is in ACTIVE state;
ON:
The device is turned ON and does not move;
DISABLED:
The device is in DISABLED state.
Therefore, if a single motor shows an “OFF” state while the remaining ones are in state “ON”, the overall device state is provided as “OFF”. If all motor devices are in state “ON”, the jjAttenuator state is “ON”. If one motor is “OFF”, two are “ONE” while one is moving, then the overall device is in “MOVING” state.