diff --git a/src/spacepackets/ecss/pus_17_test.py b/src/spacepackets/ecss/pus_17_test.py index 3761922..11d57ee 100644 --- a/src/spacepackets/ecss/pus_17_test.py +++ b/src/spacepackets/ecss/pus_17_test.py @@ -16,6 +16,9 @@ class MessageSubtype(enum.IntEnum): TM_REPLY = 2 +Subservice = MessageSubtype + + class Service17Tm(AbstractPusTm): def __init__( self, diff --git a/src/spacepackets/ecss/pus_3_hk.py b/src/spacepackets/ecss/pus_3_hk.py index 5225c88..7ddce59 100644 --- a/src/spacepackets/ecss/pus_3_hk.py +++ b/src/spacepackets/ecss/pus_3_hk.py @@ -21,3 +21,6 @@ class MessageSubtype(enum.IntEnum): TC_MODIFY_PARAMETER_REPORT_COLLECTION_INTERVAL = 31 TC_MODIFY_DIAGNOSTICS_REPORT_COLLECTION_INTERVAL = 32 + + +Subservice = MessageSubtype diff --git a/src/spacepackets/ecss/pus_5_event.py b/src/spacepackets/ecss/pus_5_event.py index 49732e8..ee9aa0e 100644 --- a/src/spacepackets/ecss/pus_5_event.py +++ b/src/spacepackets/ecss/pus_5_event.py @@ -8,3 +8,6 @@ class MessageSubtype(enum.IntEnum): TM_HIGH_SEVERITY_EVENT = 4 TC_ENABLE_EVENT_REPORTING = 5 TC_DISABLE_EVENT_REPORTING = 6 + + +Subservice = MessageSubtype diff --git a/tests/ecss/test_message_subtype_compat.py b/tests/ecss/test_message_subtype_compat.py new file mode 100644 index 0000000..9aff3fb --- /dev/null +++ b/tests/ecss/test_message_subtype_compat.py @@ -0,0 +1,14 @@ +from unittest import TestCase + +from spacepackets.ecss import pus_3_hk, pus_5_event, pus_17_test + + +class TestMessageSubtypeCompat(TestCase): + def test_service_17_exports_legacy_subservice_enum_alias(self): + self.assertIs(pus_17_test.Subservice, pus_17_test.MessageSubtype) + + def test_service_3_exports_legacy_subservice_enum_alias(self): + self.assertIs(pus_3_hk.Subservice, pus_3_hk.MessageSubtype) + + def test_service_5_exports_legacy_subservice_enum_alias(self): + self.assertIs(pus_5_event.Subservice, pus_5_event.MessageSubtype)