From 9f8ab3e23574bdb7daefb0eaa4efd1d635045045 Mon Sep 17 00:00:00 2001 From: Markus Kranz Date: Fri, 17 Feb 2023 20:00:46 +0100 Subject: [PATCH] introduced some enums to classes --- eive_tmtc/tmtc/acs/reaction_wheels.py | 3 ++- eive_tmtc/tmtc/acs/sus.py | 3 ++- eive_tmtc/tmtc/com/syrlinks_handler.py | 2 +- eive_tmtc/tmtc/payload/ploc_supervisor.py | 2 +- eive_tmtc/tmtc/power/bpx_batt.py | 3 ++- eive_tmtc/tmtc/power/common_power.py | 3 ++- 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/eive_tmtc/tmtc/acs/reaction_wheels.py b/eive_tmtc/tmtc/acs/reaction_wheels.py index da8be5f..c2e5252 100644 --- a/eive_tmtc/tmtc/acs/reaction_wheels.py +++ b/eive_tmtc/tmtc/acs/reaction_wheels.py @@ -4,6 +4,7 @@ @author J. Meier @date 20.06.2021 """ +import enum import struct from typing import List @@ -64,7 +65,7 @@ class InfoAss: ALL_SPEED_OFF = "Speed down to 0" -class RwSetId: +class RwSetId(enum.IntEnum): STATUS_SET_ID = 4 TEMPERATURE_SET_ID = 8 LAST_RESET = 2 diff --git a/eive_tmtc/tmtc/acs/sus.py b/eive_tmtc/tmtc/acs/sus.py index 7989a1e..2e6a0da 100644 --- a/eive_tmtc/tmtc/acs/sus.py +++ b/eive_tmtc/tmtc/acs/sus.py @@ -1,3 +1,4 @@ +import enum import struct from eive_tmtc.pus_tm.defs import PrintWrapper @@ -5,7 +6,7 @@ from tmtccmd.util import ObjectIdU32 from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter -class SetId: +class SetId(enum.IntEnum): HK = 3 diff --git a/eive_tmtc/tmtc/com/syrlinks_handler.py b/eive_tmtc/tmtc/com/syrlinks_handler.py index 6c00ea0..3157978 100644 --- a/eive_tmtc/tmtc/com/syrlinks_handler.py +++ b/eive_tmtc/tmtc/com/syrlinks_handler.py @@ -34,7 +34,7 @@ from tmtccmd.util import ObjectIdU32 from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter -class SetId: +class SetId(enum.IntEnum): RX_REGISTERS_DATASET = 1 TX_REGISTERS_DATASET = 2 TEMPERATURE_SET_ID = 3 diff --git a/eive_tmtc/tmtc/payload/ploc_supervisor.py b/eive_tmtc/tmtc/payload/ploc_supervisor.py index 1599ef6..8ee470a 100644 --- a/eive_tmtc/tmtc/payload/ploc_supervisor.py +++ b/eive_tmtc/tmtc/payload/ploc_supervisor.py @@ -130,7 +130,7 @@ class SupvActionId: MEM_CHECK = 61 -class SetIds: +class SetIds(enum.IntEnum): HK_REPORT = 102 BOOT_STATUS_REPORT = 103 diff --git a/eive_tmtc/tmtc/power/bpx_batt.py b/eive_tmtc/tmtc/power/bpx_batt.py index c6283fe..ef65256 100644 --- a/eive_tmtc/tmtc/power/bpx_batt.py +++ b/eive_tmtc/tmtc/power/bpx_batt.py @@ -1,3 +1,4 @@ +import enum import struct from eive_tmtc.pus_tm.defs import PrintWrapper @@ -19,7 +20,7 @@ from tmtccmd.tc.pus_200_fsfw_mode import Subservice as ModeSubservices from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter -class BpxSetId: +class BpxSetId(enum.IntEnum): GET_HK_SET = 0 GET_CFG_SET = 5 diff --git a/eive_tmtc/tmtc/power/common_power.py b/eive_tmtc/tmtc/power/common_power.py index 35e7c04..630745b 100644 --- a/eive_tmtc/tmtc/power/common_power.py +++ b/eive_tmtc/tmtc/power/common_power.py @@ -1,3 +1,4 @@ +import enum import struct from typing import List @@ -116,7 +117,7 @@ class PowerOpCodes: PRINT_LATCHUPS = ["print_latchups"] -class SetId: +class SetId(enum.IntEnum): CORE = 1 AUX = 2 CONFIG = 3