Skip to content

Commit

Permalink
Add ErrorCode enum to LinearStage
Browse files Browse the repository at this point in the history
  • Loading branch information
couger01 committed Jul 10, 2024
1 parent 1cd1167 commit 25a02fe
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/news/interface_changes/DM-45062.linearstage.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add ErrorCode enum.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@
<?xml-stylesheet type="text/xsl" href="http://lsst-sal.tuc.noao.edu/schema/SALEventSet.xsl"?>
<SALEventSet xmlns:xsi="http://lsst-sal.tuc.noao.edu/schema/SALEventSet.xsd">
<Enumeration>DetailedState_NotMovingState, DetailedState_MovingState</Enumeration>
<Enumeration>
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
</Enumeration>
<SALEvent>
<Subsystem>LinearStage</Subsystem>
<EFDB_Topic>LinearStage_logevent_detailedState</EFDB_Topic>
Expand Down
24 changes: 23 additions & 1 deletion python/lsst/ts/xml/enums/LinearStage.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,30 @@
__all__ = ["DetailedState"]
__all__ = ["DetailedState", "ErrorCode"]

import enum


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

0 comments on commit 25a02fe

Please sign in to comment.