From 384122f811fd6e7babae21c0c117821aad47b996 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 17 Jan 2022 15:03:46 +0100 Subject: [PATCH 01/39] started BPX handler --- bsp_q7s/core/ObjectFactory.cpp | 3 +++ linux/fsfwconfig/devices/addresses.h | 1 + mission/devices/BpxBatteryHandler.h | 30 ++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 mission/devices/BpxBatteryHandler.h diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index 69f6dfaf..9815c1d3 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -144,6 +144,9 @@ void ObjectFactory::produce(void* args) { new IMTQHandler(objects::IMTQ_HANDLER, objects::I2C_COM_IF, imtqI2cCookie); createReactionWheelComponents(gpioComIF); + I2cCookie* bpxI2cCookie = + new I2cCookie(addresses::BPX_BATTERY, 100, q7s::I2C_DEFAULT_DEV); + #if OBSW_ADD_PLOC_MPSOC == 1 UartCookie* plocMpsocCookie = new UartCookie(objects::PLOC_MPSOC_HANDLER, q7s::UART_PLOC_MPSOC_DEV, diff --git a/linux/fsfwconfig/devices/addresses.h b/linux/fsfwconfig/devices/addresses.h index 5ef82788..3405eb47 100644 --- a/linux/fsfwconfig/devices/addresses.h +++ b/linux/fsfwconfig/devices/addresses.h @@ -45,6 +45,7 @@ enum logicalAddresses : address_t { }; enum i2cAddresses : address_t { + BPX_BATTERY = 0x07, IMTQ = 16, TMP1075_TCS_1 = 72, TMP1075_TCS_2 = 73, diff --git a/mission/devices/BpxBatteryHandler.h b/mission/devices/BpxBatteryHandler.h new file mode 100644 index 00000000..99843e59 --- /dev/null +++ b/mission/devices/BpxBatteryHandler.h @@ -0,0 +1,30 @@ +#ifndef MISSION_DEVICES_BPXBATTERYHANDLER_H_ +#define MISSION_DEVICES_BPXBATTERYHANDLER_H_ + +#include + +class BpxBatteryHandler: public DeviceHandlerBase { +public: + BpxBatteryHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie); + virtual ~BpxBatteryHandler(); +protected: + void doStartUp() override; + void doShutDown() override; + ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t* id) override; + ReturnValue_t buildTransitionDeviceCommand(DeviceCommandId_t* id) override; + void fillCommandAndReplyMap() override; + ReturnValue_t buildCommandFromCommand(DeviceCommandId_t deviceCommand, const uint8_t* commandData, + size_t commandDataLen) override; + ReturnValue_t scanForReply(const uint8_t* start, size_t remainingSize, DeviceCommandId_t* foundId, + size_t* foundLen) override; + ReturnValue_t interpretDeviceReply(DeviceCommandId_t ixd, const uint8_t* packet) override; + void setNormalDatapoolEntriesInvalid() override; + virtual LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override; + uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override; + ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap, + LocalDataPoolManager& poolManager) override; +}; + + + +#endif /* MISSION_DEVICES_BPXBATTERYHANDLER_H_ */ From 3a274e7a9ba0a2d690a95b5de04bcf82975bfa45 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 17 Jan 2022 15:35:46 +0100 Subject: [PATCH 02/39] apply clang format --- bsp_q7s/core/ObjectFactory.cpp | 5 ++- linux/obc/PtmeIF.h | 4 +-- mission/devices/BpxBatteryHandler.cpp | 47 ++++++++++++++++++++++++++ mission/devices/BpxBatteryHandler.h | 15 ++++---- mission/devices/CMakeLists.txt | 1 + mission/devices/GPSHyperionHandler.cpp | 10 +++++- mission/tmtc/VirtualChannel.h | 7 ++-- 7 files changed, 70 insertions(+), 19 deletions(-) create mode 100644 mission/devices/BpxBatteryHandler.cpp diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index 9815c1d3..77d3207e 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -144,9 +144,8 @@ void ObjectFactory::produce(void* args) { new IMTQHandler(objects::IMTQ_HANDLER, objects::I2C_COM_IF, imtqI2cCookie); createReactionWheelComponents(gpioComIF); - I2cCookie* bpxI2cCookie = - new I2cCookie(addresses::BPX_BATTERY, 100, q7s::I2C_DEFAULT_DEV); - + I2cCookie* bpxI2cCookie = new I2cCookie(addresses::BPX_BATTERY, 100, q7s::I2C_DEFAULT_DEV); + (void)bpxI2cCookie; #if OBSW_ADD_PLOC_MPSOC == 1 UartCookie* plocMpsocCookie = new UartCookie(objects::PLOC_MPSOC_HANDLER, q7s::UART_PLOC_MPSOC_DEV, diff --git a/linux/obc/PtmeIF.h b/linux/obc/PtmeIF.h index 5488fbfb..77e976e0 100644 --- a/linux/obc/PtmeIF.h +++ b/linux/obc/PtmeIF.h @@ -1,10 +1,10 @@ #ifndef LINUX_OBC_PTMEIF_H_ #define LINUX_OBC_PTMEIF_H_ -#include "fsfw/returnvalues/HasReturnvaluesIF.h" - #include +#include "fsfw/returnvalues/HasReturnvaluesIF.h" + /** * @brief Interface class for managing the PTME IP Core implemented in the programmable logic. * diff --git a/mission/devices/BpxBatteryHandler.cpp b/mission/devices/BpxBatteryHandler.cpp new file mode 100644 index 00000000..7d504105 --- /dev/null +++ b/mission/devices/BpxBatteryHandler.cpp @@ -0,0 +1,47 @@ +#include "BpxBatteryHandler.h" + +BpxBatteryHandler::BpxBatteryHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie) + : DeviceHandlerBase(objectId, comIF, comCookie) {} + +BpxBatteryHandler::~BpxBatteryHandler() {} + +void BpxBatteryHandler::doStartUp() {} + +void BpxBatteryHandler::doShutDown() {} + +ReturnValue_t BpxBatteryHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) { + return HasReturnvaluesIF::RETURN_OK; +} + +ReturnValue_t BpxBatteryHandler::buildTransitionDeviceCommand(DeviceCommandId_t* id) { + return HasReturnvaluesIF::RETURN_OK; +} + +void BpxBatteryHandler::fillCommandAndReplyMap() {} + +ReturnValue_t BpxBatteryHandler::buildCommandFromCommand(DeviceCommandId_t deviceCommand, + const uint8_t* commandData, + size_t commandDataLen) { + return HasReturnvaluesIF::RETURN_OK; +} + +ReturnValue_t BpxBatteryHandler::scanForReply(const uint8_t* start, size_t remainingSize, + DeviceCommandId_t* foundId, size_t* foundLen) { + return HasReturnvaluesIF::RETURN_OK; +} + +ReturnValue_t BpxBatteryHandler::interpretDeviceReply(DeviceCommandId_t ixd, + const uint8_t* packet) { + return HasReturnvaluesIF::RETURN_OK; +} + +void BpxBatteryHandler::setNormalDatapoolEntriesInvalid() {} + +LocalPoolDataSetBase* BpxBatteryHandler::getDataSetHandle(sid_t sid) { return nullptr; } + +uint32_t BpxBatteryHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 10000; } + +ReturnValue_t BpxBatteryHandler::initializeLocalDataPool(localpool::DataPool& localDataPoolMap, + LocalDataPoolManager& poolManager) { + return HasReturnvaluesIF::RETURN_OK; +} diff --git a/mission/devices/BpxBatteryHandler.h b/mission/devices/BpxBatteryHandler.h index 99843e59..887827fd 100644 --- a/mission/devices/BpxBatteryHandler.h +++ b/mission/devices/BpxBatteryHandler.h @@ -3,28 +3,27 @@ #include -class BpxBatteryHandler: public DeviceHandlerBase { -public: +class BpxBatteryHandler : public DeviceHandlerBase { + public: BpxBatteryHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie); virtual ~BpxBatteryHandler(); -protected: + + protected: void doStartUp() override; void doShutDown() override; ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t* id) override; ReturnValue_t buildTransitionDeviceCommand(DeviceCommandId_t* id) override; void fillCommandAndReplyMap() override; ReturnValue_t buildCommandFromCommand(DeviceCommandId_t deviceCommand, const uint8_t* commandData, - size_t commandDataLen) override; + size_t commandDataLen) override; ReturnValue_t scanForReply(const uint8_t* start, size_t remainingSize, DeviceCommandId_t* foundId, - size_t* foundLen) override; + size_t* foundLen) override; ReturnValue_t interpretDeviceReply(DeviceCommandId_t ixd, const uint8_t* packet) override; void setNormalDatapoolEntriesInvalid() override; virtual LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override; uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override; ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap, - LocalDataPoolManager& poolManager) override; + LocalDataPoolManager& poolManager) override; }; - - #endif /* MISSION_DEVICES_BPXBATTERYHANDLER_H_ */ diff --git a/mission/devices/CMakeLists.txt b/mission/devices/CMakeLists.txt index ed811ed3..a9c52b0b 100644 --- a/mission/devices/CMakeLists.txt +++ b/mission/devices/CMakeLists.txt @@ -1,6 +1,7 @@ target_sources(${TARGET_NAME} PUBLIC GPSHyperionHandler.cpp GomspaceDeviceHandler.cpp + BpxBatteryHandler.cpp Tmp1075Handler.cpp PCDUHandler.cpp P60DockHandler.cpp diff --git a/mission/devices/GPSHyperionHandler.cpp b/mission/devices/GPSHyperionHandler.cpp index 5b2a2a95..9ffc6c8f 100644 --- a/mission/devices/GPSHyperionHandler.cpp +++ b/mission/devices/GPSHyperionHandler.cpp @@ -1,7 +1,9 @@ #include "GPSHyperionHandler.h" +#ifdef FSFW_OSAL_LINUX #include #include +#endif #include @@ -22,7 +24,11 @@ GPSHyperionHandler::GPSHyperionHandler(object_id_t objectId, object_id_t parentI GPSHyperionHandler::~GPSHyperionHandler() {} -void GPSHyperionHandler::performControlOperation() { readGpsDataFromGpsd(); } +void GPSHyperionHandler::performControlOperation() { +#ifdef FSFW_OSAL_LINUX + readGpsDataFromGpsd(); +#endif +} LocalPoolDataSetBase *GPSHyperionHandler::getDataSetHandle(sid_t sid) { return nullptr; } @@ -83,6 +89,7 @@ ReturnValue_t GPSHyperionHandler::handleCommandMessage(CommandMessage *message) return ExtendedControllerBase::handleCommandMessage(message); } +#ifdef FSFW_OSAL_LINUX void GPSHyperionHandler::readGpsDataFromGpsd() { // The data from the device will generally be read all at once. Therefore, we // can set all field here @@ -166,3 +173,4 @@ void GPSHyperionHandler::readGpsDataFromGpsd() { std::cout << "Speed(m/s): " << gps->fix.speed << std::endl; } } +#endif diff --git a/mission/tmtc/VirtualChannel.h b/mission/tmtc/VirtualChannel.h index 62953dcb..13e30b32 100644 --- a/mission/tmtc/VirtualChannel.h +++ b/mission/tmtc/VirtualChannel.h @@ -1,14 +1,11 @@ #ifndef VIRTUALCHANNEL_H_ #define VIRTUALCHANNEL_H_ - #include "OBSWConfig.h" - -#include "linux/obc/PtmeIF.h" - +#include "fsfw/ipc/MessageQueueIF.h" #include "fsfw/returnvalues/HasReturnvaluesIF.h" #include "fsfw/tmtcservices/AcceptsTelemetryIF.h" -#include "fsfw/ipc/MessageQueueIF.h" +#include "linux/obc/PtmeIF.h" class StorageManagerIF; From a9cd072acdc2fc15d2cde9442a9ccb29875e2623 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 17 Jan 2022 15:36:52 +0100 Subject: [PATCH 03/39] add battery definitions file --- mission/devices/devicedefinitions/BpxBatteryDefinitions.h | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 mission/devices/devicedefinitions/BpxBatteryDefinitions.h diff --git a/mission/devices/devicedefinitions/BpxBatteryDefinitions.h b/mission/devices/devicedefinitions/BpxBatteryDefinitions.h new file mode 100644 index 00000000..436cc6f6 --- /dev/null +++ b/mission/devices/devicedefinitions/BpxBatteryDefinitions.h @@ -0,0 +1,8 @@ +#ifndef MISSION_DEVICES_DEVICEDEFINITIONS_BPXBATTERYDEFINITIONS_H_ +#define MISSION_DEVICES_DEVICEDEFINITIONS_BPXBATTERYDEFINITIONS_H_ + +namespace BpxBattery { + +} + +#endif /* MISSION_DEVICES_DEVICEDEFINITIONS_BPXBATTERYDEFINITIONS_H_ */ From 1d6f999ab6b96275b0634bb3bf0547b7339a74be Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 17 Jan 2022 16:21:33 +0100 Subject: [PATCH 04/39] added HK deserializer --- mission/devices/BpxBatteryHandler.h | 2 + .../devicedefinitions/BpxBatteryDefinitions.h | 64 +++++++++++++++++++ 2 files changed, 66 insertions(+) diff --git a/mission/devices/BpxBatteryHandler.h b/mission/devices/BpxBatteryHandler.h index 887827fd..5edc0348 100644 --- a/mission/devices/BpxBatteryHandler.h +++ b/mission/devices/BpxBatteryHandler.h @@ -1,6 +1,8 @@ #ifndef MISSION_DEVICES_BPXBATTERYHANDLER_H_ #define MISSION_DEVICES_BPXBATTERYHANDLER_H_ +#include "devicedefinitions/BpxBatteryDefinitions.h" + #include class BpxBatteryHandler : public DeviceHandlerBase { diff --git a/mission/devices/devicedefinitions/BpxBatteryDefinitions.h b/mission/devices/devicedefinitions/BpxBatteryDefinitions.h index 436cc6f6..ff96e857 100644 --- a/mission/devices/devicedefinitions/BpxBatteryDefinitions.h +++ b/mission/devices/devicedefinitions/BpxBatteryDefinitions.h @@ -1,8 +1,72 @@ #ifndef MISSION_DEVICES_DEVICEDEFINITIONS_BPXBATTERYDEFINITIONS_H_ #define MISSION_DEVICES_DEVICEDEFINITIONS_BPXBATTERYDEFINITIONS_H_ +#include +#include + namespace BpxBattery { +static constexpr uint8_t PORT_PING = 1; +static constexpr uint8_t PORT_REBOOT = 4; +static constexpr uint8_t PORT_GET_HK = 9; +static constexpr uint8_t PORT_RESET_COUNTERS = 15; +static constexpr uint8_t PORT_CONFIG_CMD = 17; +static constexpr uint8_t PORT_CONFIG_GET = 18; +static constexpr uint8_t PORT_CONFIG_SET = 19; +static constexpr uint8_t PORT_MAN_HEAT_ON = 20; +static constexpr uint8_t PORT_MAN_HEAT_OFF = 21; + +// Taken from BPX manual 3.14 +typedef struct __attribute__((packed)) { + //! Mode for battheater [0=OFF,1=Auto] + uint8_t battheater_mode; + int8_t battheater_low; + //! Turn heater on at [degC] + int8_t battheater_high; + //! Turn heater off at [degC] +} bpx_config_t; + +class BpxHkDeserializer: public SerialLinkedListAdapter { +public: + BpxHkDeserializer() { + setLinks(); + } + + //! Charge current in mA + SerializeElement chargeCurrent; + //! Discharge current in mA + SerializeElement dischargeCurrent; + //! Heater current in mA + SerializeElement heaterCurrent; + + //! Battery voltage in mV + SerializeElement battVoltage; + //! Battery temperature 1 in degC + SerializeElement battTemp1; + //! Battery temperature 2 in degC + SerializeElement battTemp2; + //! Battery temperature 3 in degC + SerializeElement battTemp3; + //! Battery temperature 4 in degC + SerializeElement battTemp4; + + SerializeElement rebootCounter; + SerializeElement bootcause; +private: + void setLinks() { + setStart(&chargeCurrent); + chargeCurrent.setNext(&dischargeCurrent); + dischargeCurrent.setNext(&heaterCurrent); + heaterCurrent.setNext(&battVoltage); + battVoltage.setNext(&battTemp1); + battTemp1.setNext(&battTemp2); + battTemp2.setNext(&battTemp3); + battTemp3.setNext(&battTemp4); + battTemp4.setNext(&rebootCounter); + rebootCounter.setNext(&bootcause); + } +}; + } #endif /* MISSION_DEVICES_DEVICEDEFINITIONS_BPXBATTERYDEFINITIONS_H_ */ From fab259a2b5a6f8fc5f541ab30e2807493230bf94 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 17 Jan 2022 16:44:20 +0100 Subject: [PATCH 05/39] added BPX HK set --- mission/devices/BpxBatteryHandler.h | 4 +- .../devicedefinitions/BpxBatteryDefinitions.h | 144 ++++++++++++++++-- 2 files changed, 135 insertions(+), 13 deletions(-) diff --git a/mission/devices/BpxBatteryHandler.h b/mission/devices/BpxBatteryHandler.h index 5edc0348..6ab0ea9c 100644 --- a/mission/devices/BpxBatteryHandler.h +++ b/mission/devices/BpxBatteryHandler.h @@ -1,10 +1,10 @@ #ifndef MISSION_DEVICES_BPXBATTERYHANDLER_H_ #define MISSION_DEVICES_BPXBATTERYHANDLER_H_ -#include "devicedefinitions/BpxBatteryDefinitions.h" - #include +#include "devicedefinitions/BpxBatteryDefinitions.h" + class BpxBatteryHandler : public DeviceHandlerBase { public: BpxBatteryHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie); diff --git a/mission/devices/devicedefinitions/BpxBatteryDefinitions.h b/mission/devices/devicedefinitions/BpxBatteryDefinitions.h index ff96e857..b0ab8df7 100644 --- a/mission/devices/devicedefinitions/BpxBatteryDefinitions.h +++ b/mission/devices/devicedefinitions/BpxBatteryDefinitions.h @@ -1,11 +1,28 @@ #ifndef MISSION_DEVICES_DEVICEDEFINITIONS_BPXBATTERYDEFINITIONS_H_ #define MISSION_DEVICES_DEVICEDEFINITIONS_BPXBATTERYDEFINITIONS_H_ +#include #include + #include namespace BpxBattery { +enum BpxPoolIds { + CHARGE_CURRENT = 0, + DISCHARGE_CURRENT = 1, + HEATER_CURRENT = 2, + BATT_VOLTAGE = 3, + BATT_TEMP_1 = 4, + BATT_TEMP_2 = 5, + BATT_TEMP_3 = 6, + BATT_TEMP_4 = 7, + REBOOT_COUNTER = 8, + BOOTCAUSE = 9 +}; + +static constexpr uint32_t HK_SET_ID = 0; + static constexpr uint8_t PORT_PING = 1; static constexpr uint8_t PORT_REBOOT = 4; static constexpr uint8_t PORT_GET_HK = 9; @@ -16,6 +33,9 @@ static constexpr uint8_t PORT_CONFIG_SET = 19; static constexpr uint8_t PORT_MAN_HEAT_ON = 20; static constexpr uint8_t PORT_MAN_HEAT_OFF = 21; +static constexpr uint8_t HK_ENTRIES = 10; + + // Taken from BPX manual 3.14 typedef struct __attribute__((packed)) { //! Mode for battheater [0=OFF,1=Auto] @@ -26,11 +46,11 @@ typedef struct __attribute__((packed)) { //! Turn heater off at [degC] } bpx_config_t; -class BpxHkDeserializer: public SerialLinkedListAdapter { -public: - BpxHkDeserializer() { - setLinks(); - } + +//! Not used for more but might still be useful +class BpxHkDeserializer : public SerialLinkedListAdapter { + public: + BpxHkDeserializer() { setLinks(); } //! Charge current in mA SerializeElement chargeCurrent; @@ -42,17 +62,18 @@ public: //! Battery voltage in mV SerializeElement battVoltage; //! Battery temperature 1 in degC - SerializeElement battTemp1; + SerializeElement battTemp1; //! Battery temperature 2 in degC - SerializeElement battTemp2; + SerializeElement battTemp2; //! Battery temperature 3 in degC - SerializeElement battTemp3; + SerializeElement battTemp3; //! Battery temperature 4 in degC - SerializeElement battTemp4; + SerializeElement battTemp4; SerializeElement rebootCounter; SerializeElement bootcause; -private: + + private: void setLinks() { setStart(&chargeCurrent); chargeCurrent.setNext(&dischargeCurrent); @@ -67,6 +88,107 @@ private: } }; -} + +/** + * @brief BPX HK data holder + */ +class BpxBatteryHk : public StaticLocalDataSet { + public: + /** + * Constructor for data users + * @param gyroId + */ + BpxBatteryHk(object_id_t bpxId) : StaticLocalDataSet(sid_t(bpxId, BpxBattery::HK_SET_ID)) { + setAllVariablesReadOnly(); + } + + ReturnValue_t parseRawHk(const uint8_t* data, size_t size) { + size_t remSize = size; + ReturnValue_t result = + chargeCurrent.deSerialize(&data, &remSize, SerializeIF::Endianness::NETWORK); + if (result != HasReturnvaluesIF::RETURN_OK) { + return result; + } + result = dischargeCurrent.deSerialize(&data, &remSize, SerializeIF::Endianness::NETWORK); + if (result != HasReturnvaluesIF::RETURN_OK) { + return result; + } + result = heaterCurrent.deSerialize(&data, &remSize, SerializeIF::Endianness::NETWORK); + if (result != HasReturnvaluesIF::RETURN_OK) { + return result; + } + result = battVoltage.deSerialize(&data, &remSize, SerializeIF::Endianness::NETWORK); + if (result != HasReturnvaluesIF::RETURN_OK) { + return result; + } + result = battTemp1.deSerialize(&data, &remSize, SerializeIF::Endianness::NETWORK); + if (result != HasReturnvaluesIF::RETURN_OK) { + return result; + } + result = battTemp2.deSerialize(&data, &remSize, SerializeIF::Endianness::NETWORK); + if (result != HasReturnvaluesIF::RETURN_OK) { + return result; + } + result = battTemp3.deSerialize(&data, &remSize, SerializeIF::Endianness::NETWORK); + if (result != HasReturnvaluesIF::RETURN_OK) { + return result; + } + result = battTemp4.deSerialize(&data, &remSize, SerializeIF::Endianness::NETWORK); + if (result != HasReturnvaluesIF::RETURN_OK) { + return result; + } + result = rebootCounter.deSerialize(&data, &remSize, SerializeIF::Endianness::NETWORK); + if (result != HasReturnvaluesIF::RETURN_OK) { + return result; + } + result = bootcause.deSerialize(&data, &remSize, SerializeIF::Endianness::NETWORK); + if (result != HasReturnvaluesIF::RETURN_OK) { + return result; + } + return result; + } + + BpxBatteryHk(); + + private: + //! Charge current in mA + lp_var_t chargeCurrent = + lp_var_t(sid.objectId, BpxBattery::BpxPoolIds::CHARGE_CURRENT, this); + //! Discharge current in mA + lp_var_t dischargeCurrent = + lp_var_t(sid.objectId, BpxBattery::BpxPoolIds::DISCHARGE_CURRENT, this); + //! Heater current in mA + lp_var_t heaterCurrent = + lp_var_t(sid.objectId, BpxBattery::BpxPoolIds::HEATER_CURRENT, this); + + //! Battery voltage in mV + lp_var_t battVoltage = + lp_var_t(sid.objectId, BpxBattery::BpxPoolIds::BATT_VOLTAGE, this); + //! Battery temperature 1 in degC + SerializeElement battTemp1 = + lp_var_t(sid.objectId, BpxBattery::BpxPoolIds::BATT_TEMP_1, this); + //! Battery temperature 2 in degC + SerializeElement battTemp2 = + lp_var_t(sid.objectId, BpxBattery::BpxPoolIds::BATT_TEMP_2, this); + //! Battery temperature 3 in degC + SerializeElement battTemp3 = + lp_var_t(sid.objectId, BpxBattery::BpxPoolIds::BATT_TEMP_3, this); + //! Battery temperature 4 in degC + SerializeElement battTemp4 = + lp_var_t(sid.objectId, BpxBattery::BpxPoolIds::BATT_TEMP_4, this); + SerializeElement rebootCounter = + lp_var_t(sid.objectId, BpxBattery::BpxPoolIds::REBOOT_COUNTER, this); + SerializeElement bootcause = + lp_var_t(sid.objectId, BpxBattery::BpxPoolIds::BOOTCAUSE, this); + + friend class BpxBatteryHandler; + /** + * Constructor for data creator + * @param hkOwner + */ + BpxBatteryHk(HasLocalDataPoolIF* hkOwner) : StaticLocalDataSet(hkOwner, BpxBattery::HK_SET_ID) {} +}; + +}; #endif /* MISSION_DEVICES_DEVICEDEFINITIONS_BPXBATTERYDEFINITIONS_H_ */ From d5a09dc2808ad7e843e96748a9ba38cee6102c73 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 17 Jan 2022 17:11:27 +0100 Subject: [PATCH 06/39] added cfg HK --- mission/devices/BpxBatteryHandler.cpp | 11 ++- mission/devices/BpxBatteryHandler.h | 3 + .../devicedefinitions/BpxBatteryDefinitions.h | 82 +++++++++++++++---- 3 files changed, 78 insertions(+), 18 deletions(-) diff --git a/mission/devices/BpxBatteryHandler.cpp b/mission/devices/BpxBatteryHandler.cpp index 7d504105..111a5acf 100644 --- a/mission/devices/BpxBatteryHandler.cpp +++ b/mission/devices/BpxBatteryHandler.cpp @@ -1,7 +1,7 @@ #include "BpxBatteryHandler.h" BpxBatteryHandler::BpxBatteryHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie) - : DeviceHandlerBase(objectId, comIF, comCookie) {} + : DeviceHandlerBase(objectId, comIF, comCookie), hkSet(this), cfgSet(this) {} BpxBatteryHandler::~BpxBatteryHandler() {} @@ -17,7 +17,14 @@ ReturnValue_t BpxBatteryHandler::buildTransitionDeviceCommand(DeviceCommandId_t* return HasReturnvaluesIF::RETURN_OK; } -void BpxBatteryHandler::fillCommandAndReplyMap() {} +void BpxBatteryHandler::fillCommandAndReplyMap() { + insertInCommandAndReplyMap(BpxBattery::READ_HK, 1, &hkSet); + insertInCommandAndReplyMap(BpxBattery::PING, 1); + insertInCommandAndReplyMap(BpxBattery::REBOOT, 1); + insertInCommandAndReplyMap(BpxBattery::RESET_COUNTERS, 1); + insertInCommandAndReplyMap(BpxBattery::RESTORE_DEFAULT_CONFIG, 1); + insertInCommandAndReplyMap(BpxBattery::READ_CONFIG, 1); +} ReturnValue_t BpxBatteryHandler::buildCommandFromCommand(DeviceCommandId_t deviceCommand, const uint8_t* commandData, diff --git a/mission/devices/BpxBatteryHandler.h b/mission/devices/BpxBatteryHandler.h index 6ab0ea9c..2699f548 100644 --- a/mission/devices/BpxBatteryHandler.h +++ b/mission/devices/BpxBatteryHandler.h @@ -11,6 +11,9 @@ class BpxBatteryHandler : public DeviceHandlerBase { virtual ~BpxBatteryHandler(); protected: + BpxBatteryHk hkSet; + BpxBatteryCfg cfgSet; + void doStartUp() override; void doShutDown() override; ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t* id) override; diff --git a/mission/devices/devicedefinitions/BpxBatteryDefinitions.h b/mission/devices/devicedefinitions/BpxBatteryDefinitions.h index b0ab8df7..1fbe4653 100644 --- a/mission/devices/devicedefinitions/BpxBatteryDefinitions.h +++ b/mission/devices/devicedefinitions/BpxBatteryDefinitions.h @@ -8,7 +8,7 @@ namespace BpxBattery { -enum BpxPoolIds { +enum HkPoolIds { CHARGE_CURRENT = 0, DISCHARGE_CURRENT = 1, HEATER_CURRENT = 2, @@ -21,7 +21,21 @@ enum BpxPoolIds { BOOTCAUSE = 9 }; +enum CfgPoolIds { BATTERY_HEATER_MODE = 0, BATTHEAT_LOW_LIMIT = 1, BATTHEAT_HIGH_LIMIT = 2 }; + +static constexpr DeviceCommandId_t READ_HK = 0; +static constexpr DeviceCommandId_t PING = 1; +static constexpr DeviceCommandId_t REBOOT = 2; +static constexpr DeviceCommandId_t RESET_COUNTERS = 3; +static constexpr DeviceCommandId_t RESTORE_DEFAULT_CONFIG = 4; +static constexpr DeviceCommandId_t READ_CONFIG = 5; +static constexpr DeviceCommandId_t WRITE_CONFIG = 6; + +static constexpr DeviceCommandId_t MANUAL_HEATER_ON = 10; +static constexpr DeviceCommandId_t MANUAL_HEATER_OFF = 11; + static constexpr uint32_t HK_SET_ID = 0; +static constexpr uint32_t CFG_SET_ID = 1; static constexpr uint8_t PORT_PING = 1; static constexpr uint8_t PORT_REBOOT = 4; @@ -34,7 +48,7 @@ static constexpr uint8_t PORT_MAN_HEAT_ON = 20; static constexpr uint8_t PORT_MAN_HEAT_OFF = 21; static constexpr uint8_t HK_ENTRIES = 10; - +static constexpr uint8_t CFG_ENTRIES = 3; // Taken from BPX manual 3.14 typedef struct __attribute__((packed)) { @@ -46,7 +60,6 @@ typedef struct __attribute__((packed)) { //! Turn heater off at [degC] } bpx_config_t; - //! Not used for more but might still be useful class BpxHkDeserializer : public SerialLinkedListAdapter { public: @@ -88,11 +101,12 @@ class BpxHkDeserializer : public SerialLinkedListAdapter { } }; +}; // namespace BpxBattery /** * @brief BPX HK data holder */ -class BpxBatteryHk : public StaticLocalDataSet { +class BpxBatteryHk : public StaticLocalDataSet { public: /** * Constructor for data users @@ -148,38 +162,36 @@ class BpxBatteryHk : public StaticLocalDataSet { return result; } - BpxBatteryHk(); - private: //! Charge current in mA lp_var_t chargeCurrent = - lp_var_t(sid.objectId, BpxBattery::BpxPoolIds::CHARGE_CURRENT, this); + lp_var_t(sid.objectId, BpxBattery::HkPoolIds::CHARGE_CURRENT, this); //! Discharge current in mA lp_var_t dischargeCurrent = - lp_var_t(sid.objectId, BpxBattery::BpxPoolIds::DISCHARGE_CURRENT, this); + lp_var_t(sid.objectId, BpxBattery::HkPoolIds::DISCHARGE_CURRENT, this); //! Heater current in mA lp_var_t heaterCurrent = - lp_var_t(sid.objectId, BpxBattery::BpxPoolIds::HEATER_CURRENT, this); + lp_var_t(sid.objectId, BpxBattery::HkPoolIds::HEATER_CURRENT, this); //! Battery voltage in mV lp_var_t battVoltage = - lp_var_t(sid.objectId, BpxBattery::BpxPoolIds::BATT_VOLTAGE, this); + lp_var_t(sid.objectId, BpxBattery::HkPoolIds::BATT_VOLTAGE, this); //! Battery temperature 1 in degC SerializeElement battTemp1 = - lp_var_t(sid.objectId, BpxBattery::BpxPoolIds::BATT_TEMP_1, this); + lp_var_t(sid.objectId, BpxBattery::HkPoolIds::BATT_TEMP_1, this); //! Battery temperature 2 in degC SerializeElement battTemp2 = - lp_var_t(sid.objectId, BpxBattery::BpxPoolIds::BATT_TEMP_2, this); + lp_var_t(sid.objectId, BpxBattery::HkPoolIds::BATT_TEMP_2, this); //! Battery temperature 3 in degC SerializeElement battTemp3 = - lp_var_t(sid.objectId, BpxBattery::BpxPoolIds::BATT_TEMP_3, this); + lp_var_t(sid.objectId, BpxBattery::HkPoolIds::BATT_TEMP_3, this); //! Battery temperature 4 in degC SerializeElement battTemp4 = - lp_var_t(sid.objectId, BpxBattery::BpxPoolIds::BATT_TEMP_4, this); + lp_var_t(sid.objectId, BpxBattery::HkPoolIds::BATT_TEMP_4, this); SerializeElement rebootCounter = - lp_var_t(sid.objectId, BpxBattery::BpxPoolIds::REBOOT_COUNTER, this); + lp_var_t(sid.objectId, BpxBattery::HkPoolIds::REBOOT_COUNTER, this); SerializeElement bootcause = - lp_var_t(sid.objectId, BpxBattery::BpxPoolIds::BOOTCAUSE, this); + lp_var_t(sid.objectId, BpxBattery::HkPoolIds::BOOTCAUSE, this); friend class BpxBatteryHandler; /** @@ -189,6 +201,44 @@ class BpxBatteryHk : public StaticLocalDataSet { BpxBatteryHk(HasLocalDataPoolIF* hkOwner) : StaticLocalDataSet(hkOwner, BpxBattery::HK_SET_ID) {} }; +class BpxBatteryCfg : public StaticLocalDataSet { + public: + /** + * Constructor for data users + * @param gyroId + */ + BpxBatteryCfg(object_id_t bpxId) : StaticLocalDataSet(sid_t(bpxId, BpxBattery::CFG_SET_ID)) { + setAllVariablesReadOnly(); + } + + ReturnValue_t parseRawHk(const uint8_t* data, size_t size) { + if (size < 3) { + return SerializeIF::STREAM_TOO_SHORT; + } + battheatermode.value = data[0]; + battheaterLow.value = data[1]; + battheaterHigh.value = data[2]; + return HasReturnvaluesIF::RETURN_OK; + } + + //! Mode for battheater [0=OFF,1=Auto] + lp_var_t battheatermode = + lp_var_t(sid.objectId, BpxBattery::CfgPoolIds::BATTERY_HEATER_MODE, this); + //! Turn heater on at [degC] + lp_var_t battheaterLow = + lp_var_t(sid.objectId, BpxBattery::CfgPoolIds::BATTHEAT_LOW_LIMIT, this); + //! Turn heater off at [degC] + lp_var_t battheaterHigh = + lp_var_t(sid.objectId, BpxBattery::CfgPoolIds::BATTHEAT_HIGH_LIMIT, this); + + private: + friend class BpxBatteryHandler; + /** + * Constructor for data creator + * @param hkOwner + */ + BpxBatteryCfg(HasLocalDataPoolIF* hkOwner) + : StaticLocalDataSet(hkOwner, BpxBattery::CFG_SET_ID) {} }; #endif /* MISSION_DEVICES_DEVICEDEFINITIONS_BPXBATTERYDEFINITIONS_H_ */ From 0b9b24ca08581b71eb9812a72333102a539449b8 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 27 Jan 2022 17:06:21 +0100 Subject: [PATCH 07/39] try new symlink for eive-i2c --- bsp_q7s/boardconfig/busConf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsp_q7s/boardconfig/busConf.h b/bsp_q7s/boardconfig/busConf.h index e6e399cb..c01b385d 100644 --- a/bsp_q7s/boardconfig/busConf.h +++ b/bsp_q7s/boardconfig/busConf.h @@ -6,7 +6,7 @@ namespace q7s { static constexpr char SPI_DEFAULT_DEV[] = "/dev/spidev2.0"; static constexpr char SPI_RW_DEV[] = "/dev/spidev3.0"; -static constexpr char I2C_DEFAULT_DEV[] = "/dev/i2c-0"; +static constexpr char I2C_DEFAULT_DEV[] = "/dev/i2c-eive"; static constexpr char UART_GNSS_DEV[] = "/dev/ttyUL0"; static constexpr char UART_PLOC_MPSOC_DEV[] = "/dev/ttyUL2"; From 8ee3e183275d86c3bfa1e9ab2593867fb48e7d01 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 27 Jan 2022 17:30:28 +0100 Subject: [PATCH 08/39] updatre q7s-cp utility --- bsp_q7s/core/ObjectFactory.cpp | 1 + scripts/q7s-cp.py | 63 +++++++++++++++++++++++++--------- 2 files changed, 48 insertions(+), 16 deletions(-) diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index c7e039f9..91a26a2b 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -146,6 +146,7 @@ void ObjectFactory::produce(void* args) { I2cCookie* imtqI2cCookie = new I2cCookie(addresses::IMTQ, IMTQ::MAX_REPLY_SIZE, q7s::I2C_DEFAULT_DEV); auto imtqHandler = new IMTQHandler(objects::IMTQ_HANDLER, objects::I2C_COM_IF, imtqI2cCookie); + static_cast(imtqHandler); #if OBSW_DEBUG_IMTQ == 1 imtqHandler->setToGoToNormal(true); imtqHandler->setStartUpImmediately(); diff --git a/scripts/q7s-cp.py b/scripts/q7s-cp.py index 0c8c1a79..0478001a 100755 --- a/scripts/q7s-cp.py +++ b/scripts/q7s-cp.py @@ -1,44 +1,75 @@ #!/usr/bin/env python3 import argparse import os +import sys def main(): args = handle_args() cmd = build_cmd(args) # Run the command - print(f'Running command: {cmd}') + print(f"Running command: {cmd}") result = os.system(cmd) if result != 0: - print('') - print('Removing problematic SSH key and trying again..') - remove_ssh_key_cmd = 'ssh-keygen -f "${HOME}/.ssh/known_hosts" -R "[localhost]:1535"' + print("") + print("Removing problematic SSH key and trying again..") + remove_ssh_key_cmd = ( + 'ssh-keygen -f "${HOME}/.ssh/known_hosts" -R "[localhost]:1535"' + ) os.system(remove_ssh_key_cmd) + print(f'Running command "{cmd}"') result = os.system(cmd) def handle_args(): - help_string = 'This script copies files to the Q7S as long as port forwarding is active.\n' - help_string += 'You can set up port forwarding with ' \ - '"ssh -L 1535:192.168.133.10:22 " -t /bin/bash' - parser = argparse.ArgumentParser( - description=help_string + help_string = ( + "This script copies files to the Q7S as long as port forwarding is active.\n" ) + help_string += ( + "You can set up port forwarding with " + '"ssh -L 1535:192.168.133.10:22 " -t /bin/bash' + ) + parser = argparse.ArgumentParser(description=help_string) # Optional arguments - parser.add_argument('-r', '--recursive', dest='recursive', default=False, action='store_true') - parser.add_argument('-t', '--target', help='Target destination', default='/tmp') - parser.add_argument('-P', '--port', help='Target port', default=1535) + parser.add_argument( + "-r", "--recursive", dest="recursive", default=False, action="store_true" + ) + parser.add_argument( + "-t", + "--target", + help="Target destination. If files are copied to Q7S, will be /tmp by default. " + "If files are copied back to host, will be current directory by default", + default="", + ) + parser.add_argument("-P", "--port", help="Target port", default=1535) + parser.add_argument( + "-i", + "--invert", + default=False, + action="store_true", + help="Copy from Q7S to host instead. Always copies to current directory.", + ) # Positional argument(s) - parser.add_argument('source', help='Source files to copy') + parser.add_argument( + "source", help="Source files to copy or target files to copy back to host" + ) return parser.parse_args() def build_cmd(args): # Build run command - cmd = 'scp ' + cmd = "scp " if args.recursive: - cmd += '-r ' - cmd += f'-P {args.port} {args.source} root@localhost:' + cmd += "-r " + target = args.target + if args.invert and target == "": + target = "." + elif target == "": + target = f"/tmp" + if args.invert: + cmd += f"-P {args.port} root@localhost:{args.source} {target}" + else: + cmd += f"-P {args.port} {args.source} root@localhost:{target}" if args.target: cmd += args.target return cmd From 0a315f203b2bc64c386b8a3bc2190c79d5b34015 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 27 Jan 2022 18:29:14 +0100 Subject: [PATCH 09/39] renamed some deivces --- bsp_q7s/boardconfig/busConf.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bsp_q7s/boardconfig/busConf.h b/bsp_q7s/boardconfig/busConf.h index c01b385d..7d30fa47 100644 --- a/bsp_q7s/boardconfig/busConf.h +++ b/bsp_q7s/boardconfig/busConf.h @@ -3,12 +3,12 @@ namespace q7s { -static constexpr char SPI_DEFAULT_DEV[] = "/dev/spidev2.0"; -static constexpr char SPI_RW_DEV[] = "/dev/spidev3.0"; +static constexpr char SPI_DEFAULT_DEV[] = "/dev/spi-main"; +static constexpr char SPI_RW_DEV[] = "/dev/spi-rw"; static constexpr char I2C_DEFAULT_DEV[] = "/dev/i2c-eive"; -static constexpr char UART_GNSS_DEV[] = "/dev/ttyUL0"; +static constexpr char UART_GNSS_DEV[] = "/dev/ul-gps"; static constexpr char UART_PLOC_MPSOC_DEV[] = "/dev/ttyUL2"; static constexpr char UART_PLOC_SUPERVSIOR_DEV[] = "/dev/ttyUL3"; static constexpr char UART_SYRLINKS_DEV[] = "/dev/ttyUL4"; From b1e716788a0df77fa59d8faabf4e7dfe3363279f Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 27 Jan 2022 18:29:31 +0100 Subject: [PATCH 10/39] renamed GPS controller --- bsp_q7s/core/ObjectFactory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index 91a26a2b..67900284 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -579,7 +579,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI resetArgsGnss0.gnss1 = false; resetArgsGnss0.gpioComIF = gpioComIF; resetArgsGnss0.waitPeriodMs = 100; - auto gpsHandler0 = new GPSHyperionHandler(objects::GPS_CONTROLLER, objects::NO_OBJECT, debugGps); + auto gpsHandler0 = new GPSHyperionLinuxController(objects::GPS_CONTROLLER, objects::NO_OBJECT, debugGps); gpsHandler0->setResetPinTriggerFunction(gps::triggerGpioResetPin, &resetArgsGnss0); #endif /* OBSW_ADD_ACS_HANDLERS == 1 */ } From 3bd4c57b85f28004b2dc8abcf65a357ef59210cb Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 27 Jan 2022 18:32:54 +0100 Subject: [PATCH 11/39] replaced all names --- bsp_q7s/boardconfig/busConf.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bsp_q7s/boardconfig/busConf.h b/bsp_q7s/boardconfig/busConf.h index 7d30fa47..ec7212bd 100644 --- a/bsp_q7s/boardconfig/busConf.h +++ b/bsp_q7s/boardconfig/busConf.h @@ -9,10 +9,10 @@ static constexpr char SPI_RW_DEV[] = "/dev/spi-rw"; static constexpr char I2C_DEFAULT_DEV[] = "/dev/i2c-eive"; static constexpr char UART_GNSS_DEV[] = "/dev/ul-gps"; -static constexpr char UART_PLOC_MPSOC_DEV[] = "/dev/ttyUL2"; -static constexpr char UART_PLOC_SUPERVSIOR_DEV[] = "/dev/ttyUL3"; -static constexpr char UART_SYRLINKS_DEV[] = "/dev/ttyUL4"; -static constexpr char UART_STAR_TRACKER_DEV[] = "/dev/ttyUL7"; +static constexpr char UART_PLOC_MPSOC_DEV[] = "/dev/ul-plmpsoc"; +static constexpr char UART_PLOC_SUPERVSIOR_DEV[] = "/dev/ul-plsv"; +static constexpr char UART_SYRLINKS_DEV[] = "/dev/ul-syrlinks"; +static constexpr char UART_STAR_TRACKER_DEV[] = "/dev/ul-str"; static constexpr char UIO_PDEC_REGISTERS[] = "/dev/uio0"; static constexpr char UIO_PDEC_CONFIG_MEMORY[] = "/dev/uio2"; From 4050521e5aa793a3b2b8b32c29f78456a4032b44 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 1 Feb 2022 11:17:00 +0100 Subject: [PATCH 12/39] added GNSS select pin --- bsp_q7s/boardconfig/busConf.h | 1 + bsp_q7s/core/ObjectFactory.cpp | 9 ++++++++- linux/fsfwconfig/devices/gpioIds.h | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/bsp_q7s/boardconfig/busConf.h b/bsp_q7s/boardconfig/busConf.h index ec7212bd..2083ac6b 100644 --- a/bsp_q7s/boardconfig/busConf.h +++ b/bsp_q7s/boardconfig/busConf.h @@ -43,6 +43,7 @@ static constexpr char GNSS_0_ENABLE[] = "enable_gnss_0"; static constexpr char GNSS_1_ENABLE[] = "enable_gnss_1"; static constexpr char GYRO_0_ENABLE[] = "enable_gyro_0"; static constexpr char GYRO_2_ENABLE[] = "enable_gyro_2"; +static constexpr char GNSS_SELECT[] = "gnss_mux_select"; static constexpr char HEATER_0[] = "heater0"; static constexpr char HEATER_1[] = "heater1"; static constexpr char HEATER_2[] = "heater2"; diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index 67900284..980c57a2 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -482,6 +482,12 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI gpio::LOW); gpioCookieAcsBoard->addGpio(gpioIds::GNSS_1_ENABLE, gpio); + // Select pin. 0 for GPS side A, 1 for GPS side B + consumer.str(""); + consumer << "0x" << std::hex << objects::GPS_CONTROLLER; + gpio = new GpiodRegularByLineName(q7s::gpioNames::GNSS_SELECT, consumer.str(), gpio::DIR_OUT, + gpio::LOW); + gpioCookieAcsBoard->addGpio(gpioIds::GNSS_SELECT, gpio); gpioComIF->addGpios(gpioCookieAcsBoard); #if OBSW_ADD_ACS_HANDLERS == 1 @@ -579,7 +585,8 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI resetArgsGnss0.gnss1 = false; resetArgsGnss0.gpioComIF = gpioComIF; resetArgsGnss0.waitPeriodMs = 100; - auto gpsHandler0 = new GPSHyperionLinuxController(objects::GPS_CONTROLLER, objects::NO_OBJECT, debugGps); + auto gpsHandler0 = + new GPSHyperionLinuxController(objects::GPS_CONTROLLER, objects::NO_OBJECT, debugGps); gpsHandler0->setResetPinTriggerFunction(gps::triggerGpioResetPin, &resetArgsGnss0); #endif /* OBSW_ADD_ACS_HANDLERS == 1 */ } diff --git a/linux/fsfwconfig/devices/gpioIds.h b/linux/fsfwconfig/devices/gpioIds.h index bb753a30..46717569 100644 --- a/linux/fsfwconfig/devices/gpioIds.h +++ b/linux/fsfwconfig/devices/gpioIds.h @@ -29,6 +29,7 @@ enum gpioId_t { GNSS_1_NRESET, GNSS_0_ENABLE, GNSS_1_ENABLE, + GNSS_SELECT, GYRO_0_ENABLE, GYRO_2_ENABLE, From d91ceb6fa74bbbe9e383d697ed32b511802b4222 Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Tue, 1 Feb 2022 11:47:04 +0100 Subject: [PATCH 13/39] idented preprocessor define --- linux/fsfwconfig/OBSWConfig.h.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/fsfwconfig/OBSWConfig.h.in b/linux/fsfwconfig/OBSWConfig.h.in index c3caf1a9..324481c5 100644 --- a/linux/fsfwconfig/OBSWConfig.h.in +++ b/linux/fsfwconfig/OBSWConfig.h.in @@ -53,7 +53,7 @@ debugging. */ #define OBSW_ADD_RAD_SENSORS 0 #define OBSW_ADD_SYRLINKS 0 #define OBSW_ENABLE_SYRLINKS_TRANSMIT_TIMEOUT 0 -#define OBSW_SYRLINKS_SIMULATED 1 +#define OBSW_SYRLINKS_SIMULATED 1 #endif From 03742621768adc4adc5895c6f631c8c238b6bfb9 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 2 Feb 2022 09:45:08 +0100 Subject: [PATCH 14/39] submodule update --- fsfw | 2 +- tmtc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fsfw b/fsfw index faf7da27..663810a2 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit faf7da2743dcd30d83c3ab2f7b4d85277878e636 +Subproject commit 663810a29a3e78be1c1cb3bb8c362174823ac4f7 diff --git a/tmtc b/tmtc index 2e326da1..8da50e2c 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 2e326da175bb0e806b460507ddcf2977cd1a2372 +Subproject commit 8da50e2c3f709def5b26fd9df1cd23beac35482e From 9d80e739259b4215d9f10723610eaac6765237eb Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 2 Feb 2022 12:16:04 +0100 Subject: [PATCH 15/39] fsfw update --- fsfw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsfw b/fsfw index 663810a2..3a65c0db 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 663810a29a3e78be1c1cb3bb8c362174823ac4f7 +Subproject commit 3a65c0db914bad3f47999f54747ed58a66168bee From 866450f1ae1edb03d9b269694bc90aa9394954e1 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 2 Feb 2022 12:18:22 +0100 Subject: [PATCH 16/39] small fsfw fix --- fsfw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsfw b/fsfw index 3a65c0db..33386550 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 3a65c0db914bad3f47999f54747ed58a66168bee +Subproject commit 33386550cf81e47f4a3c95cd063349442dd83d09 From dd822f9c442f9e4bdf6c675714b8628af615f880 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 2 Feb 2022 13:09:46 +0100 Subject: [PATCH 17/39] apply clang script --- bsp_q7s/core/InitMission.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsp_q7s/core/InitMission.cpp b/bsp_q7s/core/InitMission.cpp index cb01496c..bceb303d 100644 --- a/bsp_q7s/core/InitMission.cpp +++ b/bsp_q7s/core/InitMission.cpp @@ -263,7 +263,7 @@ void initmission::createPstTasks(TaskFactory& factory, sif::error << "InitMission::initTasks: GomSpace PST initialization failed!" << std::endl; } taskVec.push_back(gomSpacePstTask); -#else /* BOARD_TE7020 == 0 */ +#else /* BOARD_TE7020 == 0 */ FixedTimeslotTaskIF* pollingSequenceTaskTE0720 = factory.createFixedTimeslotTask( "PST_TASK_TE0720", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE * 8, 3.0, missedDeadlineFunc); result = pst::pollingSequenceTE0720(pollingSequenceTaskTE0720); From 89bbf98b4afb7a7d4e76a006a178d433b61f8622 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 2 Feb 2022 16:07:28 +0100 Subject: [PATCH 18/39] continued BPX handler --- fsfw | 2 +- mission/devices/BpxBatteryHandler.cpp | 169 ++++++++++++++++-- mission/devices/BpxBatteryHandler.h | 14 +- .../devicedefinitions/BpxBatteryDefinitions.h | 16 +- 4 files changed, 181 insertions(+), 20 deletions(-) diff --git a/fsfw b/fsfw index 33386550..6698d283 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 33386550cf81e47f4a3c95cd063349442dd83d09 +Subproject commit 6698d283b6576bc867b28d06ff772e4b3bb5c33f diff --git a/mission/devices/BpxBatteryHandler.cpp b/mission/devices/BpxBatteryHandler.cpp index 111a5acf..5d6d2d09 100644 --- a/mission/devices/BpxBatteryHandler.cpp +++ b/mission/devices/BpxBatteryHandler.cpp @@ -5,12 +5,28 @@ BpxBatteryHandler::BpxBatteryHandler(object_id_t objectId, object_id_t comIF, Co BpxBatteryHandler::~BpxBatteryHandler() {} -void BpxBatteryHandler::doStartUp() {} +void BpxBatteryHandler::doStartUp() { + if(state == States::CHECK_COM) { + if(commandExecuted) { + state = States::IDLE; + commandExecuted = false; + if(goToNormalModeImmediately) { + setMode(MODE_NORMAL); + } else { + setMode(_MODE_TO_ON); + } + } + } +} -void BpxBatteryHandler::doShutDown() {} +void BpxBatteryHandler::doShutDown() { + // Perform a COM check on reboot + state = States::CHECK_COM; +} ReturnValue_t BpxBatteryHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) { - return HasReturnvaluesIF::RETURN_OK; + *id = BpxBattery::GET_HK; + return buildCommandFromCommand(*id, nullptr, 0); } ReturnValue_t BpxBatteryHandler::buildTransitionDeviceCommand(DeviceCommandId_t* id) { @@ -18,34 +34,165 @@ ReturnValue_t BpxBatteryHandler::buildTransitionDeviceCommand(DeviceCommandId_t* } void BpxBatteryHandler::fillCommandAndReplyMap() { - insertInCommandAndReplyMap(BpxBattery::READ_HK, 1, &hkSet); + insertInCommandAndReplyMap(BpxBattery::GET_HK, 1, &hkSet); insertInCommandAndReplyMap(BpxBattery::PING, 1); insertInCommandAndReplyMap(BpxBattery::REBOOT, 1); insertInCommandAndReplyMap(BpxBattery::RESET_COUNTERS, 1); - insertInCommandAndReplyMap(BpxBattery::RESTORE_DEFAULT_CONFIG, 1); - insertInCommandAndReplyMap(BpxBattery::READ_CONFIG, 1); + insertInCommandAndReplyMap(BpxBattery::CONFIG_CMD, 1); + insertInCommandAndReplyMap(BpxBattery::CONFIG_GET, 1, &cfgSet); } ReturnValue_t BpxBatteryHandler::buildCommandFromCommand(DeviceCommandId_t deviceCommand, const uint8_t* commandData, size_t commandDataLen) { + switch(deviceCommand) { + case(BpxBattery::PING): { + if(commandDataLen == 1) { + sentPingByte = commandData[0]; + } else { + sentPingByte = BpxBattery::DEFAULT_PING_SENT_BYTE; + } + + cmdBuf[0] = BpxBattery::PORT_PING; + cmdBuf[1] = sentPingByte; + this->rawPacketLen = 2; + break; + } + case(BpxBattery::REBOOT): { + cmdBuf[0] = BpxBattery::PORT_REBOOT; + cmdBuf[1] = 0x80; + cmdBuf[2] = 0x07; + cmdBuf[3] = 0x80; + cmdBuf[4] = 0x07; + this->rawPacketLen = 5; + triggerEvent(DeviceHandlerIF::DEVICE_WANTS_HARD_REBOOT); + break; + } + case(BpxBattery::RESET_COUNTERS): { + cmdBuf[0] = BpxBattery::PORT_RESET_COUNTERS; + cmdBuf[1] = BpxBattery::RESET_COUNTERS_MAGIC_VALUE; + this->rawPacketLen = 2; + break; + } + case(BpxBattery::CONFIG_CMD): { + cmdBuf[0] = BpxBattery::PORT_CONFIG_CMD; + // Needs to be set to 0x01 according to datasheet + cmdBuf[1] = 0x01; + this->rawPacketLen = 2; + break; + } + case(BpxBattery::CONFIG_GET): { + cmdBuf[0] = BpxBattery::PORT_CONFIG_GET; + this->rawPacketLen = 1; + break; + } + case(BpxBattery::CONFIG_SET): { + cmdBuf[0] = BpxBattery::PORT_CONFIG_SET; + if(commandDataLen != 3) { + return DeviceHandlerIF::INVALID_NUMBER_OR_LENGTH_OF_PARAMETERS; + } + for(uint8_t idx = 0; idx < 3; idx ++) { + cmdBuf[idx + 1] = commandData[idx]; + } + this->rawPacketLen = 4; + break; + } + case(BpxBattery::MAN_HEAT_ON): { + cmdBuf[0] = BpxBattery::PORT_MAN_HEAT_ON; + if(commandDataLen != 2) { + return DeviceHandlerIF::INVALID_NUMBER_OR_LENGTH_OF_PARAMETERS; + } + for(uint8_t idx = 0; idx < 2; idx++) { + cmdBuf[idx + 1] = commandData[idx]; + } + this->rawPacketLen = 3; + break; + } + case(BpxBattery::MAN_HEAT_OFF): { + cmdBuf[0] = BpxBattery::PORT_MAN_HEAT_OFF; + this->rawPacketLen = 1; + break; + } + default: { + return DeviceHandlerIF::COMMAND_NOT_SUPPORTED; + } + } + this->rawPacket = cmdBuf.data(); + + lastCmd = deviceCommand; return HasReturnvaluesIF::RETURN_OK; } ReturnValue_t BpxBatteryHandler::scanForReply(const uint8_t* start, size_t remainingSize, DeviceCommandId_t* foundId, size_t* foundLen) { + switch(lastCmd) { + case(BpxBattery::GET_HK): { + if(remainingSize != 21) { + return DeviceHandlerIF::LENGTH_MISSMATCH; + } + *foundLen = 21; + break; + } + case(BpxBattery::PING): + case(BpxBattery::MAN_HEAT_ON): + case(BpxBattery::MAN_HEAT_OFF): { + if(remainingSize != 1) { + return DeviceHandlerIF::LENGTH_MISSMATCH; + } + *foundLen = 1; + break; + } + case(BpxBattery::REBOOT): + case(BpxBattery::RESET_COUNTERS): + case(BpxBattery::CONFIG_CMD): + case(BpxBattery::CONFIG_SET): { + if(remainingSize != 0) { + return DeviceHandlerIF::LENGTH_MISSMATCH; + } + *foundLen = 0; + break; + } + case(BpxBattery::CONFIG_GET): { + if(remainingSize != 3) { + return DeviceHandlerIF::LENGTH_MISSMATCH; + } + *foundLen = 3; + break; + } + default: { + return DeviceHandlerIF::UNKNOWN_DEVICE_REPLY; + } + } + *foundId = lastCmd; return HasReturnvaluesIF::RETURN_OK; } -ReturnValue_t BpxBatteryHandler::interpretDeviceReply(DeviceCommandId_t ixd, +ReturnValue_t BpxBatteryHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) { + switch(id) { + case(BpxBattery::GET_HK): { + ReturnValue_t result = hkSet.parseRawHk(packet, 21); + if(result != HasReturnvaluesIF::RETURN_OK) { + return result; + } + break; + } + case(BpxBattery::PING): { + if (packet[0] != sentPingByte) { + return DeviceHandlerIF::INVALID_DATA; + } + break; + } + case(BpxBattery::RESET_COUNTERS): { + break; + } + default: { + return DeviceHandlerIF::UNKNOWN_DEVICE_REPLY; + } + } return HasReturnvaluesIF::RETURN_OK; } -void BpxBatteryHandler::setNormalDatapoolEntriesInvalid() {} - -LocalPoolDataSetBase* BpxBatteryHandler::getDataSetHandle(sid_t sid) { return nullptr; } - uint32_t BpxBatteryHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 10000; } ReturnValue_t BpxBatteryHandler::initializeLocalDataPool(localpool::DataPool& localDataPoolMap, diff --git a/mission/devices/BpxBatteryHandler.h b/mission/devices/BpxBatteryHandler.h index 2699f548..bcd0585b 100644 --- a/mission/devices/BpxBatteryHandler.h +++ b/mission/devices/BpxBatteryHandler.h @@ -11,8 +11,19 @@ class BpxBatteryHandler : public DeviceHandlerBase { virtual ~BpxBatteryHandler(); protected: + enum class States { + CHECK_COM = 0, + IDLE = 1, + }; + + States state = States::CHECK_COM; + bool commandExecuted = false; + bool goToNormalModeImmediately = false; + uint8_t sentPingByte = BpxBattery::DEFAULT_PING_SENT_BYTE; BpxBatteryHk hkSet; + DeviceCommandId_t lastCmd = DeviceHandlerIF::NO_COMMAND_ID; BpxBatteryCfg cfgSet; + std::array cmdBuf = {}; void doStartUp() override; void doShutDown() override; @@ -23,8 +34,7 @@ class BpxBatteryHandler : public DeviceHandlerBase { size_t commandDataLen) override; ReturnValue_t scanForReply(const uint8_t* start, size_t remainingSize, DeviceCommandId_t* foundId, size_t* foundLen) override; - ReturnValue_t interpretDeviceReply(DeviceCommandId_t ixd, const uint8_t* packet) override; - void setNormalDatapoolEntriesInvalid() override; + ReturnValue_t interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) override; virtual LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override; uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override; ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap, diff --git a/mission/devices/devicedefinitions/BpxBatteryDefinitions.h b/mission/devices/devicedefinitions/BpxBatteryDefinitions.h index 1fbe4653..d7ef4aa5 100644 --- a/mission/devices/devicedefinitions/BpxBatteryDefinitions.h +++ b/mission/devices/devicedefinitions/BpxBatteryDefinitions.h @@ -23,16 +23,20 @@ enum HkPoolIds { enum CfgPoolIds { BATTERY_HEATER_MODE = 0, BATTHEAT_LOW_LIMIT = 1, BATTHEAT_HIGH_LIMIT = 2 }; -static constexpr DeviceCommandId_t READ_HK = 0; +static constexpr DeviceCommandId_t GET_HK = 0; static constexpr DeviceCommandId_t PING = 1; static constexpr DeviceCommandId_t REBOOT = 2; static constexpr DeviceCommandId_t RESET_COUNTERS = 3; -static constexpr DeviceCommandId_t RESTORE_DEFAULT_CONFIG = 4; -static constexpr DeviceCommandId_t READ_CONFIG = 5; -static constexpr DeviceCommandId_t WRITE_CONFIG = 6; +// This is the mnemonic GomSpace chose, but this command actually restores the default config +static constexpr DeviceCommandId_t CONFIG_CMD = 4; +static constexpr DeviceCommandId_t CONFIG_GET = 5; +static constexpr DeviceCommandId_t CONFIG_SET = 6; -static constexpr DeviceCommandId_t MANUAL_HEATER_ON = 10; -static constexpr DeviceCommandId_t MANUAL_HEATER_OFF = 11; +static constexpr DeviceCommandId_t MAN_HEAT_ON = 10; +static constexpr DeviceCommandId_t MAN_HEAT_OFF = 11; + +static constexpr uint8_t RESET_COUNTERS_MAGIC_VALUE = 0x42; +static constexpr uint8_t DEFAULT_PING_SENT_BYTE = 0x07; static constexpr uint32_t HK_SET_ID = 0; static constexpr uint32_t CFG_SET_ID = 1; From 0067cac94db175f4cf3326edb50e6ac3611657cb Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 2 Feb 2022 16:33:36 +0100 Subject: [PATCH 19/39] created all pool entries for bpx handler --- mission/devices/BpxBatteryHandler.cpp | 271 ++++++++++++++------------ mission/devices/BpxBatteryHandler.h | 10 + 2 files changed, 159 insertions(+), 122 deletions(-) diff --git a/mission/devices/BpxBatteryHandler.cpp b/mission/devices/BpxBatteryHandler.cpp index 5d6d2d09..41d10157 100644 --- a/mission/devices/BpxBatteryHandler.cpp +++ b/mission/devices/BpxBatteryHandler.cpp @@ -6,11 +6,11 @@ BpxBatteryHandler::BpxBatteryHandler(object_id_t objectId, object_id_t comIF, Co BpxBatteryHandler::~BpxBatteryHandler() {} void BpxBatteryHandler::doStartUp() { - if(state == States::CHECK_COM) { - if(commandExecuted) { + if (state == States::CHECK_COM) { + if (commandExecuted) { state = States::IDLE; commandExecuted = false; - if(goToNormalModeImmediately) { + if (goToNormalModeImmediately) { setMode(MODE_NORMAL); } else { setMode(_MODE_TO_ON); @@ -45,77 +45,79 @@ void BpxBatteryHandler::fillCommandAndReplyMap() { ReturnValue_t BpxBatteryHandler::buildCommandFromCommand(DeviceCommandId_t deviceCommand, const uint8_t* commandData, size_t commandDataLen) { - switch(deviceCommand) { - case(BpxBattery::PING): { - if(commandDataLen == 1) { - sentPingByte = commandData[0]; - } else { - sentPingByte = BpxBattery::DEFAULT_PING_SENT_BYTE; - } + switch (deviceCommand) { + case (BpxBattery::PING): { + if (commandDataLen == 1) { + sentPingByte = commandData[0]; + } else { + sentPingByte = BpxBattery::DEFAULT_PING_SENT_BYTE; + } - cmdBuf[0] = BpxBattery::PORT_PING; - cmdBuf[1] = sentPingByte; - this->rawPacketLen = 2; - break; - } - case(BpxBattery::REBOOT): { - cmdBuf[0] = BpxBattery::PORT_REBOOT; - cmdBuf[1] = 0x80; - cmdBuf[2] = 0x07; - cmdBuf[3] = 0x80; - cmdBuf[4] = 0x07; - this->rawPacketLen = 5; - triggerEvent(DeviceHandlerIF::DEVICE_WANTS_HARD_REBOOT); - break; - } - case(BpxBattery::RESET_COUNTERS): { - cmdBuf[0] = BpxBattery::PORT_RESET_COUNTERS; - cmdBuf[1] = BpxBattery::RESET_COUNTERS_MAGIC_VALUE; - this->rawPacketLen = 2; - break; - } - case(BpxBattery::CONFIG_CMD): { - cmdBuf[0] = BpxBattery::PORT_CONFIG_CMD; - // Needs to be set to 0x01 according to datasheet - cmdBuf[1] = 0x01; - this->rawPacketLen = 2; - break; - } - case(BpxBattery::CONFIG_GET): { - cmdBuf[0] = BpxBattery::PORT_CONFIG_GET; - this->rawPacketLen = 1; - break; - } - case(BpxBattery::CONFIG_SET): { - cmdBuf[0] = BpxBattery::PORT_CONFIG_SET; - if(commandDataLen != 3) { - return DeviceHandlerIF::INVALID_NUMBER_OR_LENGTH_OF_PARAMETERS; + cmdBuf[0] = BpxBattery::PORT_PING; + cmdBuf[1] = sentPingByte; + this->rawPacketLen = 2; + break; } - for(uint8_t idx = 0; idx < 3; idx ++) { - cmdBuf[idx + 1] = commandData[idx]; + case (BpxBattery::REBOOT): { + cmdBuf[0] = BpxBattery::PORT_REBOOT; + cmdBuf[1] = 0x80; + cmdBuf[2] = 0x07; + cmdBuf[3] = 0x80; + cmdBuf[4] = 0x07; + this->rawPacketLen = 5; + // This instructs the FDIR to set the device mode off and on again + // to ensure the I2C communication is also verified + triggerEvent(DeviceHandlerIF::DEVICE_WANTS_HARD_REBOOT); + break; } - this->rawPacketLen = 4; - break; - } - case(BpxBattery::MAN_HEAT_ON): { - cmdBuf[0] = BpxBattery::PORT_MAN_HEAT_ON; - if(commandDataLen != 2) { - return DeviceHandlerIF::INVALID_NUMBER_OR_LENGTH_OF_PARAMETERS; + case (BpxBattery::RESET_COUNTERS): { + cmdBuf[0] = BpxBattery::PORT_RESET_COUNTERS; + cmdBuf[1] = BpxBattery::RESET_COUNTERS_MAGIC_VALUE; + this->rawPacketLen = 2; + break; } - for(uint8_t idx = 0; idx < 2; idx++) { - cmdBuf[idx + 1] = commandData[idx]; + case (BpxBattery::CONFIG_CMD): { + cmdBuf[0] = BpxBattery::PORT_CONFIG_CMD; + // Needs to be set to 0x01 according to datasheet + cmdBuf[1] = 0x01; + this->rawPacketLen = 2; + break; + } + case (BpxBattery::CONFIG_GET): { + cmdBuf[0] = BpxBattery::PORT_CONFIG_GET; + this->rawPacketLen = 1; + break; + } + case (BpxBattery::CONFIG_SET): { + cmdBuf[0] = BpxBattery::PORT_CONFIG_SET; + if (commandDataLen != 3) { + return DeviceHandlerIF::INVALID_NUMBER_OR_LENGTH_OF_PARAMETERS; + } + for (uint8_t idx = 0; idx < 3; idx++) { + cmdBuf[idx + 1] = commandData[idx]; + } + this->rawPacketLen = 4; + break; + } + case (BpxBattery::MAN_HEAT_ON): { + cmdBuf[0] = BpxBattery::PORT_MAN_HEAT_ON; + if (commandDataLen != 2) { + return DeviceHandlerIF::INVALID_NUMBER_OR_LENGTH_OF_PARAMETERS; + } + for (uint8_t idx = 0; idx < 2; idx++) { + cmdBuf[idx + 1] = commandData[idx]; + } + this->rawPacketLen = 3; + break; + } + case (BpxBattery::MAN_HEAT_OFF): { + cmdBuf[0] = BpxBattery::PORT_MAN_HEAT_OFF; + this->rawPacketLen = 1; + break; + } + default: { + return DeviceHandlerIF::COMMAND_NOT_SUPPORTED; } - this->rawPacketLen = 3; - break; - } - case(BpxBattery::MAN_HEAT_OFF): { - cmdBuf[0] = BpxBattery::PORT_MAN_HEAT_OFF; - this->rawPacketLen = 1; - break; - } - default: { - return DeviceHandlerIF::COMMAND_NOT_SUPPORTED; - } } this->rawPacket = cmdBuf.data(); @@ -125,70 +127,85 @@ ReturnValue_t BpxBatteryHandler::buildCommandFromCommand(DeviceCommandId_t devic ReturnValue_t BpxBatteryHandler::scanForReply(const uint8_t* start, size_t remainingSize, DeviceCommandId_t* foundId, size_t* foundLen) { - switch(lastCmd) { - case(BpxBattery::GET_HK): { - if(remainingSize != 21) { - return DeviceHandlerIF::LENGTH_MISSMATCH; + switch (lastCmd) { + case (BpxBattery::GET_HK): { + if (remainingSize != 21) { + return DeviceHandlerIF::LENGTH_MISSMATCH; + } + *foundLen = 21; + break; } - *foundLen = 21; - break; - } - case(BpxBattery::PING): - case(BpxBattery::MAN_HEAT_ON): - case(BpxBattery::MAN_HEAT_OFF): { - if(remainingSize != 1) { - return DeviceHandlerIF::LENGTH_MISSMATCH; + case (BpxBattery::PING): + case (BpxBattery::MAN_HEAT_ON): + case (BpxBattery::MAN_HEAT_OFF): { + if (remainingSize != 1) { + return DeviceHandlerIF::LENGTH_MISSMATCH; + } + *foundLen = 1; + break; } - *foundLen = 1; - break; - } - case(BpxBattery::REBOOT): - case(BpxBattery::RESET_COUNTERS): - case(BpxBattery::CONFIG_CMD): - case(BpxBattery::CONFIG_SET): { - if(remainingSize != 0) { - return DeviceHandlerIF::LENGTH_MISSMATCH; + case (BpxBattery::REBOOT): + case (BpxBattery::RESET_COUNTERS): + case (BpxBattery::CONFIG_CMD): + case (BpxBattery::CONFIG_SET): { + if (remainingSize != 0) { + return DeviceHandlerIF::LENGTH_MISSMATCH; + } + *foundLen = 0; + break; } - *foundLen = 0; - break; - } - case(BpxBattery::CONFIG_GET): { - if(remainingSize != 3) { - return DeviceHandlerIF::LENGTH_MISSMATCH; + case (BpxBattery::CONFIG_GET): { + if (remainingSize != 3) { + return DeviceHandlerIF::LENGTH_MISSMATCH; + } + *foundLen = 3; + break; + } + default: { + return DeviceHandlerIF::UNKNOWN_DEVICE_REPLY; } - *foundLen = 3; - break; - } - default: { - return DeviceHandlerIF::UNKNOWN_DEVICE_REPLY; - } } *foundId = lastCmd; return HasReturnvaluesIF::RETURN_OK; } -ReturnValue_t BpxBatteryHandler::interpretDeviceReply(DeviceCommandId_t id, - const uint8_t* packet) { - switch(id) { - case(BpxBattery::GET_HK): { - ReturnValue_t result = hkSet.parseRawHk(packet, 21); - if(result != HasReturnvaluesIF::RETURN_OK) { - return result; +ReturnValue_t BpxBatteryHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) { + switch (id) { + case (BpxBattery::GET_HK): { + ReturnValue_t result = hkSet.parseRawHk(packet, 21); + if (result != HasReturnvaluesIF::RETURN_OK) { + return result; + } + break; } - break; - } - case(BpxBattery::PING): { - if (packet[0] != sentPingByte) { - return DeviceHandlerIF::INVALID_DATA; + case (BpxBattery::PING): { + if (packet[0] != sentPingByte) { + return DeviceHandlerIF::INVALID_DATA; + } + break; + } + case (BpxBattery::RESET_COUNTERS): + case (BpxBattery::CONFIG_CMD): + case (BpxBattery::CONFIG_SET): { + break; + } + case (BpxBattery::MAN_HEAT_ON): + case (BpxBattery::MAN_HEAT_OFF): { + if (packet[0] != 0x01) { + return DeviceHandlerIF::DEVICE_DID_NOT_EXECUTE; + } + break; + } + case (BpxBattery::CONFIG_GET): { + ReturnValue_t result = cfgSet.parseRawHk(packet, 3); + if (result != HasReturnvaluesIF::RETURN_OK) { + return result; + } + break; + } + default: { + return DeviceHandlerIF::UNKNOWN_DEVICE_REPLY; } - break; - } - case(BpxBattery::RESET_COUNTERS): { - break; - } - default: { - return DeviceHandlerIF::UNKNOWN_DEVICE_REPLY; - } } return HasReturnvaluesIF::RETURN_OK; } @@ -197,5 +214,15 @@ uint32_t BpxBatteryHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) ReturnValue_t BpxBatteryHandler::initializeLocalDataPool(localpool::DataPool& localDataPoolMap, LocalDataPoolManager& poolManager) { + localDataPoolMap.emplace(BpxBattery::HkPoolIds::BATT_TEMP_1, &battTemp1); + localDataPoolMap.emplace(BpxBattery::HkPoolIds::BATT_TEMP_2, &battTemp2); + localDataPoolMap.emplace(BpxBattery::HkPoolIds::BATT_TEMP_3, &battTemp3); + localDataPoolMap.emplace(BpxBattery::HkPoolIds::BATT_TEMP_4, &battTemp4); + localDataPoolMap.emplace(BpxBattery::HkPoolIds::CHARGE_CURRENT, &chargeCurrent); + localDataPoolMap.emplace(BpxBattery::HkPoolIds::DISCHARGE_CURRENT, &dischargeCurrent); + localDataPoolMap.emplace(BpxBattery::HkPoolIds::HEATER_CURRENT, &heaterCurrent); + localDataPoolMap.emplace(BpxBattery::HkPoolIds::BATT_VOLTAGE, &battVolt); + localDataPoolMap.emplace(BpxBattery::HkPoolIds::REBOOT_COUNTER, &rebootCounter); + localDataPoolMap.emplace(BpxBattery::HkPoolIds::BOOTCAUSE, &bootCause); return HasReturnvaluesIF::RETURN_OK; } diff --git a/mission/devices/BpxBatteryHandler.h b/mission/devices/BpxBatteryHandler.h index bcd0585b..a993baea 100644 --- a/mission/devices/BpxBatteryHandler.h +++ b/mission/devices/BpxBatteryHandler.h @@ -24,6 +24,16 @@ class BpxBatteryHandler : public DeviceHandlerBase { DeviceCommandId_t lastCmd = DeviceHandlerIF::NO_COMMAND_ID; BpxBatteryCfg cfgSet; std::array cmdBuf = {}; + PoolEntry chargeCurrent = PoolEntry({0}); + PoolEntry dischargeCurrent = PoolEntry({0}); + PoolEntry heaterCurrent = PoolEntry({0}); + PoolEntry battVolt = PoolEntry({0}); + PoolEntry battTemp1 = PoolEntry({0}); + PoolEntry battTemp2 = PoolEntry({0}); + PoolEntry battTemp3 = PoolEntry({0}); + PoolEntry battTemp4 = PoolEntry({0}); + PoolEntry rebootCounter = PoolEntry({0}); + PoolEntry bootCause = PoolEntry({0}); void doStartUp() override; void doShutDown() override; From 988a5e6b31b099f71c732ef6bc1cc7b6b358d347 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 2 Feb 2022 17:36:40 +0100 Subject: [PATCH 20/39] battery handler not created --- bsp_q7s/core/ObjectFactory.cpp | 18 ++++++++++++++---- bsp_q7s/core/ObjectFactory.h | 3 ++- common/config/commonObjects.h | 1 + linux/fsfwconfig/OBSWConfig.h.in | 2 ++ mission/devices/BpxBatteryHandler.cpp | 4 ++++ mission/devices/BpxBatteryHandler.h | 3 ++- 6 files changed, 25 insertions(+), 6 deletions(-) diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index 13a1624c..797a07d7 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -45,6 +45,7 @@ #include "linux/devices/devicedefinitions/SusDefinitions.h" #include "mission/core/GenericFactory.h" #include "mission/devices/ACUHandler.h" +#include "mission/devices/BpxBatteryHandler.h" #include "mission/devices/GPSHyperionLinuxController.h" #include "mission/devices/GyroADIS1650XHandler.h" #include "mission/devices/HeaterHandler.h" @@ -117,7 +118,8 @@ void ObjectFactory::produce(void* args) { LinuxLibgpioIF* gpioComIF = nullptr; UartComIF* uartComIF = nullptr; SpiComIF* spiComIF = nullptr; - createCommunicationInterfaces(&gpioComIF, &uartComIF, &spiComIF); + I2cComIF* i2cComIF = nullptr; + createCommunicationInterfaces(&gpioComIF, &uartComIF, &spiComIF, &i2cComIF); createTmpComponents(); #if BOARD_TE0720 == 0 new CoreController(objects::CORE_CONTROLLER); @@ -154,8 +156,16 @@ void ObjectFactory::produce(void* args) { #endif createReactionWheelComponents(gpioComIF); +#if OBSW_ADD_BPX_BATTERY_HANDLER == 1 I2cCookie* bpxI2cCookie = new I2cCookie(addresses::BPX_BATTERY, 100, q7s::I2C_DEFAULT_DEV); - (void)bpxI2cCookie; + BpxBatteryHandler* bpxHandler = + new BpxBatteryHandler(objects::BPX_BATT_HANDLER, objects::I2C_COM_IF, bpxI2cCookie); +#if OBSW_DEBUG_BPX_BATT == 1 + bpxHandler->setStartUpImmediately(); + bpxHandler->setToGoToNormalMode(true); +#endif +#endif + #if OBSW_ADD_PLOC_MPSOC == 1 UartCookie* plocMpsocCookie = new UartCookie(objects::PLOC_MPSOC_HANDLER, q7s::UART_PLOC_MPSOC_DEV, @@ -225,7 +235,7 @@ void ObjectFactory::createTmpComponents() { } void ObjectFactory::createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, UartComIF** uartComIF, - SpiComIF** spiComIF) { + SpiComIF** spiComIF, I2cComIF** i2cComIF) { if (gpioComIF == nullptr or uartComIF == nullptr or spiComIF == nullptr) { sif::error << "ObjectFactory::createCommunicationInterfaces: Invalid passed ComIF pointer" << std::endl; @@ -234,7 +244,7 @@ void ObjectFactory::createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, Ua /* Communication interfaces */ new CspComIF(objects::CSP_COM_IF); - new I2cComIF(objects::I2C_COM_IF); + *i2cComIF = new I2cComIF(objects::I2C_COM_IF); *uartComIF = new UartComIF(objects::UART_COM_IF); #if OBSW_ADD_SPI_TEST_CODE == 0 *spiComIF = new SpiComIF(objects::SPI_COM_IF, *gpioComIF); diff --git a/bsp_q7s/core/ObjectFactory.h b/bsp_q7s/core/ObjectFactory.h index 8fa4a147..b4ccbea4 100644 --- a/bsp_q7s/core/ObjectFactory.h +++ b/bsp_q7s/core/ObjectFactory.h @@ -4,6 +4,7 @@ class LinuxLibgpioIF; class UartComIF; class SpiComIF; +class I2cComIF; namespace ObjectFactory { @@ -11,7 +12,7 @@ void setStatics(); void produce(void* args); void createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, UartComIF** uartComIF, - SpiComIF** spiComIF); + SpiComIF** spiComIF, I2cComIF** i2cComIF); void createTmpComponents(); void createPcduComponents(LinuxLibgpioIF* gpioComIF); void createRadSensorComponent(LinuxLibgpioIF* gpioComIF); diff --git a/common/config/commonObjects.h b/common/config/commonObjects.h index bd364daf..09facbc1 100644 --- a/common/config/commonObjects.h +++ b/common/config/commonObjects.h @@ -25,6 +25,7 @@ enum commonObjects: uint32_t { PDU1_HANDLER = 0x44250001, PDU2_HANDLER = 0x44250002, ACU_HANDLER = 0x44250003, + BPX_BATT_HANDLER = 0x44260000, TMP1075_HANDLER_1 = 0x44420004, TMP1075_HANDLER_2 = 0x44420005, MGM_0_LIS3_HANDLER = 0x44120006, diff --git a/linux/fsfwconfig/OBSWConfig.h.in b/linux/fsfwconfig/OBSWConfig.h.in index 324481c5..9667b6fd 100644 --- a/linux/fsfwconfig/OBSWConfig.h.in +++ b/linux/fsfwconfig/OBSWConfig.h.in @@ -41,6 +41,7 @@ debugging. */ #define OBSW_ENABLE_TIMERS 1 #define OBSW_ADD_MGT 1 +#define OBSW_ADD_BPX_BATTERY_HANDLER 1 #define OBSW_ADD_STAR_TRACKER 0 #define OBSW_ADD_PLOC_SUPERVISOR 0 #define OBSW_ADD_PLOC_MPSOC 0 @@ -81,6 +82,7 @@ debugging. */ #define OBSW_TEST_GPIO_OPEN_BY_LINE_NAME 0 #define OBSW_DEBUG_P60DOCK 0 +#define OBSW_DEBUG_BPX_BATT 0 #define OBSW_DEBUG_PDU1 0 #define OBSW_DEBUG_PDU2 0 #define OBSW_DEBUG_GPS 0 diff --git a/mission/devices/BpxBatteryHandler.cpp b/mission/devices/BpxBatteryHandler.cpp index 41d10157..a1069cfb 100644 --- a/mission/devices/BpxBatteryHandler.cpp +++ b/mission/devices/BpxBatteryHandler.cpp @@ -226,3 +226,7 @@ ReturnValue_t BpxBatteryHandler::initializeLocalDataPool(localpool::DataPool& lo localDataPoolMap.emplace(BpxBattery::HkPoolIds::BOOTCAUSE, &bootCause); return HasReturnvaluesIF::RETURN_OK; } + +void BpxBatteryHandler::setToGoToNormalMode(bool enable) { + this->goToNormalModeImmediately = enable; +} diff --git a/mission/devices/BpxBatteryHandler.h b/mission/devices/BpxBatteryHandler.h index a993baea..d3a02645 100644 --- a/mission/devices/BpxBatteryHandler.h +++ b/mission/devices/BpxBatteryHandler.h @@ -10,6 +10,8 @@ class BpxBatteryHandler : public DeviceHandlerBase { BpxBatteryHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie); virtual ~BpxBatteryHandler(); + void setToGoToNormalMode(bool enable); + protected: enum class States { CHECK_COM = 0, @@ -45,7 +47,6 @@ class BpxBatteryHandler : public DeviceHandlerBase { ReturnValue_t scanForReply(const uint8_t* start, size_t remainingSize, DeviceCommandId_t* foundId, size_t* foundLen) override; ReturnValue_t interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) override; - virtual LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override; uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override; ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap, LocalDataPoolManager& poolManager) override; From 7d5b4325e2c6048dbbfdb2d53b8dd54d56b7f3a0 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 2 Feb 2022 17:38:14 +0100 Subject: [PATCH 21/39] add bpx handler in I2C PST --- .../fsfwconfig/pollingsequence/pollingSequenceFactory.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp b/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp index 70119272..9ddff5d3 100644 --- a/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp +++ b/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp @@ -525,6 +525,13 @@ ReturnValue_t pst::pstI2c(FixedTimeslotTaskIF *thisSequence) { thisSequence->addSlot(objects::IMTQ_HANDLER, length * 0.4, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::IMTQ_HANDLER, length * 0.6, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::IMTQ_HANDLER, length * 0.8, DeviceHandlerIF::GET_READ); +#endif +#if OBSW_ADD_BPX_BATTERY_HANDLER == 1 + thisSequence->addSlot(objects::BPX_BATT_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); + thisSequence->addSlot(objects::BPX_BATT_HANDLER, length * 0.2, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::BPX_BATT_HANDLER, length * 0.4, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::BPX_BATT_HANDLER, length * 0.6, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::BPX_BATT_HANDLER, length * 0.8, DeviceHandlerIF::GET_READ); #endif if (thisSequence->checkSequence() != HasReturnvaluesIF::RETURN_OK) { sif::error << "I2C PST initialization failed" << std::endl; From fea0b2bfe9ba85c429b40643a1cda3675cb9a824 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 2 Feb 2022 17:53:07 +0100 Subject: [PATCH 22/39] added debug printouts --- mission/devices/BpxBatteryHandler.cpp | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/mission/devices/BpxBatteryHandler.cpp b/mission/devices/BpxBatteryHandler.cpp index a1069cfb..a6a9fe9f 100644 --- a/mission/devices/BpxBatteryHandler.cpp +++ b/mission/devices/BpxBatteryHandler.cpp @@ -1,4 +1,7 @@ #include "BpxBatteryHandler.h" +#include "OBSWConfig.h" + +#include BpxBatteryHandler::BpxBatteryHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie) : DeviceHandlerBase(objectId, comIF, comCookie), hkSet(this), cfgSet(this) {} @@ -30,6 +33,10 @@ ReturnValue_t BpxBatteryHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) } ReturnValue_t BpxBatteryHandler::buildTransitionDeviceCommand(DeviceCommandId_t* id) { + if(state == States::CHECK_COM) { + *id = BpxBattery::PING; + return buildCommandFromCommand(*id, nullptr, 0); + } return HasReturnvaluesIF::RETURN_OK; } @@ -47,7 +54,7 @@ ReturnValue_t BpxBatteryHandler::buildCommandFromCommand(DeviceCommandId_t devic size_t commandDataLen) { switch (deviceCommand) { case (BpxBattery::PING): { - if (commandDataLen == 1) { + if (commandDataLen == 1 and commandData != nullptr) { sentPingByte = commandData[0]; } else { sentPingByte = BpxBattery::DEFAULT_PING_SENT_BYTE; @@ -172,10 +179,24 @@ ReturnValue_t BpxBatteryHandler::scanForReply(const uint8_t* start, size_t remai ReturnValue_t BpxBatteryHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) { switch (id) { case (BpxBattery::GET_HK): { + PoolReadGuard rg(&hkSet); ReturnValue_t result = hkSet.parseRawHk(packet, 21); if (result != HasReturnvaluesIF::RETURN_OK) { return result; } +#if OBSW_DEBUG_BPX_BATT == 1 + sif::info << "BPX Battery HK output:" << std::endl; + sif::info << "Charge current [mA]: " << hkSet.chargeCurrent << std::endl; + sif::info << "Discharge current [mA]; " << hkSet.dischargeCurrent << std::endl; + sif::info << "Heater current [mA]: " << hkSet.heaterCurrent << std::endl; + sif::info << "Battery voltage [mV]: " << hkSet.battVoltage << std::endl; + sif::info << "Battery Temperature 1 [C]: " << hkSet.battTemp1 << std::endl; + sif::info << "Battery Temperature 2 [C]: " << hkSet.battTemp2 << std::endl; + sif::info << "Battery Temperature 3 [C]: " << hkSet.battTemp3 << std::endl; + sif::info << "Battery Temperature 4 [C]: " << hkSet.battTemp4 << std::endl; + sif::info << "Battery Reboot Counter: " << hkSet.rebootCounter << std::endl; + sif::info << "Battery Boot Cause: " << hkSet.bootcause << std::endl; +#endif break; } case (BpxBattery::PING): { @@ -197,6 +218,7 @@ ReturnValue_t BpxBatteryHandler::interpretDeviceReply(DeviceCommandId_t id, cons break; } case (BpxBattery::CONFIG_GET): { + PoolReadGuard rg(&cfgSet); ReturnValue_t result = cfgSet.parseRawHk(packet, 3); if (result != HasReturnvaluesIF::RETURN_OK) { return result; From f47101c3889837f86735cb18e9ea61c71d99796d Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 3 Feb 2022 11:13:54 +0100 Subject: [PATCH 23/39] fsfw update --- fsfw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsfw b/fsfw index 6698d283..8f95b03e 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 6698d283b6576bc867b28d06ff772e4b3bb5c33f +Subproject commit 8f95b03e6a6dd321488aa5d60d28f20dddf7549a From 344390da14a56509e03abb0ba681868fa29e8e76 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 3 Feb 2022 12:02:25 +0100 Subject: [PATCH 24/39] bugfixes --- bsp_q7s/core/ObjectFactory.cpp | 4 +- fsfw | 2 +- generators/bsp_q7s_objects.csv | 11 +- generators/objects/translateObjects.cpp | 29 +- linux/fsfwconfig/objects/translateObjects.cpp | 471 +++++++++--------- mission/devices/BpxBatteryHandler.cpp | 6 +- .../devicedefinitions/BpxBatteryDefinitions.h | 19 +- 7 files changed, 264 insertions(+), 278 deletions(-) diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index 797a07d7..f4a594b8 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -161,8 +161,10 @@ void ObjectFactory::produce(void* args) { BpxBatteryHandler* bpxHandler = new BpxBatteryHandler(objects::BPX_BATT_HANDLER, objects::I2C_COM_IF, bpxI2cCookie); #if OBSW_DEBUG_BPX_BATT == 1 - bpxHandler->setStartUpImmediately(); bpxHandler->setToGoToNormalMode(true); + bpxHandler->setStartUpImmediately(); +#else + static_cast(bpxHandler); #endif #endif diff --git a/fsfw b/fsfw index 8f95b03e..fca48257 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 8f95b03e6a6dd321488aa5d60d28f20dddf7549a +Subproject commit fca48257b7a156f4563d5a5a6ca71b0ab98bb9fc diff --git a/generators/bsp_q7s_objects.csv b/generators/bsp_q7s_objects.csv index af48751f..c686ec40 100644 --- a/generators/bsp_q7s_objects.csv +++ b/generators/bsp_q7s_objects.csv @@ -28,14 +28,14 @@ 0x44120313;GYRO_3_L3G_HANDLER 0x44120350;RW4 0x44130001;STAR_TRACKER -0x44130045;GPS0_HANDLER -0x44130146;GPS1_HANDLER +0x44130045;GPS_CONTROLLER 0x44140014;IMTQ_HANDLER 0x442000A1;PCDU_HANDLER 0x44250000;P60DOCK_HANDLER 0x44250001;PDU1_HANDLER 0x44250002;PDU2_HANDLER 0x44250003;ACU_HANDLER +0x44260000;BPX_BATT_HANDLER 0x443200A5;RAD_SENSOR 0x44330000;PLOC_UPDATER 0x44330001;PLOC_MEMORY_DUMPER @@ -75,11 +75,7 @@ 0x50000400;TMTC_POLLING_TASK 0x50000500;FILE_SYSTEM_HANDLER 0x50000600;PTME -0x50000700;PAPB_VC0 -0x50000701;PAPB_VC1 -0x50000702;PAPB_VC2 -0x50000703;PAPB_VC3 -0x50000704;PDEC_HANDLER +0x50000700;PDEC_HANDLER 0x50000800;CCSDS_HANDLER 0x51000500;PUS_SERVICE_6 0x53000000;FSFW_OBJECTS_START @@ -93,6 +89,7 @@ 0x53000020;PUS_SERVICE_20_PARAMETERS 0x53000200;PUS_SERVICE_200_MODE_MGMT 0x53000201;PUS_SERVICE_201_HEALTH +0x53001000;CFDP_PACKET_DISTRIBUTOR 0x53010000;HEALTH_TABLE 0x53010100;MODE_STORE 0x53030000;EVENT_MANAGER diff --git a/generators/objects/translateObjects.cpp b/generators/objects/translateObjects.cpp index 899aaf2b..44b74490 100644 --- a/generators/objects/translateObjects.cpp +++ b/generators/objects/translateObjects.cpp @@ -1,8 +1,8 @@ /** * @brief Auto-generated object translation file. * @details - * Contains 113 translations. - * Generated on: 2022-01-17 15:36:10 + * Contains 110 translations. + * Generated on: 2022-02-03 12:01:36 */ #include "translateObjects.h" @@ -36,14 +36,14 @@ const char *MGM_3_RM3100_HANDLER_STRING = "MGM_3_RM3100_HANDLER"; const char *GYRO_3_L3G_HANDLER_STRING = "GYRO_3_L3G_HANDLER"; const char *RW4_STRING = "RW4"; const char *STAR_TRACKER_STRING = "STAR_TRACKER"; -const char *GPS0_HANDLER_STRING = "GPS0_HANDLER"; -const char *GPS1_HANDLER_STRING = "GPS1_HANDLER"; +const char *GPS_CONTROLLER_STRING = "GPS_CONTROLLER"; const char *IMTQ_HANDLER_STRING = "IMTQ_HANDLER"; const char *PCDU_HANDLER_STRING = "PCDU_HANDLER"; const char *P60DOCK_HANDLER_STRING = "P60DOCK_HANDLER"; const char *PDU1_HANDLER_STRING = "PDU1_HANDLER"; const char *PDU2_HANDLER_STRING = "PDU2_HANDLER"; const char *ACU_HANDLER_STRING = "ACU_HANDLER"; +const char *BPX_BATT_HANDLER_STRING = "BPX_BATT_HANDLER"; const char *RAD_SENSOR_STRING = "RAD_SENSOR"; const char *PLOC_UPDATER_STRING = "PLOC_UPDATER"; const char *PLOC_MEMORY_DUMPER_STRING = "PLOC_MEMORY_DUMPER"; @@ -83,10 +83,6 @@ const char *TMTC_BRIDGE_STRING = "TMTC_BRIDGE"; const char *TMTC_POLLING_TASK_STRING = "TMTC_POLLING_TASK"; const char *FILE_SYSTEM_HANDLER_STRING = "FILE_SYSTEM_HANDLER"; const char *PTME_STRING = "PTME"; -const char *PAPB_VC0_STRING = "PAPB_VC0"; -const char *PAPB_VC1_STRING = "PAPB_VC1"; -const char *PAPB_VC2_STRING = "PAPB_VC2"; -const char *PAPB_VC3_STRING = "PAPB_VC3"; const char *PDEC_HANDLER_STRING = "PDEC_HANDLER"; const char *CCSDS_HANDLER_STRING = "CCSDS_HANDLER"; const char *PUS_SERVICE_6_STRING = "PUS_SERVICE_6"; @@ -101,6 +97,7 @@ const char *PUS_SERVICE_17_TEST_STRING = "PUS_SERVICE_17_TEST"; const char *PUS_SERVICE_20_PARAMETERS_STRING = "PUS_SERVICE_20_PARAMETERS"; const char *PUS_SERVICE_200_MODE_MGMT_STRING = "PUS_SERVICE_200_MODE_MGMT"; const char *PUS_SERVICE_201_HEALTH_STRING = "PUS_SERVICE_201_HEALTH"; +const char *CFDP_PACKET_DISTRIBUTOR_STRING = "CFDP_PACKET_DISTRIBUTOR"; const char *HEALTH_TABLE_STRING = "HEALTH_TABLE"; const char *MODE_STORE_STRING = "MODE_STORE"; const char *EVENT_MANAGER_STRING = "EVENT_MANAGER"; @@ -183,9 +180,7 @@ const char* translateObject(object_id_t object) { case 0x44130001: return STAR_TRACKER_STRING; case 0x44130045: - return GPS0_HANDLER_STRING; - case 0x44130146: - return GPS1_HANDLER_STRING; + return GPS_CONTROLLER_STRING; case 0x44140014: return IMTQ_HANDLER_STRING; case 0x442000A1: @@ -198,6 +193,8 @@ const char* translateObject(object_id_t object) { return PDU2_HANDLER_STRING; case 0x44250003: return ACU_HANDLER_STRING; + case 0x44260000: + return BPX_BATT_HANDLER_STRING; case 0x443200A5: return RAD_SENSOR_STRING; case 0x44330000: @@ -277,14 +274,6 @@ const char* translateObject(object_id_t object) { case 0x50000600: return PTME_STRING; case 0x50000700: - return PAPB_VC0_STRING; - case 0x50000701: - return PAPB_VC1_STRING; - case 0x50000702: - return PAPB_VC2_STRING; - case 0x50000703: - return PAPB_VC3_STRING; - case 0x50000704: return PDEC_HANDLER_STRING; case 0x50000800: return CCSDS_HANDLER_STRING; @@ -312,6 +301,8 @@ const char* translateObject(object_id_t object) { return PUS_SERVICE_200_MODE_MGMT_STRING; case 0x53000201: return PUS_SERVICE_201_HEALTH_STRING; + case 0x53001000: + return CFDP_PACKET_DISTRIBUTOR_STRING; case 0x53010000: return HEALTH_TABLE_STRING; case 0x53010100: diff --git a/linux/fsfwconfig/objects/translateObjects.cpp b/linux/fsfwconfig/objects/translateObjects.cpp index 03973790..44b74490 100644 --- a/linux/fsfwconfig/objects/translateObjects.cpp +++ b/linux/fsfwconfig/objects/translateObjects.cpp @@ -1,8 +1,8 @@ /** * @brief Auto-generated object translation file. * @details - * Contains 113 translations. - * Generated on: 2022-01-17 15:36:10 + * Contains 110 translations. + * Generated on: 2022-02-03 12:01:36 */ #include "translateObjects.h" @@ -36,14 +36,14 @@ const char *MGM_3_RM3100_HANDLER_STRING = "MGM_3_RM3100_HANDLER"; const char *GYRO_3_L3G_HANDLER_STRING = "GYRO_3_L3G_HANDLER"; const char *RW4_STRING = "RW4"; const char *STAR_TRACKER_STRING = "STAR_TRACKER"; -const char *GPS0_HANDLER_STRING = "GPS0_HANDLER"; -const char *GPS1_HANDLER_STRING = "GPS1_HANDLER"; +const char *GPS_CONTROLLER_STRING = "GPS_CONTROLLER"; const char *IMTQ_HANDLER_STRING = "IMTQ_HANDLER"; const char *PCDU_HANDLER_STRING = "PCDU_HANDLER"; const char *P60DOCK_HANDLER_STRING = "P60DOCK_HANDLER"; const char *PDU1_HANDLER_STRING = "PDU1_HANDLER"; const char *PDU2_HANDLER_STRING = "PDU2_HANDLER"; const char *ACU_HANDLER_STRING = "ACU_HANDLER"; +const char *BPX_BATT_HANDLER_STRING = "BPX_BATT_HANDLER"; const char *RAD_SENSOR_STRING = "RAD_SENSOR"; const char *PLOC_UPDATER_STRING = "PLOC_UPDATER"; const char *PLOC_MEMORY_DUMPER_STRING = "PLOC_MEMORY_DUMPER"; @@ -83,10 +83,6 @@ const char *TMTC_BRIDGE_STRING = "TMTC_BRIDGE"; const char *TMTC_POLLING_TASK_STRING = "TMTC_POLLING_TASK"; const char *FILE_SYSTEM_HANDLER_STRING = "FILE_SYSTEM_HANDLER"; const char *PTME_STRING = "PTME"; -const char *PAPB_VC0_STRING = "PAPB_VC0"; -const char *PAPB_VC1_STRING = "PAPB_VC1"; -const char *PAPB_VC2_STRING = "PAPB_VC2"; -const char *PAPB_VC3_STRING = "PAPB_VC3"; const char *PDEC_HANDLER_STRING = "PDEC_HANDLER"; const char *CCSDS_HANDLER_STRING = "CCSDS_HANDLER"; const char *PUS_SERVICE_6_STRING = "PUS_SERVICE_6"; @@ -101,6 +97,7 @@ const char *PUS_SERVICE_17_TEST_STRING = "PUS_SERVICE_17_TEST"; const char *PUS_SERVICE_20_PARAMETERS_STRING = "PUS_SERVICE_20_PARAMETERS"; const char *PUS_SERVICE_200_MODE_MGMT_STRING = "PUS_SERVICE_200_MODE_MGMT"; const char *PUS_SERVICE_201_HEALTH_STRING = "PUS_SERVICE_201_HEALTH"; +const char *CFDP_PACKET_DISTRIBUTOR_STRING = "CFDP_PACKET_DISTRIBUTOR"; const char *HEALTH_TABLE_STRING = "HEALTH_TABLE"; const char *MODE_STORE_STRING = "MODE_STORE"; const char *EVENT_MANAGER_STRING = "EVENT_MANAGER"; @@ -120,236 +117,230 @@ const char *TM_FUNNEL_STRING = "TM_FUNNEL"; const char *CCSDS_IP_CORE_BRIDGE_STRING = "CCSDS_IP_CORE_BRIDGE"; const char *NO_OBJECT_STRING = "NO_OBJECT"; -const char *translateObject(object_id_t object) { - switch ((object & 0xFFFFFFFF)) { - case 0x00005060: - return P60DOCK_TEST_TASK_STRING; - case 0x43000003: - return CORE_CONTROLLER_STRING; - case 0x43100002: - return ACS_CONTROLLER_STRING; - case 0x43400001: - return THERMAL_CONTROLLER_STRING; - case 0x44120006: - return MGM_0_LIS3_HANDLER_STRING; - case 0x44120010: - return GYRO_0_ADIS_HANDLER_STRING; - case 0x44120032: - return SUS_1_STRING; - case 0x44120033: - return SUS_2_STRING; - case 0x44120034: - return SUS_3_STRING; - case 0x44120035: - return SUS_4_STRING; - case 0x44120036: - return SUS_5_STRING; - case 0x44120037: - return SUS_6_STRING; - case 0x44120038: - return SUS_7_STRING; - case 0x44120039: - return SUS_8_STRING; - case 0x44120040: - return SUS_9_STRING; - case 0x44120041: - return SUS_10_STRING; - case 0x44120042: - return SUS_11_STRING; - case 0x44120043: - return SUS_12_STRING; - case 0x44120044: - return SUS_13_STRING; - case 0x44120047: - return RW1_STRING; - case 0x44120107: - return MGM_1_RM3100_HANDLER_STRING; - case 0x44120111: - return GYRO_1_L3G_HANDLER_STRING; - case 0x44120148: - return RW2_STRING; - case 0x44120208: - return MGM_2_LIS3_HANDLER_STRING; - case 0x44120212: - return GYRO_2_ADIS_HANDLER_STRING; - case 0x44120249: - return RW3_STRING; - case 0x44120309: - return MGM_3_RM3100_HANDLER_STRING; - case 0x44120313: - return GYRO_3_L3G_HANDLER_STRING; - case 0x44120350: - return RW4_STRING; - case 0x44130001: - return STAR_TRACKER_STRING; - case 0x44130045: - return GPS0_HANDLER_STRING; - case 0x44130146: - return GPS1_HANDLER_STRING; - case 0x44140014: - return IMTQ_HANDLER_STRING; - case 0x442000A1: - return PCDU_HANDLER_STRING; - case 0x44250000: - return P60DOCK_HANDLER_STRING; - case 0x44250001: - return PDU1_HANDLER_STRING; - case 0x44250002: - return PDU2_HANDLER_STRING; - case 0x44250003: - return ACU_HANDLER_STRING; - case 0x443200A5: - return RAD_SENSOR_STRING; - case 0x44330000: - return PLOC_UPDATER_STRING; - case 0x44330001: - return PLOC_MEMORY_DUMPER_STRING; - case 0x44330002: - return STR_HELPER_STRING; - case 0x44330015: - return PLOC_MPSOC_HANDLER_STRING; - case 0x44330016: - return PLOC_SUPERVISOR_HANDLER_STRING; - case 0x444100A2: - return SOLAR_ARRAY_DEPL_HANDLER_STRING; - case 0x444100A4: - return HEATER_HANDLER_STRING; - case 0x44420004: - return TMP1075_HANDLER_1_STRING; - case 0x44420005: - return TMP1075_HANDLER_2_STRING; - case 0x44420016: - return RTD_IC_3_STRING; - case 0x44420017: - return RTD_IC_4_STRING; - case 0x44420018: - return RTD_IC_5_STRING; - case 0x44420019: - return RTD_IC_6_STRING; - case 0x44420020: - return RTD_IC_7_STRING; - case 0x44420021: - return RTD_IC_8_STRING; - case 0x44420022: - return RTD_IC_9_STRING; - case 0x44420023: - return RTD_IC_10_STRING; - case 0x44420024: - return RTD_IC_11_STRING; - case 0x44420025: - return RTD_IC_12_STRING; - case 0x44420026: - return RTD_IC_13_STRING; - case 0x44420027: - return RTD_IC_14_STRING; - case 0x44420028: - return RTD_IC_15_STRING; - case 0x44420029: - return RTD_IC_16_STRING; - case 0x44420030: - return RTD_IC_17_STRING; - case 0x44420031: - return RTD_IC_18_STRING; - case 0x445300A3: - return SYRLINKS_HK_HANDLER_STRING; - case 0x49000000: - return ARDUINO_COM_IF_STRING; - case 0x49010005: - return GPIO_IF_STRING; - case 0x49020004: - return SPI_COM_IF_STRING; - case 0x49030003: - return UART_COM_IF_STRING; - case 0x49040002: - return I2C_COM_IF_STRING; - case 0x49050001: - return CSP_COM_IF_STRING; - case 0x50000100: - return CCSDS_PACKET_DISTRIBUTOR_STRING; - case 0x50000200: - return PUS_PACKET_DISTRIBUTOR_STRING; - case 0x50000300: - return TMTC_BRIDGE_STRING; - case 0x50000400: - return TMTC_POLLING_TASK_STRING; - case 0x50000500: - return FILE_SYSTEM_HANDLER_STRING; - case 0x50000600: - return PTME_STRING; - case 0x50000700: - return PAPB_VC0_STRING; - case 0x50000701: - return PAPB_VC1_STRING; - case 0x50000702: - return PAPB_VC2_STRING; - case 0x50000703: - return PAPB_VC3_STRING; - case 0x50000704: - return PDEC_HANDLER_STRING; - case 0x50000800: - return CCSDS_HANDLER_STRING; - case 0x51000500: - return PUS_SERVICE_6_STRING; - case 0x53000000: - return FSFW_OBJECTS_START_STRING; - case 0x53000001: - return PUS_SERVICE_1_VERIFICATION_STRING; - case 0x53000002: - return PUS_SERVICE_2_DEVICE_ACCESS_STRING; - case 0x53000003: - return PUS_SERVICE_3_HOUSEKEEPING_STRING; - case 0x53000005: - return PUS_SERVICE_5_EVENT_REPORTING_STRING; - case 0x53000008: - return PUS_SERVICE_8_FUNCTION_MGMT_STRING; - case 0x53000009: - return PUS_SERVICE_9_TIME_MGMT_STRING; - case 0x53000017: - return PUS_SERVICE_17_TEST_STRING; - case 0x53000020: - return PUS_SERVICE_20_PARAMETERS_STRING; - case 0x53000200: - return PUS_SERVICE_200_MODE_MGMT_STRING; - case 0x53000201: - return PUS_SERVICE_201_HEALTH_STRING; - case 0x53010000: - return HEALTH_TABLE_STRING; - case 0x53010100: - return MODE_STORE_STRING; - case 0x53030000: - return EVENT_MANAGER_STRING; - case 0x53040000: - return INTERNAL_ERROR_REPORTER_STRING; - case 0x534f0100: - return TC_STORE_STRING; - case 0x534f0200: - return TM_STORE_STRING; - case 0x534f0300: - return IPC_STORE_STRING; - case 0x53500010: - return TIME_STAMPER_STRING; - case 0x53ffffff: - return FSFW_OBJECTS_END_STRING; - case 0x54000010: - return SPI_TEST_STRING; - case 0x54000020: - return UART_TEST_STRING; - case 0x5400AFFE: - return DUMMY_HANDLER_STRING; - case 0x5400CAFE: - return DUMMY_INTERFACE_STRING; - case 0x54123456: - return LIBGPIOD_TEST_STRING; - case 0x54694269: - return TEST_TASK_STRING; - case 0x73000100: - return TM_FUNNEL_STRING; - case 0x73500000: - return CCSDS_IP_CORE_BRIDGE_STRING; - case 0xFFFFFFFF: - return NO_OBJECT_STRING; - default: - return "UNKNOWN_OBJECT"; - } - return 0; +const char* translateObject(object_id_t object) { + switch( (object & 0xFFFFFFFF) ) { + case 0x00005060: + return P60DOCK_TEST_TASK_STRING; + case 0x43000003: + return CORE_CONTROLLER_STRING; + case 0x43100002: + return ACS_CONTROLLER_STRING; + case 0x43400001: + return THERMAL_CONTROLLER_STRING; + case 0x44120006: + return MGM_0_LIS3_HANDLER_STRING; + case 0x44120010: + return GYRO_0_ADIS_HANDLER_STRING; + case 0x44120032: + return SUS_1_STRING; + case 0x44120033: + return SUS_2_STRING; + case 0x44120034: + return SUS_3_STRING; + case 0x44120035: + return SUS_4_STRING; + case 0x44120036: + return SUS_5_STRING; + case 0x44120037: + return SUS_6_STRING; + case 0x44120038: + return SUS_7_STRING; + case 0x44120039: + return SUS_8_STRING; + case 0x44120040: + return SUS_9_STRING; + case 0x44120041: + return SUS_10_STRING; + case 0x44120042: + return SUS_11_STRING; + case 0x44120043: + return SUS_12_STRING; + case 0x44120044: + return SUS_13_STRING; + case 0x44120047: + return RW1_STRING; + case 0x44120107: + return MGM_1_RM3100_HANDLER_STRING; + case 0x44120111: + return GYRO_1_L3G_HANDLER_STRING; + case 0x44120148: + return RW2_STRING; + case 0x44120208: + return MGM_2_LIS3_HANDLER_STRING; + case 0x44120212: + return GYRO_2_ADIS_HANDLER_STRING; + case 0x44120249: + return RW3_STRING; + case 0x44120309: + return MGM_3_RM3100_HANDLER_STRING; + case 0x44120313: + return GYRO_3_L3G_HANDLER_STRING; + case 0x44120350: + return RW4_STRING; + case 0x44130001: + return STAR_TRACKER_STRING; + case 0x44130045: + return GPS_CONTROLLER_STRING; + case 0x44140014: + return IMTQ_HANDLER_STRING; + case 0x442000A1: + return PCDU_HANDLER_STRING; + case 0x44250000: + return P60DOCK_HANDLER_STRING; + case 0x44250001: + return PDU1_HANDLER_STRING; + case 0x44250002: + return PDU2_HANDLER_STRING; + case 0x44250003: + return ACU_HANDLER_STRING; + case 0x44260000: + return BPX_BATT_HANDLER_STRING; + case 0x443200A5: + return RAD_SENSOR_STRING; + case 0x44330000: + return PLOC_UPDATER_STRING; + case 0x44330001: + return PLOC_MEMORY_DUMPER_STRING; + case 0x44330002: + return STR_HELPER_STRING; + case 0x44330015: + return PLOC_MPSOC_HANDLER_STRING; + case 0x44330016: + return PLOC_SUPERVISOR_HANDLER_STRING; + case 0x444100A2: + return SOLAR_ARRAY_DEPL_HANDLER_STRING; + case 0x444100A4: + return HEATER_HANDLER_STRING; + case 0x44420004: + return TMP1075_HANDLER_1_STRING; + case 0x44420005: + return TMP1075_HANDLER_2_STRING; + case 0x44420016: + return RTD_IC_3_STRING; + case 0x44420017: + return RTD_IC_4_STRING; + case 0x44420018: + return RTD_IC_5_STRING; + case 0x44420019: + return RTD_IC_6_STRING; + case 0x44420020: + return RTD_IC_7_STRING; + case 0x44420021: + return RTD_IC_8_STRING; + case 0x44420022: + return RTD_IC_9_STRING; + case 0x44420023: + return RTD_IC_10_STRING; + case 0x44420024: + return RTD_IC_11_STRING; + case 0x44420025: + return RTD_IC_12_STRING; + case 0x44420026: + return RTD_IC_13_STRING; + case 0x44420027: + return RTD_IC_14_STRING; + case 0x44420028: + return RTD_IC_15_STRING; + case 0x44420029: + return RTD_IC_16_STRING; + case 0x44420030: + return RTD_IC_17_STRING; + case 0x44420031: + return RTD_IC_18_STRING; + case 0x445300A3: + return SYRLINKS_HK_HANDLER_STRING; + case 0x49000000: + return ARDUINO_COM_IF_STRING; + case 0x49010005: + return GPIO_IF_STRING; + case 0x49020004: + return SPI_COM_IF_STRING; + case 0x49030003: + return UART_COM_IF_STRING; + case 0x49040002: + return I2C_COM_IF_STRING; + case 0x49050001: + return CSP_COM_IF_STRING; + case 0x50000100: + return CCSDS_PACKET_DISTRIBUTOR_STRING; + case 0x50000200: + return PUS_PACKET_DISTRIBUTOR_STRING; + case 0x50000300: + return TMTC_BRIDGE_STRING; + case 0x50000400: + return TMTC_POLLING_TASK_STRING; + case 0x50000500: + return FILE_SYSTEM_HANDLER_STRING; + case 0x50000600: + return PTME_STRING; + case 0x50000700: + return PDEC_HANDLER_STRING; + case 0x50000800: + return CCSDS_HANDLER_STRING; + case 0x51000500: + return PUS_SERVICE_6_STRING; + case 0x53000000: + return FSFW_OBJECTS_START_STRING; + case 0x53000001: + return PUS_SERVICE_1_VERIFICATION_STRING; + case 0x53000002: + return PUS_SERVICE_2_DEVICE_ACCESS_STRING; + case 0x53000003: + return PUS_SERVICE_3_HOUSEKEEPING_STRING; + case 0x53000005: + return PUS_SERVICE_5_EVENT_REPORTING_STRING; + case 0x53000008: + return PUS_SERVICE_8_FUNCTION_MGMT_STRING; + case 0x53000009: + return PUS_SERVICE_9_TIME_MGMT_STRING; + case 0x53000017: + return PUS_SERVICE_17_TEST_STRING; + case 0x53000020: + return PUS_SERVICE_20_PARAMETERS_STRING; + case 0x53000200: + return PUS_SERVICE_200_MODE_MGMT_STRING; + case 0x53000201: + return PUS_SERVICE_201_HEALTH_STRING; + case 0x53001000: + return CFDP_PACKET_DISTRIBUTOR_STRING; + case 0x53010000: + return HEALTH_TABLE_STRING; + case 0x53010100: + return MODE_STORE_STRING; + case 0x53030000: + return EVENT_MANAGER_STRING; + case 0x53040000: + return INTERNAL_ERROR_REPORTER_STRING; + case 0x534f0100: + return TC_STORE_STRING; + case 0x534f0200: + return TM_STORE_STRING; + case 0x534f0300: + return IPC_STORE_STRING; + case 0x53500010: + return TIME_STAMPER_STRING; + case 0x53ffffff: + return FSFW_OBJECTS_END_STRING; + case 0x54000010: + return SPI_TEST_STRING; + case 0x54000020: + return UART_TEST_STRING; + case 0x5400AFFE: + return DUMMY_HANDLER_STRING; + case 0x5400CAFE: + return DUMMY_INTERFACE_STRING; + case 0x54123456: + return LIBGPIOD_TEST_STRING; + case 0x54694269: + return TEST_TASK_STRING; + case 0x73000100: + return TM_FUNNEL_STRING; + case 0x73500000: + return CCSDS_IP_CORE_BRIDGE_STRING; + case 0xFFFFFFFF: + return NO_OBJECT_STRING; + default: + return "UNKNOWN_OBJECT"; + } + return 0; } diff --git a/mission/devices/BpxBatteryHandler.cpp b/mission/devices/BpxBatteryHandler.cpp index a6a9fe9f..a2224242 100644 --- a/mission/devices/BpxBatteryHandler.cpp +++ b/mission/devices/BpxBatteryHandler.cpp @@ -4,7 +4,8 @@ #include BpxBatteryHandler::BpxBatteryHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie) - : DeviceHandlerBase(objectId, comIF, comCookie), hkSet(this), cfgSet(this) {} + : DeviceHandlerBase(objectId, comIF, comCookie), hkSet(this), cfgSet(this) { +} BpxBatteryHandler::~BpxBatteryHandler() {} @@ -203,6 +204,9 @@ ReturnValue_t BpxBatteryHandler::interpretDeviceReply(DeviceCommandId_t id, cons if (packet[0] != sentPingByte) { return DeviceHandlerIF::INVALID_DATA; } + if(mode == _MODE_START_UP) { + commandExecuted = true; + } break; } case (BpxBattery::RESET_COUNTERS): diff --git a/mission/devices/devicedefinitions/BpxBatteryDefinitions.h b/mission/devices/devicedefinitions/BpxBatteryDefinitions.h index d7ef4aa5..3ebb6d5a 100644 --- a/mission/devices/devicedefinitions/BpxBatteryDefinitions.h +++ b/mission/devices/devicedefinitions/BpxBatteryDefinitions.h @@ -38,8 +38,8 @@ static constexpr DeviceCommandId_t MAN_HEAT_OFF = 11; static constexpr uint8_t RESET_COUNTERS_MAGIC_VALUE = 0x42; static constexpr uint8_t DEFAULT_PING_SENT_BYTE = 0x07; -static constexpr uint32_t HK_SET_ID = 0; -static constexpr uint32_t CFG_SET_ID = 1; +static constexpr uint32_t HK_SET_ID = GET_HK; +static constexpr uint32_t CFG_SET_ID = CONFIG_GET; static constexpr uint8_t PORT_PING = 1; static constexpr uint8_t PORT_REBOOT = 4; @@ -166,7 +166,6 @@ class BpxBatteryHk : public StaticLocalDataSet { return result; } - private: //! Charge current in mA lp_var_t chargeCurrent = lp_var_t(sid.objectId, BpxBattery::HkPoolIds::CHARGE_CURRENT, this); @@ -181,22 +180,24 @@ class BpxBatteryHk : public StaticLocalDataSet { lp_var_t battVoltage = lp_var_t(sid.objectId, BpxBattery::HkPoolIds::BATT_VOLTAGE, this); //! Battery temperature 1 in degC - SerializeElement battTemp1 = + lp_var_t battTemp1 = lp_var_t(sid.objectId, BpxBattery::HkPoolIds::BATT_TEMP_1, this); //! Battery temperature 2 in degC - SerializeElement battTemp2 = + lp_var_t battTemp2 = lp_var_t(sid.objectId, BpxBattery::HkPoolIds::BATT_TEMP_2, this); //! Battery temperature 3 in degC - SerializeElement battTemp3 = + lp_var_t battTemp3 = lp_var_t(sid.objectId, BpxBattery::HkPoolIds::BATT_TEMP_3, this); //! Battery temperature 4 in degC - SerializeElement battTemp4 = + lp_var_t battTemp4 = lp_var_t(sid.objectId, BpxBattery::HkPoolIds::BATT_TEMP_4, this); - SerializeElement rebootCounter = + lp_var_t rebootCounter = lp_var_t(sid.objectId, BpxBattery::HkPoolIds::REBOOT_COUNTER, this); - SerializeElement bootcause = + lp_var_t bootcause = lp_var_t(sid.objectId, BpxBattery::HkPoolIds::BOOTCAUSE, this); + private: + friend class BpxBatteryHandler; /** * Constructor for data creator From 6440567585039ef106acd7a5951a6884f1e15cd9 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 3 Feb 2022 12:03:47 +0100 Subject: [PATCH 25/39] update event list --- generators/bsp_q7s_events.csv | 256 ++++----- generators/events/translateEvents.cpp | 82 +-- linux/fsfwconfig/events/translateEvents.cpp | 554 +++++++++----------- linux/fsfwconfig/events/translateEvents.h | 2 +- 4 files changed, 363 insertions(+), 531 deletions(-) diff --git a/generators/bsp_q7s_events.csv b/generators/bsp_q7s_events.csv index 040b2657..4a82c156 100644 --- a/generators/bsp_q7s_events.csv +++ b/generators/bsp_q7s_events.csv @@ -1,140 +1,116 @@ -2200;STORE_SEND_WRITE_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h -2201;STORE_WRITE_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h -2202;STORE_SEND_READ_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h -2203;STORE_READ_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h -2204;UNEXPECTED_MSG;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h -2205;STORING_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h -2206;TM_DUMP_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h -2207;STORE_INIT_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h -2208;STORE_INIT_EMPTY;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h -2209;STORE_CONTENT_CORRUPTED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h -2210;STORE_INITIALIZE;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h -2211;INIT_DONE;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h -2212;DUMP_FINISHED;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h -2213;DELETION_FINISHED;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h -2214;DELETION_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h -2215;AUTO_CATALOGS_SENDING_FAILED;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h -2600;GET_DATA_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/storagemanager/StorageManagerIF.h -2601;STORE_DATA_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/storagemanager/StorageManagerIF.h -2800;DEVICE_BUILDING_COMMAND_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h -2801;DEVICE_SENDING_COMMAND_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h -2802;DEVICE_REQUESTING_REPLY_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h -2803;DEVICE_READING_REPLY_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h -2804;DEVICE_INTERPRETING_REPLY_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h -2805;DEVICE_MISSED_REPLY;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h -2806;DEVICE_UNKNOWN_REPLY;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h -2807;DEVICE_UNREQUESTED_REPLY;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h -2808;INVALID_DEVICE_COMMAND;LOW;Indicates a SW bug in child class.;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h -2809;MONITORING_LIMIT_EXCEEDED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h -2810;MONITORING_AMBIGUOUS;HIGH;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h -4201;FUSE_CURRENT_HIGH;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/power/Fuse.h -4202;FUSE_WENT_OFF;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/power/Fuse.h -4204;POWER_ABOVE_HIGH_LIMIT;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/power/Fuse.h -4205;POWER_BELOW_LOW_LIMIT;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/power/Fuse.h -4300;SWITCH_WENT_OFF;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/power/PowerSwitchIF.h -5000;HEATER_ON;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/Heater.h -5001;HEATER_OFF;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/Heater.h -5002;HEATER_TIMEOUT;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/Heater.h -5003;HEATER_STAYED_ON;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/Heater.h -5004;HEATER_STAYED_OFF;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/Heater.h -5200;TEMP_SENSOR_HIGH;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h -5201;TEMP_SENSOR_LOW;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h -5202;TEMP_SENSOR_GRADIENT;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h -5901;COMPONENT_TEMP_LOW;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h -5902;COMPONENT_TEMP_HIGH;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h -5903;COMPONENT_TEMP_OOL_LOW;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h -5904;COMPONENT_TEMP_OOL_HIGH;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h -5905;TEMP_NOT_IN_OP_RANGE;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h -7101;FDIR_CHANGED_STATE;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/fdir/FailureIsolationBase.h -7102;FDIR_STARTS_RECOVERY;MEDIUM;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/fdir/FailureIsolationBase.h -7103;FDIR_TURNS_OFF_DEVICE;MEDIUM;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/fdir/FailureIsolationBase.h -7201;MONITOR_CHANGED_STATE;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h -7202;VALUE_BELOW_LOW_LIMIT;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h -7203;VALUE_ABOVE_HIGH_LIMIT;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h -7204;VALUE_OUT_OF_RANGE;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h -7301;SWITCHING_TM_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/datapool/HkSwitchHelper.h -7400;CHANGING_MODE;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h -7401;MODE_INFO;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h -7402;FALLBACK_FAILED;HIGH;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h -7403;MODE_TRANSITION_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h -7404;CANT_KEEP_MODE;HIGH;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h -7405;OBJECT_IN_INVALID_MODE;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h -7406;FORCING_MODE;MEDIUM;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h -7407;MODE_CMD_REJECTED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h -7506;HEALTH_INFO;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h -7507;CHILD_CHANGED_HEALTH;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h -7508;CHILD_PROBLEMS;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h -7509;OVERWRITING_HEALTH;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h -7510;TRYING_RECOVERY;MEDIUM;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h -7511;RECOVERY_STEP;MEDIUM;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h -7512;RECOVERY_DONE;MEDIUM;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h -7900;RF_AVAILABLE;INFO;A RF available signal was detected. P1: raw RFA state, P2: 0;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h -7901;RF_LOST;INFO;A previously found RF available signal was lost. P1: raw RFA state, P2: 0;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h -7902;BIT_LOCK;INFO;A Bit Lock signal. Was detected. P1: raw BLO state, P2: 0;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h -7903;BIT_LOCK_LOST;INFO;A previously found Bit Lock signal was lost. P1: raw BLO state, P2: 0;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h -7905;FRAME_PROCESSING_FAILED;LOW;The CCSDS Board could not interpret a TC;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h -8900;CLOCK_SET;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/pus/Service9TimeManagement.h -8901;CLOCK_SET_FAILURE;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/pus/Service9TimeManagement.h -9700;TEST;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/pus/Service17Test.h -10600;CHANGE_OF_SETUP_PARAMETER;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/hal/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h -10900;GPIO_PULL_HIGH_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/HeaterHandler.h -10901;GPIO_PULL_LOW_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/HeaterHandler.h -10902;SWITCH_ALREADY_ON;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/HeaterHandler.h -10903;SWITCH_ALREADY_OFF;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/HeaterHandler.h -10904;MAIN_SWITCH_TIMEOUT;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/HeaterHandler.h -11000;MAIN_SWITCH_ON_TIMEOUT;LOW;;C:\Users\jakob\eive-software\eive_obsw/linux/devices/SolarArrayDeploymentHandler.h -11001;MAIN_SWITCH_OFF_TIMEOUT;LOW;;C:\Users\jakob\eive-software\eive_obsw/linux/devices/SolarArrayDeploymentHandler.h -11002;DEPLOYMENT_FAILED;HIGH;;C:\Users\jakob\eive-software\eive_obsw/linux/devices/SolarArrayDeploymentHandler.h -11003;DEPL_SA1_GPIO_SWTICH_ON_FAILED;HIGH;;C:\Users\jakob\eive-software\eive_obsw/linux/devices/SolarArrayDeploymentHandler.h -11004;DEPL_SA2_GPIO_SWTICH_ON_FAILED;HIGH;;C:\Users\jakob\eive-software\eive_obsw/linux/devices/SolarArrayDeploymentHandler.h -11101;MEMORY_READ_RPT_CRC_FAILURE;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/PlocMPSoCHandler.h -11102;ACK_FAILURE;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/PlocMPSoCHandler.h -11103;EXE_FAILURE;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/PlocMPSoCHandler.h -11104;CRC_FAILURE_EVENT;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/PlocMPSoCHandler.h -11201;SELF_TEST_I2C_FAILURE;LOW;Get self test result returns I2C failure P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;C:\Users\jakob\eive-software\eive_obsw/mission/devices/IMTQHandler.h -11202;SELF_TEST_SPI_FAILURE;LOW;Get self test result returns SPI failure. This concerns the MTM connectivity. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;C:\Users\jakob\eive-software\eive_obsw/mission/devices/IMTQHandler.h -11203;SELF_TEST_ADC_FAILURE;LOW;Get self test result returns failure in measurement of current and temperature. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;C:\Users\jakob\eive-software\eive_obsw/mission/devices/IMTQHandler.h -11204;SELF_TEST_PWM_FAILURE;LOW;Get self test result returns PWM failure which concerns the coil actuation. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;C:\Users\jakob\eive-software\eive_obsw/mission/devices/IMTQHandler.h -11205;SELF_TEST_TC_FAILURE;LOW;Get self test result returns TC failure (system failure) P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;C:\Users\jakob\eive-software\eive_obsw/mission/devices/IMTQHandler.h -11206;SELF_TEST_MTM_RANGE_FAILURE;LOW;Get self test result returns failure that MTM values were outside of the expected range. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;C:\Users\jakob\eive-software\eive_obsw/mission/devices/IMTQHandler.h -11207;SELF_TEST_COIL_CURRENT_FAILURE;LOW;Get self test result returns failure indicating that the coil current was outside of the expected range P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;C:\Users\jakob\eive-software\eive_obsw/mission/devices/IMTQHandler.h -11208;INVALID_ERROR_BYTE;LOW;Received invalid error byte. This indicates an error of the communication link between IMTQ and OBC.;C:\Users\jakob\eive-software\eive_obsw/mission/devices/IMTQHandler.h -11301;ERROR_STATE;HIGH;Reaction wheel signals an error state;C:\Users\jakob\eive-software\eive_obsw/mission/devices/RwHandler.h -11501;SUPV_MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC supervisor crc failure in telemetry packet;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocSupervisorHandler.h -11502;SUPV_ACK_FAILURE;LOW;PLOC supervisor received acknowledgment failure report;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocSupervisorHandler.h -11503;SUPV_EXE_FAILURE;LOW;PLOC received execution failure report;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocSupervisorHandler.h -11504;SUPV_CRC_FAILURE_EVENT;LOW;PLOC supervisor reply has invalid crc;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocSupervisorHandler.h -11600;SANITIZATION_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/memory/SdCardManager.h -11700;UPDATE_FILE_NOT_EXISTS;LOW;;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocUpdater.h -11701;ACTION_COMMANDING_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocUpdater.h -11702;UPDATE_AVAILABLE_FAILED;LOW;Supervisor handler replied action message indicating a command execution failure of the update available command;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocUpdater.h -11703;UPDATE_TRANSFER_FAILED;LOW;Supervisor handler failed to transfer an update space packet. P1: Parameter holds the number of update packets already sent (inclusive the failed packet);C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocUpdater.h -11704;UPDATE_VERIFY_FAILED;LOW;Supervisor failed to execute the update verify command.;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocUpdater.h -11705;UPDATE_FINISHED;INFO;MPSoC update successful completed;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocUpdater.h -11800;SEND_MRAM_DUMP_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocMemoryDumper.h -11801;MRAM_DUMP_FAILED;LOW;Received completion failure report form PLOC supervisor handler P1: MRAM start address of failing dump command;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocMemoryDumper.h -11802;MRAM_DUMP_FINISHED;LOW;MRAM dump finished successfully;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocMemoryDumper.h -11901;INVALID_TC_FRAME;HIGH;;C:\Users\jakob\eive-software\eive_obsw/linux/obc/PdecHandler.h -11902;INVALID_FAR;HIGH;Read invalid FAR from PDEC after startup;C:\Users\jakob\eive-software\eive_obsw/linux/obc/PdecHandler.h -11903;CARRIER_LOCK;INFO;Carrier lock detected;C:\Users\jakob\eive-software\eive_obsw/linux/obc/PdecHandler.h -11904;BIT_LOCK_PDEC;INFO;Bit lock detected (data valid);C:\Users\jakob\eive-software\eive_obsw/linux/obc/PdecHandler.h -12000;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/startracker/StrHelper.h -12001;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/startracker/StrHelper.h -12002;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successfulop;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/startracker/StrHelper.h -12003;IMAGE_DOWNLOAD_SUCCESSFUL;LOW;Image download was successful;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/startracker/StrHelper.h -12004;FLASH_WRITE_SUCCESSFUL;LOW;Finished flash write procedure successfully;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/startracker/StrHelper.h -12005;FLASH_READ_SUCCESSFUL;LOW;Finished flash read procedure successfully;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/startracker/StrHelper.h -12006;FLASH_WRITE_FAILED;LOW;Flash write procedure failed;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/startracker/StrHelper.h -12007;FLASH_READ_FAILED;LOW;Flash read procedure failed;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/startracker/StrHelper.h -12008;FPGA_DOWNLOAD_SUCCESSFUL;LOW;Download of FPGA image successful;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/startracker/StrHelper.h -12009;FPGA_DOWNLOAD_FAILED;LOW;Download of FPGA image failed;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/startracker/StrHelper.h -12010;FPGA_UPLOAD_SUCCESSFUL;LOW;Upload of FPGA image successful;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/startracker/StrHelper.h -12011;FPGA_UPLOAD_FAILED;LOW;Upload of FPGA image failed;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/startracker/StrHelper.h -12012;STR_HELPER_READING_REPLY_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/startracker/StrHelper.h -12013;STR_HELPER_COM_ERROR;LOW;;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/startracker/StrHelper.h -12014;STR_HELPER_NO_REPLY;LOW;Star tracker did not send replies (maybe device is powered off)P1: Position of upload or download packet for which no reply was sent;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/startracker/StrHelper.h -12015;STR_HELPER_DEC_ERROR;LOW;;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/startracker/StrHelper.h -12016;POSITION_MISMATCH;LOW;Position mismatch P1: The expected position and thus the position for which the image upload/download failed;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/startracker/StrHelper.h -12017;STR_HELPER_FILE_NOT_EXISTS;LOW;Specified file does not existP1: Internal state of str helper;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/startracker/StrHelper.h -12018;STR_HELPER_SENDING_PACKET_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/startracker/StrHelper.h -12019;STR_HELPER_REQUESTING_MSG_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/startracker/StrHelper.h +2201;STORE_WRITE_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h +2203;STORE_READ_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h +2205;STORING_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h +2208;STORE_INIT_EMPTY;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h +2211;INIT_DONE;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h +2212;DUMP_FINISHED;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h +2213;DELETION_FINISHED;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h +2214;DELETION_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h +2600;GET_DATA_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/storagemanager/StorageManagerIF.h +2601;STORE_DATA_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/storagemanager/StorageManagerIF.h +2800;DEVICE_BUILDING_COMMAND_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h +2801;DEVICE_SENDING_COMMAND_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h +2802;DEVICE_REQUESTING_REPLY_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h +2803;DEVICE_READING_REPLY_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h +2804;DEVICE_INTERPRETING_REPLY_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h +2805;DEVICE_MISSED_REPLY;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h +2806;DEVICE_UNKNOWN_REPLY;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h +2807;DEVICE_UNREQUESTED_REPLY;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h +2808;INVALID_DEVICE_COMMAND;LOW;Indicates a SW bug in child class.;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h +2809;MONITORING_LIMIT_EXCEEDED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h +2810;MONITORING_AMBIGUOUS;HIGH;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h +2811;DEVICE_WANTS_HARD_REBOOT;HIGH;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h +4201;FUSE_CURRENT_HIGH;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/power/Fuse.h +4300;SWITCH_WENT_OFF;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/power/PowerSwitchIF.h +5000;HEATER_ON;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/thermal/Heater.h +5001;HEATER_OFF;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/thermal/Heater.h +5002;HEATER_TIMEOUT;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/thermal/Heater.h +5003;HEATER_STAYED_ON;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/thermal/Heater.h +5004;HEATER_STAYED_OFF;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/thermal/Heater.h +5200;TEMP_SENSOR_HIGH;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h +5201;TEMP_SENSOR_LOW;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h +5202;TEMP_SENSOR_GRADIENT;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h +5901;COMPONENT_TEMP_LOW;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h +5902;COMPONENT_TEMP_HIGH;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h +5903;COMPONENT_TEMP_OOL_LOW;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h +5904;COMPONENT_TEMP_OOL_HIGH;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h +5905;TEMP_NOT_IN_OP_RANGE;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h +7102;FDIR_STARTS_RECOVERY;MEDIUM;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/fdir/FailureIsolationBase.h +7103;FDIR_TURNS_OFF_DEVICE;MEDIUM;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/fdir/FailureIsolationBase.h +7201;MONITOR_CHANGED_STATE;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h +7202;VALUE_BELOW_LOW_LIMIT;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h +7203;VALUE_ABOVE_HIGH_LIMIT;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h +7204;VALUE_OUT_OF_RANGE;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h +7401;MODE_INFO;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h +7402;FALLBACK_FAILED;HIGH;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h +7403;MODE_TRANSITION_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h +7404;CANT_KEEP_MODE;HIGH;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h +7406;FORCING_MODE;MEDIUM;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h +7506;HEALTH_INFO;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/health/HasHealthIF.h +7507;CHILD_CHANGED_HEALTH;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/health/HasHealthIF.h +7508;CHILD_PROBLEMS;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/health/HasHealthIF.h +7512;RECOVERY_DONE;MEDIUM;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/health/HasHealthIF.h +7900;RF_AVAILABLE;INFO;A RF available signal was detected. P1: raw RFA state, P2: 0;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h +7901;RF_LOST;INFO;A previously found RF available signal was lost. P1: raw RFA state, P2: 0;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h +7902;BIT_LOCK;INFO;A Bit Lock signal. Was detected. P1: raw BLO state, P2: 0;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h +7903;BIT_LOCK_LOST;INFO;A previously found Bit Lock signal was lost. P1: raw BLO state, P2: 0;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h +7905;FRAME_PROCESSING_FAILED;LOW;The CCSDS Board could not interpret a TC;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h +9700;TEST;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/pus/Service17Test.h +10600;CHANGE_OF_SETUP_PARAMETER;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/hal/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h +10900;GPIO_PULL_HIGH_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/HeaterHandler.h +10901;GPIO_PULL_LOW_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/HeaterHandler.h +10902;SWITCH_ALREADY_ON;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/HeaterHandler.h +10903;SWITCH_ALREADY_OFF;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/HeaterHandler.h +10904;MAIN_SWITCH_TIMEOUT;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/HeaterHandler.h +11000;MAIN_SWITCH_ON_TIMEOUT;LOW;;/home/rmueller/EIVE/eive-obsw/linux/devices/SolarArrayDeploymentHandler.h +11001;MAIN_SWITCH_OFF_TIMEOUT;LOW;;/home/rmueller/EIVE/eive-obsw/linux/devices/SolarArrayDeploymentHandler.h +11002;DEPLOYMENT_FAILED;HIGH;;/home/rmueller/EIVE/eive-obsw/linux/devices/SolarArrayDeploymentHandler.h +11003;DEPL_SA1_GPIO_SWTICH_ON_FAILED;HIGH;;/home/rmueller/EIVE/eive-obsw/linux/devices/SolarArrayDeploymentHandler.h +11004;DEPL_SA2_GPIO_SWTICH_ON_FAILED;HIGH;;/home/rmueller/EIVE/eive-obsw/linux/devices/SolarArrayDeploymentHandler.h +11201;SELF_TEST_I2C_FAILURE;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h +11202;SELF_TEST_SPI_FAILURE;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h +11203;SELF_TEST_ADC_FAILURE;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h +11204;SELF_TEST_PWM_FAILURE;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h +11205;SELF_TEST_TC_FAILURE;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h +11206;SELF_TEST_MTM_RANGE_FAILURE;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h +11207;SELF_TEST_COIL_CURRENT_FAILURE;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h +11208;INVALID_ERROR_BYTE;LOW;Received invalid error byte. This indicates an error of the communication link between IMTQ and OBC.;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h +11301;ERROR_STATE;HIGH;Reaction wheel signals an error state;/home/rmueller/EIVE/eive-obsw/mission/devices/RwHandler.h +11501;SUPV_MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC supervisor crc failure in telemetry packet;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocSupervisorHandler.h +11502;SUPV_ACK_FAILURE;LOW;PLOC supervisor received acknowledgment failure report;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocSupervisorHandler.h +11503;SUPV_EXE_FAILURE;LOW;PLOC received execution failure report;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocSupervisorHandler.h +11504;SUPV_CRC_FAILURE_EVENT;LOW;PLOC supervisor reply has invalid crc;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocSupervisorHandler.h +11600;SANITIZATION_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/bsp_q7s/memory/SdCardManager.h +11700;UPDATE_FILE_NOT_EXISTS;LOW;;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocUpdater.h +11701;ACTION_COMMANDING_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocUpdater.h +11702;UPDATE_AVAILABLE_FAILED;LOW;Supervisor handler replied action message indicating a command execution failure of the update available command;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocUpdater.h +11703;UPDATE_TRANSFER_FAILED;LOW;Supervisor handler failed to transfer an update space packet. P1: Parameter holds the number of update packets already sent (inclusive the failed packet);/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocUpdater.h +11704;UPDATE_VERIFY_FAILED;LOW;Supervisor failed to execute the update verify command.;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocUpdater.h +11705;UPDATE_FINISHED;INFO;MPSoC update successful completed;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocUpdater.h +11800;SEND_MRAM_DUMP_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocMemoryDumper.h +11801;MRAM_DUMP_FAILED;LOW;Received completion failure report form PLOC supervisor handler P1: MRAM start address of failing dump command;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocMemoryDumper.h +11802;MRAM_DUMP_FINISHED;LOW;MRAM dump finished successfully;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocMemoryDumper.h +11901;INVALID_TC_FRAME;HIGH;;/home/rmueller/EIVE/eive-obsw/linux/obc/PdecHandler.h +11902;INVALID_FAR;HIGH;Read invalid FAR from PDEC after startup;/home/rmueller/EIVE/eive-obsw/linux/obc/PdecHandler.h +11903;CARRIER_LOCK;INFO;Carrier lock detected;/home/rmueller/EIVE/eive-obsw/linux/obc/PdecHandler.h +11904;BIT_LOCK_PDEC;INFO;Bit lock detected (data valid);/home/rmueller/EIVE/eive-obsw/linux/obc/PdecHandler.h +12000;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h +12001;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h +12002;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successfulop;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h +12003;IMAGE_DOWNLOAD_SUCCESSFUL;LOW;Image download was successful;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h +12004;FLASH_WRITE_SUCCESSFUL;LOW;Finished flash write procedure successfully;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h +12005;FLASH_READ_SUCCESSFUL;LOW;Finished flash read procedure successfully;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h +12006;FLASH_WRITE_FAILED;LOW;Flash write procedure failed;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h +12007;FLASH_READ_FAILED;LOW;Flash read procedure failed;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h +12008;FPGA_DOWNLOAD_SUCCESSFUL;LOW;Download of FPGA image successful;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h +12009;FPGA_DOWNLOAD_FAILED;LOW;Download of FPGA image failed;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h +12010;FPGA_UPLOAD_SUCCESSFUL;LOW;Upload of FPGA image successful;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h +12011;FPGA_UPLOAD_FAILED;LOW;Upload of FPGA image failed;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h +12012;STR_HELPER_READING_REPLY_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h +12013;STR_HELPER_COM_ERROR;LOW;;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h +12014;STR_HELPER_NO_REPLY;LOW;Star tracker did not send replies (maybe device is powered off) P1: Position of upload or download packet for which no reply was sent;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h +12015;STR_HELPER_DEC_ERROR;LOW;;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h +12016;POSITION_MISMATCH;LOW;Position mismatch P1: The expected position and thus the position for which the image upload/download failed;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h +12017;STR_HELPER_FILE_NOT_EXISTS;LOW;Specified file does not exist P1: Internal state of str helper;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h +12018;STR_HELPER_SENDING_PACKET_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h +12019;STR_HELPER_REQUESTING_MSG_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h diff --git a/generators/events/translateEvents.cpp b/generators/events/translateEvents.cpp index 11a02c64..70e0c2a7 100644 --- a/generators/events/translateEvents.cpp +++ b/generators/events/translateEvents.cpp @@ -1,26 +1,18 @@ /** - * @brief Auto-generated event translation file. Contains 140 translations. + * @brief Auto-generated event translation file. Contains 116 translations. * @details - * Generated on: 2022-01-17 15:35:58 + * Generated on: 2022-02-03 12:03:33 */ #include "translateEvents.h" -const char *STORE_SEND_WRITE_FAILED_STRING = "STORE_SEND_WRITE_FAILED"; const char *STORE_WRITE_FAILED_STRING = "STORE_WRITE_FAILED"; -const char *STORE_SEND_READ_FAILED_STRING = "STORE_SEND_READ_FAILED"; const char *STORE_READ_FAILED_STRING = "STORE_READ_FAILED"; -const char *UNEXPECTED_MSG_STRING = "UNEXPECTED_MSG"; const char *STORING_FAILED_STRING = "STORING_FAILED"; -const char *TM_DUMP_FAILED_STRING = "TM_DUMP_FAILED"; -const char *STORE_INIT_FAILED_STRING = "STORE_INIT_FAILED"; const char *STORE_INIT_EMPTY_STRING = "STORE_INIT_EMPTY"; -const char *STORE_CONTENT_CORRUPTED_STRING = "STORE_CONTENT_CORRUPTED"; -const char *STORE_INITIALIZE_STRING = "STORE_INITIALIZE"; const char *INIT_DONE_STRING = "INIT_DONE"; const char *DUMP_FINISHED_STRING = "DUMP_FINISHED"; const char *DELETION_FINISHED_STRING = "DELETION_FINISHED"; const char *DELETION_FAILED_STRING = "DELETION_FAILED"; -const char *AUTO_CATALOGS_SENDING_FAILED_STRING = "AUTO_CATALOGS_SENDING_FAILED"; const char *GET_DATA_FAILED_STRING = "GET_DATA_FAILED"; const char *STORE_DATA_FAILED_STRING = "STORE_DATA_FAILED"; const char *DEVICE_BUILDING_COMMAND_FAILED_STRING = "DEVICE_BUILDING_COMMAND_FAILED"; @@ -34,10 +26,8 @@ const char *DEVICE_UNREQUESTED_REPLY_STRING = "DEVICE_UNREQUESTED_REPLY"; const char *INVALID_DEVICE_COMMAND_STRING = "INVALID_DEVICE_COMMAND"; const char *MONITORING_LIMIT_EXCEEDED_STRING = "MONITORING_LIMIT_EXCEEDED"; const char *MONITORING_AMBIGUOUS_STRING = "MONITORING_AMBIGUOUS"; +const char *DEVICE_WANTS_HARD_REBOOT_STRING = "DEVICE_WANTS_HARD_REBOOT"; const char *FUSE_CURRENT_HIGH_STRING = "FUSE_CURRENT_HIGH"; -const char *FUSE_WENT_OFF_STRING = "FUSE_WENT_OFF"; -const char *POWER_ABOVE_HIGH_LIMIT_STRING = "POWER_ABOVE_HIGH_LIMIT"; -const char *POWER_BELOW_LOW_LIMIT_STRING = "POWER_BELOW_LOW_LIMIT"; const char *SWITCH_WENT_OFF_STRING = "SWITCH_WENT_OFF"; const char *HEATER_ON_STRING = "HEATER_ON"; const char *HEATER_OFF_STRING = "HEATER_OFF"; @@ -52,36 +42,26 @@ const char *COMPONENT_TEMP_HIGH_STRING = "COMPONENT_TEMP_HIGH"; const char *COMPONENT_TEMP_OOL_LOW_STRING = "COMPONENT_TEMP_OOL_LOW"; const char *COMPONENT_TEMP_OOL_HIGH_STRING = "COMPONENT_TEMP_OOL_HIGH"; const char *TEMP_NOT_IN_OP_RANGE_STRING = "TEMP_NOT_IN_OP_RANGE"; -const char *FDIR_CHANGED_STATE_STRING = "FDIR_CHANGED_STATE"; const char *FDIR_STARTS_RECOVERY_STRING = "FDIR_STARTS_RECOVERY"; const char *FDIR_TURNS_OFF_DEVICE_STRING = "FDIR_TURNS_OFF_DEVICE"; const char *MONITOR_CHANGED_STATE_STRING = "MONITOR_CHANGED_STATE"; const char *VALUE_BELOW_LOW_LIMIT_STRING = "VALUE_BELOW_LOW_LIMIT"; const char *VALUE_ABOVE_HIGH_LIMIT_STRING = "VALUE_ABOVE_HIGH_LIMIT"; const char *VALUE_OUT_OF_RANGE_STRING = "VALUE_OUT_OF_RANGE"; -const char *SWITCHING_TM_FAILED_STRING = "SWITCHING_TM_FAILED"; -const char *CHANGING_MODE_STRING = "CHANGING_MODE"; const char *MODE_INFO_STRING = "MODE_INFO"; const char *FALLBACK_FAILED_STRING = "FALLBACK_FAILED"; const char *MODE_TRANSITION_FAILED_STRING = "MODE_TRANSITION_FAILED"; const char *CANT_KEEP_MODE_STRING = "CANT_KEEP_MODE"; -const char *OBJECT_IN_INVALID_MODE_STRING = "OBJECT_IN_INVALID_MODE"; const char *FORCING_MODE_STRING = "FORCING_MODE"; -const char *MODE_CMD_REJECTED_STRING = "MODE_CMD_REJECTED"; const char *HEALTH_INFO_STRING = "HEALTH_INFO"; const char *CHILD_CHANGED_HEALTH_STRING = "CHILD_CHANGED_HEALTH"; const char *CHILD_PROBLEMS_STRING = "CHILD_PROBLEMS"; -const char *OVERWRITING_HEALTH_STRING = "OVERWRITING_HEALTH"; -const char *TRYING_RECOVERY_STRING = "TRYING_RECOVERY"; -const char *RECOVERY_STEP_STRING = "RECOVERY_STEP"; const char *RECOVERY_DONE_STRING = "RECOVERY_DONE"; const char *RF_AVAILABLE_STRING = "RF_AVAILABLE"; const char *RF_LOST_STRING = "RF_LOST"; const char *BIT_LOCK_STRING = "BIT_LOCK"; const char *BIT_LOCK_LOST_STRING = "BIT_LOCK_LOST"; const char *FRAME_PROCESSING_FAILED_STRING = "FRAME_PROCESSING_FAILED"; -const char *CLOCK_SET_STRING = "CLOCK_SET"; -const char *CLOCK_SET_FAILURE_STRING = "CLOCK_SET_FAILURE"; const char *TEST_STRING = "TEST"; const char *CHANGE_OF_SETUP_PARAMETER_STRING = "CHANGE_OF_SETUP_PARAMETER"; const char *GPIO_PULL_HIGH_FAILED_STRING = "GPIO_PULL_HIGH_FAILED"; @@ -94,10 +74,6 @@ const char *MAIN_SWITCH_OFF_TIMEOUT_STRING = "MAIN_SWITCH_OFF_TIMEOUT"; const char *DEPLOYMENT_FAILED_STRING = "DEPLOYMENT_FAILED"; const char *DEPL_SA1_GPIO_SWTICH_ON_FAILED_STRING = "DEPL_SA1_GPIO_SWTICH_ON_FAILED"; const char *DEPL_SA2_GPIO_SWTICH_ON_FAILED_STRING = "DEPL_SA2_GPIO_SWTICH_ON_FAILED"; -const char *MEMORY_READ_RPT_CRC_FAILURE_STRING = "MEMORY_READ_RPT_CRC_FAILURE"; -const char *ACK_FAILURE_STRING = "ACK_FAILURE"; -const char *EXE_FAILURE_STRING = "EXE_FAILURE"; -const char *CRC_FAILURE_EVENT_STRING = "CRC_FAILURE_EVENT"; const char *SELF_TEST_I2C_FAILURE_STRING = "SELF_TEST_I2C_FAILURE"; const char *SELF_TEST_SPI_FAILURE_STRING = "SELF_TEST_SPI_FAILURE"; const char *SELF_TEST_ADC_FAILURE_STRING = "SELF_TEST_ADC_FAILURE"; @@ -148,28 +124,14 @@ const char *STR_HELPER_REQUESTING_MSG_FAILED_STRING = "STR_HELPER_REQUESTING_MSG const char * translateEvents(Event event) { switch( (event & 0xffff) ) { - case(2200): - return STORE_SEND_WRITE_FAILED_STRING; case(2201): return STORE_WRITE_FAILED_STRING; - case(2202): - return STORE_SEND_READ_FAILED_STRING; case(2203): return STORE_READ_FAILED_STRING; - case(2204): - return UNEXPECTED_MSG_STRING; case(2205): return STORING_FAILED_STRING; - case(2206): - return TM_DUMP_FAILED_STRING; - case(2207): - return STORE_INIT_FAILED_STRING; case(2208): return STORE_INIT_EMPTY_STRING; - case(2209): - return STORE_CONTENT_CORRUPTED_STRING; - case(2210): - return STORE_INITIALIZE_STRING; case(2211): return INIT_DONE_STRING; case(2212): @@ -178,8 +140,6 @@ const char * translateEvents(Event event) { return DELETION_FINISHED_STRING; case(2214): return DELETION_FAILED_STRING; - case(2215): - return AUTO_CATALOGS_SENDING_FAILED_STRING; case(2600): return GET_DATA_FAILED_STRING; case(2601): @@ -206,14 +166,10 @@ const char * translateEvents(Event event) { return MONITORING_LIMIT_EXCEEDED_STRING; case(2810): return MONITORING_AMBIGUOUS_STRING; + case(2811): + return DEVICE_WANTS_HARD_REBOOT_STRING; case(4201): return FUSE_CURRENT_HIGH_STRING; - case(4202): - return FUSE_WENT_OFF_STRING; - case(4204): - return POWER_ABOVE_HIGH_LIMIT_STRING; - case(4205): - return POWER_BELOW_LOW_LIMIT_STRING; case(4300): return SWITCH_WENT_OFF_STRING; case(5000): @@ -242,8 +198,6 @@ const char * translateEvents(Event event) { return COMPONENT_TEMP_OOL_HIGH_STRING; case(5905): return TEMP_NOT_IN_OP_RANGE_STRING; - case(7101): - return FDIR_CHANGED_STATE_STRING; case(7102): return FDIR_STARTS_RECOVERY_STRING; case(7103): @@ -256,10 +210,6 @@ const char * translateEvents(Event event) { return VALUE_ABOVE_HIGH_LIMIT_STRING; case(7204): return VALUE_OUT_OF_RANGE_STRING; - case(7301): - return SWITCHING_TM_FAILED_STRING; - case(7400): - return CHANGING_MODE_STRING; case(7401): return MODE_INFO_STRING; case(7402): @@ -268,24 +218,14 @@ const char * translateEvents(Event event) { return MODE_TRANSITION_FAILED_STRING; case(7404): return CANT_KEEP_MODE_STRING; - case(7405): - return OBJECT_IN_INVALID_MODE_STRING; case(7406): return FORCING_MODE_STRING; - case(7407): - return MODE_CMD_REJECTED_STRING; case(7506): return HEALTH_INFO_STRING; case(7507): return CHILD_CHANGED_HEALTH_STRING; case(7508): return CHILD_PROBLEMS_STRING; - case(7509): - return OVERWRITING_HEALTH_STRING; - case(7510): - return TRYING_RECOVERY_STRING; - case(7511): - return RECOVERY_STEP_STRING; case(7512): return RECOVERY_DONE_STRING; case(7900): @@ -298,10 +238,6 @@ const char * translateEvents(Event event) { return BIT_LOCK_LOST_STRING; case(7905): return FRAME_PROCESSING_FAILED_STRING; - case(8900): - return CLOCK_SET_STRING; - case(8901): - return CLOCK_SET_FAILURE_STRING; case(9700): return TEST_STRING; case(10600): @@ -326,14 +262,6 @@ const char * translateEvents(Event event) { return DEPL_SA1_GPIO_SWTICH_ON_FAILED_STRING; case(11004): return DEPL_SA2_GPIO_SWTICH_ON_FAILED_STRING; - case(11101): - return MEMORY_READ_RPT_CRC_FAILURE_STRING; - case(11102): - return ACK_FAILURE_STRING; - case(11103): - return EXE_FAILURE_STRING; - case(11104): - return CRC_FAILURE_EVENT_STRING; case(11201): return SELF_TEST_I2C_FAILURE_STRING; case(11202): diff --git a/linux/fsfwconfig/events/translateEvents.cpp b/linux/fsfwconfig/events/translateEvents.cpp index 9ee9f3cf..70e0c2a7 100644 --- a/linux/fsfwconfig/events/translateEvents.cpp +++ b/linux/fsfwconfig/events/translateEvents.cpp @@ -1,26 +1,18 @@ /** - * @brief Auto-generated event translation file. Contains 140 translations. + * @brief Auto-generated event translation file. Contains 116 translations. * @details - * Generated on: 2022-01-17 15:35:58 + * Generated on: 2022-02-03 12:03:33 */ #include "translateEvents.h" -const char *STORE_SEND_WRITE_FAILED_STRING = "STORE_SEND_WRITE_FAILED"; const char *STORE_WRITE_FAILED_STRING = "STORE_WRITE_FAILED"; -const char *STORE_SEND_READ_FAILED_STRING = "STORE_SEND_READ_FAILED"; const char *STORE_READ_FAILED_STRING = "STORE_READ_FAILED"; -const char *UNEXPECTED_MSG_STRING = "UNEXPECTED_MSG"; const char *STORING_FAILED_STRING = "STORING_FAILED"; -const char *TM_DUMP_FAILED_STRING = "TM_DUMP_FAILED"; -const char *STORE_INIT_FAILED_STRING = "STORE_INIT_FAILED"; const char *STORE_INIT_EMPTY_STRING = "STORE_INIT_EMPTY"; -const char *STORE_CONTENT_CORRUPTED_STRING = "STORE_CONTENT_CORRUPTED"; -const char *STORE_INITIALIZE_STRING = "STORE_INITIALIZE"; const char *INIT_DONE_STRING = "INIT_DONE"; const char *DUMP_FINISHED_STRING = "DUMP_FINISHED"; const char *DELETION_FINISHED_STRING = "DELETION_FINISHED"; const char *DELETION_FAILED_STRING = "DELETION_FAILED"; -const char *AUTO_CATALOGS_SENDING_FAILED_STRING = "AUTO_CATALOGS_SENDING_FAILED"; const char *GET_DATA_FAILED_STRING = "GET_DATA_FAILED"; const char *STORE_DATA_FAILED_STRING = "STORE_DATA_FAILED"; const char *DEVICE_BUILDING_COMMAND_FAILED_STRING = "DEVICE_BUILDING_COMMAND_FAILED"; @@ -34,10 +26,8 @@ const char *DEVICE_UNREQUESTED_REPLY_STRING = "DEVICE_UNREQUESTED_REPLY"; const char *INVALID_DEVICE_COMMAND_STRING = "INVALID_DEVICE_COMMAND"; const char *MONITORING_LIMIT_EXCEEDED_STRING = "MONITORING_LIMIT_EXCEEDED"; const char *MONITORING_AMBIGUOUS_STRING = "MONITORING_AMBIGUOUS"; +const char *DEVICE_WANTS_HARD_REBOOT_STRING = "DEVICE_WANTS_HARD_REBOOT"; const char *FUSE_CURRENT_HIGH_STRING = "FUSE_CURRENT_HIGH"; -const char *FUSE_WENT_OFF_STRING = "FUSE_WENT_OFF"; -const char *POWER_ABOVE_HIGH_LIMIT_STRING = "POWER_ABOVE_HIGH_LIMIT"; -const char *POWER_BELOW_LOW_LIMIT_STRING = "POWER_BELOW_LOW_LIMIT"; const char *SWITCH_WENT_OFF_STRING = "SWITCH_WENT_OFF"; const char *HEATER_ON_STRING = "HEATER_ON"; const char *HEATER_OFF_STRING = "HEATER_OFF"; @@ -52,36 +42,26 @@ const char *COMPONENT_TEMP_HIGH_STRING = "COMPONENT_TEMP_HIGH"; const char *COMPONENT_TEMP_OOL_LOW_STRING = "COMPONENT_TEMP_OOL_LOW"; const char *COMPONENT_TEMP_OOL_HIGH_STRING = "COMPONENT_TEMP_OOL_HIGH"; const char *TEMP_NOT_IN_OP_RANGE_STRING = "TEMP_NOT_IN_OP_RANGE"; -const char *FDIR_CHANGED_STATE_STRING = "FDIR_CHANGED_STATE"; const char *FDIR_STARTS_RECOVERY_STRING = "FDIR_STARTS_RECOVERY"; const char *FDIR_TURNS_OFF_DEVICE_STRING = "FDIR_TURNS_OFF_DEVICE"; const char *MONITOR_CHANGED_STATE_STRING = "MONITOR_CHANGED_STATE"; const char *VALUE_BELOW_LOW_LIMIT_STRING = "VALUE_BELOW_LOW_LIMIT"; const char *VALUE_ABOVE_HIGH_LIMIT_STRING = "VALUE_ABOVE_HIGH_LIMIT"; const char *VALUE_OUT_OF_RANGE_STRING = "VALUE_OUT_OF_RANGE"; -const char *SWITCHING_TM_FAILED_STRING = "SWITCHING_TM_FAILED"; -const char *CHANGING_MODE_STRING = "CHANGING_MODE"; const char *MODE_INFO_STRING = "MODE_INFO"; const char *FALLBACK_FAILED_STRING = "FALLBACK_FAILED"; const char *MODE_TRANSITION_FAILED_STRING = "MODE_TRANSITION_FAILED"; const char *CANT_KEEP_MODE_STRING = "CANT_KEEP_MODE"; -const char *OBJECT_IN_INVALID_MODE_STRING = "OBJECT_IN_INVALID_MODE"; const char *FORCING_MODE_STRING = "FORCING_MODE"; -const char *MODE_CMD_REJECTED_STRING = "MODE_CMD_REJECTED"; const char *HEALTH_INFO_STRING = "HEALTH_INFO"; const char *CHILD_CHANGED_HEALTH_STRING = "CHILD_CHANGED_HEALTH"; const char *CHILD_PROBLEMS_STRING = "CHILD_PROBLEMS"; -const char *OVERWRITING_HEALTH_STRING = "OVERWRITING_HEALTH"; -const char *TRYING_RECOVERY_STRING = "TRYING_RECOVERY"; -const char *RECOVERY_STEP_STRING = "RECOVERY_STEP"; const char *RECOVERY_DONE_STRING = "RECOVERY_DONE"; const char *RF_AVAILABLE_STRING = "RF_AVAILABLE"; const char *RF_LOST_STRING = "RF_LOST"; const char *BIT_LOCK_STRING = "BIT_LOCK"; const char *BIT_LOCK_LOST_STRING = "BIT_LOCK_LOST"; const char *FRAME_PROCESSING_FAILED_STRING = "FRAME_PROCESSING_FAILED"; -const char *CLOCK_SET_STRING = "CLOCK_SET"; -const char *CLOCK_SET_FAILURE_STRING = "CLOCK_SET_FAILURE"; const char *TEST_STRING = "TEST"; const char *CHANGE_OF_SETUP_PARAMETER_STRING = "CHANGE_OF_SETUP_PARAMETER"; const char *GPIO_PULL_HIGH_FAILED_STRING = "GPIO_PULL_HIGH_FAILED"; @@ -94,10 +74,6 @@ const char *MAIN_SWITCH_OFF_TIMEOUT_STRING = "MAIN_SWITCH_OFF_TIMEOUT"; const char *DEPLOYMENT_FAILED_STRING = "DEPLOYMENT_FAILED"; const char *DEPL_SA1_GPIO_SWTICH_ON_FAILED_STRING = "DEPL_SA1_GPIO_SWTICH_ON_FAILED"; const char *DEPL_SA2_GPIO_SWTICH_ON_FAILED_STRING = "DEPL_SA2_GPIO_SWTICH_ON_FAILED"; -const char *MEMORY_READ_RPT_CRC_FAILURE_STRING = "MEMORY_READ_RPT_CRC_FAILURE"; -const char *ACK_FAILURE_STRING = "ACK_FAILURE"; -const char *EXE_FAILURE_STRING = "EXE_FAILURE"; -const char *CRC_FAILURE_EVENT_STRING = "CRC_FAILURE_EVENT"; const char *SELF_TEST_I2C_FAILURE_STRING = "SELF_TEST_I2C_FAILURE"; const char *SELF_TEST_SPI_FAILURE_STRING = "SELF_TEST_SPI_FAILURE"; const char *SELF_TEST_ADC_FAILURE_STRING = "SELF_TEST_ADC_FAILURE"; @@ -146,290 +122,242 @@ const char *STR_HELPER_FILE_NOT_EXISTS_STRING = "STR_HELPER_FILE_NOT_EXISTS"; const char *STR_HELPER_SENDING_PACKET_FAILED_STRING = "STR_HELPER_SENDING_PACKET_FAILED"; const char *STR_HELPER_REQUESTING_MSG_FAILED_STRING = "STR_HELPER_REQUESTING_MSG_FAILED"; -const char *translateEvents(Event event) { - switch ((event & 0xffff)) { - case (2200): - return STORE_SEND_WRITE_FAILED_STRING; - case (2201): - return STORE_WRITE_FAILED_STRING; - case (2202): - return STORE_SEND_READ_FAILED_STRING; - case (2203): - return STORE_READ_FAILED_STRING; - case (2204): - return UNEXPECTED_MSG_STRING; - case (2205): - return STORING_FAILED_STRING; - case (2206): - return TM_DUMP_FAILED_STRING; - case (2207): - return STORE_INIT_FAILED_STRING; - case (2208): - return STORE_INIT_EMPTY_STRING; - case (2209): - return STORE_CONTENT_CORRUPTED_STRING; - case (2210): - return STORE_INITIALIZE_STRING; - case (2211): - return INIT_DONE_STRING; - case (2212): - return DUMP_FINISHED_STRING; - case (2213): - return DELETION_FINISHED_STRING; - case (2214): - return DELETION_FAILED_STRING; - case (2215): - return AUTO_CATALOGS_SENDING_FAILED_STRING; - case (2600): - return GET_DATA_FAILED_STRING; - case (2601): - return STORE_DATA_FAILED_STRING; - case (2800): - return DEVICE_BUILDING_COMMAND_FAILED_STRING; - case (2801): - return DEVICE_SENDING_COMMAND_FAILED_STRING; - case (2802): - return DEVICE_REQUESTING_REPLY_FAILED_STRING; - case (2803): - return DEVICE_READING_REPLY_FAILED_STRING; - case (2804): - return DEVICE_INTERPRETING_REPLY_FAILED_STRING; - case (2805): - return DEVICE_MISSED_REPLY_STRING; - case (2806): - return DEVICE_UNKNOWN_REPLY_STRING; - case (2807): - return DEVICE_UNREQUESTED_REPLY_STRING; - case (2808): - return INVALID_DEVICE_COMMAND_STRING; - case (2809): - return MONITORING_LIMIT_EXCEEDED_STRING; - case (2810): - return MONITORING_AMBIGUOUS_STRING; - case (4201): - return FUSE_CURRENT_HIGH_STRING; - case (4202): - return FUSE_WENT_OFF_STRING; - case (4204): - return POWER_ABOVE_HIGH_LIMIT_STRING; - case (4205): - return POWER_BELOW_LOW_LIMIT_STRING; - case (4300): - return SWITCH_WENT_OFF_STRING; - case (5000): - return HEATER_ON_STRING; - case (5001): - return HEATER_OFF_STRING; - case (5002): - return HEATER_TIMEOUT_STRING; - case (5003): - return HEATER_STAYED_ON_STRING; - case (5004): - return HEATER_STAYED_OFF_STRING; - case (5200): - return TEMP_SENSOR_HIGH_STRING; - case (5201): - return TEMP_SENSOR_LOW_STRING; - case (5202): - return TEMP_SENSOR_GRADIENT_STRING; - case (5901): - return COMPONENT_TEMP_LOW_STRING; - case (5902): - return COMPONENT_TEMP_HIGH_STRING; - case (5903): - return COMPONENT_TEMP_OOL_LOW_STRING; - case (5904): - return COMPONENT_TEMP_OOL_HIGH_STRING; - case (5905): - return TEMP_NOT_IN_OP_RANGE_STRING; - case (7101): - return FDIR_CHANGED_STATE_STRING; - case (7102): - return FDIR_STARTS_RECOVERY_STRING; - case (7103): - return FDIR_TURNS_OFF_DEVICE_STRING; - case (7201): - return MONITOR_CHANGED_STATE_STRING; - case (7202): - return VALUE_BELOW_LOW_LIMIT_STRING; - case (7203): - return VALUE_ABOVE_HIGH_LIMIT_STRING; - case (7204): - return VALUE_OUT_OF_RANGE_STRING; - case (7301): - return SWITCHING_TM_FAILED_STRING; - case (7400): - return CHANGING_MODE_STRING; - case (7401): - return MODE_INFO_STRING; - case (7402): - return FALLBACK_FAILED_STRING; - case (7403): - return MODE_TRANSITION_FAILED_STRING; - case (7404): - return CANT_KEEP_MODE_STRING; - case (7405): - return OBJECT_IN_INVALID_MODE_STRING; - case (7406): - return FORCING_MODE_STRING; - case (7407): - return MODE_CMD_REJECTED_STRING; - case (7506): - return HEALTH_INFO_STRING; - case (7507): - return CHILD_CHANGED_HEALTH_STRING; - case (7508): - return CHILD_PROBLEMS_STRING; - case (7509): - return OVERWRITING_HEALTH_STRING; - case (7510): - return TRYING_RECOVERY_STRING; - case (7511): - return RECOVERY_STEP_STRING; - case (7512): - return RECOVERY_DONE_STRING; - case (7900): - return RF_AVAILABLE_STRING; - case (7901): - return RF_LOST_STRING; - case (7902): - return BIT_LOCK_STRING; - case (7903): - return BIT_LOCK_LOST_STRING; - case (7905): - return FRAME_PROCESSING_FAILED_STRING; - case (8900): - return CLOCK_SET_STRING; - case (8901): - return CLOCK_SET_FAILURE_STRING; - case (9700): - return TEST_STRING; - case (10600): - return CHANGE_OF_SETUP_PARAMETER_STRING; - case (10900): - return GPIO_PULL_HIGH_FAILED_STRING; - case (10901): - return GPIO_PULL_LOW_FAILED_STRING; - case (10902): - return SWITCH_ALREADY_ON_STRING; - case (10903): - return SWITCH_ALREADY_OFF_STRING; - case (10904): - return MAIN_SWITCH_TIMEOUT_STRING; - case (11000): - return MAIN_SWITCH_ON_TIMEOUT_STRING; - case (11001): - return MAIN_SWITCH_OFF_TIMEOUT_STRING; - case (11002): - return DEPLOYMENT_FAILED_STRING; - case (11003): - return DEPL_SA1_GPIO_SWTICH_ON_FAILED_STRING; - case (11004): - return DEPL_SA2_GPIO_SWTICH_ON_FAILED_STRING; - case (11101): - return MEMORY_READ_RPT_CRC_FAILURE_STRING; - case (11102): - return ACK_FAILURE_STRING; - case (11103): - return EXE_FAILURE_STRING; - case (11104): - return CRC_FAILURE_EVENT_STRING; - case (11201): - return SELF_TEST_I2C_FAILURE_STRING; - case (11202): - return SELF_TEST_SPI_FAILURE_STRING; - case (11203): - return SELF_TEST_ADC_FAILURE_STRING; - case (11204): - return SELF_TEST_PWM_FAILURE_STRING; - case (11205): - return SELF_TEST_TC_FAILURE_STRING; - case (11206): - return SELF_TEST_MTM_RANGE_FAILURE_STRING; - case (11207): - return SELF_TEST_COIL_CURRENT_FAILURE_STRING; - case (11208): - return INVALID_ERROR_BYTE_STRING; - case (11301): - return ERROR_STATE_STRING; - case (11501): - return SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING; - case (11502): - return SUPV_ACK_FAILURE_STRING; - case (11503): - return SUPV_EXE_FAILURE_STRING; - case (11504): - return SUPV_CRC_FAILURE_EVENT_STRING; - case (11600): - return SANITIZATION_FAILED_STRING; - case (11700): - return UPDATE_FILE_NOT_EXISTS_STRING; - case (11701): - return ACTION_COMMANDING_FAILED_STRING; - case (11702): - return UPDATE_AVAILABLE_FAILED_STRING; - case (11703): - return UPDATE_TRANSFER_FAILED_STRING; - case (11704): - return UPDATE_VERIFY_FAILED_STRING; - case (11705): - return UPDATE_FINISHED_STRING; - case (11800): - return SEND_MRAM_DUMP_FAILED_STRING; - case (11801): - return MRAM_DUMP_FAILED_STRING; - case (11802): - return MRAM_DUMP_FINISHED_STRING; - case (11901): - return INVALID_TC_FRAME_STRING; - case (11902): - return INVALID_FAR_STRING; - case (11903): - return CARRIER_LOCK_STRING; - case (11904): - return BIT_LOCK_PDEC_STRING; - case (12000): - return IMAGE_UPLOAD_FAILED_STRING; - case (12001): - return IMAGE_DOWNLOAD_FAILED_STRING; - case (12002): - return IMAGE_UPLOAD_SUCCESSFUL_STRING; - case (12003): - return IMAGE_DOWNLOAD_SUCCESSFUL_STRING; - case (12004): - return FLASH_WRITE_SUCCESSFUL_STRING; - case (12005): - return FLASH_READ_SUCCESSFUL_STRING; - case (12006): - return FLASH_WRITE_FAILED_STRING; - case (12007): - return FLASH_READ_FAILED_STRING; - case (12008): - return FPGA_DOWNLOAD_SUCCESSFUL_STRING; - case (12009): - return FPGA_DOWNLOAD_FAILED_STRING; - case (12010): - return FPGA_UPLOAD_SUCCESSFUL_STRING; - case (12011): - return FPGA_UPLOAD_FAILED_STRING; - case (12012): - return STR_HELPER_READING_REPLY_FAILED_STRING; - case (12013): - return STR_HELPER_COM_ERROR_STRING; - case (12014): - return STR_HELPER_NO_REPLY_STRING; - case (12015): - return STR_HELPER_DEC_ERROR_STRING; - case (12016): - return POSITION_MISMATCH_STRING; - case (12017): - return STR_HELPER_FILE_NOT_EXISTS_STRING; - case (12018): - return STR_HELPER_SENDING_PACKET_FAILED_STRING; - case (12019): - return STR_HELPER_REQUESTING_MSG_FAILED_STRING; - default: - return "UNKNOWN_EVENT"; - } - return 0; +const char * translateEvents(Event event) { + switch( (event & 0xffff) ) { + case(2201): + return STORE_WRITE_FAILED_STRING; + case(2203): + return STORE_READ_FAILED_STRING; + case(2205): + return STORING_FAILED_STRING; + case(2208): + return STORE_INIT_EMPTY_STRING; + case(2211): + return INIT_DONE_STRING; + case(2212): + return DUMP_FINISHED_STRING; + case(2213): + return DELETION_FINISHED_STRING; + case(2214): + return DELETION_FAILED_STRING; + case(2600): + return GET_DATA_FAILED_STRING; + case(2601): + return STORE_DATA_FAILED_STRING; + case(2800): + return DEVICE_BUILDING_COMMAND_FAILED_STRING; + case(2801): + return DEVICE_SENDING_COMMAND_FAILED_STRING; + case(2802): + return DEVICE_REQUESTING_REPLY_FAILED_STRING; + case(2803): + return DEVICE_READING_REPLY_FAILED_STRING; + case(2804): + return DEVICE_INTERPRETING_REPLY_FAILED_STRING; + case(2805): + return DEVICE_MISSED_REPLY_STRING; + case(2806): + return DEVICE_UNKNOWN_REPLY_STRING; + case(2807): + return DEVICE_UNREQUESTED_REPLY_STRING; + case(2808): + return INVALID_DEVICE_COMMAND_STRING; + case(2809): + return MONITORING_LIMIT_EXCEEDED_STRING; + case(2810): + return MONITORING_AMBIGUOUS_STRING; + case(2811): + return DEVICE_WANTS_HARD_REBOOT_STRING; + case(4201): + return FUSE_CURRENT_HIGH_STRING; + case(4300): + return SWITCH_WENT_OFF_STRING; + case(5000): + return HEATER_ON_STRING; + case(5001): + return HEATER_OFF_STRING; + case(5002): + return HEATER_TIMEOUT_STRING; + case(5003): + return HEATER_STAYED_ON_STRING; + case(5004): + return HEATER_STAYED_OFF_STRING; + case(5200): + return TEMP_SENSOR_HIGH_STRING; + case(5201): + return TEMP_SENSOR_LOW_STRING; + case(5202): + return TEMP_SENSOR_GRADIENT_STRING; + case(5901): + return COMPONENT_TEMP_LOW_STRING; + case(5902): + return COMPONENT_TEMP_HIGH_STRING; + case(5903): + return COMPONENT_TEMP_OOL_LOW_STRING; + case(5904): + return COMPONENT_TEMP_OOL_HIGH_STRING; + case(5905): + return TEMP_NOT_IN_OP_RANGE_STRING; + case(7102): + return FDIR_STARTS_RECOVERY_STRING; + case(7103): + return FDIR_TURNS_OFF_DEVICE_STRING; + case(7201): + return MONITOR_CHANGED_STATE_STRING; + case(7202): + return VALUE_BELOW_LOW_LIMIT_STRING; + case(7203): + return VALUE_ABOVE_HIGH_LIMIT_STRING; + case(7204): + return VALUE_OUT_OF_RANGE_STRING; + case(7401): + return MODE_INFO_STRING; + case(7402): + return FALLBACK_FAILED_STRING; + case(7403): + return MODE_TRANSITION_FAILED_STRING; + case(7404): + return CANT_KEEP_MODE_STRING; + case(7406): + return FORCING_MODE_STRING; + case(7506): + return HEALTH_INFO_STRING; + case(7507): + return CHILD_CHANGED_HEALTH_STRING; + case(7508): + return CHILD_PROBLEMS_STRING; + case(7512): + return RECOVERY_DONE_STRING; + case(7900): + return RF_AVAILABLE_STRING; + case(7901): + return RF_LOST_STRING; + case(7902): + return BIT_LOCK_STRING; + case(7903): + return BIT_LOCK_LOST_STRING; + case(7905): + return FRAME_PROCESSING_FAILED_STRING; + case(9700): + return TEST_STRING; + case(10600): + return CHANGE_OF_SETUP_PARAMETER_STRING; + case(10900): + return GPIO_PULL_HIGH_FAILED_STRING; + case(10901): + return GPIO_PULL_LOW_FAILED_STRING; + case(10902): + return SWITCH_ALREADY_ON_STRING; + case(10903): + return SWITCH_ALREADY_OFF_STRING; + case(10904): + return MAIN_SWITCH_TIMEOUT_STRING; + case(11000): + return MAIN_SWITCH_ON_TIMEOUT_STRING; + case(11001): + return MAIN_SWITCH_OFF_TIMEOUT_STRING; + case(11002): + return DEPLOYMENT_FAILED_STRING; + case(11003): + return DEPL_SA1_GPIO_SWTICH_ON_FAILED_STRING; + case(11004): + return DEPL_SA2_GPIO_SWTICH_ON_FAILED_STRING; + case(11201): + return SELF_TEST_I2C_FAILURE_STRING; + case(11202): + return SELF_TEST_SPI_FAILURE_STRING; + case(11203): + return SELF_TEST_ADC_FAILURE_STRING; + case(11204): + return SELF_TEST_PWM_FAILURE_STRING; + case(11205): + return SELF_TEST_TC_FAILURE_STRING; + case(11206): + return SELF_TEST_MTM_RANGE_FAILURE_STRING; + case(11207): + return SELF_TEST_COIL_CURRENT_FAILURE_STRING; + case(11208): + return INVALID_ERROR_BYTE_STRING; + case(11301): + return ERROR_STATE_STRING; + case(11501): + return SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING; + case(11502): + return SUPV_ACK_FAILURE_STRING; + case(11503): + return SUPV_EXE_FAILURE_STRING; + case(11504): + return SUPV_CRC_FAILURE_EVENT_STRING; + case(11600): + return SANITIZATION_FAILED_STRING; + case(11700): + return UPDATE_FILE_NOT_EXISTS_STRING; + case(11701): + return ACTION_COMMANDING_FAILED_STRING; + case(11702): + return UPDATE_AVAILABLE_FAILED_STRING; + case(11703): + return UPDATE_TRANSFER_FAILED_STRING; + case(11704): + return UPDATE_VERIFY_FAILED_STRING; + case(11705): + return UPDATE_FINISHED_STRING; + case(11800): + return SEND_MRAM_DUMP_FAILED_STRING; + case(11801): + return MRAM_DUMP_FAILED_STRING; + case(11802): + return MRAM_DUMP_FINISHED_STRING; + case(11901): + return INVALID_TC_FRAME_STRING; + case(11902): + return INVALID_FAR_STRING; + case(11903): + return CARRIER_LOCK_STRING; + case(11904): + return BIT_LOCK_PDEC_STRING; + case(12000): + return IMAGE_UPLOAD_FAILED_STRING; + case(12001): + return IMAGE_DOWNLOAD_FAILED_STRING; + case(12002): + return IMAGE_UPLOAD_SUCCESSFUL_STRING; + case(12003): + return IMAGE_DOWNLOAD_SUCCESSFUL_STRING; + case(12004): + return FLASH_WRITE_SUCCESSFUL_STRING; + case(12005): + return FLASH_READ_SUCCESSFUL_STRING; + case(12006): + return FLASH_WRITE_FAILED_STRING; + case(12007): + return FLASH_READ_FAILED_STRING; + case(12008): + return FPGA_DOWNLOAD_SUCCESSFUL_STRING; + case(12009): + return FPGA_DOWNLOAD_FAILED_STRING; + case(12010): + return FPGA_UPLOAD_SUCCESSFUL_STRING; + case(12011): + return FPGA_UPLOAD_FAILED_STRING; + case(12012): + return STR_HELPER_READING_REPLY_FAILED_STRING; + case(12013): + return STR_HELPER_COM_ERROR_STRING; + case(12014): + return STR_HELPER_NO_REPLY_STRING; + case(12015): + return STR_HELPER_DEC_ERROR_STRING; + case(12016): + return POSITION_MISMATCH_STRING; + case(12017): + return STR_HELPER_FILE_NOT_EXISTS_STRING; + case(12018): + return STR_HELPER_SENDING_PACKET_FAILED_STRING; + case(12019): + return STR_HELPER_REQUESTING_MSG_FAILED_STRING; + default: + return "UNKNOWN_EVENT"; + } + return 0; } diff --git a/linux/fsfwconfig/events/translateEvents.h b/linux/fsfwconfig/events/translateEvents.h index 1b8a8831..bdabb21b 100644 --- a/linux/fsfwconfig/events/translateEvents.h +++ b/linux/fsfwconfig/events/translateEvents.h @@ -3,6 +3,6 @@ #include "fsfw/events/Event.h" -const char* translateEvents(Event event); +const char * translateEvents(Event event); #endif /* FSFWCONFIG_EVENTS_TRANSLATEEVENTS_H_ */ From e142408bb82e77ba9b37b4009c923e41f8755367 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 3 Feb 2022 13:37:48 +0100 Subject: [PATCH 26/39] bpx handler now working --- bsp_q7s/core/InitMission.cpp | 11 +- bsp_q7s/core/ObjectFactory.cpp | 4 + fsfw | 2 +- linux/boardtest/I2cTestClass.cpp | 101 +++- linux/boardtest/I2cTestClass.h | 29 +- linux/boardtest/UartTestClass.cpp | 29 +- linux/boardtest/UartTestClass.h | 9 + linux/fsfwconfig/FSFWConfig.h.in | 1 + linux/fsfwconfig/OBSWConfig.h.in | 4 +- linux/fsfwconfig/events/translateEvents.cpp | 476 +++++++++--------- linux/fsfwconfig/events/translateEvents.h | 2 +- linux/fsfwconfig/objects/systemObjectList.h | 1 + linux/fsfwconfig/objects/translateObjects.cpp | 452 ++++++++--------- mission/devices/BpxBatteryHandler.cpp | 68 +-- .../devicedefinitions/BpxBatteryDefinitions.h | 3 +- 15 files changed, 678 insertions(+), 514 deletions(-) diff --git a/bsp_q7s/core/InitMission.cpp b/bsp_q7s/core/InitMission.cpp index bceb303d..f7ecc7fd 100644 --- a/bsp_q7s/core/InitMission.cpp +++ b/bsp_q7s/core/InitMission.cpp @@ -248,6 +248,8 @@ void initmission::createPstTasks(TaskFactory& factory, sif::error << "InitMission::initTasks: Creating PST failed!" << std::endl; } taskVec.push_back(gpioPst); + +#if OBSW_ADD_I2C_TEST_CODE == 0 FixedTimeslotTaskIF* i2cPst = factory.createFixedTimeslotTask( "I2C_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.2, missedDeadlineFunc); result = pst::pstI2c(i2cPst); @@ -255,6 +257,7 @@ void initmission::createPstTasks(TaskFactory& factory, sif::error << "InitMission::initTasks: Creating PST failed!" << std::endl; } taskVec.push_back(i2cPst); +#endif FixedTimeslotTaskIF* gomSpacePstTask = factory.createFixedTimeslotTask( "GS_PST_TASK", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 1.0, missedDeadlineFunc); @@ -348,7 +351,7 @@ void initmission::createTestTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc, std::vector& taskVec) { #if OBSW_ADD_TEST_TASK == 1 || OBSW_ADD_SPI_TEST_CODE == 1 || \ - (BOARD_TE0720 == 1 && OBSW_TEST_LIBGPIOD == 1) + OBSW_ADD_I2C_TEST_CODE == 1 || (BOARD_TE0720 == 1 && OBSW_TEST_LIBGPIOD == 1) ReturnValue_t result = HasReturnvaluesIF::RETURN_OK; #endif PeriodicTaskIF* testTask = factory.createPeriodicTask( @@ -366,6 +369,12 @@ void initmission::createTestTasks(TaskFactory& factory, initmission::printAddObjectError("SPI_TEST", objects::SPI_TEST); } #endif +#if OBSW_ADD_I2C_TEST_CODE == 1 + result = testTask->addComponent(objects::I2C_TEST); + if (result != HasReturnvaluesIF::RETURN_OK) { + initmission::printAddObjectError("I2C_TEST", objects::I2C_TEST); + } +#endif #if BOARD_TE0720 == 1 && OBSW_TEST_LIBGPIOD == 1 result = testTask->addComponent(objects::LIBGPIOD_TEST); if (result != HasReturnvaluesIF::RETURN_OK) { diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index f4a594b8..3e515bca 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -1,3 +1,4 @@ +#include #include "ObjectFactory.h" #include @@ -1130,4 +1131,7 @@ void ObjectFactory::createTestComponents(LinuxLibgpioIF* gpioComIF) { #if OBSW_ADD_SPI_TEST_CODE == 1 new SpiTestClass(objects::SPI_TEST, gpioComIF); #endif +#if OBSW_ADD_I2C_TEST_CODE == 1 + new I2cTestClass(objects::I2C_TEST, q7s::I2C_DEFAULT_DEV); +#endif } diff --git a/fsfw b/fsfw index fca48257..b3151a0b 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit fca48257b7a156f4563d5a5a6ca71b0ab98bb9fc +Subproject commit b3151a0ba033e7c72c3ead1e8958d7be596baa45 diff --git a/linux/boardtest/I2cTestClass.cpp b/linux/boardtest/I2cTestClass.cpp index 090691e2..d3017b1b 100644 --- a/linux/boardtest/I2cTestClass.cpp +++ b/linux/boardtest/I2cTestClass.cpp @@ -1,5 +1,100 @@ -#include +#include "I2cTestClass.h" +#include +#include "fsfw/serviceinterface.h" +#include "fsfw/globalfunctions/arrayprinter.h" -I2cTestClass::I2cTestClass(object_id_t objectId) : TestTask(objectId) {} +#include +#include +#include -ReturnValue_t I2cTestClass::performPeriodicAction() { return HasReturnvaluesIF::RETURN_OK; } +I2cTestClass::I2cTestClass(object_id_t objectId, std::string i2cdev) + : TestTask(objectId), i2cdev(i2cdev) { + mode = TestModes::BPX_BATTERY; +} + +ReturnValue_t I2cTestClass::initialize() { + if(mode == TestModes::BPX_BATTERY) { + battInit(); + } + return HasReturnvaluesIF::RETURN_OK; +} + +ReturnValue_t I2cTestClass::performPeriodicAction() { + if(mode == TestModes::BPX_BATTERY) { + battPeriodic(); + } + return HasReturnvaluesIF::RETURN_OK; +} + +void I2cTestClass::battInit() { + sif::info << "I2cTestClass: BPX Initialization" << std::endl; + UnixFileGuard fileHelper(i2cdev, &bpxInfo.fd, O_RDWR, "I2cTestClass::sendMessage"); + if (fileHelper.getOpenResult() != HasReturnvaluesIF::RETURN_OK) { + sif::error << "Opening I2C device" << i2cdev << " failed" << std::endl; + return; + } + if(ioctl(bpxInfo.fd, I2C_SLAVE, bpxInfo.addr) < 0) { + sif::error << "Failed to acquire bus access and/or talk to slave" << std::endl; + } + cmdBuf[0] = BpxBattery::PORT_PING; + cmdBuf[1] = 0x42; + sendLen = 2; + ReturnValue_t result = i2cWrite(bpxInfo.fd, cmdBuf.data(), sendLen); + if(result != HasReturnvaluesIF::RETURN_OK) { + return; + } + // Receive back port, error byte and ping reply + recvLen = 3; + result = i2cRead(bpxInfo.fd, replyBuf.data(), recvLen); + if(result != HasReturnvaluesIF::RETURN_OK) { + return; + } + sif::info << "Ping reply:" << std::endl; + arrayprinter::print(replyBuf.data(), recvLen); + if(replyBuf[2] != 0x42) { + sif::warning << "Received ping reply not expected value 0x42" << std::endl; + } +} + +void I2cTestClass::battPeriodic() { + UnixFileGuard fileHelper(i2cdev, &bpxInfo.fd, O_RDWR, "I2cTestClass::sendMessage"); + if (fileHelper.getOpenResult() != HasReturnvaluesIF::RETURN_OK) { + sif::error << "Opening I2C device" << i2cdev << " failed" << std::endl; + return; + } + if(ioctl(bpxInfo.fd, I2C_SLAVE, bpxInfo.addr) < 0) { + sif::error << "Failed to acquire bus access and/or talk to slave" << std::endl; + } + cmdBuf[0] = BpxBattery::PORT_GET_HK; + sendLen = 1; + ReturnValue_t result = i2cWrite(bpxInfo.fd, cmdBuf.data(), sendLen); + if(result != HasReturnvaluesIF::RETURN_OK) { + return; + } + // Receive back HK set + recvLen = 23; + result = i2cRead(bpxInfo.fd, replyBuf.data(), recvLen); + if(result != HasReturnvaluesIF::RETURN_OK) { + return; + } + sif::info << "HK reply:" << std::endl; + arrayprinter::print(replyBuf.data(), recvLen); +} + +ReturnValue_t I2cTestClass::i2cWrite(int fd, uint8_t* data, size_t len) { + if (write(fd, data, len) != static_cast(len)) { + sif::error << "Failed to write to I2C bus" << std::endl; + sif::error << "Error " << errno << ": " << strerror(errno) << std::endl; + return HasReturnvaluesIF::RETURN_FAILED; + } + return HasReturnvaluesIF::RETURN_OK; +} + +ReturnValue_t I2cTestClass::i2cRead(int fd, uint8_t* data, size_t len) { + if( read (fd, data, len) != static_cast(len)) { + sif::error << "Failed to read from I2C bus" << std::endl; + sif::error << "Error " << errno << ": " << strerror(errno) << std::endl; + return HasReturnvaluesIF::RETURN_FAILED; + } + return HasReturnvaluesIF::RETURN_OK; +} diff --git a/linux/boardtest/I2cTestClass.h b/linux/boardtest/I2cTestClass.h index 314f9dda..5db58797 100644 --- a/linux/boardtest/I2cTestClass.h +++ b/linux/boardtest/I2cTestClass.h @@ -3,13 +3,40 @@ #include +#include "mission/devices/devicedefinitions/BpxBatteryDefinitions.h" +#include +#include + class I2cTestClass : public TestTask { public: - I2cTestClass(object_id_t objectId); + I2cTestClass(object_id_t objectId, std::string i2cdev); + ReturnValue_t initialize() override; ReturnValue_t performPeriodicAction() override; private: + enum TestModes { + NONE, + BPX_BATTERY + }; + struct I2cInfo { + int addr = 0; + int fd = 0; + }; + + TestModes mode = TestModes::NONE; + void battInit(); + void battPeriodic(); + + I2cInfo bpxInfo = { .addr = 0x07, .fd = 0 }; + std::string i2cdev; + size_t sendLen = 0; + size_t recvLen = 0; + std::array cmdBuf = {}; + std::array replyBuf = {}; + + ReturnValue_t i2cWrite(int fd, uint8_t* data, size_t len); + ReturnValue_t i2cRead(int fd, uint8_t* data, size_t len); }; #endif /* LINUX_BOARDTEST_I2CTESTCLASS_H_ */ diff --git a/linux/boardtest/UartTestClass.cpp b/linux/boardtest/UartTestClass.cpp index 9b20ad13..37e0a6f1 100644 --- a/linux/boardtest/UartTestClass.cpp +++ b/linux/boardtest/UartTestClass.cpp @@ -17,6 +17,25 @@ UartTestClass::UartTestClass(object_id_t objectId) : TestTask(objectId) {} ReturnValue_t UartTestClass::initialize() { + if (mode == TestModes::GPS) { + gpsInit(); + } + + return HasReturnvaluesIF::RETURN_OK; +} + +ReturnValue_t UartTestClass::performOneShotAction() { + return HasReturnvaluesIF::RETURN_OK; +} + +ReturnValue_t UartTestClass::performPeriodicAction() { + if(mode == TestModes::GPS) { + gpsPeriodic(); + } + return HasReturnvaluesIF::RETURN_OK; +} + +void UartTestClass::gpsInit() { #if RPI_TEST_GPS_DEVICE == 1 int result = lwgps_init(&gpsData); if (result == 0) { @@ -62,16 +81,9 @@ ReturnValue_t UartTestClass::initialize() { // Flush received and unread data. Those are old NMEA strings which are not relevant anymore tcflush(serialPort, TCIFLUSH); #endif - return HasReturnvaluesIF::RETURN_OK; } -ReturnValue_t UartTestClass::performOneShotAction() { -#if RPI_TEST_GPS_DEVICE == 1 -#endif - return HasReturnvaluesIF::RETURN_OK; -} - -ReturnValue_t UartTestClass::performPeriodicAction() { +void UartTestClass::gpsPeriodic() { #if RPI_TEST_GPS_DEVICE == 1 int bytesRead = 0; do { @@ -107,5 +119,4 @@ ReturnValue_t UartTestClass::performPeriodicAction() { } } while (bytesRead > 0); #endif - return HasReturnvaluesIF::RETURN_OK; } diff --git a/linux/boardtest/UartTestClass.h b/linux/boardtest/UartTestClass.h index f32d909d..fb0e2501 100644 --- a/linux/boardtest/UartTestClass.h +++ b/linux/boardtest/UartTestClass.h @@ -17,6 +17,15 @@ class UartTestClass : public TestTask { ReturnValue_t performPeriodicAction() override; private: + enum TestModes { + GPS, + // Solar Cell Experiment + SCE + }; + + void gpsInit(); + void gpsPeriodic(); + TestModes mode = TestModes::GPS; lwgps_t gpsData = {}; struct termios tty = {}; int serialPort = 0; diff --git a/linux/fsfwconfig/FSFWConfig.h.in b/linux/fsfwconfig/FSFWConfig.h.in index 9e8f2016..9db84254 100644 --- a/linux/fsfwconfig/FSFWConfig.h.in +++ b/linux/fsfwconfig/FSFWConfig.h.in @@ -73,6 +73,7 @@ static constexpr size_t FSFW_MAX_TM_PACKET_SIZE = 2048; } #define FSFW_HAL_SPI_WIRETAPPING 0 +#define FSFW_HAL_I2C_WIRETAPPING 0 #define FSFW_DEV_HYPERION_GPS_CREATE_NMEA_CSV 0 #define FSFW_HAL_L3GD20_GYRO_DEBUG 0 diff --git a/linux/fsfwconfig/OBSWConfig.h.in b/linux/fsfwconfig/OBSWConfig.h.in index 9667b6fd..df1bad64 100644 --- a/linux/fsfwconfig/OBSWConfig.h.in +++ b/linux/fsfwconfig/OBSWConfig.h.in @@ -66,9 +66,11 @@ debugging. */ #define OBSW_SWITCH_TO_NORMAL_MODE_AFTER_STARTUP 1 #define OBSW_PRINT_MISSED_DEADLINES 1 -// If this is enabled, all other SPI code should be disabled #define OBSW_ADD_TEST_CODE 0 +// If this is enabled, all other SPI code should be disabled #define OBSW_ADD_SPI_TEST_CODE 0 +// If this is enabled, all other I2C code should be disabled +#define OBSW_ADD_I2C_TEST_CODE 0 #define OBSW_ADD_TEST_PST 0 #define OBSW_ADD_TEST_TASK 0 #define OBSW_TEST_LIBGPIOD 0 diff --git a/linux/fsfwconfig/events/translateEvents.cpp b/linux/fsfwconfig/events/translateEvents.cpp index 70e0c2a7..787020ed 100644 --- a/linux/fsfwconfig/events/translateEvents.cpp +++ b/linux/fsfwconfig/events/translateEvents.cpp @@ -122,242 +122,242 @@ const char *STR_HELPER_FILE_NOT_EXISTS_STRING = "STR_HELPER_FILE_NOT_EXISTS"; const char *STR_HELPER_SENDING_PACKET_FAILED_STRING = "STR_HELPER_SENDING_PACKET_FAILED"; const char *STR_HELPER_REQUESTING_MSG_FAILED_STRING = "STR_HELPER_REQUESTING_MSG_FAILED"; -const char * translateEvents(Event event) { - switch( (event & 0xffff) ) { - case(2201): - return STORE_WRITE_FAILED_STRING; - case(2203): - return STORE_READ_FAILED_STRING; - case(2205): - return STORING_FAILED_STRING; - case(2208): - return STORE_INIT_EMPTY_STRING; - case(2211): - return INIT_DONE_STRING; - case(2212): - return DUMP_FINISHED_STRING; - case(2213): - return DELETION_FINISHED_STRING; - case(2214): - return DELETION_FAILED_STRING; - case(2600): - return GET_DATA_FAILED_STRING; - case(2601): - return STORE_DATA_FAILED_STRING; - case(2800): - return DEVICE_BUILDING_COMMAND_FAILED_STRING; - case(2801): - return DEVICE_SENDING_COMMAND_FAILED_STRING; - case(2802): - return DEVICE_REQUESTING_REPLY_FAILED_STRING; - case(2803): - return DEVICE_READING_REPLY_FAILED_STRING; - case(2804): - return DEVICE_INTERPRETING_REPLY_FAILED_STRING; - case(2805): - return DEVICE_MISSED_REPLY_STRING; - case(2806): - return DEVICE_UNKNOWN_REPLY_STRING; - case(2807): - return DEVICE_UNREQUESTED_REPLY_STRING; - case(2808): - return INVALID_DEVICE_COMMAND_STRING; - case(2809): - return MONITORING_LIMIT_EXCEEDED_STRING; - case(2810): - return MONITORING_AMBIGUOUS_STRING; - case(2811): - return DEVICE_WANTS_HARD_REBOOT_STRING; - case(4201): - return FUSE_CURRENT_HIGH_STRING; - case(4300): - return SWITCH_WENT_OFF_STRING; - case(5000): - return HEATER_ON_STRING; - case(5001): - return HEATER_OFF_STRING; - case(5002): - return HEATER_TIMEOUT_STRING; - case(5003): - return HEATER_STAYED_ON_STRING; - case(5004): - return HEATER_STAYED_OFF_STRING; - case(5200): - return TEMP_SENSOR_HIGH_STRING; - case(5201): - return TEMP_SENSOR_LOW_STRING; - case(5202): - return TEMP_SENSOR_GRADIENT_STRING; - case(5901): - return COMPONENT_TEMP_LOW_STRING; - case(5902): - return COMPONENT_TEMP_HIGH_STRING; - case(5903): - return COMPONENT_TEMP_OOL_LOW_STRING; - case(5904): - return COMPONENT_TEMP_OOL_HIGH_STRING; - case(5905): - return TEMP_NOT_IN_OP_RANGE_STRING; - case(7102): - return FDIR_STARTS_RECOVERY_STRING; - case(7103): - return FDIR_TURNS_OFF_DEVICE_STRING; - case(7201): - return MONITOR_CHANGED_STATE_STRING; - case(7202): - return VALUE_BELOW_LOW_LIMIT_STRING; - case(7203): - return VALUE_ABOVE_HIGH_LIMIT_STRING; - case(7204): - return VALUE_OUT_OF_RANGE_STRING; - case(7401): - return MODE_INFO_STRING; - case(7402): - return FALLBACK_FAILED_STRING; - case(7403): - return MODE_TRANSITION_FAILED_STRING; - case(7404): - return CANT_KEEP_MODE_STRING; - case(7406): - return FORCING_MODE_STRING; - case(7506): - return HEALTH_INFO_STRING; - case(7507): - return CHILD_CHANGED_HEALTH_STRING; - case(7508): - return CHILD_PROBLEMS_STRING; - case(7512): - return RECOVERY_DONE_STRING; - case(7900): - return RF_AVAILABLE_STRING; - case(7901): - return RF_LOST_STRING; - case(7902): - return BIT_LOCK_STRING; - case(7903): - return BIT_LOCK_LOST_STRING; - case(7905): - return FRAME_PROCESSING_FAILED_STRING; - case(9700): - return TEST_STRING; - case(10600): - return CHANGE_OF_SETUP_PARAMETER_STRING; - case(10900): - return GPIO_PULL_HIGH_FAILED_STRING; - case(10901): - return GPIO_PULL_LOW_FAILED_STRING; - case(10902): - return SWITCH_ALREADY_ON_STRING; - case(10903): - return SWITCH_ALREADY_OFF_STRING; - case(10904): - return MAIN_SWITCH_TIMEOUT_STRING; - case(11000): - return MAIN_SWITCH_ON_TIMEOUT_STRING; - case(11001): - return MAIN_SWITCH_OFF_TIMEOUT_STRING; - case(11002): - return DEPLOYMENT_FAILED_STRING; - case(11003): - return DEPL_SA1_GPIO_SWTICH_ON_FAILED_STRING; - case(11004): - return DEPL_SA2_GPIO_SWTICH_ON_FAILED_STRING; - case(11201): - return SELF_TEST_I2C_FAILURE_STRING; - case(11202): - return SELF_TEST_SPI_FAILURE_STRING; - case(11203): - return SELF_TEST_ADC_FAILURE_STRING; - case(11204): - return SELF_TEST_PWM_FAILURE_STRING; - case(11205): - return SELF_TEST_TC_FAILURE_STRING; - case(11206): - return SELF_TEST_MTM_RANGE_FAILURE_STRING; - case(11207): - return SELF_TEST_COIL_CURRENT_FAILURE_STRING; - case(11208): - return INVALID_ERROR_BYTE_STRING; - case(11301): - return ERROR_STATE_STRING; - case(11501): - return SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING; - case(11502): - return SUPV_ACK_FAILURE_STRING; - case(11503): - return SUPV_EXE_FAILURE_STRING; - case(11504): - return SUPV_CRC_FAILURE_EVENT_STRING; - case(11600): - return SANITIZATION_FAILED_STRING; - case(11700): - return UPDATE_FILE_NOT_EXISTS_STRING; - case(11701): - return ACTION_COMMANDING_FAILED_STRING; - case(11702): - return UPDATE_AVAILABLE_FAILED_STRING; - case(11703): - return UPDATE_TRANSFER_FAILED_STRING; - case(11704): - return UPDATE_VERIFY_FAILED_STRING; - case(11705): - return UPDATE_FINISHED_STRING; - case(11800): - return SEND_MRAM_DUMP_FAILED_STRING; - case(11801): - return MRAM_DUMP_FAILED_STRING; - case(11802): - return MRAM_DUMP_FINISHED_STRING; - case(11901): - return INVALID_TC_FRAME_STRING; - case(11902): - return INVALID_FAR_STRING; - case(11903): - return CARRIER_LOCK_STRING; - case(11904): - return BIT_LOCK_PDEC_STRING; - case(12000): - return IMAGE_UPLOAD_FAILED_STRING; - case(12001): - return IMAGE_DOWNLOAD_FAILED_STRING; - case(12002): - return IMAGE_UPLOAD_SUCCESSFUL_STRING; - case(12003): - return IMAGE_DOWNLOAD_SUCCESSFUL_STRING; - case(12004): - return FLASH_WRITE_SUCCESSFUL_STRING; - case(12005): - return FLASH_READ_SUCCESSFUL_STRING; - case(12006): - return FLASH_WRITE_FAILED_STRING; - case(12007): - return FLASH_READ_FAILED_STRING; - case(12008): - return FPGA_DOWNLOAD_SUCCESSFUL_STRING; - case(12009): - return FPGA_DOWNLOAD_FAILED_STRING; - case(12010): - return FPGA_UPLOAD_SUCCESSFUL_STRING; - case(12011): - return FPGA_UPLOAD_FAILED_STRING; - case(12012): - return STR_HELPER_READING_REPLY_FAILED_STRING; - case(12013): - return STR_HELPER_COM_ERROR_STRING; - case(12014): - return STR_HELPER_NO_REPLY_STRING; - case(12015): - return STR_HELPER_DEC_ERROR_STRING; - case(12016): - return POSITION_MISMATCH_STRING; - case(12017): - return STR_HELPER_FILE_NOT_EXISTS_STRING; - case(12018): - return STR_HELPER_SENDING_PACKET_FAILED_STRING; - case(12019): - return STR_HELPER_REQUESTING_MSG_FAILED_STRING; - default: - return "UNKNOWN_EVENT"; - } - return 0; +const char *translateEvents(Event event) { + switch ((event & 0xffff)) { + case (2201): + return STORE_WRITE_FAILED_STRING; + case (2203): + return STORE_READ_FAILED_STRING; + case (2205): + return STORING_FAILED_STRING; + case (2208): + return STORE_INIT_EMPTY_STRING; + case (2211): + return INIT_DONE_STRING; + case (2212): + return DUMP_FINISHED_STRING; + case (2213): + return DELETION_FINISHED_STRING; + case (2214): + return DELETION_FAILED_STRING; + case (2600): + return GET_DATA_FAILED_STRING; + case (2601): + return STORE_DATA_FAILED_STRING; + case (2800): + return DEVICE_BUILDING_COMMAND_FAILED_STRING; + case (2801): + return DEVICE_SENDING_COMMAND_FAILED_STRING; + case (2802): + return DEVICE_REQUESTING_REPLY_FAILED_STRING; + case (2803): + return DEVICE_READING_REPLY_FAILED_STRING; + case (2804): + return DEVICE_INTERPRETING_REPLY_FAILED_STRING; + case (2805): + return DEVICE_MISSED_REPLY_STRING; + case (2806): + return DEVICE_UNKNOWN_REPLY_STRING; + case (2807): + return DEVICE_UNREQUESTED_REPLY_STRING; + case (2808): + return INVALID_DEVICE_COMMAND_STRING; + case (2809): + return MONITORING_LIMIT_EXCEEDED_STRING; + case (2810): + return MONITORING_AMBIGUOUS_STRING; + case (2811): + return DEVICE_WANTS_HARD_REBOOT_STRING; + case (4201): + return FUSE_CURRENT_HIGH_STRING; + case (4300): + return SWITCH_WENT_OFF_STRING; + case (5000): + return HEATER_ON_STRING; + case (5001): + return HEATER_OFF_STRING; + case (5002): + return HEATER_TIMEOUT_STRING; + case (5003): + return HEATER_STAYED_ON_STRING; + case (5004): + return HEATER_STAYED_OFF_STRING; + case (5200): + return TEMP_SENSOR_HIGH_STRING; + case (5201): + return TEMP_SENSOR_LOW_STRING; + case (5202): + return TEMP_SENSOR_GRADIENT_STRING; + case (5901): + return COMPONENT_TEMP_LOW_STRING; + case (5902): + return COMPONENT_TEMP_HIGH_STRING; + case (5903): + return COMPONENT_TEMP_OOL_LOW_STRING; + case (5904): + return COMPONENT_TEMP_OOL_HIGH_STRING; + case (5905): + return TEMP_NOT_IN_OP_RANGE_STRING; + case (7102): + return FDIR_STARTS_RECOVERY_STRING; + case (7103): + return FDIR_TURNS_OFF_DEVICE_STRING; + case (7201): + return MONITOR_CHANGED_STATE_STRING; + case (7202): + return VALUE_BELOW_LOW_LIMIT_STRING; + case (7203): + return VALUE_ABOVE_HIGH_LIMIT_STRING; + case (7204): + return VALUE_OUT_OF_RANGE_STRING; + case (7401): + return MODE_INFO_STRING; + case (7402): + return FALLBACK_FAILED_STRING; + case (7403): + return MODE_TRANSITION_FAILED_STRING; + case (7404): + return CANT_KEEP_MODE_STRING; + case (7406): + return FORCING_MODE_STRING; + case (7506): + return HEALTH_INFO_STRING; + case (7507): + return CHILD_CHANGED_HEALTH_STRING; + case (7508): + return CHILD_PROBLEMS_STRING; + case (7512): + return RECOVERY_DONE_STRING; + case (7900): + return RF_AVAILABLE_STRING; + case (7901): + return RF_LOST_STRING; + case (7902): + return BIT_LOCK_STRING; + case (7903): + return BIT_LOCK_LOST_STRING; + case (7905): + return FRAME_PROCESSING_FAILED_STRING; + case (9700): + return TEST_STRING; + case (10600): + return CHANGE_OF_SETUP_PARAMETER_STRING; + case (10900): + return GPIO_PULL_HIGH_FAILED_STRING; + case (10901): + return GPIO_PULL_LOW_FAILED_STRING; + case (10902): + return SWITCH_ALREADY_ON_STRING; + case (10903): + return SWITCH_ALREADY_OFF_STRING; + case (10904): + return MAIN_SWITCH_TIMEOUT_STRING; + case (11000): + return MAIN_SWITCH_ON_TIMEOUT_STRING; + case (11001): + return MAIN_SWITCH_OFF_TIMEOUT_STRING; + case (11002): + return DEPLOYMENT_FAILED_STRING; + case (11003): + return DEPL_SA1_GPIO_SWTICH_ON_FAILED_STRING; + case (11004): + return DEPL_SA2_GPIO_SWTICH_ON_FAILED_STRING; + case (11201): + return SELF_TEST_I2C_FAILURE_STRING; + case (11202): + return SELF_TEST_SPI_FAILURE_STRING; + case (11203): + return SELF_TEST_ADC_FAILURE_STRING; + case (11204): + return SELF_TEST_PWM_FAILURE_STRING; + case (11205): + return SELF_TEST_TC_FAILURE_STRING; + case (11206): + return SELF_TEST_MTM_RANGE_FAILURE_STRING; + case (11207): + return SELF_TEST_COIL_CURRENT_FAILURE_STRING; + case (11208): + return INVALID_ERROR_BYTE_STRING; + case (11301): + return ERROR_STATE_STRING; + case (11501): + return SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING; + case (11502): + return SUPV_ACK_FAILURE_STRING; + case (11503): + return SUPV_EXE_FAILURE_STRING; + case (11504): + return SUPV_CRC_FAILURE_EVENT_STRING; + case (11600): + return SANITIZATION_FAILED_STRING; + case (11700): + return UPDATE_FILE_NOT_EXISTS_STRING; + case (11701): + return ACTION_COMMANDING_FAILED_STRING; + case (11702): + return UPDATE_AVAILABLE_FAILED_STRING; + case (11703): + return UPDATE_TRANSFER_FAILED_STRING; + case (11704): + return UPDATE_VERIFY_FAILED_STRING; + case (11705): + return UPDATE_FINISHED_STRING; + case (11800): + return SEND_MRAM_DUMP_FAILED_STRING; + case (11801): + return MRAM_DUMP_FAILED_STRING; + case (11802): + return MRAM_DUMP_FINISHED_STRING; + case (11901): + return INVALID_TC_FRAME_STRING; + case (11902): + return INVALID_FAR_STRING; + case (11903): + return CARRIER_LOCK_STRING; + case (11904): + return BIT_LOCK_PDEC_STRING; + case (12000): + return IMAGE_UPLOAD_FAILED_STRING; + case (12001): + return IMAGE_DOWNLOAD_FAILED_STRING; + case (12002): + return IMAGE_UPLOAD_SUCCESSFUL_STRING; + case (12003): + return IMAGE_DOWNLOAD_SUCCESSFUL_STRING; + case (12004): + return FLASH_WRITE_SUCCESSFUL_STRING; + case (12005): + return FLASH_READ_SUCCESSFUL_STRING; + case (12006): + return FLASH_WRITE_FAILED_STRING; + case (12007): + return FLASH_READ_FAILED_STRING; + case (12008): + return FPGA_DOWNLOAD_SUCCESSFUL_STRING; + case (12009): + return FPGA_DOWNLOAD_FAILED_STRING; + case (12010): + return FPGA_UPLOAD_SUCCESSFUL_STRING; + case (12011): + return FPGA_UPLOAD_FAILED_STRING; + case (12012): + return STR_HELPER_READING_REPLY_FAILED_STRING; + case (12013): + return STR_HELPER_COM_ERROR_STRING; + case (12014): + return STR_HELPER_NO_REPLY_STRING; + case (12015): + return STR_HELPER_DEC_ERROR_STRING; + case (12016): + return POSITION_MISMATCH_STRING; + case (12017): + return STR_HELPER_FILE_NOT_EXISTS_STRING; + case (12018): + return STR_HELPER_SENDING_PACKET_FAILED_STRING; + case (12019): + return STR_HELPER_REQUESTING_MSG_FAILED_STRING; + default: + return "UNKNOWN_EVENT"; + } + return 0; } diff --git a/linux/fsfwconfig/events/translateEvents.h b/linux/fsfwconfig/events/translateEvents.h index bdabb21b..1b8a8831 100644 --- a/linux/fsfwconfig/events/translateEvents.h +++ b/linux/fsfwconfig/events/translateEvents.h @@ -3,6 +3,6 @@ #include "fsfw/events/Event.h" -const char * translateEvents(Event event); +const char* translateEvents(Event event); #endif /* FSFWCONFIG_EVENTS_TRANSLATEEVENTS_H_ */ diff --git a/linux/fsfwconfig/objects/systemObjectList.h b/linux/fsfwconfig/objects/systemObjectList.h index c868730b..a03e4d38 100644 --- a/linux/fsfwconfig/objects/systemObjectList.h +++ b/linux/fsfwconfig/objects/systemObjectList.h @@ -62,6 +62,7 @@ enum sourceObjects : uint32_t { LIBGPIOD_TEST = 0x54123456, SPI_TEST = 0x54000010, UART_TEST = 0x54000020, + I2C_TEST = 0x54000030, DUMMY_INTERFACE = 0x5400CAFE, DUMMY_HANDLER = 0x5400AFFE, P60DOCK_TEST_TASK = 0x00005060, diff --git a/linux/fsfwconfig/objects/translateObjects.cpp b/linux/fsfwconfig/objects/translateObjects.cpp index 44b74490..08e6e126 100644 --- a/linux/fsfwconfig/objects/translateObjects.cpp +++ b/linux/fsfwconfig/objects/translateObjects.cpp @@ -117,230 +117,230 @@ const char *TM_FUNNEL_STRING = "TM_FUNNEL"; const char *CCSDS_IP_CORE_BRIDGE_STRING = "CCSDS_IP_CORE_BRIDGE"; const char *NO_OBJECT_STRING = "NO_OBJECT"; -const char* translateObject(object_id_t object) { - switch( (object & 0xFFFFFFFF) ) { - case 0x00005060: - return P60DOCK_TEST_TASK_STRING; - case 0x43000003: - return CORE_CONTROLLER_STRING; - case 0x43100002: - return ACS_CONTROLLER_STRING; - case 0x43400001: - return THERMAL_CONTROLLER_STRING; - case 0x44120006: - return MGM_0_LIS3_HANDLER_STRING; - case 0x44120010: - return GYRO_0_ADIS_HANDLER_STRING; - case 0x44120032: - return SUS_1_STRING; - case 0x44120033: - return SUS_2_STRING; - case 0x44120034: - return SUS_3_STRING; - case 0x44120035: - return SUS_4_STRING; - case 0x44120036: - return SUS_5_STRING; - case 0x44120037: - return SUS_6_STRING; - case 0x44120038: - return SUS_7_STRING; - case 0x44120039: - return SUS_8_STRING; - case 0x44120040: - return SUS_9_STRING; - case 0x44120041: - return SUS_10_STRING; - case 0x44120042: - return SUS_11_STRING; - case 0x44120043: - return SUS_12_STRING; - case 0x44120044: - return SUS_13_STRING; - case 0x44120047: - return RW1_STRING; - case 0x44120107: - return MGM_1_RM3100_HANDLER_STRING; - case 0x44120111: - return GYRO_1_L3G_HANDLER_STRING; - case 0x44120148: - return RW2_STRING; - case 0x44120208: - return MGM_2_LIS3_HANDLER_STRING; - case 0x44120212: - return GYRO_2_ADIS_HANDLER_STRING; - case 0x44120249: - return RW3_STRING; - case 0x44120309: - return MGM_3_RM3100_HANDLER_STRING; - case 0x44120313: - return GYRO_3_L3G_HANDLER_STRING; - case 0x44120350: - return RW4_STRING; - case 0x44130001: - return STAR_TRACKER_STRING; - case 0x44130045: - return GPS_CONTROLLER_STRING; - case 0x44140014: - return IMTQ_HANDLER_STRING; - case 0x442000A1: - return PCDU_HANDLER_STRING; - case 0x44250000: - return P60DOCK_HANDLER_STRING; - case 0x44250001: - return PDU1_HANDLER_STRING; - case 0x44250002: - return PDU2_HANDLER_STRING; - case 0x44250003: - return ACU_HANDLER_STRING; - case 0x44260000: - return BPX_BATT_HANDLER_STRING; - case 0x443200A5: - return RAD_SENSOR_STRING; - case 0x44330000: - return PLOC_UPDATER_STRING; - case 0x44330001: - return PLOC_MEMORY_DUMPER_STRING; - case 0x44330002: - return STR_HELPER_STRING; - case 0x44330015: - return PLOC_MPSOC_HANDLER_STRING; - case 0x44330016: - return PLOC_SUPERVISOR_HANDLER_STRING; - case 0x444100A2: - return SOLAR_ARRAY_DEPL_HANDLER_STRING; - case 0x444100A4: - return HEATER_HANDLER_STRING; - case 0x44420004: - return TMP1075_HANDLER_1_STRING; - case 0x44420005: - return TMP1075_HANDLER_2_STRING; - case 0x44420016: - return RTD_IC_3_STRING; - case 0x44420017: - return RTD_IC_4_STRING; - case 0x44420018: - return RTD_IC_5_STRING; - case 0x44420019: - return RTD_IC_6_STRING; - case 0x44420020: - return RTD_IC_7_STRING; - case 0x44420021: - return RTD_IC_8_STRING; - case 0x44420022: - return RTD_IC_9_STRING; - case 0x44420023: - return RTD_IC_10_STRING; - case 0x44420024: - return RTD_IC_11_STRING; - case 0x44420025: - return RTD_IC_12_STRING; - case 0x44420026: - return RTD_IC_13_STRING; - case 0x44420027: - return RTD_IC_14_STRING; - case 0x44420028: - return RTD_IC_15_STRING; - case 0x44420029: - return RTD_IC_16_STRING; - case 0x44420030: - return RTD_IC_17_STRING; - case 0x44420031: - return RTD_IC_18_STRING; - case 0x445300A3: - return SYRLINKS_HK_HANDLER_STRING; - case 0x49000000: - return ARDUINO_COM_IF_STRING; - case 0x49010005: - return GPIO_IF_STRING; - case 0x49020004: - return SPI_COM_IF_STRING; - case 0x49030003: - return UART_COM_IF_STRING; - case 0x49040002: - return I2C_COM_IF_STRING; - case 0x49050001: - return CSP_COM_IF_STRING; - case 0x50000100: - return CCSDS_PACKET_DISTRIBUTOR_STRING; - case 0x50000200: - return PUS_PACKET_DISTRIBUTOR_STRING; - case 0x50000300: - return TMTC_BRIDGE_STRING; - case 0x50000400: - return TMTC_POLLING_TASK_STRING; - case 0x50000500: - return FILE_SYSTEM_HANDLER_STRING; - case 0x50000600: - return PTME_STRING; - case 0x50000700: - return PDEC_HANDLER_STRING; - case 0x50000800: - return CCSDS_HANDLER_STRING; - case 0x51000500: - return PUS_SERVICE_6_STRING; - case 0x53000000: - return FSFW_OBJECTS_START_STRING; - case 0x53000001: - return PUS_SERVICE_1_VERIFICATION_STRING; - case 0x53000002: - return PUS_SERVICE_2_DEVICE_ACCESS_STRING; - case 0x53000003: - return PUS_SERVICE_3_HOUSEKEEPING_STRING; - case 0x53000005: - return PUS_SERVICE_5_EVENT_REPORTING_STRING; - case 0x53000008: - return PUS_SERVICE_8_FUNCTION_MGMT_STRING; - case 0x53000009: - return PUS_SERVICE_9_TIME_MGMT_STRING; - case 0x53000017: - return PUS_SERVICE_17_TEST_STRING; - case 0x53000020: - return PUS_SERVICE_20_PARAMETERS_STRING; - case 0x53000200: - return PUS_SERVICE_200_MODE_MGMT_STRING; - case 0x53000201: - return PUS_SERVICE_201_HEALTH_STRING; - case 0x53001000: - return CFDP_PACKET_DISTRIBUTOR_STRING; - case 0x53010000: - return HEALTH_TABLE_STRING; - case 0x53010100: - return MODE_STORE_STRING; - case 0x53030000: - return EVENT_MANAGER_STRING; - case 0x53040000: - return INTERNAL_ERROR_REPORTER_STRING; - case 0x534f0100: - return TC_STORE_STRING; - case 0x534f0200: - return TM_STORE_STRING; - case 0x534f0300: - return IPC_STORE_STRING; - case 0x53500010: - return TIME_STAMPER_STRING; - case 0x53ffffff: - return FSFW_OBJECTS_END_STRING; - case 0x54000010: - return SPI_TEST_STRING; - case 0x54000020: - return UART_TEST_STRING; - case 0x5400AFFE: - return DUMMY_HANDLER_STRING; - case 0x5400CAFE: - return DUMMY_INTERFACE_STRING; - case 0x54123456: - return LIBGPIOD_TEST_STRING; - case 0x54694269: - return TEST_TASK_STRING; - case 0x73000100: - return TM_FUNNEL_STRING; - case 0x73500000: - return CCSDS_IP_CORE_BRIDGE_STRING; - case 0xFFFFFFFF: - return NO_OBJECT_STRING; - default: - return "UNKNOWN_OBJECT"; - } - return 0; +const char *translateObject(object_id_t object) { + switch ((object & 0xFFFFFFFF)) { + case 0x00005060: + return P60DOCK_TEST_TASK_STRING; + case 0x43000003: + return CORE_CONTROLLER_STRING; + case 0x43100002: + return ACS_CONTROLLER_STRING; + case 0x43400001: + return THERMAL_CONTROLLER_STRING; + case 0x44120006: + return MGM_0_LIS3_HANDLER_STRING; + case 0x44120010: + return GYRO_0_ADIS_HANDLER_STRING; + case 0x44120032: + return SUS_1_STRING; + case 0x44120033: + return SUS_2_STRING; + case 0x44120034: + return SUS_3_STRING; + case 0x44120035: + return SUS_4_STRING; + case 0x44120036: + return SUS_5_STRING; + case 0x44120037: + return SUS_6_STRING; + case 0x44120038: + return SUS_7_STRING; + case 0x44120039: + return SUS_8_STRING; + case 0x44120040: + return SUS_9_STRING; + case 0x44120041: + return SUS_10_STRING; + case 0x44120042: + return SUS_11_STRING; + case 0x44120043: + return SUS_12_STRING; + case 0x44120044: + return SUS_13_STRING; + case 0x44120047: + return RW1_STRING; + case 0x44120107: + return MGM_1_RM3100_HANDLER_STRING; + case 0x44120111: + return GYRO_1_L3G_HANDLER_STRING; + case 0x44120148: + return RW2_STRING; + case 0x44120208: + return MGM_2_LIS3_HANDLER_STRING; + case 0x44120212: + return GYRO_2_ADIS_HANDLER_STRING; + case 0x44120249: + return RW3_STRING; + case 0x44120309: + return MGM_3_RM3100_HANDLER_STRING; + case 0x44120313: + return GYRO_3_L3G_HANDLER_STRING; + case 0x44120350: + return RW4_STRING; + case 0x44130001: + return STAR_TRACKER_STRING; + case 0x44130045: + return GPS_CONTROLLER_STRING; + case 0x44140014: + return IMTQ_HANDLER_STRING; + case 0x442000A1: + return PCDU_HANDLER_STRING; + case 0x44250000: + return P60DOCK_HANDLER_STRING; + case 0x44250001: + return PDU1_HANDLER_STRING; + case 0x44250002: + return PDU2_HANDLER_STRING; + case 0x44250003: + return ACU_HANDLER_STRING; + case 0x44260000: + return BPX_BATT_HANDLER_STRING; + case 0x443200A5: + return RAD_SENSOR_STRING; + case 0x44330000: + return PLOC_UPDATER_STRING; + case 0x44330001: + return PLOC_MEMORY_DUMPER_STRING; + case 0x44330002: + return STR_HELPER_STRING; + case 0x44330015: + return PLOC_MPSOC_HANDLER_STRING; + case 0x44330016: + return PLOC_SUPERVISOR_HANDLER_STRING; + case 0x444100A2: + return SOLAR_ARRAY_DEPL_HANDLER_STRING; + case 0x444100A4: + return HEATER_HANDLER_STRING; + case 0x44420004: + return TMP1075_HANDLER_1_STRING; + case 0x44420005: + return TMP1075_HANDLER_2_STRING; + case 0x44420016: + return RTD_IC_3_STRING; + case 0x44420017: + return RTD_IC_4_STRING; + case 0x44420018: + return RTD_IC_5_STRING; + case 0x44420019: + return RTD_IC_6_STRING; + case 0x44420020: + return RTD_IC_7_STRING; + case 0x44420021: + return RTD_IC_8_STRING; + case 0x44420022: + return RTD_IC_9_STRING; + case 0x44420023: + return RTD_IC_10_STRING; + case 0x44420024: + return RTD_IC_11_STRING; + case 0x44420025: + return RTD_IC_12_STRING; + case 0x44420026: + return RTD_IC_13_STRING; + case 0x44420027: + return RTD_IC_14_STRING; + case 0x44420028: + return RTD_IC_15_STRING; + case 0x44420029: + return RTD_IC_16_STRING; + case 0x44420030: + return RTD_IC_17_STRING; + case 0x44420031: + return RTD_IC_18_STRING; + case 0x445300A3: + return SYRLINKS_HK_HANDLER_STRING; + case 0x49000000: + return ARDUINO_COM_IF_STRING; + case 0x49010005: + return GPIO_IF_STRING; + case 0x49020004: + return SPI_COM_IF_STRING; + case 0x49030003: + return UART_COM_IF_STRING; + case 0x49040002: + return I2C_COM_IF_STRING; + case 0x49050001: + return CSP_COM_IF_STRING; + case 0x50000100: + return CCSDS_PACKET_DISTRIBUTOR_STRING; + case 0x50000200: + return PUS_PACKET_DISTRIBUTOR_STRING; + case 0x50000300: + return TMTC_BRIDGE_STRING; + case 0x50000400: + return TMTC_POLLING_TASK_STRING; + case 0x50000500: + return FILE_SYSTEM_HANDLER_STRING; + case 0x50000600: + return PTME_STRING; + case 0x50000700: + return PDEC_HANDLER_STRING; + case 0x50000800: + return CCSDS_HANDLER_STRING; + case 0x51000500: + return PUS_SERVICE_6_STRING; + case 0x53000000: + return FSFW_OBJECTS_START_STRING; + case 0x53000001: + return PUS_SERVICE_1_VERIFICATION_STRING; + case 0x53000002: + return PUS_SERVICE_2_DEVICE_ACCESS_STRING; + case 0x53000003: + return PUS_SERVICE_3_HOUSEKEEPING_STRING; + case 0x53000005: + return PUS_SERVICE_5_EVENT_REPORTING_STRING; + case 0x53000008: + return PUS_SERVICE_8_FUNCTION_MGMT_STRING; + case 0x53000009: + return PUS_SERVICE_9_TIME_MGMT_STRING; + case 0x53000017: + return PUS_SERVICE_17_TEST_STRING; + case 0x53000020: + return PUS_SERVICE_20_PARAMETERS_STRING; + case 0x53000200: + return PUS_SERVICE_200_MODE_MGMT_STRING; + case 0x53000201: + return PUS_SERVICE_201_HEALTH_STRING; + case 0x53001000: + return CFDP_PACKET_DISTRIBUTOR_STRING; + case 0x53010000: + return HEALTH_TABLE_STRING; + case 0x53010100: + return MODE_STORE_STRING; + case 0x53030000: + return EVENT_MANAGER_STRING; + case 0x53040000: + return INTERNAL_ERROR_REPORTER_STRING; + case 0x534f0100: + return TC_STORE_STRING; + case 0x534f0200: + return TM_STORE_STRING; + case 0x534f0300: + return IPC_STORE_STRING; + case 0x53500010: + return TIME_STAMPER_STRING; + case 0x53ffffff: + return FSFW_OBJECTS_END_STRING; + case 0x54000010: + return SPI_TEST_STRING; + case 0x54000020: + return UART_TEST_STRING; + case 0x5400AFFE: + return DUMMY_HANDLER_STRING; + case 0x5400CAFE: + return DUMMY_INTERFACE_STRING; + case 0x54123456: + return LIBGPIOD_TEST_STRING; + case 0x54694269: + return TEST_TASK_STRING; + case 0x73000100: + return TM_FUNNEL_STRING; + case 0x73500000: + return CCSDS_IP_CORE_BRIDGE_STRING; + case 0xFFFFFFFF: + return NO_OBJECT_STRING; + default: + return "UNKNOWN_OBJECT"; + } + return 0; } diff --git a/mission/devices/BpxBatteryHandler.cpp b/mission/devices/BpxBatteryHandler.cpp index a2224242..14e61125 100644 --- a/mission/devices/BpxBatteryHandler.cpp +++ b/mission/devices/BpxBatteryHandler.cpp @@ -1,11 +1,11 @@ #include "BpxBatteryHandler.h" -#include "OBSWConfig.h" #include +#include "OBSWConfig.h" + BpxBatteryHandler::BpxBatteryHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie) - : DeviceHandlerBase(objectId, comIF, comCookie), hkSet(this), cfgSet(this) { -} + : DeviceHandlerBase(objectId, comIF, comCookie), hkSet(this), cfgSet(this) {} BpxBatteryHandler::~BpxBatteryHandler() {} @@ -34,7 +34,7 @@ ReturnValue_t BpxBatteryHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) } ReturnValue_t BpxBatteryHandler::buildTransitionDeviceCommand(DeviceCommandId_t* id) { - if(state == States::CHECK_COM) { + if (state == States::CHECK_COM) { *id = BpxBattery::PING; return buildCommandFromCommand(*id, nullptr, 0); } @@ -42,18 +42,23 @@ ReturnValue_t BpxBatteryHandler::buildTransitionDeviceCommand(DeviceCommandId_t* } void BpxBatteryHandler::fillCommandAndReplyMap() { - insertInCommandAndReplyMap(BpxBattery::GET_HK, 1, &hkSet); - insertInCommandAndReplyMap(BpxBattery::PING, 1); + insertInCommandAndReplyMap(BpxBattery::GET_HK, 1, &hkSet, 23); + insertInCommandAndReplyMap(BpxBattery::PING, 1, nullptr, 3); insertInCommandAndReplyMap(BpxBattery::REBOOT, 1); insertInCommandAndReplyMap(BpxBattery::RESET_COUNTERS, 1); insertInCommandAndReplyMap(BpxBattery::CONFIG_CMD, 1); - insertInCommandAndReplyMap(BpxBattery::CONFIG_GET, 1, &cfgSet); + insertInCommandAndReplyMap(BpxBattery::CONFIG_GET, 1, &cfgSet, 3); } ReturnValue_t BpxBatteryHandler::buildCommandFromCommand(DeviceCommandId_t deviceCommand, const uint8_t* commandData, size_t commandDataLen) { switch (deviceCommand) { + case (BpxBattery::GET_HK): { + cmdBuf[0] = BpxBattery::PORT_GET_HK; + this->rawPacketLen = 1; + break; + } case (BpxBattery::PING): { if (commandDataLen == 1 and commandData != nullptr) { sentPingByte = commandData[0]; @@ -137,42 +142,40 @@ ReturnValue_t BpxBatteryHandler::scanForReply(const uint8_t* start, size_t remai DeviceCommandId_t* foundId, size_t* foundLen) { switch (lastCmd) { case (BpxBattery::GET_HK): { - if (remainingSize != 21) { + if (remainingSize != 23) { return DeviceHandlerIF::LENGTH_MISSMATCH; } - *foundLen = 21; break; } case (BpxBattery::PING): case (BpxBattery::MAN_HEAT_ON): case (BpxBattery::MAN_HEAT_OFF): { - if (remainingSize != 1) { + if (remainingSize != 3) { return DeviceHandlerIF::LENGTH_MISSMATCH; } - *foundLen = 1; break; } case (BpxBattery::REBOOT): case (BpxBattery::RESET_COUNTERS): case (BpxBattery::CONFIG_CMD): case (BpxBattery::CONFIG_SET): { - if (remainingSize != 0) { + if (remainingSize != 2) { return DeviceHandlerIF::LENGTH_MISSMATCH; } - *foundLen = 0; break; } case (BpxBattery::CONFIG_GET): { - if (remainingSize != 3) { + if (remainingSize != 5) { return DeviceHandlerIF::LENGTH_MISSMATCH; } - *foundLen = 3; + break; } default: { return DeviceHandlerIF::UNKNOWN_DEVICE_REPLY; } } + *foundLen = remainingSize; *foundId = lastCmd; return HasReturnvaluesIF::RETURN_OK; } @@ -181,30 +184,30 @@ ReturnValue_t BpxBatteryHandler::interpretDeviceReply(DeviceCommandId_t id, cons switch (id) { case (BpxBattery::GET_HK): { PoolReadGuard rg(&hkSet); - ReturnValue_t result = hkSet.parseRawHk(packet, 21); + ReturnValue_t result = hkSet.parseRawHk(packet + 2, 21); if (result != HasReturnvaluesIF::RETURN_OK) { return result; } #if OBSW_DEBUG_BPX_BATT == 1 - sif::info << "BPX Battery HK output:" << std::endl; - sif::info << "Charge current [mA]: " << hkSet.chargeCurrent << std::endl; - sif::info << "Discharge current [mA]; " << hkSet.dischargeCurrent << std::endl; - sif::info << "Heater current [mA]: " << hkSet.heaterCurrent << std::endl; - sif::info << "Battery voltage [mV]: " << hkSet.battVoltage << std::endl; - sif::info << "Battery Temperature 1 [C]: " << hkSet.battTemp1 << std::endl; - sif::info << "Battery Temperature 2 [C]: " << hkSet.battTemp2 << std::endl; - sif::info << "Battery Temperature 3 [C]: " << hkSet.battTemp3 << std::endl; - sif::info << "Battery Temperature 4 [C]: " << hkSet.battTemp4 << std::endl; - sif::info << "Battery Reboot Counter: " << hkSet.rebootCounter << std::endl; - sif::info << "Battery Boot Cause: " << hkSet.bootcause << std::endl; + sif::info << "BPX Battery HK output:" << std::endl; + sif::info << "Charge current [mA]: " << hkSet.chargeCurrent << std::endl; + sif::info << "Discharge current [mA]: " << hkSet.dischargeCurrent << std::endl; + sif::info << "Heater current [mA]: " << hkSet.heaterCurrent << std::endl; + sif::info << "Battery voltage [mV]: " << hkSet.battVoltage << std::endl; + sif::info << "Battery Temperature 1 [C]: " << hkSet.battTemp1 << std::endl; + sif::info << "Battery Temperature 2 [C]: " << hkSet.battTemp2 << std::endl; + sif::info << "Battery Temperature 3 [C]: " << hkSet.battTemp3 << std::endl; + sif::info << "Battery Temperature 4 [C]: " << hkSet.battTemp4 << std::endl; + sif::info << "Battery Reboot Counter: " << hkSet.rebootCounter << std::endl; + sif::info << "Battery Boot Cause: " << static_cast(hkSet.bootcause.value) << std::endl; #endif break; } case (BpxBattery::PING): { - if (packet[0] != sentPingByte) { - return DeviceHandlerIF::INVALID_DATA; + if (packet[2] != sentPingByte) { + return DeviceHandlerIF::INVALID_DATA; } - if(mode == _MODE_START_UP) { + if (mode == _MODE_START_UP) { commandExecuted = true; } break; @@ -216,14 +219,14 @@ ReturnValue_t BpxBatteryHandler::interpretDeviceReply(DeviceCommandId_t id, cons } case (BpxBattery::MAN_HEAT_ON): case (BpxBattery::MAN_HEAT_OFF): { - if (packet[0] != 0x01) { + if (packet[2] != 0x01) { return DeviceHandlerIF::DEVICE_DID_NOT_EXECUTE; } break; } case (BpxBattery::CONFIG_GET): { PoolReadGuard rg(&cfgSet); - ReturnValue_t result = cfgSet.parseRawHk(packet, 3); + ReturnValue_t result = cfgSet.parseRawHk(packet + 2, 3); if (result != HasReturnvaluesIF::RETURN_OK) { return result; } @@ -250,6 +253,7 @@ ReturnValue_t BpxBatteryHandler::initializeLocalDataPool(localpool::DataPool& lo localDataPoolMap.emplace(BpxBattery::HkPoolIds::BATT_VOLTAGE, &battVolt); localDataPoolMap.emplace(BpxBattery::HkPoolIds::REBOOT_COUNTER, &rebootCounter); localDataPoolMap.emplace(BpxBattery::HkPoolIds::BOOTCAUSE, &bootCause); + poolManager.subscribeForPeriodicPacket(hkSet.getSid(), false, 1.0, false); return HasReturnvaluesIF::RETURN_OK; } diff --git a/mission/devices/devicedefinitions/BpxBatteryDefinitions.h b/mission/devices/devicedefinitions/BpxBatteryDefinitions.h index 3ebb6d5a..8123b237 100644 --- a/mission/devices/devicedefinitions/BpxBatteryDefinitions.h +++ b/mission/devices/devicedefinitions/BpxBatteryDefinitions.h @@ -4,6 +4,8 @@ #include #include +#include "fsfw/devicehandlers/DeviceHandlerIF.h" + #include namespace BpxBattery { @@ -197,7 +199,6 @@ class BpxBatteryHk : public StaticLocalDataSet { lp_var_t(sid.objectId, BpxBattery::HkPoolIds::BOOTCAUSE, this); private: - friend class BpxBatteryHandler; /** * Constructor for data creator From 9bf3e46e3c80e34bbe0aad958e2545514d11e4da Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 3 Feb 2022 15:03:35 +0100 Subject: [PATCH 27/39] tested some commands --- bsp_q7s/core/ObjectFactory.cpp | 2 +- linux/fsfwconfig/OBSWConfig.h.in | 1 + mission/devices/BpxBatteryHandler.cpp | 10 +++++++--- tmtc | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index 3e515bca..66408254 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -161,7 +161,7 @@ void ObjectFactory::produce(void* args) { I2cCookie* bpxI2cCookie = new I2cCookie(addresses::BPX_BATTERY, 100, q7s::I2C_DEFAULT_DEV); BpxBatteryHandler* bpxHandler = new BpxBatteryHandler(objects::BPX_BATT_HANDLER, objects::I2C_COM_IF, bpxI2cCookie); -#if OBSW_DEBUG_BPX_BATT == 1 +#if OBSW_TEST_BPX_BATT == 1 bpxHandler->setToGoToNormalMode(true); bpxHandler->setStartUpImmediately(); #else diff --git a/linux/fsfwconfig/OBSWConfig.h.in b/linux/fsfwconfig/OBSWConfig.h.in index df1bad64..bdaf4c4f 100644 --- a/linux/fsfwconfig/OBSWConfig.h.in +++ b/linux/fsfwconfig/OBSWConfig.h.in @@ -77,6 +77,7 @@ debugging. */ #define OBSW_TEST_RADIATION_SENSOR_HANDLER 0 #define OBSW_TEST_SUS_HANDLER 0 #define OBSW_TEST_PLOC_HANDLER 0 +#define OBSW_TEST_BPX_BATT 0 #define OBSW_TEST_CCSDS_BRIDGE 0 #define OBSW_TEST_CCSDS_PTME 0 #define OBSW_TEST_TE7020_HEATER 0 diff --git a/mission/devices/BpxBatteryHandler.cpp b/mission/devices/BpxBatteryHandler.cpp index 14e61125..b16f8d3c 100644 --- a/mission/devices/BpxBatteryHandler.cpp +++ b/mission/devices/BpxBatteryHandler.cpp @@ -44,9 +44,9 @@ ReturnValue_t BpxBatteryHandler::buildTransitionDeviceCommand(DeviceCommandId_t* void BpxBatteryHandler::fillCommandAndReplyMap() { insertInCommandAndReplyMap(BpxBattery::GET_HK, 1, &hkSet, 23); insertInCommandAndReplyMap(BpxBattery::PING, 1, nullptr, 3); - insertInCommandAndReplyMap(BpxBattery::REBOOT, 1); - insertInCommandAndReplyMap(BpxBattery::RESET_COUNTERS, 1); - insertInCommandAndReplyMap(BpxBattery::CONFIG_CMD, 1); + insertInCommandAndReplyMap(BpxBattery::REBOOT, 1, nullptr, 0); + insertInCommandAndReplyMap(BpxBattery::RESET_COUNTERS, 1, nullptr, 2); + insertInCommandAndReplyMap(BpxBattery::CONFIG_CMD, 1, nullptr, 2); insertInCommandAndReplyMap(BpxBattery::CONFIG_GET, 1, &cfgSet, 3); } @@ -181,10 +181,14 @@ ReturnValue_t BpxBatteryHandler::scanForReply(const uint8_t* start, size_t remai } ReturnValue_t BpxBatteryHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) { + if (packet[1] != 0) { + return DeviceHandlerIF::DEVICE_REPORTED_ERROR; + } switch (id) { case (BpxBattery::GET_HK): { PoolReadGuard rg(&hkSet); ReturnValue_t result = hkSet.parseRawHk(packet + 2, 21); + hkSet.setValidity(true, true); if (result != HasReturnvaluesIF::RETURN_OK) { return result; } diff --git a/tmtc b/tmtc index 8da50e2c..1702d895 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 8da50e2c3f709def5b26fd9df1cd23beac35482e +Subproject commit 1702d895761311d115c2e79b459b4a6d6843fc97 From a77d5f366962ba9d182e2c78deb249c6cc5ba38c Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 3 Feb 2022 15:31:18 +0100 Subject: [PATCH 28/39] tested cfg set request --- linux/fsfwconfig/OBSWConfig.h.in | 3 +- mission/devices/BpxBatteryHandler.cpp | 32 ++++++++++------- mission/devices/BpxBatteryHandler.h | 3 ++ .../devicedefinitions/BpxBatteryDefinitions.h | 36 ++++++++++--------- tmtc | 2 +- 5 files changed, 45 insertions(+), 31 deletions(-) diff --git a/linux/fsfwconfig/OBSWConfig.h.in b/linux/fsfwconfig/OBSWConfig.h.in index bdaf4c4f..6c4e4773 100644 --- a/linux/fsfwconfig/OBSWConfig.h.in +++ b/linux/fsfwconfig/OBSWConfig.h.in @@ -54,7 +54,7 @@ debugging. */ #define OBSW_ADD_RAD_SENSORS 0 #define OBSW_ADD_SYRLINKS 0 #define OBSW_ENABLE_SYRLINKS_TRANSMIT_TIMEOUT 0 -#define OBSW_SYRLINKS_SIMULATED 1 +#define OBSW_ENABLE_PERIODIC_HK 0 #endif @@ -66,6 +66,7 @@ debugging. */ #define OBSW_SWITCH_TO_NORMAL_MODE_AFTER_STARTUP 1 #define OBSW_PRINT_MISSED_DEADLINES 1 +#define OBSW_SYRLINKS_SIMULATED 1 #define OBSW_ADD_TEST_CODE 0 // If this is enabled, all other SPI code should be disabled #define OBSW_ADD_SPI_TEST_CODE 0 diff --git a/mission/devices/BpxBatteryHandler.cpp b/mission/devices/BpxBatteryHandler.cpp index b16f8d3c..6c080b04 100644 --- a/mission/devices/BpxBatteryHandler.cpp +++ b/mission/devices/BpxBatteryHandler.cpp @@ -47,7 +47,7 @@ void BpxBatteryHandler::fillCommandAndReplyMap() { insertInCommandAndReplyMap(BpxBattery::REBOOT, 1, nullptr, 0); insertInCommandAndReplyMap(BpxBattery::RESET_COUNTERS, 1, nullptr, 2); insertInCommandAndReplyMap(BpxBattery::CONFIG_CMD, 1, nullptr, 2); - insertInCommandAndReplyMap(BpxBattery::CONFIG_GET, 1, &cfgSet, 3); + insertInCommandAndReplyMap(BpxBattery::CONFIG_GET, 1, &cfgSet, 5); } ReturnValue_t BpxBatteryHandler::buildCommandFromCommand(DeviceCommandId_t deviceCommand, @@ -234,6 +234,7 @@ ReturnValue_t BpxBatteryHandler::interpretDeviceReply(DeviceCommandId_t id, cons if (result != HasReturnvaluesIF::RETURN_OK) { return result; } + cfgSet.setValidity(true, true); break; } default: { @@ -247,17 +248,24 @@ uint32_t BpxBatteryHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) ReturnValue_t BpxBatteryHandler::initializeLocalDataPool(localpool::DataPool& localDataPoolMap, LocalDataPoolManager& poolManager) { - localDataPoolMap.emplace(BpxBattery::HkPoolIds::BATT_TEMP_1, &battTemp1); - localDataPoolMap.emplace(BpxBattery::HkPoolIds::BATT_TEMP_2, &battTemp2); - localDataPoolMap.emplace(BpxBattery::HkPoolIds::BATT_TEMP_3, &battTemp3); - localDataPoolMap.emplace(BpxBattery::HkPoolIds::BATT_TEMP_4, &battTemp4); - localDataPoolMap.emplace(BpxBattery::HkPoolIds::CHARGE_CURRENT, &chargeCurrent); - localDataPoolMap.emplace(BpxBattery::HkPoolIds::DISCHARGE_CURRENT, &dischargeCurrent); - localDataPoolMap.emplace(BpxBattery::HkPoolIds::HEATER_CURRENT, &heaterCurrent); - localDataPoolMap.emplace(BpxBattery::HkPoolIds::BATT_VOLTAGE, &battVolt); - localDataPoolMap.emplace(BpxBattery::HkPoolIds::REBOOT_COUNTER, &rebootCounter); - localDataPoolMap.emplace(BpxBattery::HkPoolIds::BOOTCAUSE, &bootCause); - poolManager.subscribeForPeriodicPacket(hkSet.getSid(), false, 1.0, false); + localDataPoolMap.emplace(BpxBattery::BATT_TEMP_1, &battTemp1); + localDataPoolMap.emplace(BpxBattery::BATT_TEMP_2, &battTemp2); + localDataPoolMap.emplace(BpxBattery::BATT_TEMP_3, &battTemp3); + localDataPoolMap.emplace(BpxBattery::BATT_TEMP_4, &battTemp4); + localDataPoolMap.emplace(BpxBattery::CHARGE_CURRENT, &chargeCurrent); + localDataPoolMap.emplace(BpxBattery::DISCHARGE_CURRENT, &dischargeCurrent); + localDataPoolMap.emplace(BpxBattery::HEATER_CURRENT, &heaterCurrent); + localDataPoolMap.emplace(BpxBattery::BATT_VOLTAGE, &battVolt); + localDataPoolMap.emplace(BpxBattery::REBOOT_COUNTER, &rebootCounter); + localDataPoolMap.emplace(BpxBattery::BOOTCAUSE, &bootCause); + + localDataPoolMap.emplace(BpxBattery::BATTERY_HEATER_MODE, &battheatMode); + localDataPoolMap.emplace(BpxBattery::BATTHEAT_LOW_LIMIT, &battheatLow); + localDataPoolMap.emplace(BpxBattery::BATTHEAT_HIGH_LIMIT, &battheatHigh); + +#if OBSW_ENABLE_PERIODIC_HK == 1 + poolManager.subscribeForPeriodicPacket(hkSet.getSid(), true, 1.0, false); +#endif return HasReturnvaluesIF::RETURN_OK; } diff --git a/mission/devices/BpxBatteryHandler.h b/mission/devices/BpxBatteryHandler.h index d3a02645..eb75fe2c 100644 --- a/mission/devices/BpxBatteryHandler.h +++ b/mission/devices/BpxBatteryHandler.h @@ -36,6 +36,9 @@ class BpxBatteryHandler : public DeviceHandlerBase { PoolEntry battTemp4 = PoolEntry({0}); PoolEntry rebootCounter = PoolEntry({0}); PoolEntry bootCause = PoolEntry({0}); + PoolEntry battheatMode = PoolEntry({0}); + PoolEntry battheatLow = PoolEntry({0}); + PoolEntry battheatHigh = PoolEntry({0}); void doStartUp() override; void doShutDown() override; diff --git a/mission/devices/devicedefinitions/BpxBatteryDefinitions.h b/mission/devices/devicedefinitions/BpxBatteryDefinitions.h index 8123b237..dba9fb59 100644 --- a/mission/devices/devicedefinitions/BpxBatteryDefinitions.h +++ b/mission/devices/devicedefinitions/BpxBatteryDefinitions.h @@ -10,7 +10,7 @@ namespace BpxBattery { -enum HkPoolIds { +enum LocalPoolIds { CHARGE_CURRENT = 0, DISCHARGE_CURRENT = 1, HEATER_CURRENT = 2, @@ -20,10 +20,12 @@ enum HkPoolIds { BATT_TEMP_3 = 6, BATT_TEMP_4 = 7, REBOOT_COUNTER = 8, - BOOTCAUSE = 9 -}; + BOOTCAUSE = 9, -enum CfgPoolIds { BATTERY_HEATER_MODE = 0, BATTHEAT_LOW_LIMIT = 1, BATTHEAT_HIGH_LIMIT = 2 }; + BATTERY_HEATER_MODE = 10, + BATTHEAT_LOW_LIMIT = 11, + BATTHEAT_HIGH_LIMIT = 12 +}; static constexpr DeviceCommandId_t GET_HK = 0; static constexpr DeviceCommandId_t PING = 1; @@ -170,33 +172,33 @@ class BpxBatteryHk : public StaticLocalDataSet { //! Charge current in mA lp_var_t chargeCurrent = - lp_var_t(sid.objectId, BpxBattery::HkPoolIds::CHARGE_CURRENT, this); + lp_var_t(sid.objectId, BpxBattery::CHARGE_CURRENT, this); //! Discharge current in mA lp_var_t dischargeCurrent = - lp_var_t(sid.objectId, BpxBattery::HkPoolIds::DISCHARGE_CURRENT, this); + lp_var_t(sid.objectId, BpxBattery::DISCHARGE_CURRENT, this); //! Heater current in mA lp_var_t heaterCurrent = - lp_var_t(sid.objectId, BpxBattery::HkPoolIds::HEATER_CURRENT, this); + lp_var_t(sid.objectId, BpxBattery::HEATER_CURRENT, this); //! Battery voltage in mV lp_var_t battVoltage = - lp_var_t(sid.objectId, BpxBattery::HkPoolIds::BATT_VOLTAGE, this); + lp_var_t(sid.objectId, BpxBattery::BATT_VOLTAGE, this); //! Battery temperature 1 in degC lp_var_t battTemp1 = - lp_var_t(sid.objectId, BpxBattery::HkPoolIds::BATT_TEMP_1, this); + lp_var_t(sid.objectId, BpxBattery::BATT_TEMP_1, this); //! Battery temperature 2 in degC lp_var_t battTemp2 = - lp_var_t(sid.objectId, BpxBattery::HkPoolIds::BATT_TEMP_2, this); + lp_var_t(sid.objectId, BpxBattery::BATT_TEMP_2, this); //! Battery temperature 3 in degC lp_var_t battTemp3 = - lp_var_t(sid.objectId, BpxBattery::HkPoolIds::BATT_TEMP_3, this); + lp_var_t(sid.objectId, BpxBattery::BATT_TEMP_3, this); //! Battery temperature 4 in degC lp_var_t battTemp4 = - lp_var_t(sid.objectId, BpxBattery::HkPoolIds::BATT_TEMP_4, this); + lp_var_t(sid.objectId, BpxBattery::BATT_TEMP_4, this); lp_var_t rebootCounter = - lp_var_t(sid.objectId, BpxBattery::HkPoolIds::REBOOT_COUNTER, this); + lp_var_t(sid.objectId, BpxBattery::REBOOT_COUNTER, this); lp_var_t bootcause = - lp_var_t(sid.objectId, BpxBattery::HkPoolIds::BOOTCAUSE, this); + lp_var_t(sid.objectId, BpxBattery::BOOTCAUSE, this); private: friend class BpxBatteryHandler; @@ -229,13 +231,13 @@ class BpxBatteryCfg : public StaticLocalDataSet { //! Mode for battheater [0=OFF,1=Auto] lp_var_t battheatermode = - lp_var_t(sid.objectId, BpxBattery::CfgPoolIds::BATTERY_HEATER_MODE, this); + lp_var_t(sid.objectId, BpxBattery::BATTERY_HEATER_MODE, this); //! Turn heater on at [degC] lp_var_t battheaterLow = - lp_var_t(sid.objectId, BpxBattery::CfgPoolIds::BATTHEAT_LOW_LIMIT, this); + lp_var_t(sid.objectId, BpxBattery::BATTHEAT_LOW_LIMIT, this); //! Turn heater off at [degC] lp_var_t battheaterHigh = - lp_var_t(sid.objectId, BpxBattery::CfgPoolIds::BATTHEAT_HIGH_LIMIT, this); + lp_var_t(sid.objectId, BpxBattery::BATTHEAT_HIGH_LIMIT, this); private: friend class BpxBatteryHandler; diff --git a/tmtc b/tmtc index 1702d895..890a20a0 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 1702d895761311d115c2e79b459b4a6d6843fc97 +Subproject commit 890a20a07895bc1d06ad49f281a107a042a5dd03 From 3250a9f489138b725aa02d7de3e9d078e0071213 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 3 Feb 2022 16:04:06 +0100 Subject: [PATCH 29/39] minor improvement, bugfix for reboot cmd --- mission/devices/BpxBatteryHandler.cpp | 30 ++++++++++++------- .../devicedefinitions/BpxBatteryDefinitions.h | 5 ++++ tmtc | 2 +- 3 files changed, 25 insertions(+), 12 deletions(-) diff --git a/mission/devices/BpxBatteryHandler.cpp b/mission/devices/BpxBatteryHandler.cpp index 6c080b04..115c3b96 100644 --- a/mission/devices/BpxBatteryHandler.cpp +++ b/mission/devices/BpxBatteryHandler.cpp @@ -42,12 +42,13 @@ ReturnValue_t BpxBatteryHandler::buildTransitionDeviceCommand(DeviceCommandId_t* } void BpxBatteryHandler::fillCommandAndReplyMap() { - insertInCommandAndReplyMap(BpxBattery::GET_HK, 1, &hkSet, 23); - insertInCommandAndReplyMap(BpxBattery::PING, 1, nullptr, 3); + using namespace BpxBattery; + insertInCommandAndReplyMap(GET_HK, 1, &hkSet, GET_HK_REPLY_LEN); + insertInCommandAndReplyMap(BpxBattery::PING, 1, nullptr, PING_REPLY_LEN); insertInCommandAndReplyMap(BpxBattery::REBOOT, 1, nullptr, 0); - insertInCommandAndReplyMap(BpxBattery::RESET_COUNTERS, 1, nullptr, 2); - insertInCommandAndReplyMap(BpxBattery::CONFIG_CMD, 1, nullptr, 2); - insertInCommandAndReplyMap(BpxBattery::CONFIG_GET, 1, &cfgSet, 5); + insertInCommandAndReplyMap(BpxBattery::RESET_COUNTERS, 1, nullptr,EMPTY_REPLY_LEN); + insertInCommandAndReplyMap(BpxBattery::CONFIG_CMD, 1, nullptr, EMPTY_REPLY_LEN); + insertInCommandAndReplyMap(BpxBattery::CONFIG_GET, 1, &cfgSet, CONFIG_GET_REPLY_LEN); } ReturnValue_t BpxBatteryHandler::buildCommandFromCommand(DeviceCommandId_t deviceCommand, @@ -140,9 +141,10 @@ ReturnValue_t BpxBatteryHandler::buildCommandFromCommand(DeviceCommandId_t devic ReturnValue_t BpxBatteryHandler::scanForReply(const uint8_t* start, size_t remainingSize, DeviceCommandId_t* foundId, size_t* foundLen) { + using namespace BpxBattery; switch (lastCmd) { case (BpxBattery::GET_HK): { - if (remainingSize != 23) { + if (remainingSize != GET_HK_REPLY_LEN) { return DeviceHandlerIF::LENGTH_MISSMATCH; } break; @@ -150,22 +152,25 @@ ReturnValue_t BpxBatteryHandler::scanForReply(const uint8_t* start, size_t remai case (BpxBattery::PING): case (BpxBattery::MAN_HEAT_ON): case (BpxBattery::MAN_HEAT_OFF): { - if (remainingSize != 3) { + if (remainingSize != PING_REPLY_LEN) { return DeviceHandlerIF::LENGTH_MISSMATCH; } break; } - case (BpxBattery::REBOOT): + case (BpxBattery::REBOOT): { + // Ignore + break; + } case (BpxBattery::RESET_COUNTERS): case (BpxBattery::CONFIG_CMD): case (BpxBattery::CONFIG_SET): { - if (remainingSize != 2) { + if (remainingSize != EMPTY_REPLY_LEN) { return DeviceHandlerIF::LENGTH_MISSMATCH; } break; } case (BpxBattery::CONFIG_GET): { - if (remainingSize != 5) { + if (remainingSize != CONFIG_GET_REPLY_LEN) { return DeviceHandlerIF::LENGTH_MISSMATCH; } @@ -181,7 +186,7 @@ ReturnValue_t BpxBatteryHandler::scanForReply(const uint8_t* start, size_t remai } ReturnValue_t BpxBatteryHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) { - if (packet[1] != 0) { + if (id != BpxBattery::REBOOT and packet[1] != 0) { return DeviceHandlerIF::DEVICE_REPORTED_ERROR; } switch (id) { @@ -237,6 +242,9 @@ ReturnValue_t BpxBatteryHandler::interpretDeviceReply(DeviceCommandId_t id, cons cfgSet.setValidity(true, true); break; } + case(BpxBattery::REBOOT): { + break; + } default: { return DeviceHandlerIF::UNKNOWN_DEVICE_REPLY; } diff --git a/mission/devices/devicedefinitions/BpxBatteryDefinitions.h b/mission/devices/devicedefinitions/BpxBatteryDefinitions.h index dba9fb59..333119f2 100644 --- a/mission/devices/devicedefinitions/BpxBatteryDefinitions.h +++ b/mission/devices/devicedefinitions/BpxBatteryDefinitions.h @@ -45,6 +45,11 @@ static constexpr uint8_t DEFAULT_PING_SENT_BYTE = 0x07; static constexpr uint32_t HK_SET_ID = GET_HK; static constexpr uint32_t CFG_SET_ID = CONFIG_GET; +static constexpr size_t GET_HK_REPLY_LEN = 23; +static constexpr size_t PING_REPLY_LEN = 3; +static constexpr size_t EMPTY_REPLY_LEN = 2; +static constexpr size_t CONFIG_GET_REPLY_LEN = 5; + static constexpr uint8_t PORT_PING = 1; static constexpr uint8_t PORT_REBOOT = 4; static constexpr uint8_t PORT_GET_HK = 9; diff --git a/tmtc b/tmtc index 890a20a0..2b89a7f2 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 890a20a07895bc1d06ad49f281a107a042a5dd03 +Subproject commit 2b89a7f2697a21e9fc9101ca320afb7bf49c8e9d From 9456dc1a00b709a7bb06f8afd2eaaba1d96c871c Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 3 Feb 2022 16:04:24 +0100 Subject: [PATCH 30/39] applied auto-formatter --- bsp_q7s/core/InitMission.cpp | 4 +-- bsp_q7s/core/ObjectFactory.cpp | 3 +- linux/boardtest/I2cTestClass.cpp | 31 ++++++++++--------- linux/boardtest/I2cTestClass.h | 12 +++---- linux/boardtest/UartTestClass.cpp | 6 ++-- mission/devices/BpxBatteryHandler.cpp | 6 ++-- .../devicedefinitions/BpxBatteryDefinitions.h | 22 +++++-------- 7 files changed, 38 insertions(+), 46 deletions(-) diff --git a/bsp_q7s/core/InitMission.cpp b/bsp_q7s/core/InitMission.cpp index f7ecc7fd..429d57f4 100644 --- a/bsp_q7s/core/InitMission.cpp +++ b/bsp_q7s/core/InitMission.cpp @@ -350,8 +350,8 @@ void initmission::createPusTasks(TaskFactory& factory, void initmission::createTestTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc, std::vector& taskVec) { -#if OBSW_ADD_TEST_TASK == 1 || OBSW_ADD_SPI_TEST_CODE == 1 || \ - OBSW_ADD_I2C_TEST_CODE == 1 || (BOARD_TE0720 == 1 && OBSW_TEST_LIBGPIOD == 1) +#if OBSW_ADD_TEST_TASK == 1 || OBSW_ADD_SPI_TEST_CODE == 1 || OBSW_ADD_I2C_TEST_CODE == 1 || \ + (BOARD_TE0720 == 1 && OBSW_TEST_LIBGPIOD == 1) ReturnValue_t result = HasReturnvaluesIF::RETURN_OK; #endif PeriodicTaskIF* testTask = factory.createPeriodicTask( diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index 66408254..b427b9b9 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -1,6 +1,7 @@ -#include #include "ObjectFactory.h" +#include + #include #include "OBSWConfig.h" diff --git a/linux/boardtest/I2cTestClass.cpp b/linux/boardtest/I2cTestClass.cpp index d3017b1b..1bd0aa52 100644 --- a/linux/boardtest/I2cTestClass.cpp +++ b/linux/boardtest/I2cTestClass.cpp @@ -1,26 +1,27 @@ #include "I2cTestClass.h" -#include -#include "fsfw/serviceinterface.h" -#include "fsfw/globalfunctions/arrayprinter.h" -#include #include +#include #include +#include + +#include "fsfw/globalfunctions/arrayprinter.h" +#include "fsfw/serviceinterface.h" I2cTestClass::I2cTestClass(object_id_t objectId, std::string i2cdev) - : TestTask(objectId), i2cdev(i2cdev) { + : TestTask(objectId), i2cdev(i2cdev) { mode = TestModes::BPX_BATTERY; } ReturnValue_t I2cTestClass::initialize() { - if(mode == TestModes::BPX_BATTERY) { + if (mode == TestModes::BPX_BATTERY) { battInit(); } return HasReturnvaluesIF::RETURN_OK; } ReturnValue_t I2cTestClass::performPeriodicAction() { - if(mode == TestModes::BPX_BATTERY) { + if (mode == TestModes::BPX_BATTERY) { battPeriodic(); } return HasReturnvaluesIF::RETURN_OK; @@ -33,25 +34,25 @@ void I2cTestClass::battInit() { sif::error << "Opening I2C device" << i2cdev << " failed" << std::endl; return; } - if(ioctl(bpxInfo.fd, I2C_SLAVE, bpxInfo.addr) < 0) { + if (ioctl(bpxInfo.fd, I2C_SLAVE, bpxInfo.addr) < 0) { sif::error << "Failed to acquire bus access and/or talk to slave" << std::endl; } cmdBuf[0] = BpxBattery::PORT_PING; cmdBuf[1] = 0x42; sendLen = 2; ReturnValue_t result = i2cWrite(bpxInfo.fd, cmdBuf.data(), sendLen); - if(result != HasReturnvaluesIF::RETURN_OK) { + if (result != HasReturnvaluesIF::RETURN_OK) { return; } // Receive back port, error byte and ping reply recvLen = 3; result = i2cRead(bpxInfo.fd, replyBuf.data(), recvLen); - if(result != HasReturnvaluesIF::RETURN_OK) { + if (result != HasReturnvaluesIF::RETURN_OK) { return; } sif::info << "Ping reply:" << std::endl; arrayprinter::print(replyBuf.data(), recvLen); - if(replyBuf[2] != 0x42) { + if (replyBuf[2] != 0x42) { sif::warning << "Received ping reply not expected value 0x42" << std::endl; } } @@ -62,19 +63,19 @@ void I2cTestClass::battPeriodic() { sif::error << "Opening I2C device" << i2cdev << " failed" << std::endl; return; } - if(ioctl(bpxInfo.fd, I2C_SLAVE, bpxInfo.addr) < 0) { + if (ioctl(bpxInfo.fd, I2C_SLAVE, bpxInfo.addr) < 0) { sif::error << "Failed to acquire bus access and/or talk to slave" << std::endl; } cmdBuf[0] = BpxBattery::PORT_GET_HK; sendLen = 1; ReturnValue_t result = i2cWrite(bpxInfo.fd, cmdBuf.data(), sendLen); - if(result != HasReturnvaluesIF::RETURN_OK) { + if (result != HasReturnvaluesIF::RETURN_OK) { return; } // Receive back HK set recvLen = 23; result = i2cRead(bpxInfo.fd, replyBuf.data(), recvLen); - if(result != HasReturnvaluesIF::RETURN_OK) { + if (result != HasReturnvaluesIF::RETURN_OK) { return; } sif::info << "HK reply:" << std::endl; @@ -91,7 +92,7 @@ ReturnValue_t I2cTestClass::i2cWrite(int fd, uint8_t* data, size_t len) { } ReturnValue_t I2cTestClass::i2cRead(int fd, uint8_t* data, size_t len) { - if( read (fd, data, len) != static_cast(len)) { + if (read(fd, data, len) != static_cast(len)) { sif::error << "Failed to read from I2C bus" << std::endl; sif::error << "Error " << errno << ": " << strerror(errno) << std::endl; return HasReturnvaluesIF::RETURN_FAILED; diff --git a/linux/boardtest/I2cTestClass.h b/linux/boardtest/I2cTestClass.h index 5db58797..500243c5 100644 --- a/linux/boardtest/I2cTestClass.h +++ b/linux/boardtest/I2cTestClass.h @@ -3,9 +3,10 @@ #include -#include "mission/devices/devicedefinitions/BpxBatteryDefinitions.h" -#include #include +#include + +#include "mission/devices/devicedefinitions/BpxBatteryDefinitions.h" class I2cTestClass : public TestTask { public: @@ -15,10 +16,7 @@ class I2cTestClass : public TestTask { ReturnValue_t performPeriodicAction() override; private: - enum TestModes { - NONE, - BPX_BATTERY - }; + enum TestModes { NONE, BPX_BATTERY }; struct I2cInfo { int addr = 0; int fd = 0; @@ -28,7 +26,7 @@ class I2cTestClass : public TestTask { void battInit(); void battPeriodic(); - I2cInfo bpxInfo = { .addr = 0x07, .fd = 0 }; + I2cInfo bpxInfo = {.addr = 0x07, .fd = 0}; std::string i2cdev; size_t sendLen = 0; size_t recvLen = 0; diff --git a/linux/boardtest/UartTestClass.cpp b/linux/boardtest/UartTestClass.cpp index 37e0a6f1..e6033c09 100644 --- a/linux/boardtest/UartTestClass.cpp +++ b/linux/boardtest/UartTestClass.cpp @@ -24,12 +24,10 @@ ReturnValue_t UartTestClass::initialize() { return HasReturnvaluesIF::RETURN_OK; } -ReturnValue_t UartTestClass::performOneShotAction() { - return HasReturnvaluesIF::RETURN_OK; -} +ReturnValue_t UartTestClass::performOneShotAction() { return HasReturnvaluesIF::RETURN_OK; } ReturnValue_t UartTestClass::performPeriodicAction() { - if(mode == TestModes::GPS) { + if (mode == TestModes::GPS) { gpsPeriodic(); } return HasReturnvaluesIF::RETURN_OK; diff --git a/mission/devices/BpxBatteryHandler.cpp b/mission/devices/BpxBatteryHandler.cpp index 115c3b96..2ad20c9d 100644 --- a/mission/devices/BpxBatteryHandler.cpp +++ b/mission/devices/BpxBatteryHandler.cpp @@ -46,7 +46,7 @@ void BpxBatteryHandler::fillCommandAndReplyMap() { insertInCommandAndReplyMap(GET_HK, 1, &hkSet, GET_HK_REPLY_LEN); insertInCommandAndReplyMap(BpxBattery::PING, 1, nullptr, PING_REPLY_LEN); insertInCommandAndReplyMap(BpxBattery::REBOOT, 1, nullptr, 0); - insertInCommandAndReplyMap(BpxBattery::RESET_COUNTERS, 1, nullptr,EMPTY_REPLY_LEN); + insertInCommandAndReplyMap(BpxBattery::RESET_COUNTERS, 1, nullptr, EMPTY_REPLY_LEN); insertInCommandAndReplyMap(BpxBattery::CONFIG_CMD, 1, nullptr, EMPTY_REPLY_LEN); insertInCommandAndReplyMap(BpxBattery::CONFIG_GET, 1, &cfgSet, CONFIG_GET_REPLY_LEN); } @@ -214,7 +214,7 @@ ReturnValue_t BpxBatteryHandler::interpretDeviceReply(DeviceCommandId_t id, cons } case (BpxBattery::PING): { if (packet[2] != sentPingByte) { - return DeviceHandlerIF::INVALID_DATA; + return DeviceHandlerIF::INVALID_DATA; } if (mode == _MODE_START_UP) { commandExecuted = true; @@ -242,7 +242,7 @@ ReturnValue_t BpxBatteryHandler::interpretDeviceReply(DeviceCommandId_t id, cons cfgSet.setValidity(true, true); break; } - case(BpxBattery::REBOOT): { + case (BpxBattery::REBOOT): { break; } default: { diff --git a/mission/devices/devicedefinitions/BpxBatteryDefinitions.h b/mission/devices/devicedefinitions/BpxBatteryDefinitions.h index 333119f2..54d4e1f8 100644 --- a/mission/devices/devicedefinitions/BpxBatteryDefinitions.h +++ b/mission/devices/devicedefinitions/BpxBatteryDefinitions.h @@ -4,10 +4,10 @@ #include #include -#include "fsfw/devicehandlers/DeviceHandlerIF.h" - #include +#include "fsfw/devicehandlers/DeviceHandlerIF.h" + namespace BpxBattery { enum LocalPoolIds { @@ -186,24 +186,18 @@ class BpxBatteryHk : public StaticLocalDataSet { lp_var_t(sid.objectId, BpxBattery::HEATER_CURRENT, this); //! Battery voltage in mV - lp_var_t battVoltage = - lp_var_t(sid.objectId, BpxBattery::BATT_VOLTAGE, this); + lp_var_t battVoltage = lp_var_t(sid.objectId, BpxBattery::BATT_VOLTAGE, this); //! Battery temperature 1 in degC - lp_var_t battTemp1 = - lp_var_t(sid.objectId, BpxBattery::BATT_TEMP_1, this); + lp_var_t battTemp1 = lp_var_t(sid.objectId, BpxBattery::BATT_TEMP_1, this); //! Battery temperature 2 in degC - lp_var_t battTemp2 = - lp_var_t(sid.objectId, BpxBattery::BATT_TEMP_2, this); + lp_var_t battTemp2 = lp_var_t(sid.objectId, BpxBattery::BATT_TEMP_2, this); //! Battery temperature 3 in degC - lp_var_t battTemp3 = - lp_var_t(sid.objectId, BpxBattery::BATT_TEMP_3, this); + lp_var_t battTemp3 = lp_var_t(sid.objectId, BpxBattery::BATT_TEMP_3, this); //! Battery temperature 4 in degC - lp_var_t battTemp4 = - lp_var_t(sid.objectId, BpxBattery::BATT_TEMP_4, this); + lp_var_t battTemp4 = lp_var_t(sid.objectId, BpxBattery::BATT_TEMP_4, this); lp_var_t rebootCounter = lp_var_t(sid.objectId, BpxBattery::REBOOT_COUNTER, this); - lp_var_t bootcause = - lp_var_t(sid.objectId, BpxBattery::BOOTCAUSE, this); + lp_var_t bootcause = lp_var_t(sid.objectId, BpxBattery::BOOTCAUSE, this); private: friend class BpxBatteryHandler; From 339b8e8eccaa4cb9725f5771a255443e81c1c28a Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 3 Feb 2022 16:19:44 +0100 Subject: [PATCH 31/39] tmtc update --- tmtc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmtc b/tmtc index 2b89a7f2..84c27308 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 2b89a7f2697a21e9fc9101ca320afb7bf49c8e9d +Subproject commit 84c2730836e6821ff089d7567018fe4ffded62db From 2cdd192eebb98d8493c0430f249aff5f44b4db75 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 3 Feb 2022 16:25:16 +0100 Subject: [PATCH 32/39] fix decode error with imtq defintions --- generators/events/translateEvents.cpp | 2 +- linux/fsfwconfig/events/translateEvents.cpp | 478 +++++++++--------- linux/fsfwconfig/events/translateEvents.h | 2 +- .../IMTQHandlerDefinitions.h | 14 +- 4 files changed, 248 insertions(+), 248 deletions(-) diff --git a/generators/events/translateEvents.cpp b/generators/events/translateEvents.cpp index 70e0c2a7..52c67652 100644 --- a/generators/events/translateEvents.cpp +++ b/generators/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** * @brief Auto-generated event translation file. Contains 116 translations. * @details - * Generated on: 2022-02-03 12:03:33 + * Generated on: 2022-02-03 16:24:52 */ #include "translateEvents.h" diff --git a/linux/fsfwconfig/events/translateEvents.cpp b/linux/fsfwconfig/events/translateEvents.cpp index 787020ed..52c67652 100644 --- a/linux/fsfwconfig/events/translateEvents.cpp +++ b/linux/fsfwconfig/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** * @brief Auto-generated event translation file. Contains 116 translations. * @details - * Generated on: 2022-02-03 12:03:33 + * Generated on: 2022-02-03 16:24:52 */ #include "translateEvents.h" @@ -122,242 +122,242 @@ const char *STR_HELPER_FILE_NOT_EXISTS_STRING = "STR_HELPER_FILE_NOT_EXISTS"; const char *STR_HELPER_SENDING_PACKET_FAILED_STRING = "STR_HELPER_SENDING_PACKET_FAILED"; const char *STR_HELPER_REQUESTING_MSG_FAILED_STRING = "STR_HELPER_REQUESTING_MSG_FAILED"; -const char *translateEvents(Event event) { - switch ((event & 0xffff)) { - case (2201): - return STORE_WRITE_FAILED_STRING; - case (2203): - return STORE_READ_FAILED_STRING; - case (2205): - return STORING_FAILED_STRING; - case (2208): - return STORE_INIT_EMPTY_STRING; - case (2211): - return INIT_DONE_STRING; - case (2212): - return DUMP_FINISHED_STRING; - case (2213): - return DELETION_FINISHED_STRING; - case (2214): - return DELETION_FAILED_STRING; - case (2600): - return GET_DATA_FAILED_STRING; - case (2601): - return STORE_DATA_FAILED_STRING; - case (2800): - return DEVICE_BUILDING_COMMAND_FAILED_STRING; - case (2801): - return DEVICE_SENDING_COMMAND_FAILED_STRING; - case (2802): - return DEVICE_REQUESTING_REPLY_FAILED_STRING; - case (2803): - return DEVICE_READING_REPLY_FAILED_STRING; - case (2804): - return DEVICE_INTERPRETING_REPLY_FAILED_STRING; - case (2805): - return DEVICE_MISSED_REPLY_STRING; - case (2806): - return DEVICE_UNKNOWN_REPLY_STRING; - case (2807): - return DEVICE_UNREQUESTED_REPLY_STRING; - case (2808): - return INVALID_DEVICE_COMMAND_STRING; - case (2809): - return MONITORING_LIMIT_EXCEEDED_STRING; - case (2810): - return MONITORING_AMBIGUOUS_STRING; - case (2811): - return DEVICE_WANTS_HARD_REBOOT_STRING; - case (4201): - return FUSE_CURRENT_HIGH_STRING; - case (4300): - return SWITCH_WENT_OFF_STRING; - case (5000): - return HEATER_ON_STRING; - case (5001): - return HEATER_OFF_STRING; - case (5002): - return HEATER_TIMEOUT_STRING; - case (5003): - return HEATER_STAYED_ON_STRING; - case (5004): - return HEATER_STAYED_OFF_STRING; - case (5200): - return TEMP_SENSOR_HIGH_STRING; - case (5201): - return TEMP_SENSOR_LOW_STRING; - case (5202): - return TEMP_SENSOR_GRADIENT_STRING; - case (5901): - return COMPONENT_TEMP_LOW_STRING; - case (5902): - return COMPONENT_TEMP_HIGH_STRING; - case (5903): - return COMPONENT_TEMP_OOL_LOW_STRING; - case (5904): - return COMPONENT_TEMP_OOL_HIGH_STRING; - case (5905): - return TEMP_NOT_IN_OP_RANGE_STRING; - case (7102): - return FDIR_STARTS_RECOVERY_STRING; - case (7103): - return FDIR_TURNS_OFF_DEVICE_STRING; - case (7201): - return MONITOR_CHANGED_STATE_STRING; - case (7202): - return VALUE_BELOW_LOW_LIMIT_STRING; - case (7203): - return VALUE_ABOVE_HIGH_LIMIT_STRING; - case (7204): - return VALUE_OUT_OF_RANGE_STRING; - case (7401): - return MODE_INFO_STRING; - case (7402): - return FALLBACK_FAILED_STRING; - case (7403): - return MODE_TRANSITION_FAILED_STRING; - case (7404): - return CANT_KEEP_MODE_STRING; - case (7406): - return FORCING_MODE_STRING; - case (7506): - return HEALTH_INFO_STRING; - case (7507): - return CHILD_CHANGED_HEALTH_STRING; - case (7508): - return CHILD_PROBLEMS_STRING; - case (7512): - return RECOVERY_DONE_STRING; - case (7900): - return RF_AVAILABLE_STRING; - case (7901): - return RF_LOST_STRING; - case (7902): - return BIT_LOCK_STRING; - case (7903): - return BIT_LOCK_LOST_STRING; - case (7905): - return FRAME_PROCESSING_FAILED_STRING; - case (9700): - return TEST_STRING; - case (10600): - return CHANGE_OF_SETUP_PARAMETER_STRING; - case (10900): - return GPIO_PULL_HIGH_FAILED_STRING; - case (10901): - return GPIO_PULL_LOW_FAILED_STRING; - case (10902): - return SWITCH_ALREADY_ON_STRING; - case (10903): - return SWITCH_ALREADY_OFF_STRING; - case (10904): - return MAIN_SWITCH_TIMEOUT_STRING; - case (11000): - return MAIN_SWITCH_ON_TIMEOUT_STRING; - case (11001): - return MAIN_SWITCH_OFF_TIMEOUT_STRING; - case (11002): - return DEPLOYMENT_FAILED_STRING; - case (11003): - return DEPL_SA1_GPIO_SWTICH_ON_FAILED_STRING; - case (11004): - return DEPL_SA2_GPIO_SWTICH_ON_FAILED_STRING; - case (11201): - return SELF_TEST_I2C_FAILURE_STRING; - case (11202): - return SELF_TEST_SPI_FAILURE_STRING; - case (11203): - return SELF_TEST_ADC_FAILURE_STRING; - case (11204): - return SELF_TEST_PWM_FAILURE_STRING; - case (11205): - return SELF_TEST_TC_FAILURE_STRING; - case (11206): - return SELF_TEST_MTM_RANGE_FAILURE_STRING; - case (11207): - return SELF_TEST_COIL_CURRENT_FAILURE_STRING; - case (11208): - return INVALID_ERROR_BYTE_STRING; - case (11301): - return ERROR_STATE_STRING; - case (11501): - return SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING; - case (11502): - return SUPV_ACK_FAILURE_STRING; - case (11503): - return SUPV_EXE_FAILURE_STRING; - case (11504): - return SUPV_CRC_FAILURE_EVENT_STRING; - case (11600): - return SANITIZATION_FAILED_STRING; - case (11700): - return UPDATE_FILE_NOT_EXISTS_STRING; - case (11701): - return ACTION_COMMANDING_FAILED_STRING; - case (11702): - return UPDATE_AVAILABLE_FAILED_STRING; - case (11703): - return UPDATE_TRANSFER_FAILED_STRING; - case (11704): - return UPDATE_VERIFY_FAILED_STRING; - case (11705): - return UPDATE_FINISHED_STRING; - case (11800): - return SEND_MRAM_DUMP_FAILED_STRING; - case (11801): - return MRAM_DUMP_FAILED_STRING; - case (11802): - return MRAM_DUMP_FINISHED_STRING; - case (11901): - return INVALID_TC_FRAME_STRING; - case (11902): - return INVALID_FAR_STRING; - case (11903): - return CARRIER_LOCK_STRING; - case (11904): - return BIT_LOCK_PDEC_STRING; - case (12000): - return IMAGE_UPLOAD_FAILED_STRING; - case (12001): - return IMAGE_DOWNLOAD_FAILED_STRING; - case (12002): - return IMAGE_UPLOAD_SUCCESSFUL_STRING; - case (12003): - return IMAGE_DOWNLOAD_SUCCESSFUL_STRING; - case (12004): - return FLASH_WRITE_SUCCESSFUL_STRING; - case (12005): - return FLASH_READ_SUCCESSFUL_STRING; - case (12006): - return FLASH_WRITE_FAILED_STRING; - case (12007): - return FLASH_READ_FAILED_STRING; - case (12008): - return FPGA_DOWNLOAD_SUCCESSFUL_STRING; - case (12009): - return FPGA_DOWNLOAD_FAILED_STRING; - case (12010): - return FPGA_UPLOAD_SUCCESSFUL_STRING; - case (12011): - return FPGA_UPLOAD_FAILED_STRING; - case (12012): - return STR_HELPER_READING_REPLY_FAILED_STRING; - case (12013): - return STR_HELPER_COM_ERROR_STRING; - case (12014): - return STR_HELPER_NO_REPLY_STRING; - case (12015): - return STR_HELPER_DEC_ERROR_STRING; - case (12016): - return POSITION_MISMATCH_STRING; - case (12017): - return STR_HELPER_FILE_NOT_EXISTS_STRING; - case (12018): - return STR_HELPER_SENDING_PACKET_FAILED_STRING; - case (12019): - return STR_HELPER_REQUESTING_MSG_FAILED_STRING; - default: - return "UNKNOWN_EVENT"; - } - return 0; +const char * translateEvents(Event event) { + switch( (event & 0xffff) ) { + case(2201): + return STORE_WRITE_FAILED_STRING; + case(2203): + return STORE_READ_FAILED_STRING; + case(2205): + return STORING_FAILED_STRING; + case(2208): + return STORE_INIT_EMPTY_STRING; + case(2211): + return INIT_DONE_STRING; + case(2212): + return DUMP_FINISHED_STRING; + case(2213): + return DELETION_FINISHED_STRING; + case(2214): + return DELETION_FAILED_STRING; + case(2600): + return GET_DATA_FAILED_STRING; + case(2601): + return STORE_DATA_FAILED_STRING; + case(2800): + return DEVICE_BUILDING_COMMAND_FAILED_STRING; + case(2801): + return DEVICE_SENDING_COMMAND_FAILED_STRING; + case(2802): + return DEVICE_REQUESTING_REPLY_FAILED_STRING; + case(2803): + return DEVICE_READING_REPLY_FAILED_STRING; + case(2804): + return DEVICE_INTERPRETING_REPLY_FAILED_STRING; + case(2805): + return DEVICE_MISSED_REPLY_STRING; + case(2806): + return DEVICE_UNKNOWN_REPLY_STRING; + case(2807): + return DEVICE_UNREQUESTED_REPLY_STRING; + case(2808): + return INVALID_DEVICE_COMMAND_STRING; + case(2809): + return MONITORING_LIMIT_EXCEEDED_STRING; + case(2810): + return MONITORING_AMBIGUOUS_STRING; + case(2811): + return DEVICE_WANTS_HARD_REBOOT_STRING; + case(4201): + return FUSE_CURRENT_HIGH_STRING; + case(4300): + return SWITCH_WENT_OFF_STRING; + case(5000): + return HEATER_ON_STRING; + case(5001): + return HEATER_OFF_STRING; + case(5002): + return HEATER_TIMEOUT_STRING; + case(5003): + return HEATER_STAYED_ON_STRING; + case(5004): + return HEATER_STAYED_OFF_STRING; + case(5200): + return TEMP_SENSOR_HIGH_STRING; + case(5201): + return TEMP_SENSOR_LOW_STRING; + case(5202): + return TEMP_SENSOR_GRADIENT_STRING; + case(5901): + return COMPONENT_TEMP_LOW_STRING; + case(5902): + return COMPONENT_TEMP_HIGH_STRING; + case(5903): + return COMPONENT_TEMP_OOL_LOW_STRING; + case(5904): + return COMPONENT_TEMP_OOL_HIGH_STRING; + case(5905): + return TEMP_NOT_IN_OP_RANGE_STRING; + case(7102): + return FDIR_STARTS_RECOVERY_STRING; + case(7103): + return FDIR_TURNS_OFF_DEVICE_STRING; + case(7201): + return MONITOR_CHANGED_STATE_STRING; + case(7202): + return VALUE_BELOW_LOW_LIMIT_STRING; + case(7203): + return VALUE_ABOVE_HIGH_LIMIT_STRING; + case(7204): + return VALUE_OUT_OF_RANGE_STRING; + case(7401): + return MODE_INFO_STRING; + case(7402): + return FALLBACK_FAILED_STRING; + case(7403): + return MODE_TRANSITION_FAILED_STRING; + case(7404): + return CANT_KEEP_MODE_STRING; + case(7406): + return FORCING_MODE_STRING; + case(7506): + return HEALTH_INFO_STRING; + case(7507): + return CHILD_CHANGED_HEALTH_STRING; + case(7508): + return CHILD_PROBLEMS_STRING; + case(7512): + return RECOVERY_DONE_STRING; + case(7900): + return RF_AVAILABLE_STRING; + case(7901): + return RF_LOST_STRING; + case(7902): + return BIT_LOCK_STRING; + case(7903): + return BIT_LOCK_LOST_STRING; + case(7905): + return FRAME_PROCESSING_FAILED_STRING; + case(9700): + return TEST_STRING; + case(10600): + return CHANGE_OF_SETUP_PARAMETER_STRING; + case(10900): + return GPIO_PULL_HIGH_FAILED_STRING; + case(10901): + return GPIO_PULL_LOW_FAILED_STRING; + case(10902): + return SWITCH_ALREADY_ON_STRING; + case(10903): + return SWITCH_ALREADY_OFF_STRING; + case(10904): + return MAIN_SWITCH_TIMEOUT_STRING; + case(11000): + return MAIN_SWITCH_ON_TIMEOUT_STRING; + case(11001): + return MAIN_SWITCH_OFF_TIMEOUT_STRING; + case(11002): + return DEPLOYMENT_FAILED_STRING; + case(11003): + return DEPL_SA1_GPIO_SWTICH_ON_FAILED_STRING; + case(11004): + return DEPL_SA2_GPIO_SWTICH_ON_FAILED_STRING; + case(11201): + return SELF_TEST_I2C_FAILURE_STRING; + case(11202): + return SELF_TEST_SPI_FAILURE_STRING; + case(11203): + return SELF_TEST_ADC_FAILURE_STRING; + case(11204): + return SELF_TEST_PWM_FAILURE_STRING; + case(11205): + return SELF_TEST_TC_FAILURE_STRING; + case(11206): + return SELF_TEST_MTM_RANGE_FAILURE_STRING; + case(11207): + return SELF_TEST_COIL_CURRENT_FAILURE_STRING; + case(11208): + return INVALID_ERROR_BYTE_STRING; + case(11301): + return ERROR_STATE_STRING; + case(11501): + return SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING; + case(11502): + return SUPV_ACK_FAILURE_STRING; + case(11503): + return SUPV_EXE_FAILURE_STRING; + case(11504): + return SUPV_CRC_FAILURE_EVENT_STRING; + case(11600): + return SANITIZATION_FAILED_STRING; + case(11700): + return UPDATE_FILE_NOT_EXISTS_STRING; + case(11701): + return ACTION_COMMANDING_FAILED_STRING; + case(11702): + return UPDATE_AVAILABLE_FAILED_STRING; + case(11703): + return UPDATE_TRANSFER_FAILED_STRING; + case(11704): + return UPDATE_VERIFY_FAILED_STRING; + case(11705): + return UPDATE_FINISHED_STRING; + case(11800): + return SEND_MRAM_DUMP_FAILED_STRING; + case(11801): + return MRAM_DUMP_FAILED_STRING; + case(11802): + return MRAM_DUMP_FINISHED_STRING; + case(11901): + return INVALID_TC_FRAME_STRING; + case(11902): + return INVALID_FAR_STRING; + case(11903): + return CARRIER_LOCK_STRING; + case(11904): + return BIT_LOCK_PDEC_STRING; + case(12000): + return IMAGE_UPLOAD_FAILED_STRING; + case(12001): + return IMAGE_DOWNLOAD_FAILED_STRING; + case(12002): + return IMAGE_UPLOAD_SUCCESSFUL_STRING; + case(12003): + return IMAGE_DOWNLOAD_SUCCESSFUL_STRING; + case(12004): + return FLASH_WRITE_SUCCESSFUL_STRING; + case(12005): + return FLASH_READ_SUCCESSFUL_STRING; + case(12006): + return FLASH_WRITE_FAILED_STRING; + case(12007): + return FLASH_READ_FAILED_STRING; + case(12008): + return FPGA_DOWNLOAD_SUCCESSFUL_STRING; + case(12009): + return FPGA_DOWNLOAD_FAILED_STRING; + case(12010): + return FPGA_UPLOAD_SUCCESSFUL_STRING; + case(12011): + return FPGA_UPLOAD_FAILED_STRING; + case(12012): + return STR_HELPER_READING_REPLY_FAILED_STRING; + case(12013): + return STR_HELPER_COM_ERROR_STRING; + case(12014): + return STR_HELPER_NO_REPLY_STRING; + case(12015): + return STR_HELPER_DEC_ERROR_STRING; + case(12016): + return POSITION_MISMATCH_STRING; + case(12017): + return STR_HELPER_FILE_NOT_EXISTS_STRING; + case(12018): + return STR_HELPER_SENDING_PACKET_FAILED_STRING; + case(12019): + return STR_HELPER_REQUESTING_MSG_FAILED_STRING; + default: + return "UNKNOWN_EVENT"; + } + return 0; } diff --git a/linux/fsfwconfig/events/translateEvents.h b/linux/fsfwconfig/events/translateEvents.h index 1b8a8831..bdabb21b 100644 --- a/linux/fsfwconfig/events/translateEvents.h +++ b/linux/fsfwconfig/events/translateEvents.h @@ -3,6 +3,6 @@ #include "fsfw/events/Event.h" -const char* translateEvents(Event event); +const char * translateEvents(Event event); #endif /* FSFWCONFIG_EVENTS_TRANSLATEEVENTS_H_ */ diff --git a/mission/devices/devicedefinitions/IMTQHandlerDefinitions.h b/mission/devices/devicedefinitions/IMTQHandlerDefinitions.h index 609bbdf8..69a3d048 100644 --- a/mission/devices/devicedefinitions/IMTQHandlerDefinitions.h +++ b/mission/devices/devicedefinitions/IMTQHandlerDefinitions.h @@ -390,7 +390,7 @@ class EngHkDataset : public StaticLocalDataSet { lp_var_t coilXCurrentmA = lp_var_t(sid.objectId, COIL_X_CURRENT, this); lp_var_t coilYCurrentmA = lp_var_t(sid.objectId, COIL_Y_CURRENT, this); lp_var_t coilZCurrentmA = lp_var_t(sid.objectId, COIL_Z_CURRENT, this); - /** All temperatures in [°C] */ + /** All temperatures in [�C] */ lp_var_t coilXTemperature = lp_var_t(sid.objectId, COIL_X_TEMPERATURE, this); lp_var_t coilYTemperature = lp_var_t(sid.objectId, COIL_Y_TEMPERATURE, this); lp_var_t coilZTemperature = lp_var_t(sid.objectId, COIL_Z_TEMPERATURE, this); @@ -477,7 +477,7 @@ class CommandDipolePacket : public SerialLinkedListAdapter { * Raw magnetic field: [nT] * Calibrated magnetic field: [nT] * Coil currents: [mA] - * Temperature: [°C] + * Temperature: [C] * The +X self test generates a positive dipole in X direction and measures the magnetic * field with the built-in MTM. The procedure of the test is as follows: * 1. All coils off (INIT step) @@ -554,7 +554,7 @@ class PosXSelfTestSet : public StaticLocalDataSet { * Raw magnetic field: [nT] * Calibrated magnetic field: [nT] * Coil currents: [mA] - * Temperature: [°C] + * Temperature: [C] * The -X self test generates a negative dipole in X direction and measures the magnetic * field with the built-in MTM. The procedure of the test is as follows: * 1. All coils off (INIT step) @@ -631,7 +631,7 @@ class NegXSelfTestSet : public StaticLocalDataSet { * Raw magnetic field: [nT] * Calibrated magnetic field: [nT] * Coil currents: [mA] - * Temperature: [°C] + * Temperature: [C] * The +Y self test generates a positive dipole in y direction and measures the magnetic * field with the built-in MTM. The procedure of the test is as follows: * 1. All coils off (INIT step) @@ -708,7 +708,7 @@ class PosYSelfTestSet : public StaticLocalDataSet { * Raw magnetic field: [nT] * Calibrated magnetic field: [nT] * Coil currents: [mA] - * Temperature: [°C] + * Temperature: [C] * The -Y self test generates a negative dipole in y direction and measures the magnetic * field with the built-in MTM. The procedure of the test is as follows: * 1. All coils off (INIT step) @@ -785,7 +785,7 @@ class NegYSelfTestSet : public StaticLocalDataSet { * Raw magnetic field: [nT] * Calibrated magnetic field: [nT] * Coil currents: [mA] - * Temperature: [°C] + * Temperature: [C] * The +Z self test generates a positive dipole in z direction and measures the magnetic * field with the built-in MTM. The procedure of the test is as follows: * 1. All coils off (INIT step) @@ -862,7 +862,7 @@ class PosZSelfTestSet : public StaticLocalDataSet { * Raw magnetic field: [nT] * Calibrated magnetic field: [nT] * Coil currents: [mA] - * Temperature: [°C] + * Temperature: [C] * The -Z self test generates a negative dipole in z direction and measures the magnetic * field with the built-in MTM. The procedure of the test is as follows: * 1. All coils off (INIT step) From 39471d826125a872afcf9c280839bf45320647e3 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 3 Feb 2022 17:06:40 +0100 Subject: [PATCH 33/39] added back some events --- fsfw | 2 +- generators/bsp_q7s_events.csv | 17 +++++++ generators/events/translateEvents.cpp | 55 ++++++++++++++++++++- linux/fsfwconfig/events/translateEvents.cpp | 55 ++++++++++++++++++++- mission/devices/PlocMPSoCHandler.h | 24 ++++++--- 5 files changed, 140 insertions(+), 13 deletions(-) diff --git a/fsfw b/fsfw index b3151a0b..b3aee76d 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit b3151a0ba033e7c72c3ead1e8958d7be596baa45 +Subproject commit b3aee76d91cdc8da568d844a83fcfde4faadce81 diff --git a/generators/bsp_q7s_events.csv b/generators/bsp_q7s_events.csv index 4a82c156..8d2c6285 100644 --- a/generators/bsp_q7s_events.csv +++ b/generators/bsp_q7s_events.csv @@ -1,11 +1,19 @@ +2200;STORE_SEND_WRITE_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h 2201;STORE_WRITE_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h +2202;STORE_SEND_READ_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h 2203;STORE_READ_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h +2204;UNEXPECTED_MSG;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h 2205;STORING_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h +2206;TM_DUMP_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h +2207;STORE_INIT_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h 2208;STORE_INIT_EMPTY;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h +2209;STORE_CONTENT_CORRUPTED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h +2210;STORE_INITIALIZE;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h 2211;INIT_DONE;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h 2212;DUMP_FINISHED;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h 2213;DELETION_FINISHED;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h 2214;DELETION_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h +2215;AUTO_CATALOGS_SENDING_FAILED;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h 2600;GET_DATA_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/storagemanager/StorageManagerIF.h 2601;STORE_DATA_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/storagemanager/StorageManagerIF.h 2800;DEVICE_BUILDING_COMMAND_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h @@ -21,6 +29,9 @@ 2810;MONITORING_AMBIGUOUS;HIGH;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h 2811;DEVICE_WANTS_HARD_REBOOT;HIGH;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h 4201;FUSE_CURRENT_HIGH;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/power/Fuse.h +4202;FUSE_WENT_OFF;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/power/Fuse.h +4204;POWER_ABOVE_HIGH_LIMIT;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/power/Fuse.h +4205;POWER_BELOW_LOW_LIMIT;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/power/Fuse.h 4300;SWITCH_WENT_OFF;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/power/PowerSwitchIF.h 5000;HEATER_ON;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/thermal/Heater.h 5001;HEATER_OFF;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/thermal/Heater.h @@ -41,14 +52,20 @@ 7202;VALUE_BELOW_LOW_LIMIT;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h 7203;VALUE_ABOVE_HIGH_LIMIT;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h 7204;VALUE_OUT_OF_RANGE;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h +7400;CHANGING_MODE;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h 7401;MODE_INFO;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h 7402;FALLBACK_FAILED;HIGH;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h 7403;MODE_TRANSITION_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h 7404;CANT_KEEP_MODE;HIGH;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h +7405;OBJECT_IN_INVALID_MODE;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h 7406;FORCING_MODE;MEDIUM;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h +7407;MODE_CMD_REJECTED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h 7506;HEALTH_INFO;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/health/HasHealthIF.h 7507;CHILD_CHANGED_HEALTH;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/health/HasHealthIF.h 7508;CHILD_PROBLEMS;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/health/HasHealthIF.h +7509;OVERWRITING_HEALTH;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/health/HasHealthIF.h +7510;TRYING_RECOVERY;MEDIUM;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/health/HasHealthIF.h +7511;RECOVERY_STEP;MEDIUM;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/health/HasHealthIF.h 7512;RECOVERY_DONE;MEDIUM;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/health/HasHealthIF.h 7900;RF_AVAILABLE;INFO;A RF available signal was detected. P1: raw RFA state, P2: 0;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h 7901;RF_LOST;INFO;A previously found RF available signal was lost. P1: raw RFA state, P2: 0;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h diff --git a/generators/events/translateEvents.cpp b/generators/events/translateEvents.cpp index 52c67652..0e2de0ef 100644 --- a/generators/events/translateEvents.cpp +++ b/generators/events/translateEvents.cpp @@ -1,18 +1,26 @@ /** - * @brief Auto-generated event translation file. Contains 116 translations. + * @brief Auto-generated event translation file. Contains 133 translations. * @details - * Generated on: 2022-02-03 16:24:52 + * Generated on: 2022-02-03 17:06:01 */ #include "translateEvents.h" +const char *STORE_SEND_WRITE_FAILED_STRING = "STORE_SEND_WRITE_FAILED"; const char *STORE_WRITE_FAILED_STRING = "STORE_WRITE_FAILED"; +const char *STORE_SEND_READ_FAILED_STRING = "STORE_SEND_READ_FAILED"; const char *STORE_READ_FAILED_STRING = "STORE_READ_FAILED"; +const char *UNEXPECTED_MSG_STRING = "UNEXPECTED_MSG"; const char *STORING_FAILED_STRING = "STORING_FAILED"; +const char *TM_DUMP_FAILED_STRING = "TM_DUMP_FAILED"; +const char *STORE_INIT_FAILED_STRING = "STORE_INIT_FAILED"; const char *STORE_INIT_EMPTY_STRING = "STORE_INIT_EMPTY"; +const char *STORE_CONTENT_CORRUPTED_STRING = "STORE_CONTENT_CORRUPTED"; +const char *STORE_INITIALIZE_STRING = "STORE_INITIALIZE"; const char *INIT_DONE_STRING = "INIT_DONE"; const char *DUMP_FINISHED_STRING = "DUMP_FINISHED"; const char *DELETION_FINISHED_STRING = "DELETION_FINISHED"; const char *DELETION_FAILED_STRING = "DELETION_FAILED"; +const char *AUTO_CATALOGS_SENDING_FAILED_STRING = "AUTO_CATALOGS_SENDING_FAILED"; const char *GET_DATA_FAILED_STRING = "GET_DATA_FAILED"; const char *STORE_DATA_FAILED_STRING = "STORE_DATA_FAILED"; const char *DEVICE_BUILDING_COMMAND_FAILED_STRING = "DEVICE_BUILDING_COMMAND_FAILED"; @@ -28,6 +36,9 @@ const char *MONITORING_LIMIT_EXCEEDED_STRING = "MONITORING_LIMIT_EXCEEDED"; const char *MONITORING_AMBIGUOUS_STRING = "MONITORING_AMBIGUOUS"; const char *DEVICE_WANTS_HARD_REBOOT_STRING = "DEVICE_WANTS_HARD_REBOOT"; const char *FUSE_CURRENT_HIGH_STRING = "FUSE_CURRENT_HIGH"; +const char *FUSE_WENT_OFF_STRING = "FUSE_WENT_OFF"; +const char *POWER_ABOVE_HIGH_LIMIT_STRING = "POWER_ABOVE_HIGH_LIMIT"; +const char *POWER_BELOW_LOW_LIMIT_STRING = "POWER_BELOW_LOW_LIMIT"; const char *SWITCH_WENT_OFF_STRING = "SWITCH_WENT_OFF"; const char *HEATER_ON_STRING = "HEATER_ON"; const char *HEATER_OFF_STRING = "HEATER_OFF"; @@ -48,14 +59,20 @@ const char *MONITOR_CHANGED_STATE_STRING = "MONITOR_CHANGED_STATE"; const char *VALUE_BELOW_LOW_LIMIT_STRING = "VALUE_BELOW_LOW_LIMIT"; const char *VALUE_ABOVE_HIGH_LIMIT_STRING = "VALUE_ABOVE_HIGH_LIMIT"; const char *VALUE_OUT_OF_RANGE_STRING = "VALUE_OUT_OF_RANGE"; +const char *CHANGING_MODE_STRING = "CHANGING_MODE"; const char *MODE_INFO_STRING = "MODE_INFO"; const char *FALLBACK_FAILED_STRING = "FALLBACK_FAILED"; const char *MODE_TRANSITION_FAILED_STRING = "MODE_TRANSITION_FAILED"; const char *CANT_KEEP_MODE_STRING = "CANT_KEEP_MODE"; +const char *OBJECT_IN_INVALID_MODE_STRING = "OBJECT_IN_INVALID_MODE"; const char *FORCING_MODE_STRING = "FORCING_MODE"; +const char *MODE_CMD_REJECTED_STRING = "MODE_CMD_REJECTED"; const char *HEALTH_INFO_STRING = "HEALTH_INFO"; const char *CHILD_CHANGED_HEALTH_STRING = "CHILD_CHANGED_HEALTH"; const char *CHILD_PROBLEMS_STRING = "CHILD_PROBLEMS"; +const char *OVERWRITING_HEALTH_STRING = "OVERWRITING_HEALTH"; +const char *TRYING_RECOVERY_STRING = "TRYING_RECOVERY"; +const char *RECOVERY_STEP_STRING = "RECOVERY_STEP"; const char *RECOVERY_DONE_STRING = "RECOVERY_DONE"; const char *RF_AVAILABLE_STRING = "RF_AVAILABLE"; const char *RF_LOST_STRING = "RF_LOST"; @@ -124,14 +141,28 @@ const char *STR_HELPER_REQUESTING_MSG_FAILED_STRING = "STR_HELPER_REQUESTING_MSG const char * translateEvents(Event event) { switch( (event & 0xffff) ) { + case(2200): + return STORE_SEND_WRITE_FAILED_STRING; case(2201): return STORE_WRITE_FAILED_STRING; + case(2202): + return STORE_SEND_READ_FAILED_STRING; case(2203): return STORE_READ_FAILED_STRING; + case(2204): + return UNEXPECTED_MSG_STRING; case(2205): return STORING_FAILED_STRING; + case(2206): + return TM_DUMP_FAILED_STRING; + case(2207): + return STORE_INIT_FAILED_STRING; case(2208): return STORE_INIT_EMPTY_STRING; + case(2209): + return STORE_CONTENT_CORRUPTED_STRING; + case(2210): + return STORE_INITIALIZE_STRING; case(2211): return INIT_DONE_STRING; case(2212): @@ -140,6 +171,8 @@ const char * translateEvents(Event event) { return DELETION_FINISHED_STRING; case(2214): return DELETION_FAILED_STRING; + case(2215): + return AUTO_CATALOGS_SENDING_FAILED_STRING; case(2600): return GET_DATA_FAILED_STRING; case(2601): @@ -170,6 +203,12 @@ const char * translateEvents(Event event) { return DEVICE_WANTS_HARD_REBOOT_STRING; case(4201): return FUSE_CURRENT_HIGH_STRING; + case(4202): + return FUSE_WENT_OFF_STRING; + case(4204): + return POWER_ABOVE_HIGH_LIMIT_STRING; + case(4205): + return POWER_BELOW_LOW_LIMIT_STRING; case(4300): return SWITCH_WENT_OFF_STRING; case(5000): @@ -210,6 +249,8 @@ const char * translateEvents(Event event) { return VALUE_ABOVE_HIGH_LIMIT_STRING; case(7204): return VALUE_OUT_OF_RANGE_STRING; + case(7400): + return CHANGING_MODE_STRING; case(7401): return MODE_INFO_STRING; case(7402): @@ -218,14 +259,24 @@ const char * translateEvents(Event event) { return MODE_TRANSITION_FAILED_STRING; case(7404): return CANT_KEEP_MODE_STRING; + case(7405): + return OBJECT_IN_INVALID_MODE_STRING; case(7406): return FORCING_MODE_STRING; + case(7407): + return MODE_CMD_REJECTED_STRING; case(7506): return HEALTH_INFO_STRING; case(7507): return CHILD_CHANGED_HEALTH_STRING; case(7508): return CHILD_PROBLEMS_STRING; + case(7509): + return OVERWRITING_HEALTH_STRING; + case(7510): + return TRYING_RECOVERY_STRING; + case(7511): + return RECOVERY_STEP_STRING; case(7512): return RECOVERY_DONE_STRING; case(7900): diff --git a/linux/fsfwconfig/events/translateEvents.cpp b/linux/fsfwconfig/events/translateEvents.cpp index 52c67652..0e2de0ef 100644 --- a/linux/fsfwconfig/events/translateEvents.cpp +++ b/linux/fsfwconfig/events/translateEvents.cpp @@ -1,18 +1,26 @@ /** - * @brief Auto-generated event translation file. Contains 116 translations. + * @brief Auto-generated event translation file. Contains 133 translations. * @details - * Generated on: 2022-02-03 16:24:52 + * Generated on: 2022-02-03 17:06:01 */ #include "translateEvents.h" +const char *STORE_SEND_WRITE_FAILED_STRING = "STORE_SEND_WRITE_FAILED"; const char *STORE_WRITE_FAILED_STRING = "STORE_WRITE_FAILED"; +const char *STORE_SEND_READ_FAILED_STRING = "STORE_SEND_READ_FAILED"; const char *STORE_READ_FAILED_STRING = "STORE_READ_FAILED"; +const char *UNEXPECTED_MSG_STRING = "UNEXPECTED_MSG"; const char *STORING_FAILED_STRING = "STORING_FAILED"; +const char *TM_DUMP_FAILED_STRING = "TM_DUMP_FAILED"; +const char *STORE_INIT_FAILED_STRING = "STORE_INIT_FAILED"; const char *STORE_INIT_EMPTY_STRING = "STORE_INIT_EMPTY"; +const char *STORE_CONTENT_CORRUPTED_STRING = "STORE_CONTENT_CORRUPTED"; +const char *STORE_INITIALIZE_STRING = "STORE_INITIALIZE"; const char *INIT_DONE_STRING = "INIT_DONE"; const char *DUMP_FINISHED_STRING = "DUMP_FINISHED"; const char *DELETION_FINISHED_STRING = "DELETION_FINISHED"; const char *DELETION_FAILED_STRING = "DELETION_FAILED"; +const char *AUTO_CATALOGS_SENDING_FAILED_STRING = "AUTO_CATALOGS_SENDING_FAILED"; const char *GET_DATA_FAILED_STRING = "GET_DATA_FAILED"; const char *STORE_DATA_FAILED_STRING = "STORE_DATA_FAILED"; const char *DEVICE_BUILDING_COMMAND_FAILED_STRING = "DEVICE_BUILDING_COMMAND_FAILED"; @@ -28,6 +36,9 @@ const char *MONITORING_LIMIT_EXCEEDED_STRING = "MONITORING_LIMIT_EXCEEDED"; const char *MONITORING_AMBIGUOUS_STRING = "MONITORING_AMBIGUOUS"; const char *DEVICE_WANTS_HARD_REBOOT_STRING = "DEVICE_WANTS_HARD_REBOOT"; const char *FUSE_CURRENT_HIGH_STRING = "FUSE_CURRENT_HIGH"; +const char *FUSE_WENT_OFF_STRING = "FUSE_WENT_OFF"; +const char *POWER_ABOVE_HIGH_LIMIT_STRING = "POWER_ABOVE_HIGH_LIMIT"; +const char *POWER_BELOW_LOW_LIMIT_STRING = "POWER_BELOW_LOW_LIMIT"; const char *SWITCH_WENT_OFF_STRING = "SWITCH_WENT_OFF"; const char *HEATER_ON_STRING = "HEATER_ON"; const char *HEATER_OFF_STRING = "HEATER_OFF"; @@ -48,14 +59,20 @@ const char *MONITOR_CHANGED_STATE_STRING = "MONITOR_CHANGED_STATE"; const char *VALUE_BELOW_LOW_LIMIT_STRING = "VALUE_BELOW_LOW_LIMIT"; const char *VALUE_ABOVE_HIGH_LIMIT_STRING = "VALUE_ABOVE_HIGH_LIMIT"; const char *VALUE_OUT_OF_RANGE_STRING = "VALUE_OUT_OF_RANGE"; +const char *CHANGING_MODE_STRING = "CHANGING_MODE"; const char *MODE_INFO_STRING = "MODE_INFO"; const char *FALLBACK_FAILED_STRING = "FALLBACK_FAILED"; const char *MODE_TRANSITION_FAILED_STRING = "MODE_TRANSITION_FAILED"; const char *CANT_KEEP_MODE_STRING = "CANT_KEEP_MODE"; +const char *OBJECT_IN_INVALID_MODE_STRING = "OBJECT_IN_INVALID_MODE"; const char *FORCING_MODE_STRING = "FORCING_MODE"; +const char *MODE_CMD_REJECTED_STRING = "MODE_CMD_REJECTED"; const char *HEALTH_INFO_STRING = "HEALTH_INFO"; const char *CHILD_CHANGED_HEALTH_STRING = "CHILD_CHANGED_HEALTH"; const char *CHILD_PROBLEMS_STRING = "CHILD_PROBLEMS"; +const char *OVERWRITING_HEALTH_STRING = "OVERWRITING_HEALTH"; +const char *TRYING_RECOVERY_STRING = "TRYING_RECOVERY"; +const char *RECOVERY_STEP_STRING = "RECOVERY_STEP"; const char *RECOVERY_DONE_STRING = "RECOVERY_DONE"; const char *RF_AVAILABLE_STRING = "RF_AVAILABLE"; const char *RF_LOST_STRING = "RF_LOST"; @@ -124,14 +141,28 @@ const char *STR_HELPER_REQUESTING_MSG_FAILED_STRING = "STR_HELPER_REQUESTING_MSG const char * translateEvents(Event event) { switch( (event & 0xffff) ) { + case(2200): + return STORE_SEND_WRITE_FAILED_STRING; case(2201): return STORE_WRITE_FAILED_STRING; + case(2202): + return STORE_SEND_READ_FAILED_STRING; case(2203): return STORE_READ_FAILED_STRING; + case(2204): + return UNEXPECTED_MSG_STRING; case(2205): return STORING_FAILED_STRING; + case(2206): + return TM_DUMP_FAILED_STRING; + case(2207): + return STORE_INIT_FAILED_STRING; case(2208): return STORE_INIT_EMPTY_STRING; + case(2209): + return STORE_CONTENT_CORRUPTED_STRING; + case(2210): + return STORE_INITIALIZE_STRING; case(2211): return INIT_DONE_STRING; case(2212): @@ -140,6 +171,8 @@ const char * translateEvents(Event event) { return DELETION_FINISHED_STRING; case(2214): return DELETION_FAILED_STRING; + case(2215): + return AUTO_CATALOGS_SENDING_FAILED_STRING; case(2600): return GET_DATA_FAILED_STRING; case(2601): @@ -170,6 +203,12 @@ const char * translateEvents(Event event) { return DEVICE_WANTS_HARD_REBOOT_STRING; case(4201): return FUSE_CURRENT_HIGH_STRING; + case(4202): + return FUSE_WENT_OFF_STRING; + case(4204): + return POWER_ABOVE_HIGH_LIMIT_STRING; + case(4205): + return POWER_BELOW_LOW_LIMIT_STRING; case(4300): return SWITCH_WENT_OFF_STRING; case(5000): @@ -210,6 +249,8 @@ const char * translateEvents(Event event) { return VALUE_ABOVE_HIGH_LIMIT_STRING; case(7204): return VALUE_OUT_OF_RANGE_STRING; + case(7400): + return CHANGING_MODE_STRING; case(7401): return MODE_INFO_STRING; case(7402): @@ -218,14 +259,24 @@ const char * translateEvents(Event event) { return MODE_TRANSITION_FAILED_STRING; case(7404): return CANT_KEEP_MODE_STRING; + case(7405): + return OBJECT_IN_INVALID_MODE_STRING; case(7406): return FORCING_MODE_STRING; + case(7407): + return MODE_CMD_REJECTED_STRING; case(7506): return HEALTH_INFO_STRING; case(7507): return CHILD_CHANGED_HEALTH_STRING; case(7508): return CHILD_PROBLEMS_STRING; + case(7509): + return OVERWRITING_HEALTH_STRING; + case(7510): + return TRYING_RECOVERY_STRING; + case(7511): + return RECOVERY_STEP_STRING; case(7512): return RECOVERY_DONE_STRING; case(7900): diff --git a/mission/devices/PlocMPSoCHandler.h b/mission/devices/PlocMPSoCHandler.h index 2b14424f..28b21a00 100644 --- a/mission/devices/PlocMPSoCHandler.h +++ b/mission/devices/PlocMPSoCHandler.h @@ -52,25 +52,33 @@ class PlocMPSoCHandler : public DeviceHandlerBase { private: static const uint8_t INTERFACE_ID = CLASS_ID::PLOC_MPSOC_HANDLER; + //! Space Packet received from PLOC has invalid CRC static const ReturnValue_t CRC_FAILURE = - MAKE_RETURN_CODE(0xA0); //!> Space Packet received from PLOC has invalid CRC + MAKE_RETURN_CODE(0xA0); + //! Received ACK failure reply from PLOC static const ReturnValue_t RECEIVED_ACK_FAILURE = - MAKE_RETURN_CODE(0xA1); //!> Received ACK failure reply from PLOC + MAKE_RETURN_CODE(0xA1); + //! Received execution failure reply from PLOC static const ReturnValue_t RECEIVED_EXE_FAILURE = - MAKE_RETURN_CODE(0xA2); //!> Received execution failure reply from PLOC + MAKE_RETURN_CODE(0xA2); + //! Received space packet with invalid APID from PLOC static const ReturnValue_t INVALID_APID = - MAKE_RETURN_CODE(0xA3); //!> Received space packet with invalid APID from PLOC + MAKE_RETURN_CODE(0xA3); static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PLOC_MPSOC_HANDLER; + //! PLOC crc failure in telemetry packet static const Event MEMORY_READ_RPT_CRC_FAILURE = - MAKE_EVENT(1, severity::LOW); //!> PLOC crc failure in telemetry packet + MAKE_EVENT(1, severity::LOW); + //! PLOC receive acknowledgment failure report static const Event ACK_FAILURE = - MAKE_EVENT(2, severity::LOW); //!> PLOC receive acknowledgment failure report + MAKE_EVENT(2, severity::LOW); + //! PLOC receive execution failure report static const Event EXE_FAILURE = - MAKE_EVENT(3, severity::LOW); //!> PLOC receive execution failure report + MAKE_EVENT(3, severity::LOW); + //! PLOC reply has invalid crc static const Event CRC_FAILURE_EVENT = - MAKE_EVENT(4, severity::LOW); //!> PLOC reply has invalid crc + MAKE_EVENT(4, severity::LOW); static const uint16_t APID_MASK = 0x7FF; static const uint16_t PACKET_SEQUENCE_COUNT_MASK = 0x3FFF; From 4000c352993b998f371bf782be9e9464ef7eae6c Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 3 Feb 2022 17:10:11 +0100 Subject: [PATCH 34/39] added back more events --- fsfw | 2 +- generators/bsp_q7s_events.csv | 5 +++++ generators/events/translateEvents.cpp | 19 ++++++++++++++-- linux/fsfwconfig/events/translateEvents.cpp | 19 ++++++++++++++-- mission/devices/PlocMPSoCHandler.h | 24 +++++++-------------- 5 files changed, 48 insertions(+), 21 deletions(-) diff --git a/fsfw b/fsfw index b3aee76d..a910a055 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit b3aee76d91cdc8da568d844a83fcfde4faadce81 +Subproject commit a910a055416962a97d575bf37c39acd6f8ac59ea diff --git a/generators/bsp_q7s_events.csv b/generators/bsp_q7s_events.csv index 8d2c6285..1896a46b 100644 --- a/generators/bsp_q7s_events.csv +++ b/generators/bsp_q7s_events.csv @@ -46,6 +46,7 @@ 5903;COMPONENT_TEMP_OOL_LOW;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h 5904;COMPONENT_TEMP_OOL_HIGH;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h 5905;TEMP_NOT_IN_OP_RANGE;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h +7101;FDIR_CHANGED_STATE;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/fdir/FailureIsolationBase.h 7102;FDIR_STARTS_RECOVERY;MEDIUM;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/fdir/FailureIsolationBase.h 7103;FDIR_TURNS_OFF_DEVICE;MEDIUM;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/fdir/FailureIsolationBase.h 7201;MONITOR_CHANGED_STATE;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h @@ -84,6 +85,10 @@ 11002;DEPLOYMENT_FAILED;HIGH;;/home/rmueller/EIVE/eive-obsw/linux/devices/SolarArrayDeploymentHandler.h 11003;DEPL_SA1_GPIO_SWTICH_ON_FAILED;HIGH;;/home/rmueller/EIVE/eive-obsw/linux/devices/SolarArrayDeploymentHandler.h 11004;DEPL_SA2_GPIO_SWTICH_ON_FAILED;HIGH;;/home/rmueller/EIVE/eive-obsw/linux/devices/SolarArrayDeploymentHandler.h +11101;MEMORY_READ_RPT_CRC_FAILURE;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/PlocMPSoCHandler.h +11102;ACK_FAILURE;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/PlocMPSoCHandler.h +11103;EXE_FAILURE;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/PlocMPSoCHandler.h +11104;CRC_FAILURE_EVENT;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/PlocMPSoCHandler.h 11201;SELF_TEST_I2C_FAILURE;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h 11202;SELF_TEST_SPI_FAILURE;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h 11203;SELF_TEST_ADC_FAILURE;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h diff --git a/generators/events/translateEvents.cpp b/generators/events/translateEvents.cpp index 0e2de0ef..3412b482 100644 --- a/generators/events/translateEvents.cpp +++ b/generators/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** - * @brief Auto-generated event translation file. Contains 133 translations. + * @brief Auto-generated event translation file. Contains 138 translations. * @details - * Generated on: 2022-02-03 17:06:01 + * Generated on: 2022-02-03 17:09:37 */ #include "translateEvents.h" @@ -53,6 +53,7 @@ const char *COMPONENT_TEMP_HIGH_STRING = "COMPONENT_TEMP_HIGH"; const char *COMPONENT_TEMP_OOL_LOW_STRING = "COMPONENT_TEMP_OOL_LOW"; const char *COMPONENT_TEMP_OOL_HIGH_STRING = "COMPONENT_TEMP_OOL_HIGH"; const char *TEMP_NOT_IN_OP_RANGE_STRING = "TEMP_NOT_IN_OP_RANGE"; +const char *FDIR_CHANGED_STATE_STRING = "FDIR_CHANGED_STATE"; const char *FDIR_STARTS_RECOVERY_STRING = "FDIR_STARTS_RECOVERY"; const char *FDIR_TURNS_OFF_DEVICE_STRING = "FDIR_TURNS_OFF_DEVICE"; const char *MONITOR_CHANGED_STATE_STRING = "MONITOR_CHANGED_STATE"; @@ -91,6 +92,10 @@ const char *MAIN_SWITCH_OFF_TIMEOUT_STRING = "MAIN_SWITCH_OFF_TIMEOUT"; const char *DEPLOYMENT_FAILED_STRING = "DEPLOYMENT_FAILED"; const char *DEPL_SA1_GPIO_SWTICH_ON_FAILED_STRING = "DEPL_SA1_GPIO_SWTICH_ON_FAILED"; const char *DEPL_SA2_GPIO_SWTICH_ON_FAILED_STRING = "DEPL_SA2_GPIO_SWTICH_ON_FAILED"; +const char *MEMORY_READ_RPT_CRC_FAILURE_STRING = "MEMORY_READ_RPT_CRC_FAILURE"; +const char *ACK_FAILURE_STRING = "ACK_FAILURE"; +const char *EXE_FAILURE_STRING = "EXE_FAILURE"; +const char *CRC_FAILURE_EVENT_STRING = "CRC_FAILURE_EVENT"; const char *SELF_TEST_I2C_FAILURE_STRING = "SELF_TEST_I2C_FAILURE"; const char *SELF_TEST_SPI_FAILURE_STRING = "SELF_TEST_SPI_FAILURE"; const char *SELF_TEST_ADC_FAILURE_STRING = "SELF_TEST_ADC_FAILURE"; @@ -237,6 +242,8 @@ const char * translateEvents(Event event) { return COMPONENT_TEMP_OOL_HIGH_STRING; case(5905): return TEMP_NOT_IN_OP_RANGE_STRING; + case(7101): + return FDIR_CHANGED_STATE_STRING; case(7102): return FDIR_STARTS_RECOVERY_STRING; case(7103): @@ -313,6 +320,14 @@ const char * translateEvents(Event event) { return DEPL_SA1_GPIO_SWTICH_ON_FAILED_STRING; case(11004): return DEPL_SA2_GPIO_SWTICH_ON_FAILED_STRING; + case(11101): + return MEMORY_READ_RPT_CRC_FAILURE_STRING; + case(11102): + return ACK_FAILURE_STRING; + case(11103): + return EXE_FAILURE_STRING; + case(11104): + return CRC_FAILURE_EVENT_STRING; case(11201): return SELF_TEST_I2C_FAILURE_STRING; case(11202): diff --git a/linux/fsfwconfig/events/translateEvents.cpp b/linux/fsfwconfig/events/translateEvents.cpp index 0e2de0ef..3412b482 100644 --- a/linux/fsfwconfig/events/translateEvents.cpp +++ b/linux/fsfwconfig/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** - * @brief Auto-generated event translation file. Contains 133 translations. + * @brief Auto-generated event translation file. Contains 138 translations. * @details - * Generated on: 2022-02-03 17:06:01 + * Generated on: 2022-02-03 17:09:37 */ #include "translateEvents.h" @@ -53,6 +53,7 @@ const char *COMPONENT_TEMP_HIGH_STRING = "COMPONENT_TEMP_HIGH"; const char *COMPONENT_TEMP_OOL_LOW_STRING = "COMPONENT_TEMP_OOL_LOW"; const char *COMPONENT_TEMP_OOL_HIGH_STRING = "COMPONENT_TEMP_OOL_HIGH"; const char *TEMP_NOT_IN_OP_RANGE_STRING = "TEMP_NOT_IN_OP_RANGE"; +const char *FDIR_CHANGED_STATE_STRING = "FDIR_CHANGED_STATE"; const char *FDIR_STARTS_RECOVERY_STRING = "FDIR_STARTS_RECOVERY"; const char *FDIR_TURNS_OFF_DEVICE_STRING = "FDIR_TURNS_OFF_DEVICE"; const char *MONITOR_CHANGED_STATE_STRING = "MONITOR_CHANGED_STATE"; @@ -91,6 +92,10 @@ const char *MAIN_SWITCH_OFF_TIMEOUT_STRING = "MAIN_SWITCH_OFF_TIMEOUT"; const char *DEPLOYMENT_FAILED_STRING = "DEPLOYMENT_FAILED"; const char *DEPL_SA1_GPIO_SWTICH_ON_FAILED_STRING = "DEPL_SA1_GPIO_SWTICH_ON_FAILED"; const char *DEPL_SA2_GPIO_SWTICH_ON_FAILED_STRING = "DEPL_SA2_GPIO_SWTICH_ON_FAILED"; +const char *MEMORY_READ_RPT_CRC_FAILURE_STRING = "MEMORY_READ_RPT_CRC_FAILURE"; +const char *ACK_FAILURE_STRING = "ACK_FAILURE"; +const char *EXE_FAILURE_STRING = "EXE_FAILURE"; +const char *CRC_FAILURE_EVENT_STRING = "CRC_FAILURE_EVENT"; const char *SELF_TEST_I2C_FAILURE_STRING = "SELF_TEST_I2C_FAILURE"; const char *SELF_TEST_SPI_FAILURE_STRING = "SELF_TEST_SPI_FAILURE"; const char *SELF_TEST_ADC_FAILURE_STRING = "SELF_TEST_ADC_FAILURE"; @@ -237,6 +242,8 @@ const char * translateEvents(Event event) { return COMPONENT_TEMP_OOL_HIGH_STRING; case(5905): return TEMP_NOT_IN_OP_RANGE_STRING; + case(7101): + return FDIR_CHANGED_STATE_STRING; case(7102): return FDIR_STARTS_RECOVERY_STRING; case(7103): @@ -313,6 +320,14 @@ const char * translateEvents(Event event) { return DEPL_SA1_GPIO_SWTICH_ON_FAILED_STRING; case(11004): return DEPL_SA2_GPIO_SWTICH_ON_FAILED_STRING; + case(11101): + return MEMORY_READ_RPT_CRC_FAILURE_STRING; + case(11102): + return ACK_FAILURE_STRING; + case(11103): + return EXE_FAILURE_STRING; + case(11104): + return CRC_FAILURE_EVENT_STRING; case(11201): return SELF_TEST_I2C_FAILURE_STRING; case(11202): diff --git a/mission/devices/PlocMPSoCHandler.h b/mission/devices/PlocMPSoCHandler.h index 28b21a00..09ad2e2a 100644 --- a/mission/devices/PlocMPSoCHandler.h +++ b/mission/devices/PlocMPSoCHandler.h @@ -53,32 +53,24 @@ class PlocMPSoCHandler : public DeviceHandlerBase { static const uint8_t INTERFACE_ID = CLASS_ID::PLOC_MPSOC_HANDLER; //! Space Packet received from PLOC has invalid CRC - static const ReturnValue_t CRC_FAILURE = - MAKE_RETURN_CODE(0xA0); + static const ReturnValue_t CRC_FAILURE = MAKE_RETURN_CODE(0xA0); //! Received ACK failure reply from PLOC - static const ReturnValue_t RECEIVED_ACK_FAILURE = - MAKE_RETURN_CODE(0xA1); + static const ReturnValue_t RECEIVED_ACK_FAILURE = MAKE_RETURN_CODE(0xA1); //! Received execution failure reply from PLOC - static const ReturnValue_t RECEIVED_EXE_FAILURE = - MAKE_RETURN_CODE(0xA2); + static const ReturnValue_t RECEIVED_EXE_FAILURE = MAKE_RETURN_CODE(0xA2); //! Received space packet with invalid APID from PLOC - static const ReturnValue_t INVALID_APID = - MAKE_RETURN_CODE(0xA3); + static const ReturnValue_t INVALID_APID = MAKE_RETURN_CODE(0xA3); static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PLOC_MPSOC_HANDLER; //! PLOC crc failure in telemetry packet - static const Event MEMORY_READ_RPT_CRC_FAILURE = - MAKE_EVENT(1, severity::LOW); + static const Event MEMORY_READ_RPT_CRC_FAILURE = MAKE_EVENT(1, severity::LOW); //! PLOC receive acknowledgment failure report - static const Event ACK_FAILURE = - MAKE_EVENT(2, severity::LOW); + static const Event ACK_FAILURE = MAKE_EVENT(2, severity::LOW); //! PLOC receive execution failure report - static const Event EXE_FAILURE = - MAKE_EVENT(3, severity::LOW); + static const Event EXE_FAILURE = MAKE_EVENT(3, severity::LOW); //! PLOC reply has invalid crc - static const Event CRC_FAILURE_EVENT = - MAKE_EVENT(4, severity::LOW); + static const Event CRC_FAILURE_EVENT = MAKE_EVENT(4, severity::LOW); static const uint16_t APID_MASK = 0x7FF; static const uint16_t PACKET_SEQUENCE_COUNT_MASK = 0x3FFF; From 5aa800af6e2a7bbba8b38b0081858765dd118d90 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 3 Feb 2022 17:14:28 +0100 Subject: [PATCH 35/39] added back more events --- fsfw | 2 +- generators/bsp_q7s_events.csv | 2 + generators/events/translateEvents.cpp | 572 ++++++++++---------- generators/fsfwgen | 2 +- linux/fsfwconfig/events/translateEvents.cpp | 572 ++++++++++---------- 5 files changed, 582 insertions(+), 568 deletions(-) diff --git a/fsfw b/fsfw index a910a055..b7f6a696 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit a910a055416962a97d575bf37c39acd6f8ac59ea +Subproject commit b7f6a6961b6f0815890c2ae98d4fd1a11c72b8c0 diff --git a/generators/bsp_q7s_events.csv b/generators/bsp_q7s_events.csv index 1896a46b..35bcb46b 100644 --- a/generators/bsp_q7s_events.csv +++ b/generators/bsp_q7s_events.csv @@ -73,6 +73,8 @@ 7902;BIT_LOCK;INFO;A Bit Lock signal. Was detected. P1: raw BLO state, P2: 0;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h 7903;BIT_LOCK_LOST;INFO;A previously found Bit Lock signal was lost. P1: raw BLO state, P2: 0;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h 7905;FRAME_PROCESSING_FAILED;LOW;The CCSDS Board could not interpret a TC;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h +8900;CLOCK_SET;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/pus/Service9TimeManagement.h +8901;CLOCK_SET_FAILURE;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/pus/Service9TimeManagement.h 9700;TEST;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/pus/Service17Test.h 10600;CHANGE_OF_SETUP_PARAMETER;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/hal/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h 10900;GPIO_PULL_HIGH_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/HeaterHandler.h diff --git a/generators/events/translateEvents.cpp b/generators/events/translateEvents.cpp index 3412b482..cc9512a9 100644 --- a/generators/events/translateEvents.cpp +++ b/generators/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** - * @brief Auto-generated event translation file. Contains 138 translations. + * @brief Auto-generated event translation file. Contains 140 translations. * @details - * Generated on: 2022-02-03 17:09:37 + * Generated on: 2022-02-03 17:13:35 */ #include "translateEvents.h" @@ -80,6 +80,8 @@ const char *RF_LOST_STRING = "RF_LOST"; const char *BIT_LOCK_STRING = "BIT_LOCK"; const char *BIT_LOCK_LOST_STRING = "BIT_LOCK_LOST"; const char *FRAME_PROCESSING_FAILED_STRING = "FRAME_PROCESSING_FAILED"; +const char *CLOCK_SET_STRING = "CLOCK_SET"; +const char *CLOCK_SET_FAILURE_STRING = "CLOCK_SET_FAILURE"; const char *TEST_STRING = "TEST"; const char *CHANGE_OF_SETUP_PARAMETER_STRING = "CHANGE_OF_SETUP_PARAMETER"; const char *GPIO_PULL_HIGH_FAILED_STRING = "GPIO_PULL_HIGH_FAILED"; @@ -145,285 +147,289 @@ const char *STR_HELPER_SENDING_PACKET_FAILED_STRING = "STR_HELPER_SENDING_PACKET const char *STR_HELPER_REQUESTING_MSG_FAILED_STRING = "STR_HELPER_REQUESTING_MSG_FAILED"; const char * translateEvents(Event event) { - switch( (event & 0xffff) ) { - case(2200): - return STORE_SEND_WRITE_FAILED_STRING; - case(2201): - return STORE_WRITE_FAILED_STRING; - case(2202): - return STORE_SEND_READ_FAILED_STRING; - case(2203): - return STORE_READ_FAILED_STRING; - case(2204): - return UNEXPECTED_MSG_STRING; - case(2205): - return STORING_FAILED_STRING; - case(2206): - return TM_DUMP_FAILED_STRING; - case(2207): - return STORE_INIT_FAILED_STRING; - case(2208): - return STORE_INIT_EMPTY_STRING; - case(2209): - return STORE_CONTENT_CORRUPTED_STRING; - case(2210): - return STORE_INITIALIZE_STRING; - case(2211): - return INIT_DONE_STRING; - case(2212): - return DUMP_FINISHED_STRING; - case(2213): - return DELETION_FINISHED_STRING; - case(2214): - return DELETION_FAILED_STRING; - case(2215): - return AUTO_CATALOGS_SENDING_FAILED_STRING; - case(2600): - return GET_DATA_FAILED_STRING; - case(2601): - return STORE_DATA_FAILED_STRING; - case(2800): - return DEVICE_BUILDING_COMMAND_FAILED_STRING; - case(2801): - return DEVICE_SENDING_COMMAND_FAILED_STRING; - case(2802): - return DEVICE_REQUESTING_REPLY_FAILED_STRING; - case(2803): - return DEVICE_READING_REPLY_FAILED_STRING; - case(2804): - return DEVICE_INTERPRETING_REPLY_FAILED_STRING; - case(2805): - return DEVICE_MISSED_REPLY_STRING; - case(2806): - return DEVICE_UNKNOWN_REPLY_STRING; - case(2807): - return DEVICE_UNREQUESTED_REPLY_STRING; - case(2808): - return INVALID_DEVICE_COMMAND_STRING; - case(2809): - return MONITORING_LIMIT_EXCEEDED_STRING; - case(2810): - return MONITORING_AMBIGUOUS_STRING; - case(2811): - return DEVICE_WANTS_HARD_REBOOT_STRING; - case(4201): - return FUSE_CURRENT_HIGH_STRING; - case(4202): - return FUSE_WENT_OFF_STRING; - case(4204): - return POWER_ABOVE_HIGH_LIMIT_STRING; - case(4205): - return POWER_BELOW_LOW_LIMIT_STRING; - case(4300): - return SWITCH_WENT_OFF_STRING; - case(5000): - return HEATER_ON_STRING; - case(5001): - return HEATER_OFF_STRING; - case(5002): - return HEATER_TIMEOUT_STRING; - case(5003): - return HEATER_STAYED_ON_STRING; - case(5004): - return HEATER_STAYED_OFF_STRING; - case(5200): - return TEMP_SENSOR_HIGH_STRING; - case(5201): - return TEMP_SENSOR_LOW_STRING; - case(5202): - return TEMP_SENSOR_GRADIENT_STRING; - case(5901): - return COMPONENT_TEMP_LOW_STRING; - case(5902): - return COMPONENT_TEMP_HIGH_STRING; - case(5903): - return COMPONENT_TEMP_OOL_LOW_STRING; - case(5904): - return COMPONENT_TEMP_OOL_HIGH_STRING; - case(5905): - return TEMP_NOT_IN_OP_RANGE_STRING; - case(7101): - return FDIR_CHANGED_STATE_STRING; - case(7102): - return FDIR_STARTS_RECOVERY_STRING; - case(7103): - return FDIR_TURNS_OFF_DEVICE_STRING; - case(7201): - return MONITOR_CHANGED_STATE_STRING; - case(7202): - return VALUE_BELOW_LOW_LIMIT_STRING; - case(7203): - return VALUE_ABOVE_HIGH_LIMIT_STRING; - case(7204): - return VALUE_OUT_OF_RANGE_STRING; - case(7400): - return CHANGING_MODE_STRING; - case(7401): - return MODE_INFO_STRING; - case(7402): - return FALLBACK_FAILED_STRING; - case(7403): - return MODE_TRANSITION_FAILED_STRING; - case(7404): - return CANT_KEEP_MODE_STRING; - case(7405): - return OBJECT_IN_INVALID_MODE_STRING; - case(7406): - return FORCING_MODE_STRING; - case(7407): - return MODE_CMD_REJECTED_STRING; - case(7506): - return HEALTH_INFO_STRING; - case(7507): - return CHILD_CHANGED_HEALTH_STRING; - case(7508): - return CHILD_PROBLEMS_STRING; - case(7509): - return OVERWRITING_HEALTH_STRING; - case(7510): - return TRYING_RECOVERY_STRING; - case(7511): - return RECOVERY_STEP_STRING; - case(7512): - return RECOVERY_DONE_STRING; - case(7900): - return RF_AVAILABLE_STRING; - case(7901): - return RF_LOST_STRING; - case(7902): - return BIT_LOCK_STRING; - case(7903): - return BIT_LOCK_LOST_STRING; - case(7905): - return FRAME_PROCESSING_FAILED_STRING; - case(9700): - return TEST_STRING; - case(10600): - return CHANGE_OF_SETUP_PARAMETER_STRING; - case(10900): - return GPIO_PULL_HIGH_FAILED_STRING; - case(10901): - return GPIO_PULL_LOW_FAILED_STRING; - case(10902): - return SWITCH_ALREADY_ON_STRING; - case(10903): - return SWITCH_ALREADY_OFF_STRING; - case(10904): - return MAIN_SWITCH_TIMEOUT_STRING; - case(11000): - return MAIN_SWITCH_ON_TIMEOUT_STRING; - case(11001): - return MAIN_SWITCH_OFF_TIMEOUT_STRING; - case(11002): - return DEPLOYMENT_FAILED_STRING; - case(11003): - return DEPL_SA1_GPIO_SWTICH_ON_FAILED_STRING; - case(11004): - return DEPL_SA2_GPIO_SWTICH_ON_FAILED_STRING; - case(11101): - return MEMORY_READ_RPT_CRC_FAILURE_STRING; - case(11102): - return ACK_FAILURE_STRING; - case(11103): - return EXE_FAILURE_STRING; - case(11104): - return CRC_FAILURE_EVENT_STRING; - case(11201): - return SELF_TEST_I2C_FAILURE_STRING; - case(11202): - return SELF_TEST_SPI_FAILURE_STRING; - case(11203): - return SELF_TEST_ADC_FAILURE_STRING; - case(11204): - return SELF_TEST_PWM_FAILURE_STRING; - case(11205): - return SELF_TEST_TC_FAILURE_STRING; - case(11206): - return SELF_TEST_MTM_RANGE_FAILURE_STRING; - case(11207): - return SELF_TEST_COIL_CURRENT_FAILURE_STRING; - case(11208): - return INVALID_ERROR_BYTE_STRING; - case(11301): - return ERROR_STATE_STRING; - case(11501): - return SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING; - case(11502): - return SUPV_ACK_FAILURE_STRING; - case(11503): - return SUPV_EXE_FAILURE_STRING; - case(11504): - return SUPV_CRC_FAILURE_EVENT_STRING; - case(11600): - return SANITIZATION_FAILED_STRING; - case(11700): - return UPDATE_FILE_NOT_EXISTS_STRING; - case(11701): - return ACTION_COMMANDING_FAILED_STRING; - case(11702): - return UPDATE_AVAILABLE_FAILED_STRING; - case(11703): - return UPDATE_TRANSFER_FAILED_STRING; - case(11704): - return UPDATE_VERIFY_FAILED_STRING; - case(11705): - return UPDATE_FINISHED_STRING; - case(11800): - return SEND_MRAM_DUMP_FAILED_STRING; - case(11801): - return MRAM_DUMP_FAILED_STRING; - case(11802): - return MRAM_DUMP_FINISHED_STRING; - case(11901): - return INVALID_TC_FRAME_STRING; - case(11902): - return INVALID_FAR_STRING; - case(11903): - return CARRIER_LOCK_STRING; - case(11904): - return BIT_LOCK_PDEC_STRING; - case(12000): - return IMAGE_UPLOAD_FAILED_STRING; - case(12001): - return IMAGE_DOWNLOAD_FAILED_STRING; - case(12002): - return IMAGE_UPLOAD_SUCCESSFUL_STRING; - case(12003): - return IMAGE_DOWNLOAD_SUCCESSFUL_STRING; - case(12004): - return FLASH_WRITE_SUCCESSFUL_STRING; - case(12005): - return FLASH_READ_SUCCESSFUL_STRING; - case(12006): - return FLASH_WRITE_FAILED_STRING; - case(12007): - return FLASH_READ_FAILED_STRING; - case(12008): - return FPGA_DOWNLOAD_SUCCESSFUL_STRING; - case(12009): - return FPGA_DOWNLOAD_FAILED_STRING; - case(12010): - return FPGA_UPLOAD_SUCCESSFUL_STRING; - case(12011): - return FPGA_UPLOAD_FAILED_STRING; - case(12012): - return STR_HELPER_READING_REPLY_FAILED_STRING; - case(12013): - return STR_HELPER_COM_ERROR_STRING; - case(12014): - return STR_HELPER_NO_REPLY_STRING; - case(12015): - return STR_HELPER_DEC_ERROR_STRING; - case(12016): - return POSITION_MISMATCH_STRING; - case(12017): - return STR_HELPER_FILE_NOT_EXISTS_STRING; - case(12018): - return STR_HELPER_SENDING_PACKET_FAILED_STRING; - case(12019): - return STR_HELPER_REQUESTING_MSG_FAILED_STRING; - default: - return "UNKNOWN_EVENT"; - } - return 0; + switch( (event & 0xffff) ) { + case(2200): + return STORE_SEND_WRITE_FAILED_STRING; + case(2201): + return STORE_WRITE_FAILED_STRING; + case(2202): + return STORE_SEND_READ_FAILED_STRING; + case(2203): + return STORE_READ_FAILED_STRING; + case(2204): + return UNEXPECTED_MSG_STRING; + case(2205): + return STORING_FAILED_STRING; + case(2206): + return TM_DUMP_FAILED_STRING; + case(2207): + return STORE_INIT_FAILED_STRING; + case(2208): + return STORE_INIT_EMPTY_STRING; + case(2209): + return STORE_CONTENT_CORRUPTED_STRING; + case(2210): + return STORE_INITIALIZE_STRING; + case(2211): + return INIT_DONE_STRING; + case(2212): + return DUMP_FINISHED_STRING; + case(2213): + return DELETION_FINISHED_STRING; + case(2214): + return DELETION_FAILED_STRING; + case(2215): + return AUTO_CATALOGS_SENDING_FAILED_STRING; + case(2600): + return GET_DATA_FAILED_STRING; + case(2601): + return STORE_DATA_FAILED_STRING; + case(2800): + return DEVICE_BUILDING_COMMAND_FAILED_STRING; + case(2801): + return DEVICE_SENDING_COMMAND_FAILED_STRING; + case(2802): + return DEVICE_REQUESTING_REPLY_FAILED_STRING; + case(2803): + return DEVICE_READING_REPLY_FAILED_STRING; + case(2804): + return DEVICE_INTERPRETING_REPLY_FAILED_STRING; + case(2805): + return DEVICE_MISSED_REPLY_STRING; + case(2806): + return DEVICE_UNKNOWN_REPLY_STRING; + case(2807): + return DEVICE_UNREQUESTED_REPLY_STRING; + case(2808): + return INVALID_DEVICE_COMMAND_STRING; + case(2809): + return MONITORING_LIMIT_EXCEEDED_STRING; + case(2810): + return MONITORING_AMBIGUOUS_STRING; + case(2811): + return DEVICE_WANTS_HARD_REBOOT_STRING; + case(4201): + return FUSE_CURRENT_HIGH_STRING; + case(4202): + return FUSE_WENT_OFF_STRING; + case(4204): + return POWER_ABOVE_HIGH_LIMIT_STRING; + case(4205): + return POWER_BELOW_LOW_LIMIT_STRING; + case(4300): + return SWITCH_WENT_OFF_STRING; + case(5000): + return HEATER_ON_STRING; + case(5001): + return HEATER_OFF_STRING; + case(5002): + return HEATER_TIMEOUT_STRING; + case(5003): + return HEATER_STAYED_ON_STRING; + case(5004): + return HEATER_STAYED_OFF_STRING; + case(5200): + return TEMP_SENSOR_HIGH_STRING; + case(5201): + return TEMP_SENSOR_LOW_STRING; + case(5202): + return TEMP_SENSOR_GRADIENT_STRING; + case(5901): + return COMPONENT_TEMP_LOW_STRING; + case(5902): + return COMPONENT_TEMP_HIGH_STRING; + case(5903): + return COMPONENT_TEMP_OOL_LOW_STRING; + case(5904): + return COMPONENT_TEMP_OOL_HIGH_STRING; + case(5905): + return TEMP_NOT_IN_OP_RANGE_STRING; + case(7101): + return FDIR_CHANGED_STATE_STRING; + case(7102): + return FDIR_STARTS_RECOVERY_STRING; + case(7103): + return FDIR_TURNS_OFF_DEVICE_STRING; + case(7201): + return MONITOR_CHANGED_STATE_STRING; + case(7202): + return VALUE_BELOW_LOW_LIMIT_STRING; + case(7203): + return VALUE_ABOVE_HIGH_LIMIT_STRING; + case(7204): + return VALUE_OUT_OF_RANGE_STRING; + case(7400): + return CHANGING_MODE_STRING; + case(7401): + return MODE_INFO_STRING; + case(7402): + return FALLBACK_FAILED_STRING; + case(7403): + return MODE_TRANSITION_FAILED_STRING; + case(7404): + return CANT_KEEP_MODE_STRING; + case(7405): + return OBJECT_IN_INVALID_MODE_STRING; + case(7406): + return FORCING_MODE_STRING; + case(7407): + return MODE_CMD_REJECTED_STRING; + case(7506): + return HEALTH_INFO_STRING; + case(7507): + return CHILD_CHANGED_HEALTH_STRING; + case(7508): + return CHILD_PROBLEMS_STRING; + case(7509): + return OVERWRITING_HEALTH_STRING; + case(7510): + return TRYING_RECOVERY_STRING; + case(7511): + return RECOVERY_STEP_STRING; + case(7512): + return RECOVERY_DONE_STRING; + case(7900): + return RF_AVAILABLE_STRING; + case(7901): + return RF_LOST_STRING; + case(7902): + return BIT_LOCK_STRING; + case(7903): + return BIT_LOCK_LOST_STRING; + case(7905): + return FRAME_PROCESSING_FAILED_STRING; + case(8900): + return CLOCK_SET_STRING; + case(8901): + return CLOCK_SET_FAILURE_STRING; + case(9700): + return TEST_STRING; + case(10600): + return CHANGE_OF_SETUP_PARAMETER_STRING; + case(10900): + return GPIO_PULL_HIGH_FAILED_STRING; + case(10901): + return GPIO_PULL_LOW_FAILED_STRING; + case(10902): + return SWITCH_ALREADY_ON_STRING; + case(10903): + return SWITCH_ALREADY_OFF_STRING; + case(10904): + return MAIN_SWITCH_TIMEOUT_STRING; + case(11000): + return MAIN_SWITCH_ON_TIMEOUT_STRING; + case(11001): + return MAIN_SWITCH_OFF_TIMEOUT_STRING; + case(11002): + return DEPLOYMENT_FAILED_STRING; + case(11003): + return DEPL_SA1_GPIO_SWTICH_ON_FAILED_STRING; + case(11004): + return DEPL_SA2_GPIO_SWTICH_ON_FAILED_STRING; + case(11101): + return MEMORY_READ_RPT_CRC_FAILURE_STRING; + case(11102): + return ACK_FAILURE_STRING; + case(11103): + return EXE_FAILURE_STRING; + case(11104): + return CRC_FAILURE_EVENT_STRING; + case(11201): + return SELF_TEST_I2C_FAILURE_STRING; + case(11202): + return SELF_TEST_SPI_FAILURE_STRING; + case(11203): + return SELF_TEST_ADC_FAILURE_STRING; + case(11204): + return SELF_TEST_PWM_FAILURE_STRING; + case(11205): + return SELF_TEST_TC_FAILURE_STRING; + case(11206): + return SELF_TEST_MTM_RANGE_FAILURE_STRING; + case(11207): + return SELF_TEST_COIL_CURRENT_FAILURE_STRING; + case(11208): + return INVALID_ERROR_BYTE_STRING; + case(11301): + return ERROR_STATE_STRING; + case(11501): + return SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING; + case(11502): + return SUPV_ACK_FAILURE_STRING; + case(11503): + return SUPV_EXE_FAILURE_STRING; + case(11504): + return SUPV_CRC_FAILURE_EVENT_STRING; + case(11600): + return SANITIZATION_FAILED_STRING; + case(11700): + return UPDATE_FILE_NOT_EXISTS_STRING; + case(11701): + return ACTION_COMMANDING_FAILED_STRING; + case(11702): + return UPDATE_AVAILABLE_FAILED_STRING; + case(11703): + return UPDATE_TRANSFER_FAILED_STRING; + case(11704): + return UPDATE_VERIFY_FAILED_STRING; + case(11705): + return UPDATE_FINISHED_STRING; + case(11800): + return SEND_MRAM_DUMP_FAILED_STRING; + case(11801): + return MRAM_DUMP_FAILED_STRING; + case(11802): + return MRAM_DUMP_FINISHED_STRING; + case(11901): + return INVALID_TC_FRAME_STRING; + case(11902): + return INVALID_FAR_STRING; + case(11903): + return CARRIER_LOCK_STRING; + case(11904): + return BIT_LOCK_PDEC_STRING; + case(12000): + return IMAGE_UPLOAD_FAILED_STRING; + case(12001): + return IMAGE_DOWNLOAD_FAILED_STRING; + case(12002): + return IMAGE_UPLOAD_SUCCESSFUL_STRING; + case(12003): + return IMAGE_DOWNLOAD_SUCCESSFUL_STRING; + case(12004): + return FLASH_WRITE_SUCCESSFUL_STRING; + case(12005): + return FLASH_READ_SUCCESSFUL_STRING; + case(12006): + return FLASH_WRITE_FAILED_STRING; + case(12007): + return FLASH_READ_FAILED_STRING; + case(12008): + return FPGA_DOWNLOAD_SUCCESSFUL_STRING; + case(12009): + return FPGA_DOWNLOAD_FAILED_STRING; + case(12010): + return FPGA_UPLOAD_SUCCESSFUL_STRING; + case(12011): + return FPGA_UPLOAD_FAILED_STRING; + case(12012): + return STR_HELPER_READING_REPLY_FAILED_STRING; + case(12013): + return STR_HELPER_COM_ERROR_STRING; + case(12014): + return STR_HELPER_NO_REPLY_STRING; + case(12015): + return STR_HELPER_DEC_ERROR_STRING; + case(12016): + return POSITION_MISMATCH_STRING; + case(12017): + return STR_HELPER_FILE_NOT_EXISTS_STRING; + case(12018): + return STR_HELPER_SENDING_PACKET_FAILED_STRING; + case(12019): + return STR_HELPER_REQUESTING_MSG_FAILED_STRING; + default: + return "UNKNOWN_EVENT"; + } + return 0; } diff --git a/generators/fsfwgen b/generators/fsfwgen index 636670f7..80312ed2 160000 --- a/generators/fsfwgen +++ b/generators/fsfwgen @@ -1 +1 @@ -Subproject commit 636670f7a0075533974ca0a668efa9b623a52749 +Subproject commit 80312ed21e5a02521fef7959a479bbd79f10e6d1 diff --git a/linux/fsfwconfig/events/translateEvents.cpp b/linux/fsfwconfig/events/translateEvents.cpp index 3412b482..cc9512a9 100644 --- a/linux/fsfwconfig/events/translateEvents.cpp +++ b/linux/fsfwconfig/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** - * @brief Auto-generated event translation file. Contains 138 translations. + * @brief Auto-generated event translation file. Contains 140 translations. * @details - * Generated on: 2022-02-03 17:09:37 + * Generated on: 2022-02-03 17:13:35 */ #include "translateEvents.h" @@ -80,6 +80,8 @@ const char *RF_LOST_STRING = "RF_LOST"; const char *BIT_LOCK_STRING = "BIT_LOCK"; const char *BIT_LOCK_LOST_STRING = "BIT_LOCK_LOST"; const char *FRAME_PROCESSING_FAILED_STRING = "FRAME_PROCESSING_FAILED"; +const char *CLOCK_SET_STRING = "CLOCK_SET"; +const char *CLOCK_SET_FAILURE_STRING = "CLOCK_SET_FAILURE"; const char *TEST_STRING = "TEST"; const char *CHANGE_OF_SETUP_PARAMETER_STRING = "CHANGE_OF_SETUP_PARAMETER"; const char *GPIO_PULL_HIGH_FAILED_STRING = "GPIO_PULL_HIGH_FAILED"; @@ -145,285 +147,289 @@ const char *STR_HELPER_SENDING_PACKET_FAILED_STRING = "STR_HELPER_SENDING_PACKET const char *STR_HELPER_REQUESTING_MSG_FAILED_STRING = "STR_HELPER_REQUESTING_MSG_FAILED"; const char * translateEvents(Event event) { - switch( (event & 0xffff) ) { - case(2200): - return STORE_SEND_WRITE_FAILED_STRING; - case(2201): - return STORE_WRITE_FAILED_STRING; - case(2202): - return STORE_SEND_READ_FAILED_STRING; - case(2203): - return STORE_READ_FAILED_STRING; - case(2204): - return UNEXPECTED_MSG_STRING; - case(2205): - return STORING_FAILED_STRING; - case(2206): - return TM_DUMP_FAILED_STRING; - case(2207): - return STORE_INIT_FAILED_STRING; - case(2208): - return STORE_INIT_EMPTY_STRING; - case(2209): - return STORE_CONTENT_CORRUPTED_STRING; - case(2210): - return STORE_INITIALIZE_STRING; - case(2211): - return INIT_DONE_STRING; - case(2212): - return DUMP_FINISHED_STRING; - case(2213): - return DELETION_FINISHED_STRING; - case(2214): - return DELETION_FAILED_STRING; - case(2215): - return AUTO_CATALOGS_SENDING_FAILED_STRING; - case(2600): - return GET_DATA_FAILED_STRING; - case(2601): - return STORE_DATA_FAILED_STRING; - case(2800): - return DEVICE_BUILDING_COMMAND_FAILED_STRING; - case(2801): - return DEVICE_SENDING_COMMAND_FAILED_STRING; - case(2802): - return DEVICE_REQUESTING_REPLY_FAILED_STRING; - case(2803): - return DEVICE_READING_REPLY_FAILED_STRING; - case(2804): - return DEVICE_INTERPRETING_REPLY_FAILED_STRING; - case(2805): - return DEVICE_MISSED_REPLY_STRING; - case(2806): - return DEVICE_UNKNOWN_REPLY_STRING; - case(2807): - return DEVICE_UNREQUESTED_REPLY_STRING; - case(2808): - return INVALID_DEVICE_COMMAND_STRING; - case(2809): - return MONITORING_LIMIT_EXCEEDED_STRING; - case(2810): - return MONITORING_AMBIGUOUS_STRING; - case(2811): - return DEVICE_WANTS_HARD_REBOOT_STRING; - case(4201): - return FUSE_CURRENT_HIGH_STRING; - case(4202): - return FUSE_WENT_OFF_STRING; - case(4204): - return POWER_ABOVE_HIGH_LIMIT_STRING; - case(4205): - return POWER_BELOW_LOW_LIMIT_STRING; - case(4300): - return SWITCH_WENT_OFF_STRING; - case(5000): - return HEATER_ON_STRING; - case(5001): - return HEATER_OFF_STRING; - case(5002): - return HEATER_TIMEOUT_STRING; - case(5003): - return HEATER_STAYED_ON_STRING; - case(5004): - return HEATER_STAYED_OFF_STRING; - case(5200): - return TEMP_SENSOR_HIGH_STRING; - case(5201): - return TEMP_SENSOR_LOW_STRING; - case(5202): - return TEMP_SENSOR_GRADIENT_STRING; - case(5901): - return COMPONENT_TEMP_LOW_STRING; - case(5902): - return COMPONENT_TEMP_HIGH_STRING; - case(5903): - return COMPONENT_TEMP_OOL_LOW_STRING; - case(5904): - return COMPONENT_TEMP_OOL_HIGH_STRING; - case(5905): - return TEMP_NOT_IN_OP_RANGE_STRING; - case(7101): - return FDIR_CHANGED_STATE_STRING; - case(7102): - return FDIR_STARTS_RECOVERY_STRING; - case(7103): - return FDIR_TURNS_OFF_DEVICE_STRING; - case(7201): - return MONITOR_CHANGED_STATE_STRING; - case(7202): - return VALUE_BELOW_LOW_LIMIT_STRING; - case(7203): - return VALUE_ABOVE_HIGH_LIMIT_STRING; - case(7204): - return VALUE_OUT_OF_RANGE_STRING; - case(7400): - return CHANGING_MODE_STRING; - case(7401): - return MODE_INFO_STRING; - case(7402): - return FALLBACK_FAILED_STRING; - case(7403): - return MODE_TRANSITION_FAILED_STRING; - case(7404): - return CANT_KEEP_MODE_STRING; - case(7405): - return OBJECT_IN_INVALID_MODE_STRING; - case(7406): - return FORCING_MODE_STRING; - case(7407): - return MODE_CMD_REJECTED_STRING; - case(7506): - return HEALTH_INFO_STRING; - case(7507): - return CHILD_CHANGED_HEALTH_STRING; - case(7508): - return CHILD_PROBLEMS_STRING; - case(7509): - return OVERWRITING_HEALTH_STRING; - case(7510): - return TRYING_RECOVERY_STRING; - case(7511): - return RECOVERY_STEP_STRING; - case(7512): - return RECOVERY_DONE_STRING; - case(7900): - return RF_AVAILABLE_STRING; - case(7901): - return RF_LOST_STRING; - case(7902): - return BIT_LOCK_STRING; - case(7903): - return BIT_LOCK_LOST_STRING; - case(7905): - return FRAME_PROCESSING_FAILED_STRING; - case(9700): - return TEST_STRING; - case(10600): - return CHANGE_OF_SETUP_PARAMETER_STRING; - case(10900): - return GPIO_PULL_HIGH_FAILED_STRING; - case(10901): - return GPIO_PULL_LOW_FAILED_STRING; - case(10902): - return SWITCH_ALREADY_ON_STRING; - case(10903): - return SWITCH_ALREADY_OFF_STRING; - case(10904): - return MAIN_SWITCH_TIMEOUT_STRING; - case(11000): - return MAIN_SWITCH_ON_TIMEOUT_STRING; - case(11001): - return MAIN_SWITCH_OFF_TIMEOUT_STRING; - case(11002): - return DEPLOYMENT_FAILED_STRING; - case(11003): - return DEPL_SA1_GPIO_SWTICH_ON_FAILED_STRING; - case(11004): - return DEPL_SA2_GPIO_SWTICH_ON_FAILED_STRING; - case(11101): - return MEMORY_READ_RPT_CRC_FAILURE_STRING; - case(11102): - return ACK_FAILURE_STRING; - case(11103): - return EXE_FAILURE_STRING; - case(11104): - return CRC_FAILURE_EVENT_STRING; - case(11201): - return SELF_TEST_I2C_FAILURE_STRING; - case(11202): - return SELF_TEST_SPI_FAILURE_STRING; - case(11203): - return SELF_TEST_ADC_FAILURE_STRING; - case(11204): - return SELF_TEST_PWM_FAILURE_STRING; - case(11205): - return SELF_TEST_TC_FAILURE_STRING; - case(11206): - return SELF_TEST_MTM_RANGE_FAILURE_STRING; - case(11207): - return SELF_TEST_COIL_CURRENT_FAILURE_STRING; - case(11208): - return INVALID_ERROR_BYTE_STRING; - case(11301): - return ERROR_STATE_STRING; - case(11501): - return SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING; - case(11502): - return SUPV_ACK_FAILURE_STRING; - case(11503): - return SUPV_EXE_FAILURE_STRING; - case(11504): - return SUPV_CRC_FAILURE_EVENT_STRING; - case(11600): - return SANITIZATION_FAILED_STRING; - case(11700): - return UPDATE_FILE_NOT_EXISTS_STRING; - case(11701): - return ACTION_COMMANDING_FAILED_STRING; - case(11702): - return UPDATE_AVAILABLE_FAILED_STRING; - case(11703): - return UPDATE_TRANSFER_FAILED_STRING; - case(11704): - return UPDATE_VERIFY_FAILED_STRING; - case(11705): - return UPDATE_FINISHED_STRING; - case(11800): - return SEND_MRAM_DUMP_FAILED_STRING; - case(11801): - return MRAM_DUMP_FAILED_STRING; - case(11802): - return MRAM_DUMP_FINISHED_STRING; - case(11901): - return INVALID_TC_FRAME_STRING; - case(11902): - return INVALID_FAR_STRING; - case(11903): - return CARRIER_LOCK_STRING; - case(11904): - return BIT_LOCK_PDEC_STRING; - case(12000): - return IMAGE_UPLOAD_FAILED_STRING; - case(12001): - return IMAGE_DOWNLOAD_FAILED_STRING; - case(12002): - return IMAGE_UPLOAD_SUCCESSFUL_STRING; - case(12003): - return IMAGE_DOWNLOAD_SUCCESSFUL_STRING; - case(12004): - return FLASH_WRITE_SUCCESSFUL_STRING; - case(12005): - return FLASH_READ_SUCCESSFUL_STRING; - case(12006): - return FLASH_WRITE_FAILED_STRING; - case(12007): - return FLASH_READ_FAILED_STRING; - case(12008): - return FPGA_DOWNLOAD_SUCCESSFUL_STRING; - case(12009): - return FPGA_DOWNLOAD_FAILED_STRING; - case(12010): - return FPGA_UPLOAD_SUCCESSFUL_STRING; - case(12011): - return FPGA_UPLOAD_FAILED_STRING; - case(12012): - return STR_HELPER_READING_REPLY_FAILED_STRING; - case(12013): - return STR_HELPER_COM_ERROR_STRING; - case(12014): - return STR_HELPER_NO_REPLY_STRING; - case(12015): - return STR_HELPER_DEC_ERROR_STRING; - case(12016): - return POSITION_MISMATCH_STRING; - case(12017): - return STR_HELPER_FILE_NOT_EXISTS_STRING; - case(12018): - return STR_HELPER_SENDING_PACKET_FAILED_STRING; - case(12019): - return STR_HELPER_REQUESTING_MSG_FAILED_STRING; - default: - return "UNKNOWN_EVENT"; - } - return 0; + switch( (event & 0xffff) ) { + case(2200): + return STORE_SEND_WRITE_FAILED_STRING; + case(2201): + return STORE_WRITE_FAILED_STRING; + case(2202): + return STORE_SEND_READ_FAILED_STRING; + case(2203): + return STORE_READ_FAILED_STRING; + case(2204): + return UNEXPECTED_MSG_STRING; + case(2205): + return STORING_FAILED_STRING; + case(2206): + return TM_DUMP_FAILED_STRING; + case(2207): + return STORE_INIT_FAILED_STRING; + case(2208): + return STORE_INIT_EMPTY_STRING; + case(2209): + return STORE_CONTENT_CORRUPTED_STRING; + case(2210): + return STORE_INITIALIZE_STRING; + case(2211): + return INIT_DONE_STRING; + case(2212): + return DUMP_FINISHED_STRING; + case(2213): + return DELETION_FINISHED_STRING; + case(2214): + return DELETION_FAILED_STRING; + case(2215): + return AUTO_CATALOGS_SENDING_FAILED_STRING; + case(2600): + return GET_DATA_FAILED_STRING; + case(2601): + return STORE_DATA_FAILED_STRING; + case(2800): + return DEVICE_BUILDING_COMMAND_FAILED_STRING; + case(2801): + return DEVICE_SENDING_COMMAND_FAILED_STRING; + case(2802): + return DEVICE_REQUESTING_REPLY_FAILED_STRING; + case(2803): + return DEVICE_READING_REPLY_FAILED_STRING; + case(2804): + return DEVICE_INTERPRETING_REPLY_FAILED_STRING; + case(2805): + return DEVICE_MISSED_REPLY_STRING; + case(2806): + return DEVICE_UNKNOWN_REPLY_STRING; + case(2807): + return DEVICE_UNREQUESTED_REPLY_STRING; + case(2808): + return INVALID_DEVICE_COMMAND_STRING; + case(2809): + return MONITORING_LIMIT_EXCEEDED_STRING; + case(2810): + return MONITORING_AMBIGUOUS_STRING; + case(2811): + return DEVICE_WANTS_HARD_REBOOT_STRING; + case(4201): + return FUSE_CURRENT_HIGH_STRING; + case(4202): + return FUSE_WENT_OFF_STRING; + case(4204): + return POWER_ABOVE_HIGH_LIMIT_STRING; + case(4205): + return POWER_BELOW_LOW_LIMIT_STRING; + case(4300): + return SWITCH_WENT_OFF_STRING; + case(5000): + return HEATER_ON_STRING; + case(5001): + return HEATER_OFF_STRING; + case(5002): + return HEATER_TIMEOUT_STRING; + case(5003): + return HEATER_STAYED_ON_STRING; + case(5004): + return HEATER_STAYED_OFF_STRING; + case(5200): + return TEMP_SENSOR_HIGH_STRING; + case(5201): + return TEMP_SENSOR_LOW_STRING; + case(5202): + return TEMP_SENSOR_GRADIENT_STRING; + case(5901): + return COMPONENT_TEMP_LOW_STRING; + case(5902): + return COMPONENT_TEMP_HIGH_STRING; + case(5903): + return COMPONENT_TEMP_OOL_LOW_STRING; + case(5904): + return COMPONENT_TEMP_OOL_HIGH_STRING; + case(5905): + return TEMP_NOT_IN_OP_RANGE_STRING; + case(7101): + return FDIR_CHANGED_STATE_STRING; + case(7102): + return FDIR_STARTS_RECOVERY_STRING; + case(7103): + return FDIR_TURNS_OFF_DEVICE_STRING; + case(7201): + return MONITOR_CHANGED_STATE_STRING; + case(7202): + return VALUE_BELOW_LOW_LIMIT_STRING; + case(7203): + return VALUE_ABOVE_HIGH_LIMIT_STRING; + case(7204): + return VALUE_OUT_OF_RANGE_STRING; + case(7400): + return CHANGING_MODE_STRING; + case(7401): + return MODE_INFO_STRING; + case(7402): + return FALLBACK_FAILED_STRING; + case(7403): + return MODE_TRANSITION_FAILED_STRING; + case(7404): + return CANT_KEEP_MODE_STRING; + case(7405): + return OBJECT_IN_INVALID_MODE_STRING; + case(7406): + return FORCING_MODE_STRING; + case(7407): + return MODE_CMD_REJECTED_STRING; + case(7506): + return HEALTH_INFO_STRING; + case(7507): + return CHILD_CHANGED_HEALTH_STRING; + case(7508): + return CHILD_PROBLEMS_STRING; + case(7509): + return OVERWRITING_HEALTH_STRING; + case(7510): + return TRYING_RECOVERY_STRING; + case(7511): + return RECOVERY_STEP_STRING; + case(7512): + return RECOVERY_DONE_STRING; + case(7900): + return RF_AVAILABLE_STRING; + case(7901): + return RF_LOST_STRING; + case(7902): + return BIT_LOCK_STRING; + case(7903): + return BIT_LOCK_LOST_STRING; + case(7905): + return FRAME_PROCESSING_FAILED_STRING; + case(8900): + return CLOCK_SET_STRING; + case(8901): + return CLOCK_SET_FAILURE_STRING; + case(9700): + return TEST_STRING; + case(10600): + return CHANGE_OF_SETUP_PARAMETER_STRING; + case(10900): + return GPIO_PULL_HIGH_FAILED_STRING; + case(10901): + return GPIO_PULL_LOW_FAILED_STRING; + case(10902): + return SWITCH_ALREADY_ON_STRING; + case(10903): + return SWITCH_ALREADY_OFF_STRING; + case(10904): + return MAIN_SWITCH_TIMEOUT_STRING; + case(11000): + return MAIN_SWITCH_ON_TIMEOUT_STRING; + case(11001): + return MAIN_SWITCH_OFF_TIMEOUT_STRING; + case(11002): + return DEPLOYMENT_FAILED_STRING; + case(11003): + return DEPL_SA1_GPIO_SWTICH_ON_FAILED_STRING; + case(11004): + return DEPL_SA2_GPIO_SWTICH_ON_FAILED_STRING; + case(11101): + return MEMORY_READ_RPT_CRC_FAILURE_STRING; + case(11102): + return ACK_FAILURE_STRING; + case(11103): + return EXE_FAILURE_STRING; + case(11104): + return CRC_FAILURE_EVENT_STRING; + case(11201): + return SELF_TEST_I2C_FAILURE_STRING; + case(11202): + return SELF_TEST_SPI_FAILURE_STRING; + case(11203): + return SELF_TEST_ADC_FAILURE_STRING; + case(11204): + return SELF_TEST_PWM_FAILURE_STRING; + case(11205): + return SELF_TEST_TC_FAILURE_STRING; + case(11206): + return SELF_TEST_MTM_RANGE_FAILURE_STRING; + case(11207): + return SELF_TEST_COIL_CURRENT_FAILURE_STRING; + case(11208): + return INVALID_ERROR_BYTE_STRING; + case(11301): + return ERROR_STATE_STRING; + case(11501): + return SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING; + case(11502): + return SUPV_ACK_FAILURE_STRING; + case(11503): + return SUPV_EXE_FAILURE_STRING; + case(11504): + return SUPV_CRC_FAILURE_EVENT_STRING; + case(11600): + return SANITIZATION_FAILED_STRING; + case(11700): + return UPDATE_FILE_NOT_EXISTS_STRING; + case(11701): + return ACTION_COMMANDING_FAILED_STRING; + case(11702): + return UPDATE_AVAILABLE_FAILED_STRING; + case(11703): + return UPDATE_TRANSFER_FAILED_STRING; + case(11704): + return UPDATE_VERIFY_FAILED_STRING; + case(11705): + return UPDATE_FINISHED_STRING; + case(11800): + return SEND_MRAM_DUMP_FAILED_STRING; + case(11801): + return MRAM_DUMP_FAILED_STRING; + case(11802): + return MRAM_DUMP_FINISHED_STRING; + case(11901): + return INVALID_TC_FRAME_STRING; + case(11902): + return INVALID_FAR_STRING; + case(11903): + return CARRIER_LOCK_STRING; + case(11904): + return BIT_LOCK_PDEC_STRING; + case(12000): + return IMAGE_UPLOAD_FAILED_STRING; + case(12001): + return IMAGE_DOWNLOAD_FAILED_STRING; + case(12002): + return IMAGE_UPLOAD_SUCCESSFUL_STRING; + case(12003): + return IMAGE_DOWNLOAD_SUCCESSFUL_STRING; + case(12004): + return FLASH_WRITE_SUCCESSFUL_STRING; + case(12005): + return FLASH_READ_SUCCESSFUL_STRING; + case(12006): + return FLASH_WRITE_FAILED_STRING; + case(12007): + return FLASH_READ_FAILED_STRING; + case(12008): + return FPGA_DOWNLOAD_SUCCESSFUL_STRING; + case(12009): + return FPGA_DOWNLOAD_FAILED_STRING; + case(12010): + return FPGA_UPLOAD_SUCCESSFUL_STRING; + case(12011): + return FPGA_UPLOAD_FAILED_STRING; + case(12012): + return STR_HELPER_READING_REPLY_FAILED_STRING; + case(12013): + return STR_HELPER_COM_ERROR_STRING; + case(12014): + return STR_HELPER_NO_REPLY_STRING; + case(12015): + return STR_HELPER_DEC_ERROR_STRING; + case(12016): + return POSITION_MISMATCH_STRING; + case(12017): + return STR_HELPER_FILE_NOT_EXISTS_STRING; + case(12018): + return STR_HELPER_SENDING_PACKET_FAILED_STRING; + case(12019): + return STR_HELPER_REQUESTING_MSG_FAILED_STRING; + default: + return "UNKNOWN_EVENT"; + } + return 0; } From b8011717f703bdf5c4cb8f6bc236170165ae088d Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 3 Feb 2022 17:31:33 +0100 Subject: [PATCH 36/39] fix which adds back descriptions --- generators/bsp_q7s_events.csv | 24 ++++++++++----------- generators/events/translateEvents.cpp | 2 +- generators/fsfwgen | 2 +- linux/fsfwconfig/events/translateEvents.cpp | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/generators/bsp_q7s_events.csv b/generators/bsp_q7s_events.csv index 35bcb46b..b3d874ab 100644 --- a/generators/bsp_q7s_events.csv +++ b/generators/bsp_q7s_events.csv @@ -91,13 +91,13 @@ 11102;ACK_FAILURE;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/PlocMPSoCHandler.h 11103;EXE_FAILURE;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/PlocMPSoCHandler.h 11104;CRC_FAILURE_EVENT;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/PlocMPSoCHandler.h -11201;SELF_TEST_I2C_FAILURE;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h -11202;SELF_TEST_SPI_FAILURE;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h -11203;SELF_TEST_ADC_FAILURE;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h -11204;SELF_TEST_PWM_FAILURE;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h -11205;SELF_TEST_TC_FAILURE;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h -11206;SELF_TEST_MTM_RANGE_FAILURE;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h -11207;SELF_TEST_COIL_CURRENT_FAILURE;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h +11201;SELF_TEST_I2C_FAILURE;LOW;Get self test result returns I2C failure P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h +11202;SELF_TEST_SPI_FAILURE;LOW;Get self test result returns SPI failure. This concerns the MTM connectivity. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h +11203;SELF_TEST_ADC_FAILURE;LOW;Get self test result returns failure in measurement of current and temperature. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h +11204;SELF_TEST_PWM_FAILURE;LOW;Get self test result returns PWM failure which concerns the coil actuation. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h +11205;SELF_TEST_TC_FAILURE;LOW;Get self test result returns TC failure (system failure) P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h +11206;SELF_TEST_MTM_RANGE_FAILURE;LOW;Get self test result returns failure that MTM values were outside of the expected range. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h +11207;SELF_TEST_COIL_CURRENT_FAILURE;LOW;Get self test result returns failure indicating that the coil current was outside of the expected range P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h 11208;INVALID_ERROR_BYTE;LOW;Received invalid error byte. This indicates an error of the communication link between IMTQ and OBC.;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h 11301;ERROR_STATE;HIGH;Reaction wheel signals an error state;/home/rmueller/EIVE/eive-obsw/mission/devices/RwHandler.h 11501;SUPV_MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC supervisor crc failure in telemetry packet;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocSupervisorHandler.h @@ -106,12 +106,12 @@ 11504;SUPV_CRC_FAILURE_EVENT;LOW;PLOC supervisor reply has invalid crc;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocSupervisorHandler.h 11600;SANITIZATION_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/bsp_q7s/memory/SdCardManager.h 11700;UPDATE_FILE_NOT_EXISTS;LOW;;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocUpdater.h -11701;ACTION_COMMANDING_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocUpdater.h +11701;ACTION_COMMANDING_FAILED;LOW;Failed to send command to supervisor handler P1: Return value of CommandActionHelper::commandAction P2: Action ID of command to send;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocUpdater.h 11702;UPDATE_AVAILABLE_FAILED;LOW;Supervisor handler replied action message indicating a command execution failure of the update available command;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocUpdater.h 11703;UPDATE_TRANSFER_FAILED;LOW;Supervisor handler failed to transfer an update space packet. P1: Parameter holds the number of update packets already sent (inclusive the failed packet);/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocUpdater.h 11704;UPDATE_VERIFY_FAILED;LOW;Supervisor failed to execute the update verify command.;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocUpdater.h 11705;UPDATE_FINISHED;INFO;MPSoC update successful completed;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocUpdater.h -11800;SEND_MRAM_DUMP_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocMemoryDumper.h +11800;SEND_MRAM_DUMP_FAILED;LOW;Failed to send mram dump command to supervisor handler P1: Return value of commandAction function P2: Start address of MRAM to dump with this command;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocMemoryDumper.h 11801;MRAM_DUMP_FAILED;LOW;Received completion failure report form PLOC supervisor handler P1: MRAM start address of failing dump command;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocMemoryDumper.h 11802;MRAM_DUMP_FINISHED;LOW;MRAM dump finished successfully;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocMemoryDumper.h 11901;INVALID_TC_FRAME;HIGH;;/home/rmueller/EIVE/eive-obsw/linux/obc/PdecHandler.h @@ -130,10 +130,10 @@ 12009;FPGA_DOWNLOAD_FAILED;LOW;Download of FPGA image failed;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h 12010;FPGA_UPLOAD_SUCCESSFUL;LOW;Upload of FPGA image successful;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h 12011;FPGA_UPLOAD_FAILED;LOW;Upload of FPGA image failed;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h -12012;STR_HELPER_READING_REPLY_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h -12013;STR_HELPER_COM_ERROR;LOW;;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h +12012;STR_HELPER_READING_REPLY_FAILED;LOW;Failed to read communication interface reply data P1: Return code of failed communication interface read call P1: Upload/download position for which the read call failed;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h +12013;STR_HELPER_COM_ERROR;LOW;Unexpected stop of decoding sequence P1: Return code of failed communication interface read call P1: Upload/download position for which the read call failed;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h 12014;STR_HELPER_NO_REPLY;LOW;Star tracker did not send replies (maybe device is powered off) P1: Position of upload or download packet for which no reply was sent;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h -12015;STR_HELPER_DEC_ERROR;LOW;;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h +12015;STR_HELPER_DEC_ERROR;LOW;Error during decoding of received reply occurred P1: Return value of decoding function P2: Position of upload/download packet, or address of flash write/read request;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h 12016;POSITION_MISMATCH;LOW;Position mismatch P1: The expected position and thus the position for which the image upload/download failed;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h 12017;STR_HELPER_FILE_NOT_EXISTS;LOW;Specified file does not exist P1: Internal state of str helper;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h 12018;STR_HELPER_SENDING_PACKET_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h diff --git a/generators/events/translateEvents.cpp b/generators/events/translateEvents.cpp index cc9512a9..9e6a5f61 100644 --- a/generators/events/translateEvents.cpp +++ b/generators/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** * @brief Auto-generated event translation file. Contains 140 translations. * @details - * Generated on: 2022-02-03 17:13:35 + * Generated on: 2022-02-03 17:30:40 */ #include "translateEvents.h" diff --git a/generators/fsfwgen b/generators/fsfwgen index 80312ed2..24fa9a3f 160000 --- a/generators/fsfwgen +++ b/generators/fsfwgen @@ -1 +1 @@ -Subproject commit 80312ed21e5a02521fef7959a479bbd79f10e6d1 +Subproject commit 24fa9a3fe3f5c6157b4c48e867e22bd2d335d18a diff --git a/linux/fsfwconfig/events/translateEvents.cpp b/linux/fsfwconfig/events/translateEvents.cpp index cc9512a9..9e6a5f61 100644 --- a/linux/fsfwconfig/events/translateEvents.cpp +++ b/linux/fsfwconfig/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** * @brief Auto-generated event translation file. Contains 140 translations. * @details - * Generated on: 2022-02-03 17:13:35 + * Generated on: 2022-02-03 17:30:40 */ #include "translateEvents.h" From ec01edc535cb48614c789e8855ef8a0754586dd5 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 3 Feb 2022 17:34:25 +0100 Subject: [PATCH 37/39] fsfw update --- fsfw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsfw b/fsfw index b7f6a696..0d4bd856 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit b7f6a6961b6f0815890c2ae98d4fd1a11c72b8c0 +Subproject commit 0d4bd856bd6753db60e2465a754ee728ac44cabc From e1d506926f01cbb1e6c2f4e5fa5e7af1d7464b8c Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 3 Feb 2022 17:37:37 +0100 Subject: [PATCH 38/39] and another fsfw update --- fsfw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsfw b/fsfw index 0d4bd856..32a9e0c7 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 0d4bd856bd6753db60e2465a754ee728ac44cabc +Subproject commit 32a9e0c7044665f0265c10108c8d62d45c047769 From 6543264691b8382ca9f3a4f09e96e39298620f21 Mon Sep 17 00:00:00 2001 From: "Jakob.Meier" Date: Sat, 5 Feb 2022 11:43:40 +0100 Subject: [PATCH 39/39] manually preparing sysroots for cross compiling gpsd lib --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7d27b092..34f31da7 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,9 @@ 12. [Static Code Analysis](#static-code-analysis) 13. [Eclipse](#eclipse) 14. [Running the OBSW on a Raspberry Pi](#rpi) -15. [FSFW](#fsfw) -16. [Coding Style](#coding-style) +15. [Manually preparing sysroots to compile gpsd](#gpsd) +16. [FSFW](#fsfw) +17. [Coding Style](#coding-style) # General information @@ -1133,6 +1134,9 @@ sudo apt-get install gpiod libgpiod-dev to install the required GPIO libraries before cloning the system root folder. +# Manually preparing sysroots to compile gpsd +Copy all header files from [here](https://eive-cloud.irs.uni-stuttgart.de/index.php/apps/files/?dir=/EIVE_IRS/Software/gpsd&fileid=1189985) to the /usr/include directory and all static libraries to /usr/lib. + # Flight Software Framework (FSFW) An EIVE fork of the FSFW is submodules into this repository.