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 9, 2024
1 parent e4709f3 commit e7eaf78
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
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,
ErrorCode_DisableMotor,
ErrorCode_EnableMotor,
ErrorCode_Home,
ErrorCode_MoveAbsolute,
ErrorCode_MoveRelative,
ErrorCode_Position,
ErrorCode_Telemetry,
ErrorCode_Stop
</Enumeration>
<SALEvent>
<Subsystem>LinearStage</Subsystem>
<EFDB_Topic>LinearStage_logevent_detailedState</EFDB_Topic>
Expand Down
22 changes: 22 additions & 0 deletions python/lsst/ts/xml/enums/LinearStage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = enum.auto()
"""Connection to the device failed."""
DISABLE_MOTOR = enum.auto()
"""Disabling the motor failed."""
ENABLE_MOTOR = enum.auto()
"""Enabling the motor failed."""
HOME = enum.auto()
"""Homing the stage failed."""
MOVE_ABSOLUTE = enum.auto()
"""The absolute move failed."""
MOVE_RELATIVE = enum.auto()
"""The relative move failed."""
POSITION = enum.auto()
"""Failed to get the position."""
TELEMETRY = enum.auto()
"""The telemetry loop failed."""
STOP = enum.auto()

0 comments on commit e7eaf78

Please sign in to comment.