From b53900071c4b3cf3fd25aa812be06f27427c112f Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 7 Mar 2022 13:20:17 +0100 Subject: [PATCH] subsystem ID bugfix --- generators/bsp_q7s_events.csv | 4 +++- generators/events/event_parser.py | 7 +++++-- generators/events/translateEvents.cpp | 16 +++++++++++----- generators/fsfwgen | 2 +- generators/objects/objects.py | 2 +- generators/returnvalues/returnvalues_parser.py | 2 +- linux/fsfwconfig/events/subsystemIdRanges.h | 2 +- linux/fsfwconfig/events/translateEvents.cpp | 16 +++++++++++----- tmtc | 2 +- 9 files changed, 35 insertions(+), 18 deletions(-) diff --git a/generators/bsp_q7s_events.csv b/generators/bsp_q7s_events.csv index 5850bacd..5548ee83 100644 --- a/generators/bsp_q7s_events.csv +++ b/generators/bsp_q7s_events.csv @@ -111,7 +111,6 @@ 11504;0x2cf0;SUPV_CRC_FAILURE_EVENT;LOW;PLOC supervisor reply has invalid crc;bsp_q7s/devices/PlocSupervisorHandler.h 11600;0x2d50;SANITIZATION_FAILED;LOW;;bsp_q7s/memory/SdCardManager.h 11601;0x2d51;MOUNTED_SD_CARD;INFO;;bsp_q7s/memory/SdCardManager.h -11603;0x2d53;REBOOT_HW;MEDIUM;;bsp_q7s/core/CoreController.h 11700;0x2db4;UPDATE_FILE_NOT_EXISTS;LOW;;bsp_q7s/devices/PlocUpdater.h 11701;0x2db5;ACTION_COMMANDING_FAILED;LOW;Failed to send command to supervisor handler P1: Return value of CommandActionHelper::commandAction P2: Action ID of command to send;bsp_q7s/devices/PlocUpdater.h 11702;0x2db6;UPDATE_AVAILABLE_FAILED;LOW;Supervisor handler replied action message indicating a command execution failure of the update available command;bsp_q7s/devices/PlocUpdater.h @@ -153,3 +152,6 @@ 12109;0x2f4d;I_MPA_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h 12110;0x2f4e;U_HPA_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h 12111;0x2f4f;I_HPA_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h +13600;0x3520;ALLOC_FAILURE;MEDIUM;;bsp_q7s/core/CoreController.h +13601;0x3521;REBOOT_SW;MEDIUM; Software reboot occured. Can also be a systemd reboot. P1: Current Chip, P2: Current Copy;bsp_q7s/core/CoreController.h +13603;0x3523;REBOOT_HW;MEDIUM;;bsp_q7s/core/CoreController.h diff --git a/generators/events/event_parser.py b/generators/events/event_parser.py index 7b6b86c8..9398ba98 100644 --- a/generators/events/event_parser.py +++ b/generators/events/event_parser.py @@ -82,7 +82,10 @@ def parse_events( handle_csv_export( file_name=CSV_FILENAME, event_list=event_list, file_separator=FILE_SEPARATOR ) - copy_file(filename=CSV_FILENAME, destination=CSV_COPY_DEST, delete_existing_file=True) + LOGGER.info(f"Copying CSV file to {CSV_COPY_DEST}") + copy_file( + filename=CSV_FILENAME, destination=CSV_COPY_DEST, delete_existing_file=True + ) if generate_cpp: handle_cpp_export( @@ -93,7 +96,7 @@ def parse_events( header_file_name=CPP_H_FILENAME, ) if COPY_CPP_FILE: - LOGGER.info(f"EventParser: Copying file to {CPP_COPY_DESTINATION}") + LOGGER.info(f"EventParser: Copying CPP translation file to {CPP_COPY_DESTINATION}") copy_file(CPP_FILENAME, CPP_COPY_DESTINATION) copy_file(CPP_H_FILENAME, CPP_COPY_DESTINATION) diff --git a/generators/events/translateEvents.cpp b/generators/events/translateEvents.cpp index 9e2ad079..1f4c169f 100644 --- a/generators/events/translateEvents.cpp +++ b/generators/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** - * @brief Auto-generated event translation file. Contains 155 translations. + * @brief Auto-generated event translation file. Contains 157 translations. * @details - * Generated on: 2022-03-07 11:35:37 + * Generated on: 2022-03-07 13:17:06 */ #include "translateEvents.h" @@ -118,7 +118,6 @@ const char *SUPV_EXE_FAILURE_STRING = "SUPV_EXE_FAILURE"; const char *SUPV_CRC_FAILURE_EVENT_STRING = "SUPV_CRC_FAILURE_EVENT"; const char *SANITIZATION_FAILED_STRING = "SANITIZATION_FAILED"; const char *MOUNTED_SD_CARD_STRING = "MOUNTED_SD_CARD"; -const char *REBOOT_HW_STRING = "REBOOT_HW"; const char *UPDATE_FILE_NOT_EXISTS_STRING = "UPDATE_FILE_NOT_EXISTS"; const char *ACTION_COMMANDING_FAILED_STRING = "ACTION_COMMANDING_FAILED"; const char *UPDATE_AVAILABLE_FAILED_STRING = "UPDATE_AVAILABLE_FAILED"; @@ -160,6 +159,9 @@ const char *U_MPA_OUT_OF_BOUNDS_STRING = "U_MPA_OUT_OF_BOUNDS"; const char *I_MPA_OUT_OF_BOUNDS_STRING = "I_MPA_OUT_OF_BOUNDS"; const char *U_HPA_OUT_OF_BOUNDS_STRING = "U_HPA_OUT_OF_BOUNDS"; const char *I_HPA_OUT_OF_BOUNDS_STRING = "I_HPA_OUT_OF_BOUNDS"; +const char *ALLOC_FAILURE_STRING = "ALLOC_FAILURE"; +const char *REBOOT_SW_STRING = "REBOOT_SW"; +const char *REBOOT_HW_STRING = "REBOOT_HW"; const char *translateEvents(Event event) { switch ((event & 0xFFFF)) { @@ -389,8 +391,6 @@ const char *translateEvents(Event event) { return SANITIZATION_FAILED_STRING; case (11601): return MOUNTED_SD_CARD_STRING; - case (11603): - return REBOOT_HW_STRING; case (11700): return UPDATE_FILE_NOT_EXISTS_STRING; case (11701): @@ -473,6 +473,12 @@ const char *translateEvents(Event event) { return U_HPA_OUT_OF_BOUNDS_STRING; case (12111): return I_HPA_OUT_OF_BOUNDS_STRING; + case (13600): + return ALLOC_FAILURE_STRING; + case (13601): + return REBOOT_SW_STRING; + case (13603): + return REBOOT_HW_STRING; default: return "UNKNOWN_EVENT"; } diff --git a/generators/fsfwgen b/generators/fsfwgen index 52f29169..348877b5 160000 --- a/generators/fsfwgen +++ b/generators/fsfwgen @@ -1 +1 @@ -Subproject commit 52f291692c4074a23743c799148b0432a4e405fa +Subproject commit 348877b5d93ad17db4b03d08b134a2e1c87af2df diff --git a/generators/objects/objects.py b/generators/objects/objects.py index 3ea80e8e..fa174bc1 100644 --- a/generators/objects/objects.py +++ b/generators/objects/objects.py @@ -118,5 +118,5 @@ def handle_file_export(list_items): copy_file( filename=CSV_OBJECT_FILENAME, destination=CSV_COPY_DEST, - delete_existing_file=True + delete_existing_file=True, ) diff --git a/generators/returnvalues/returnvalues_parser.py b/generators/returnvalues/returnvalues_parser.py index 48d929ea..53c84564 100644 --- a/generators/returnvalues/returnvalues_parser.py +++ b/generators/returnvalues/returnvalues_parser.py @@ -87,7 +87,7 @@ def parse_returnvalues(): copy_file( filename=CSV_RETVAL_FILENAME, destination=CSV_COPY_DEST, - delete_existing_file=True + delete_existing_file=True, ) if EXPORT_TO_SQL: LOGGER.info("ReturnvalueParser: Exporting to SQL") diff --git a/linux/fsfwconfig/events/subsystemIdRanges.h b/linux/fsfwconfig/events/subsystemIdRanges.h index 33ef1a09..768797b5 100644 --- a/linux/fsfwconfig/events/subsystemIdRanges.h +++ b/linux/fsfwconfig/events/subsystemIdRanges.h @@ -13,7 +13,7 @@ namespace SUBSYSTEM_ID { enum : uint8_t { SUBSYSTEM_ID_START = COMMON_SUBSYSTEM_ID_END, - CORE = 116, + CORE = 136, }; } diff --git a/linux/fsfwconfig/events/translateEvents.cpp b/linux/fsfwconfig/events/translateEvents.cpp index 9e2ad079..1f4c169f 100644 --- a/linux/fsfwconfig/events/translateEvents.cpp +++ b/linux/fsfwconfig/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** - * @brief Auto-generated event translation file. Contains 155 translations. + * @brief Auto-generated event translation file. Contains 157 translations. * @details - * Generated on: 2022-03-07 11:35:37 + * Generated on: 2022-03-07 13:17:06 */ #include "translateEvents.h" @@ -118,7 +118,6 @@ const char *SUPV_EXE_FAILURE_STRING = "SUPV_EXE_FAILURE"; const char *SUPV_CRC_FAILURE_EVENT_STRING = "SUPV_CRC_FAILURE_EVENT"; const char *SANITIZATION_FAILED_STRING = "SANITIZATION_FAILED"; const char *MOUNTED_SD_CARD_STRING = "MOUNTED_SD_CARD"; -const char *REBOOT_HW_STRING = "REBOOT_HW"; const char *UPDATE_FILE_NOT_EXISTS_STRING = "UPDATE_FILE_NOT_EXISTS"; const char *ACTION_COMMANDING_FAILED_STRING = "ACTION_COMMANDING_FAILED"; const char *UPDATE_AVAILABLE_FAILED_STRING = "UPDATE_AVAILABLE_FAILED"; @@ -160,6 +159,9 @@ const char *U_MPA_OUT_OF_BOUNDS_STRING = "U_MPA_OUT_OF_BOUNDS"; const char *I_MPA_OUT_OF_BOUNDS_STRING = "I_MPA_OUT_OF_BOUNDS"; const char *U_HPA_OUT_OF_BOUNDS_STRING = "U_HPA_OUT_OF_BOUNDS"; const char *I_HPA_OUT_OF_BOUNDS_STRING = "I_HPA_OUT_OF_BOUNDS"; +const char *ALLOC_FAILURE_STRING = "ALLOC_FAILURE"; +const char *REBOOT_SW_STRING = "REBOOT_SW"; +const char *REBOOT_HW_STRING = "REBOOT_HW"; const char *translateEvents(Event event) { switch ((event & 0xFFFF)) { @@ -389,8 +391,6 @@ const char *translateEvents(Event event) { return SANITIZATION_FAILED_STRING; case (11601): return MOUNTED_SD_CARD_STRING; - case (11603): - return REBOOT_HW_STRING; case (11700): return UPDATE_FILE_NOT_EXISTS_STRING; case (11701): @@ -473,6 +473,12 @@ const char *translateEvents(Event event) { return U_HPA_OUT_OF_BOUNDS_STRING; case (12111): return I_HPA_OUT_OF_BOUNDS_STRING; + case (13600): + return ALLOC_FAILURE_STRING; + case (13601): + return REBOOT_SW_STRING; + case (13603): + return REBOOT_HW_STRING; default: return "UNKNOWN_EVENT"; } diff --git a/tmtc b/tmtc index d132747c..e1d43b8d 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit d132747cf98b576fad98f85fc7c5882e8259f051 +Subproject commit e1d43b8de9e2b09493245fdf6c050b8b819eab41