diff --git a/doc/news/interface_changes/DM-45062.linearstage.rst b/doc/news/interface_changes/DM-45062.linearstage.rst new file mode 100644 index 000000000..d79be3541 --- /dev/null +++ b/doc/news/interface_changes/DM-45062.linearstage.rst @@ -0,0 +1 @@ +Add ErrorCode enum. \ No newline at end of file diff --git a/python/lsst/ts/xml/data/sal_interfaces/LinearStage/LinearStage_Events.xml b/python/lsst/ts/xml/data/sal_interfaces/LinearStage/LinearStage_Events.xml index 9fff1cd12..a45a1c62a 100644 --- a/python/lsst/ts/xml/data/sal_interfaces/LinearStage/LinearStage_Events.xml +++ b/python/lsst/ts/xml/data/sal_interfaces/LinearStage/LinearStage_Events.xml @@ -2,6 +2,17 @@ DetailedState_NotMovingState, DetailedState_MovingState + + ErrorCode_ConnectionFailed=1, + ErrorCode_DisableMotor=2, + ErrorCode_EnableMotor=3, + ErrorCode_Home=4, + ErrorCode_MoveAbsolute=5, + ErrorCode_MoveRelative=6, + ErrorCode_Position=7, + ErrorCode_Telemetry=8, + ErrorCode_Stop=9 + LinearStage LinearStage_logevent_detailedState diff --git a/python/lsst/ts/xml/enums/LinearStage.py b/python/lsst/ts/xml/enums/LinearStage.py index 74d1315be..411500ef0 100644 --- a/python/lsst/ts/xml/enums/LinearStage.py +++ b/python/lsst/ts/xml/enums/LinearStage.py @@ -1,4 +1,4 @@ -__all__ = ["DetailedState"] +__all__ = ["DetailedState", "ErrorCode"] import enum @@ -6,3 +6,25 @@ class DetailedState(enum.IntEnum): NOTMOVINGSTATE = 1 MOVINGSTATE = 2 + + +class ErrorCode(enum.IntEnum): + """Error codes that indicate why the CSC went to fault state.""" + + CONNECTION_FAILED = 1 + """Connection to the device failed.""" + DISABLE_MOTOR = 2 + """Disabling the motor failed.""" + ENABLE_MOTOR = 3 + """Enabling the motor failed.""" + HOME = 4 + """Homing the stage failed.""" + MOVE_ABSOLUTE = 5 + """The absolute move failed.""" + MOVE_RELATIVE = 6 + """The relative move failed.""" + POSITION = 7 + """Failed to get the position.""" + TELEMETRY = 8 + """The telemetry loop failed.""" + STOP = 9