Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ErrorCode enum to LinearStage #877

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading