Shutter: TangoShutter state is not consistent with the BaseShutter state
TangoShutter
can expose state which are not included in the BaseShutterState
API.
As result, as client POV, we can't expect anything to that state. This can be one of BaseShutterState
, or anything else depending on the controller.
class BaseShutterState(Enum):
""" Base states"""
UNKNOWN = "Unknown state"
OPEN = "Open"
CLOSED = "Closed"
FAULT = "Fault state"
TangoShutterState = Enum(
"TangoShutterState",
dict(
{
"MOVING": "Moving",
"DISABLE": "Hutch not searched",
"STANDBY": "Wait for permission",
"RUNNING": "Automatic opening",
},
**{item.name: item.value for item in BaseShutterState},
),
)
It would be good to normalize a list of state handled by the API, with a clear meaning.
Derived controllers have to expose known states, and only known states. Else the state have to be normalized, or have to be returned with another API.
Edited by Valentin Valls