From ada921ceade348578fa51da82f161ce8b4b5b5a3 Mon Sep 17 00:00:00 2001 From: Te-Wei Date: Tue, 6 Aug 2024 09:33:17 -0400 Subject: [PATCH 1/2] Update the changed interface of MTHexapod with the controller's simplified state machine. --- doc/news/interface_changes/DM-45566.mthexapod.rst | 1 + .../sal_interfaces/MTHexapod/MTHexapod_Events.xml | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 doc/news/interface_changes/DM-45566.mthexapod.rst diff --git a/doc/news/interface_changes/DM-45566.mthexapod.rst b/doc/news/interface_changes/DM-45566.mthexapod.rst new file mode 100644 index 000000000..501af0616 --- /dev/null +++ b/doc/news/interface_changes/DM-45566.mthexapod.rst @@ -0,0 +1 @@ +Remove the MTHexapod_logevent_controllerState.offlineSubstate and add the MTHexapod_logevent_configuration.drivesEnabled. diff --git a/python/lsst/ts/xml/data/sal_interfaces/MTHexapod/MTHexapod_Events.xml b/python/lsst/ts/xml/data/sal_interfaces/MTHexapod/MTHexapod_Events.xml index ed29559a5..5723e032f 100644 --- a/python/lsst/ts/xml/data/sal_interfaces/MTHexapod/MTHexapod_Events.xml +++ b/python/lsst/ts/xml/data/sal_interfaces/MTHexapod/MTHexapod_Events.xml @@ -255,6 +255,13 @@ um/s2 1 + + drivesEnabled + Drives are enabled or not. + boolean + unitless + 1 + MTHexapod @@ -279,13 +286,6 @@ unitless 1 - - offlineSubstate - Substate in OFFLINE mode, an OfflineSubstate enumeration value. - long - unitless - 1 - enabledSubstate Substate in ENABLED mode, an EnabledSubstate enumeration value. From 76a60c53b580cb430339860f6b48363a07074b2d Mon Sep 17 00:00:00 2001 From: Te-Wei Date: Tue, 6 Aug 2024 12:01:43 -0400 Subject: [PATCH 2/2] Remove the OfflineSubstate enum in MTHexapod and MTRotator. --- .../interface_changes/DM-45566.mthexapod.rst | 1 + .../MTHexapod/MTHexapod_Events.xml | 4 --- .../MTRotator/MTRotator_Events.xml | 4 --- python/lsst/ts/xml/enums/MTHexapod.py | 5 ++- python/lsst/ts/xml/enums/MTRotator.py | 31 +++++-------------- 5 files changed, 10 insertions(+), 35 deletions(-) diff --git a/doc/news/interface_changes/DM-45566.mthexapod.rst b/doc/news/interface_changes/DM-45566.mthexapod.rst index 501af0616..8e0dab0fa 100644 --- a/doc/news/interface_changes/DM-45566.mthexapod.rst +++ b/doc/news/interface_changes/DM-45566.mthexapod.rst @@ -1 +1,2 @@ Remove the MTHexapod_logevent_controllerState.offlineSubstate and add the MTHexapod_logevent_configuration.drivesEnabled. +Remove the OfflineSubstate enum in MTHexapod and MTRotator. diff --git a/python/lsst/ts/xml/data/sal_interfaces/MTHexapod/MTHexapod_Events.xml b/python/lsst/ts/xml/data/sal_interfaces/MTHexapod/MTHexapod_Events.xml index 5723e032f..3aef1d209 100644 --- a/python/lsst/ts/xml/data/sal_interfaces/MTHexapod/MTHexapod_Events.xml +++ b/python/lsst/ts/xml/data/sal_interfaces/MTHexapod/MTHexapod_Events.xml @@ -7,10 +7,6 @@ ControllerState_Enabled=2, ControllerState_Offline=3, ControllerState_Fault=4 - - - OfflineSubstate_PublishOnly=0, - OfflineSubstate_Available=1 EnabledSubstate_Stationary=0, diff --git a/python/lsst/ts/xml/data/sal_interfaces/MTRotator/MTRotator_Events.xml b/python/lsst/ts/xml/data/sal_interfaces/MTRotator/MTRotator_Events.xml index 755d36be0..cc628f54a 100644 --- a/python/lsst/ts/xml/data/sal_interfaces/MTRotator/MTRotator_Events.xml +++ b/python/lsst/ts/xml/data/sal_interfaces/MTRotator/MTRotator_Events.xml @@ -7,10 +7,6 @@ ControllerState_Enabled=2, ControllerState_Offline=3, ControllerState_Fault=4 - - - OfflineSubstate_PublishOnly=0, - OfflineSubstate_Available=1 EnabledSubstate_Stationary=0, diff --git a/python/lsst/ts/xml/enums/MTHexapod.py b/python/lsst/ts/xml/enums/MTHexapod.py index 0a68c4054..79c86ec99 100644 --- a/python/lsst/ts/xml/enums/MTHexapod.py +++ b/python/lsst/ts/xml/enums/MTHexapod.py @@ -22,7 +22,6 @@ "ApplicationStatus", "ControllerState", "EnabledSubstate", - "OfflineSubstate", "SalIndex", "ErrorCode", ] @@ -30,8 +29,8 @@ import enum # MTHexapod and MTRotator have the same enum values for -# ControllerState, OfflineSubstate, and EnabledSubstate. -from .MTRotator import ControllerState, EnabledSubstate, OfflineSubstate +# ControllerState and EnabledSubstate. +from .MTRotator import ControllerState, EnabledSubstate class ApplicationStatus(enum.IntFlag): diff --git a/python/lsst/ts/xml/enums/MTRotator.py b/python/lsst/ts/xml/enums/MTRotator.py index d433c142e..c15cbab3b 100644 --- a/python/lsst/ts/xml/enums/MTRotator.py +++ b/python/lsst/ts/xml/enums/MTRotator.py @@ -20,7 +20,6 @@ __all__ = [ "ControllerState", - "OfflineSubstate", "EnabledSubstate", "FaultSubstate", "ApplicationStatus", @@ -42,28 +41,12 @@ class ControllerState(enum.IntEnum): """ STANDBY = 0 - DISABLED = enum.auto() # Deprecated in rotator + DISABLED = enum.auto() # Deprecated in rotator/hexapod ENABLED = enum.auto() - OFFLINE = enum.auto() # Deprecated in rotator + OFFLINE = enum.auto() # Deprecated in rotator/hexapod FAULT = enum.auto() -class OfflineSubstate(enum.IntEnum): - """Controller substate for the OFFLINE state. - - Value reported in ``telemetry.offline_substate``. - - This is enum ``OfflineSubStates`` in Moog code. - - Deprecated in the rotator. - - TODO: Remove this after simplifying the state machine in hexapod, DM-39787. - """ - - PUBLISH_ONLY = 0 - AVAILABLE = enum.auto() - - class EnabledSubstate(enum.IntEnum): """Controller substate for the ENABLED state. @@ -74,11 +57,11 @@ class EnabledSubstate(enum.IntEnum): STATIONARY = 0 MOVING_POINT_TO_POINT = enum.auto() - SLEWING_OR_TRACKING = enum.auto() - CONTROLLED_STOPPING = enum.auto() - INITIALIZING = enum.auto() # Deprecated in rotator - RELATIVE = enum.auto() # Deprecated in rotator - CONSTANT_VELOCITY = enum.auto() + SLEWING_OR_TRACKING = enum.auto() # hexapod does not have this + CONTROLLED_STOPPING = enum.auto() # hexapod does not have this + INITIALIZING = enum.auto() # Deprecated in rotator/hexapod + RELATIVE = enum.auto() # Deprecated in rotator/hexapod + CONSTANT_VELOCITY = enum.auto() # hexapod does not have this class FaultSubstate(enum.IntEnum):