From a70520d40ccc3bb99770b64ec760e8b8a726e88c Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 21 Jun 2021 11:10:47 +0200 Subject: [PATCH] updated retval and event parser --- .../fsfwconfig/events/translateEvents.cpp | 2 +- generators/bsp_hosted_events.csv | 78 +++++++++++++++++++ generators/events/event_parser.py | 6 +- generators/events/translateEvents.cpp | 2 +- 4 files changed, 83 insertions(+), 5 deletions(-) create mode 100644 generators/bsp_hosted_events.csv diff --git a/bsp_hosted/fsfwconfig/events/translateEvents.cpp b/bsp_hosted/fsfwconfig/events/translateEvents.cpp index d7bfb71..19ea04b 100644 --- a/bsp_hosted/fsfwconfig/events/translateEvents.cpp +++ b/bsp_hosted/fsfwconfig/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** * @brief Auto-generated event translation file. Contains 78 translations. * @details - * Generated on: 2021-05-28 18:21:33 + * Generated on: 2021-06-21 11:10:29 */ #include "translateEvents.h" diff --git a/generators/bsp_hosted_events.csv b/generators/bsp_hosted_events.csv new file mode 100644 index 0000000..17df878 --- /dev/null +++ b/generators/bsp_hosted_events.csv @@ -0,0 +1,78 @@ +2200;STORE_SEND_WRITE_FAILED;LOW; ;../../fsfw/tmstorage/TmStoreBackendIF.h +2201;STORE_WRITE_FAILED;LOW; ;../../fsfw/tmstorage/TmStoreBackendIF.h +2202;STORE_SEND_READ_FAILED;LOW; ;../../fsfw/tmstorage/TmStoreBackendIF.h +2203;STORE_READ_FAILED;LOW; ;../../fsfw/tmstorage/TmStoreBackendIF.h +2204;UNEXPECTED_MSG;LOW; ;../../fsfw/tmstorage/TmStoreBackendIF.h +2205;STORING_FAILED;LOW; ;../../fsfw/tmstorage/TmStoreBackendIF.h +2206;TM_DUMP_FAILED;LOW; ;../../fsfw/tmstorage/TmStoreBackendIF.h +2207;STORE_INIT_FAILED;LOW; ;../../fsfw/tmstorage/TmStoreBackendIF.h +2208;STORE_INIT_EMPTY;INFO; ;../../fsfw/tmstorage/TmStoreBackendIF.h +2209;STORE_CONTENT_CORRUPTED;LOW; ;../../fsfw/tmstorage/TmStoreBackendIF.h +2210;STORE_INITIALIZE;INFO; ;../../fsfw/tmstorage/TmStoreBackendIF.h +2211;INIT_DONE;INFO; ;../../fsfw/tmstorage/TmStoreBackendIF.h +2212;DUMP_FINISHED;INFO; ;../../fsfw/tmstorage/TmStoreBackendIF.h +2213;DELETION_FINISHED;INFO; ;../../fsfw/tmstorage/TmStoreBackendIF.h +2214;DELETION_FAILED;LOW; ;../../fsfw/tmstorage/TmStoreBackendIF.h +2215;AUTO_CATALOGS_SENDING_FAILED;INFO; ;../../fsfw/tmstorage/TmStoreBackendIF.h +2600;GET_DATA_FAILED;LOW; ;../../fsfw/storagemanager/StorageManagerIF.h +2601;STORE_DATA_FAILED;LOW; ;../../fsfw/storagemanager/StorageManagerIF.h +2800;DEVICE_BUILDING_COMMAND_FAILED;LOW; ;../../fsfw/devicehandlers/DeviceHandlerIF.h +2801;DEVICE_SENDING_COMMAND_FAILED;LOW; ;../../fsfw/devicehandlers/DeviceHandlerIF.h +2802;DEVICE_REQUESTING_REPLY_FAILED;LOW; ;../../fsfw/devicehandlers/DeviceHandlerIF.h +2803;DEVICE_READING_REPLY_FAILED;LOW; ;../../fsfw/devicehandlers/DeviceHandlerIF.h +2804;DEVICE_INTERPRETING_REPLY_FAILED;LOW; ;../../fsfw/devicehandlers/DeviceHandlerIF.h +2805;DEVICE_MISSED_REPLY;LOW; ;../../fsfw/devicehandlers/DeviceHandlerIF.h +2806;DEVICE_UNKNOWN_REPLY;LOW; ;../../fsfw/devicehandlers/DeviceHandlerIF.h +2807;DEVICE_UNREQUESTED_REPLY;LOW; ;../../fsfw/devicehandlers/DeviceHandlerIF.h +2808;INVALID_DEVICE_COMMAND;LOW; ;../../fsfw/devicehandlers/DeviceHandlerIF.h +2809;MONITORING_LIMIT_EXCEEDED;LOW; ;../../fsfw/devicehandlers/DeviceHandlerIF.h +2810;MONITORING_AMBIGUOUS;HIGH; ;../../fsfw/devicehandlers/DeviceHandlerIF.h +4201;FUSE_CURRENT_HIGH;LOW; ;../../fsfw/power/Fuse.h +4202;FUSE_WENT_OFF;LOW; ;../../fsfw/power/Fuse.h +4204;POWER_ABOVE_HIGH_LIMIT;LOW; ;../../fsfw/power/Fuse.h +4205;POWER_BELOW_LOW_LIMIT;LOW; ;../../fsfw/power/Fuse.h +4300;SWITCH_WENT_OFF;LOW; ;../../fsfw/power/PowerSwitchIF.h +5000;HEATER_ON;INFO; ;../../fsfw/thermal/Heater.h +5001;HEATER_OFF;INFO; ;../../fsfw/thermal/Heater.h +5002;HEATER_TIMEOUT;LOW; ;../../fsfw/thermal/Heater.h +5003;HEATER_STAYED_ON;LOW; ;../../fsfw/thermal/Heater.h +5004;HEATER_STAYED_OFF;LOW; ;../../fsfw/thermal/Heater.h +5200;TEMP_SENSOR_HIGH;LOW; ;../../fsfw/thermal/AbstractTemperatureSensor.h +5201;TEMP_SENSOR_LOW;LOW; ;../../fsfw/thermal/AbstractTemperatureSensor.h +5202;TEMP_SENSOR_GRADIENT;LOW; ;../../fsfw/thermal/AbstractTemperatureSensor.h +5901;COMPONENT_TEMP_LOW;LOW; ;../../fsfw/thermal/ThermalComponentIF.h +5902;COMPONENT_TEMP_HIGH;LOW; ;../../fsfw/thermal/ThermalComponentIF.h +5903;COMPONENT_TEMP_OOL_LOW;LOW; ;../../fsfw/thermal/ThermalComponentIF.h +5904;COMPONENT_TEMP_OOL_HIGH;LOW; ;../../fsfw/thermal/ThermalComponentIF.h +5905;TEMP_NOT_IN_OP_RANGE;LOW; ;../../fsfw/thermal/ThermalComponentIF.h +7101;FDIR_CHANGED_STATE;INFO; ;../../fsfw/fdir/FailureIsolationBase.h +7102;FDIR_STARTS_RECOVERY;MEDIUM; ;../../fsfw/fdir/FailureIsolationBase.h +7103;FDIR_TURNS_OFF_DEVICE;MEDIUM; ;../../fsfw/fdir/FailureIsolationBase.h +7201;MONITOR_CHANGED_STATE;LOW; ;../../fsfw/monitoring/MonitoringIF.h +7202;VALUE_BELOW_LOW_LIMIT;LOW; ;../../fsfw/monitoring/MonitoringIF.h +7203;VALUE_ABOVE_HIGH_LIMIT;LOW; ;../../fsfw/monitoring/MonitoringIF.h +7204;VALUE_OUT_OF_RANGE;LOW; ;../../fsfw/monitoring/MonitoringIF.h +7301;SWITCHING_TM_FAILED;LOW; ;../../fsfw/datapool/HkSwitchHelper.h +7400;CHANGING_MODE;INFO; ;../../fsfw/modes/HasModesIF.h +7401;MODE_INFO;INFO; ;../../fsfw/modes/HasModesIF.h +7402;FALLBACK_FAILED;HIGH; ;../../fsfw/modes/HasModesIF.h +7403;MODE_TRANSITION_FAILED;LOW; ;../../fsfw/modes/HasModesIF.h +7404;CANT_KEEP_MODE;HIGH; ;../../fsfw/modes/HasModesIF.h +7405;OBJECT_IN_INVALID_MODE;LOW; ;../../fsfw/modes/HasModesIF.h +7406;FORCING_MODE;MEDIUM; ;../../fsfw/modes/HasModesIF.h +7407;MODE_CMD_REJECTED;LOW; ;../../fsfw/modes/HasModesIF.h +7506;HEALTH_INFO;INFO; ;../../fsfw/health/HasHealthIF.h +7507;CHILD_CHANGED_HEALTH;INFO; ;../../fsfw/health/HasHealthIF.h +7508;CHILD_PROBLEMS;LOW; ;../../fsfw/health/HasHealthIF.h +7509;OVERWRITING_HEALTH;LOW; ;../../fsfw/health/HasHealthIF.h +7510;TRYING_RECOVERY;MEDIUM; ;../../fsfw/health/HasHealthIF.h +7511;RECOVERY_STEP;MEDIUM; ;../../fsfw/health/HasHealthIF.h +7512;RECOVERY_DONE;MEDIUM; ;../../fsfw/health/HasHealthIF.h +7900;RF_AVAILABLE;INFO; ;../../fsfw/datalinklayer/DataLinkLayer.h +7901;RF_LOST;INFO; ;../../fsfw/datalinklayer/DataLinkLayer.h +7902;BIT_LOCK;INFO; ;../../fsfw/datalinklayer/DataLinkLayer.h +7903;BIT_LOCK_LOST;INFO; ;../../fsfw/datalinklayer/DataLinkLayer.h +7905;FRAME_PROCESSING_FAILED;LOW; ;../../fsfw/datalinklayer/DataLinkLayer.h +8900;CLOCK_SET;INFO; ;../../fsfw/pus/Service9TimeManagement.h +8901;CLOCK_SET_FAILURE;LOW; ;../../fsfw/pus/Service9TimeManagement.h +9700;TEST;INFO; ;../../fsfw/pus/Service17Test.h diff --git a/generators/events/event_parser.py b/generators/events/event_parser.py index 3f50abc..9c3393e 100644 --- a/generators/events/event_parser.py +++ b/generators/events/event_parser.py @@ -19,7 +19,7 @@ from fsfwgen.utility.file_management import copy_file, move_file from definitions import BspSelect, BspFolderDict # TODO: Ask from user or store in json file? -BSP_SELECT = BspSelect.BSP_LINUX.value +BSP_SELECT = BspSelect.BSP_HOSTED.value BSP_FOLDER = BspFolderDict[BSP_SELECT] DATE_TODAY = datetime.datetime.now() DATE_STRING_FULL = DATE_TODAY.strftime("%Y-%m-%d %H:%M:%S") @@ -45,10 +45,10 @@ FILE_SEPARATOR = ";" SUBSYSTEM_DEFINITION_DESTINATIONS = [ f"../../{BSP_FOLDER}/fsfwconfig/events/subsystemIdRanges.h", "../../fsfw/events/fwSubsystemIdRanges.h", - "../../common/config/commonSubsystemIds.h" + "../../example_common/config/commonSubsystemIds.h" ] -HEADER_DEFINITION_DESTINATIONS = ["../../mission/", "../../fsfw/", f"../../{BSP_FOLDER}", "../../test/"] +HEADER_DEFINITION_DESTINATIONS = ["../../example_common/", "../../fsfw/", f"../../{BSP_FOLDER}"] def main(): diff --git a/generators/events/translateEvents.cpp b/generators/events/translateEvents.cpp index 49d993b..19ea04b 100644 --- a/generators/events/translateEvents.cpp +++ b/generators/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** * @brief Auto-generated event translation file. Contains 78 translations. * @details - * Generated on: 2021-05-28 18:21:48 + * Generated on: 2021-06-21 11:10:29 */ #include "translateEvents.h"