diff --git a/CHANGELOG.md b/CHANGELOG.md index 09055dd7..276a6b1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,11 +16,52 @@ will consitute of a breaking change warranting a new major release: # [unreleased] +# [v7.2.0] 2023-10-27 + +- `eive-tmtc` v5.10.1 + +## Added + +- STR: Added new TM sets: Blob, Blobs, MatchedCentroids, Contrast, AutoBlob, Centroid, Centroids +- STR: Added new mechanism where the secondary TM which is polled can now be a set instead of + being temperature only. An API is exposed which allows to add a data set to that set of secondary + telemetry, reset it back to temperature only, and read the whole set. This allows more debugging + capability. +- CFDP source handler, which allows file downlink using the standardized + CFDP interface. +- Proper back pressure handling for the CFDP handler, where the `LiveTmTask` is able to throttle + the CFDP handler. +- Added CFDP fault handler events. +- The EIVE system will command the payload OFF explicitely again when receiving the + `power::POWER_LEVEL_CRITICAL` event. + ## Fixed +- If the PTME is driven in a way where it fills faster than it can be emptied, the interface + can become full during the process of a regular packet write. The interface of the PAPB VC + was adapted to be stateful now. Packet generation is started with a `write` call while + write transfers are advanced and completed with the `advanceWrite` call if they can not be + completed immediately. +- CFDP Space Packets SSC is now generated properly, was always 0 before. +- Host build fixes - PL Enable set of the power controller is now set to invalid properly if the power controller is not in normal mode. - MPSoC debug mode. +- Possible bugfix for PL PCDU parameter JSON handling which might not have been initialized + properly from the JSON file. + +## Changed + +- Swapped RTD 9 (PLOC HPA Sensor) and RTD 11 (PLOC MPA Sensor) chip select definitions. It is + strongly suspected the cables for those devices were swapped during integration. This is probably + the easiest way to fix the issue without the need to tweak ground or other OBSW or controller + code. +- Added a 3 second delay in the EIVE system between commanding all PL components except the SUPV, + and the SUPV itself OFF when the power level becomes low or critical. +- SUS FDIR should now trigger less events. The finish event is now only triggered once the + SUS has been working properly for a minute again. It will then display the number of periods + during which the SUS was not working as well as the maximum amount of invalid messages. +- Updated battery internal resistance to new value # [v7.1.0] 2023-10-11 diff --git a/CMakeLists.txt b/CMakeLists.txt index 65e85d35..cbfd7815 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ cmake_minimum_required(VERSION 3.13) set(OBSW_VERSION_MAJOR 7) -set(OBSW_VERSION_MINOR 1) +set(OBSW_VERSION_MINOR 2) set(OBSW_VERSION_REVISION 0) # set(CMAKE_VERBOSE TRUE) diff --git a/bsp_hosted/CMakeLists.txt b/bsp_hosted/CMakeLists.txt index ec2016b4..1300375e 100644 --- a/bsp_hosted/CMakeLists.txt +++ b/bsp_hosted/CMakeLists.txt @@ -1,4 +1,4 @@ -target_sources(${OBSW_NAME} PUBLIC scheduling.cpp main.cpp ObjectFactory.cpp) +target_sources(${OBSW_NAME} PUBLIC scheduling.cpp main.cpp objectFactory.cpp) add_subdirectory(fsfwconfig) add_subdirectory(boardconfig) diff --git a/bsp_hosted/OBSWConfig.h.in b/bsp_hosted/OBSWConfig.h.in index 5e6fcc2c..6e525e5a 100644 --- a/bsp_hosted/OBSWConfig.h.in +++ b/bsp_hosted/OBSWConfig.h.in @@ -101,7 +101,7 @@ /** CMake Defines */ /*******************************************************************/ -#define OBSW_ADD_TMTC_UDP_SERVER 1 +#define OBSW_ADD_TMTC_UDP_SERVER 0 #define OBSW_ADD_TMTC_TCP_SERVER 1 #cmakedefine EIVE_BUILD_GPSD_GPS_HANDLER diff --git a/bsp_hosted/fsfwconfig/events/translateEvents.cpp b/bsp_hosted/fsfwconfig/events/translateEvents.cpp index 9bb03ff0..099a4c7a 100644 --- a/bsp_hosted/fsfwconfig/events/translateEvents.cpp +++ b/bsp_hosted/fsfwconfig/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** - * @brief Auto-generated event translation file. Contains 313 translations. + * @brief Auto-generated event translation file. Contains 315 translations. * @details - * Generated on: 2023-10-11 10:54:39 + * Generated on: 2023-10-27 14:24:05 */ #include "translateEvents.h" @@ -92,6 +92,7 @@ const char *MSG_QUEUE_ERROR_STRING = "MSG_QUEUE_ERROR"; const char *SERIALIZATION_ERROR_STRING = "SERIALIZATION_ERROR"; const char *FILESTORE_ERROR_STRING = "FILESTORE_ERROR"; const char *FILENAME_TOO_LARGE_ERROR_STRING = "FILENAME_TOO_LARGE_ERROR"; +const char *HANDLING_CFDP_REQUEST_FAILED_STRING = "HANDLING_CFDP_REQUEST_FAILED"; const char *SAFE_RATE_VIOLATION_STRING = "SAFE_RATE_VIOLATION"; const char *SAFE_RATE_RECOVERY_STRING = "SAFE_RATE_RECOVERY"; const char *MULTIPLE_RW_INVALID_STRING = "MULTIPLE_RW_INVALID"; @@ -318,6 +319,7 @@ const char *DUMP_HK_CANCELLED_STRING = "DUMP_HK_CANCELLED"; const char *DUMP_CFDP_CANCELLED_STRING = "DUMP_CFDP_CANCELLED"; const char *TEMPERATURE_ALL_ONES_START_STRING = "TEMPERATURE_ALL_ONES_START"; const char *TEMPERATURE_ALL_ONES_RECOVERY_STRING = "TEMPERATURE_ALL_ONES_RECOVERY"; +const char *FAULT_HANDLER_TRIGGERED_STRING = "FAULT_HANDLER_TRIGGERED"; const char *translateEvents(Event event) { switch ((event & 0xFFFF)) { @@ -495,6 +497,8 @@ const char *translateEvents(Event event) { return FILESTORE_ERROR_STRING; case (10804): return FILENAME_TOO_LARGE_ERROR_STRING; + case (10805): + return HANDLING_CFDP_REQUEST_FAILED_STRING; case (11200): return SAFE_RATE_VIOLATION_STRING; case (11201): @@ -947,6 +951,8 @@ const char *translateEvents(Event event) { return TEMPERATURE_ALL_ONES_START_STRING; case (14501): return TEMPERATURE_ALL_ONES_RECOVERY_STRING; + case (14600): + return FAULT_HANDLER_TRIGGERED_STRING; default: return "UNKNOWN_EVENT"; } diff --git a/bsp_hosted/fsfwconfig/objects/translateObjects.cpp b/bsp_hosted/fsfwconfig/objects/translateObjects.cpp index 7e795093..1fa48c9a 100644 --- a/bsp_hosted/fsfwconfig/objects/translateObjects.cpp +++ b/bsp_hosted/fsfwconfig/objects/translateObjects.cpp @@ -1,8 +1,8 @@ /** * @brief Auto-generated object translation file. * @details - * Contains 174 translations. - * Generated on: 2023-10-11 10:54:39 + * Contains 175 translations. + * Generated on: 2023-10-27 14:24:05 */ #include "translateObjects.h" @@ -161,6 +161,7 @@ const char *PUS_TM_FUNNEL_STRING = "PUS_TM_FUNNEL"; const char *CFDP_TM_FUNNEL_STRING = "CFDP_TM_FUNNEL"; const char *CFDP_HANDLER_STRING = "CFDP_HANDLER"; const char *CFDP_DISTRIBUTOR_STRING = "CFDP_DISTRIBUTOR"; +const char *CFDP_FAULT_HANDLER_STRING = "CFDP_FAULT_HANDLER"; const char *EIVE_SYSTEM_STRING = "EIVE_SYSTEM"; const char *ACS_SUBSYSTEM_STRING = "ACS_SUBSYSTEM"; const char *PL_SUBSYSTEM_STRING = "PL_SUBSYSTEM"; @@ -493,6 +494,8 @@ const char *translateObject(object_id_t object) { return CFDP_HANDLER_STRING; case 0x73000206: return CFDP_DISTRIBUTOR_STRING; + case 0x73000207: + return CFDP_FAULT_HANDLER_STRING; case 0x73010000: return EIVE_SYSTEM_STRING; case 0x73010001: diff --git a/bsp_hosted/ObjectFactory.cpp b/bsp_hosted/objectFactory.cpp similarity index 96% rename from bsp_hosted/ObjectFactory.cpp rename to bsp_hosted/objectFactory.cpp index 4873bc58..0f785e70 100644 --- a/bsp_hosted/ObjectFactory.cpp +++ b/bsp_hosted/objectFactory.cpp @@ -1,4 +1,4 @@ -#include "ObjectFactory.h" +#include "objectFactory.h" #include #include @@ -61,14 +61,14 @@ void ObjectFactory::produce(void* args) { CfdpTmFunnel* cfdpFunnel; StorageManagerIF* tmStore; StorageManagerIF* ipcStore; - PersistentTmStores persistentStores; + PersistentTmStores persistentStores{}; bool enableHkSets = false; #if OBSW_ENABLE_PERIODIC_HK == 1 enableHkSets = true; #endif auto sdcMan = new DummySdCardManager("/tmp"); ObjectFactory::produceGenericObjects(nullptr, &pusFunnel, &cfdpFunnel, *sdcMan, &ipcStore, - &tmStore, persistentStores, 120, enableHkSets); + &tmStore, persistentStores, 120, enableHkSets, false); new TmFunnelHandler(objects::LIVE_TM_TASK, *pusFunnel, *cfdpFunnel); auto* dummyGpioIF = new DummyGpioIF(); @@ -105,6 +105,8 @@ void ObjectFactory::produce(void* args) { #endif dummy::DummyCfg cfg; + cfg.addPlPcduDummy = true; + cfg.addCamSwitcherDummy = true; dummy::createDummies(cfg, *dummySwitcher, dummyGpioIF, enableHkSets); HeaterHandler* heaterHandler = nullptr; diff --git a/bsp_hosted/ObjectFactory.h b/bsp_hosted/objectFactory.h similarity index 100% rename from bsp_hosted/ObjectFactory.h rename to bsp_hosted/objectFactory.h diff --git a/bsp_hosted/scheduling.cpp b/bsp_hosted/scheduling.cpp index 5fd53906..c771608f 100644 --- a/bsp_hosted/scheduling.cpp +++ b/bsp_hosted/scheduling.cpp @@ -13,8 +13,8 @@ #include #include "OBSWConfig.h" -#include "ObjectFactory.h" #include "mission/scheduling.h" +#include "objectFactory.h" #include "scheduling.h" #ifdef LINUX @@ -69,21 +69,25 @@ void scheduling::initTasks() { if (result != returnvalue::OK) { sif::error << "Adding CFDP distributor failed" << std::endl; } +#if OBSW_ADD_TMTC_UDP_SERVER == 1 result = tmtcDistributor->addComponent(objects::UDP_TMTC_SERVER); if (result != returnvalue::OK) { sif::error << "adding UDP server failed" << std::endl; } +#endif result = tmtcDistributor->addComponent(objects::TCP_TMTC_SERVER); if (result != returnvalue::OK) { sif::error << "adding TCP server failed" << std::endl; } +#if OBSW_ADD_TMTC_UDP_SERVER == 1 PeriodicTaskIF* udpPollingTask = factory->createPeriodicTask( "UDP_POLLING", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc); result = udpPollingTask->addComponent(objects::UDP_TMTC_POLLING_TASK); if (result != returnvalue::OK) { sif::error << "Add component UDP Polling failed" << std::endl; } +#endif PeriodicTaskIF* tcpPollingTask = factory->createPeriodicTask( "TCP_POLLING", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc); result = tcpPollingTask->addComponent(objects::TCP_TMTC_POLLING_TASK); @@ -92,7 +96,7 @@ void scheduling::initTasks() { } PeriodicTaskIF* liveTmTask = factory->createPeriodicTask( - "LIVE_TM", 55, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, nullptr, &RR_SCHEDULING); + "LIVE_TM", 55, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, nullptr, &RR_SCHEDULING); result = liveTmTask->addComponent(objects::LIVE_TM_TASK); if (result != returnvalue::OK) { scheduling::printAddObjectError("LIVE_TM", objects::LIVE_TM_TASK); @@ -179,6 +183,28 @@ void scheduling::initTasks() { } #endif + // If those are added at a later stage.. + /* + PeriodicTaskIF* logTmTask = factory->createPeriodicTask( + "LOG_PSTORE", 0, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, nullptr); + result = logTmTask->addComponent(objects::LOG_STORE_AND_TM_TASK); + if (result != returnvalue::OK) { + scheduling::printAddObjectError("LOG_STORE_AND_TM", objects::LOG_STORE_AND_TM_TASK); + } + PeriodicTaskIF* hkTmTask = + factory->createPeriodicTask("HK_PSTORE", 0, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, nullptr); + result = hkTmTask->addComponent(objects::HK_STORE_AND_TM_TASK); + if (result != returnvalue::OK) { + scheduling::printAddObjectError("HK_STORE_AND_TM", objects::HK_STORE_AND_TM_TASK); + } + PeriodicTaskIF* cfdpTmTask = factory->createPeriodicTask( + "CFDP_PSTORE", 0, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, nullptr); + result = cfdpTmTask->addComponent(objects::CFDP_STORE_AND_TM_TASK); + if (result != returnvalue::OK) { + scheduling::printAddObjectError("CFDP_STORE_AND_TM", objects::CFDP_STORE_AND_TM_TASK); + } + */ + #if OBSW_ADD_PLOC_SUPERVISOR == 1 PeriodicTaskIF* supvHelperTask = factory->createPeriodicTask( "PLOC_SUPV_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc); @@ -201,7 +227,7 @@ void scheduling::initTasks() { PeriodicTaskIF* dummyTask = factory->createPeriodicTask( "DUMMY_TASK", 35, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc); dummyTask->addComponent(objects::THERMAL_TEMP_INSERTER); - scheduling::scheduleTmpTempSensors(dummyTask); + scheduling::scheduleTmpTempSensors(dummyTask, true); scheduling::scheduleRtdSensors(dummyTask); dummyTask->addComponent(objects::SUS_0_N_LOC_XFYFZM_PT_XF); dummyTask->addComponent(objects::SUS_1_N_LOC_XBYFZM_PT_XB); @@ -218,7 +244,9 @@ void scheduling::initTasks() { sif::info << "Starting tasks.." << std::endl; tmtcDistributor->startTask(); +#if OBSW_ADD_TMTC_UDP_SERVER == 1 udpPollingTask->startTask(); +#endif tcpPollingTask->startTask(); liveTmTask->startTask(); @@ -228,6 +256,12 @@ void scheduling::initTasks() { pstTask->startTask(); thermalTask->startTask(); dummyTask->startTask(); + + // If those are added at a later stage.. + // logTmTask->startTask(); + // cfdpTmTask->startTask(); + // hkTmTask->startTask(); + #if OBSW_ADD_PLOC_SUPERVISOR == 1 supvHelperTask->startTask(); #endif diff --git a/bsp_q7s/em/emObjectFactory.cpp b/bsp_q7s/em/emObjectFactory.cpp index 3a16dcec..ca75e123 100644 --- a/bsp_q7s/em/emObjectFactory.cpp +++ b/bsp_q7s/em/emObjectFactory.cpp @@ -41,7 +41,7 @@ void ObjectFactory::produce(void* args) { new XiphosWdtHandler(objects::XIPHOS_WDT); ObjectFactory::produceGenericObjects(&healthTable, &pusFunnel, &cfdpFunnel, *SdCardManager::instance(), &ipcStore, &tmStore, stores, 200, - enableHkSets); + enableHkSets, true); LinuxLibgpioIF* gpioComIF = nullptr; SerialComIF* uartComIF = nullptr; @@ -164,14 +164,9 @@ void ObjectFactory::produce(void* args) { CcsdsIpCoreHandler* ipCoreHandler = nullptr; CcsdsComponentArgs ccsdsArgs(*gpioComIF, *ipcStore, *tmStore, stores, *pusFunnel, *cfdpFunnel, &ipCoreHandler); - createCcsdsComponents(ccsdsArgs); -#if OBSW_TM_TO_PTME == 1 - if (ccsdsArgs.liveDestination != nullptr) { - pusFunnel->addLiveDestination("VC0 LIVE TM", *ccsdsArgs.liveDestination, 0); - cfdpFunnel->addLiveDestination("VC0 LIVE TM", *ccsdsArgs.liveDestination, 0); - } -#endif + createCcsdsIpComponentsAddTmRouting(ccsdsArgs); #endif /* OBSW_ADD_CCSDS_IP_CORES == 1 */ + /* Test Task */ #if OBSW_ADD_TEST_CODE == 1 createTestComponents(gpioComIF); diff --git a/bsp_q7s/fmObjectFactory.cpp b/bsp_q7s/fmObjectFactory.cpp index 57e2e0c4..e4a61124 100644 --- a/bsp_q7s/fmObjectFactory.cpp +++ b/bsp_q7s/fmObjectFactory.cpp @@ -38,7 +38,7 @@ void ObjectFactory::produce(void* args) { new XiphosWdtHandler(objects::XIPHOS_WDT); ObjectFactory::produceGenericObjects(&healthTable, &pusFunnel, &cfdpFunnel, *SdCardManager::instance(), &ipcStore, &tmStore, stores, 200, - true); + true, true); LinuxLibgpioIF* gpioComIF = nullptr; SerialComIF* uartComIF = nullptr; @@ -116,13 +116,7 @@ void ObjectFactory::produce(void* args) { CcsdsIpCoreHandler* ipCoreHandler = nullptr; CcsdsComponentArgs ccsdsArgs(*gpioComIF, *ipcStore, *tmStore, stores, *pusFunnel, *cfdpFunnel, &ipCoreHandler); - createCcsdsComponents(ccsdsArgs); -#if OBSW_TM_TO_PTME == 1 - if (ccsdsArgs.liveDestination != nullptr) { - pusFunnel->addLiveDestination("VC0 LIVE TM", *ccsdsArgs.liveDestination, 0); - cfdpFunnel->addLiveDestination("VC0 LIVE TM", *ccsdsArgs.liveDestination, 0); - } -#endif + createCcsdsIpComponentsAddTmRouting(ccsdsArgs); #endif /* OBSW_ADD_CCSDS_IP_CORES == 1 */ #if OBSW_ADD_SCEX_DEVICE == 1 diff --git a/bsp_q7s/objectFactory.cpp b/bsp_q7s/objectFactory.cpp index 39271628..c8e6f555 100644 --- a/bsp_q7s/objectFactory.cpp +++ b/bsp_q7s/objectFactory.cpp @@ -134,7 +134,7 @@ using gpio::Levels; ResetArgs RESET_ARGS_GNSS; std::atomic_bool LINK_STATE = CcsdsIpCoreHandler::LINK_DOWN; std::atomic_bool PTME_LOCKED = false; -std::atomic_uint16_t I2C_FATAL_ERRORS = 0; +std::atomic_uint16_t signals::I2C_FATAL_ERRORS = 0; uint8_t core::FW_VERSION_MAJOR = 0; uint8_t core::FW_VERSION_MINOR = 0; uint8_t core::FW_VERSION_REVISION = 0; @@ -750,14 +750,18 @@ ReturnValue_t ObjectFactory::createCcsdsComponents(CcsdsComponentArgs& args) { gpioChecker(args.gpioComIF.addGpios(gpioCookiePtmeIp), "PTME PAPB VCs"); // Creating virtual channel interfaces - VirtualChannelIF* vc0 = new PapbVcInterface(&args.gpioComIF, gpioIds::VC0_PAPB_EMPTY, - q7s::UIO_PTME, q7s::uiomapids::PTME_VC0); - VirtualChannelIF* vc1 = new PapbVcInterface(&args.gpioComIF, gpioIds::VC1_PAPB_EMPTY, - q7s::UIO_PTME, q7s::uiomapids::PTME_VC1); - VirtualChannelIF* vc2 = new PapbVcInterface(&args.gpioComIF, gpioIds::VC2_PAPB_EMPTY, - q7s::UIO_PTME, q7s::uiomapids::PTME_VC2); - VirtualChannelIF* vc3 = new PapbVcInterface(&args.gpioComIF, gpioIds::VC3_PAPB_EMPTY, - q7s::UIO_PTME, q7s::uiomapids::PTME_VC3); + VirtualChannelIF* vc0 = + new PapbVcInterface(&args.gpioComIF, gpioIds::VC0_PAPB_EMPTY, q7s::UIO_PTME, + q7s::uiomapids::PTME_VC0, config::MAX_SPACEPACKET_TC_SIZE); + VirtualChannelIF* vc1 = + new PapbVcInterface(&args.gpioComIF, gpioIds::VC1_PAPB_EMPTY, q7s::UIO_PTME, + q7s::uiomapids::PTME_VC1, config::MAX_SPACEPACKET_TC_SIZE); + VirtualChannelIF* vc2 = + new PapbVcInterface(&args.gpioComIF, gpioIds::VC2_PAPB_EMPTY, q7s::UIO_PTME, + q7s::uiomapids::PTME_VC2, config::MAX_SPACEPACKET_TC_SIZE); + VirtualChannelIF* vc3 = + new PapbVcInterface(&args.gpioComIF, gpioIds::VC3_PAPB_EMPTY, q7s::UIO_PTME, + q7s::uiomapids::PTME_VC3, config::MAX_SPACEPACKET_TC_SIZE); // Creating ptme object and adding virtual channel interfaces Ptme* ptme = new Ptme(objects::PTME); ptme->addVcInterface(ccsds::VC0, vc0); @@ -777,12 +781,13 @@ ReturnValue_t ObjectFactory::createCcsdsComponents(CcsdsComponentArgs& args) { new CcsdsIpCoreHandler(objects::CCSDS_HANDLER, objects::CCSDS_PACKET_DISTRIBUTOR, *ptmeConfig, LINK_STATE, &args.gpioComIF, gpios, PTME_LOCKED); // This VC will receive all live TM - auto* vcWithQueue = - new VirtualChannelWithQueue(objects::PTME_VC0_LIVE_TM, ccsds::VC0, "PTME VC0 LIVE TM", *ptme, - LINK_STATE, args.tmStore, 500); - args.liveDestination = vcWithQueue; + auto* vcWithQueue = new VirtualChannel(objects::PTME_VC0_LIVE_TM, ccsds::VC0, "PTME VC0 LIVE TM", + *ptme, LINK_STATE); auto* liveTask = new LiveTmTask(objects::LIVE_TM_TASK, args.pusFunnel, args.cfdpFunnel, - *vcWithQueue, PTME_LOCKED); + *vcWithQueue, PTME_LOCKED, config::LIVE_CHANNEL_NORMAL_QUEUE_SIZE, + config::LIVE_CHANNEL_CFDP_QUEUE_SIZE); + args.normalLiveTmDest = liveTask->getNormalLiveQueueId(); + args.cfdpLiveTmDest = liveTask->getCfdpLiveQueueId(); liveTask->connectModeTreeParent(satsystem::com::SUBSYSTEM); // Set up log store. @@ -953,7 +958,7 @@ void ObjectFactory::createImtqComponents(PowerSwitchIF* pwrSwitcher, bool enable auto* imtqAssy = new ImtqAssembly(objects::IMTQ_ASSY); imtqAssy->connectModeTreeParent(satsystem::acs::ACS_SUBSYSTEM); - new ImtqPollingTask(objects::IMTQ_POLLING, I2C_FATAL_ERRORS); + new ImtqPollingTask(objects::IMTQ_POLLING, signals::I2C_FATAL_ERRORS); I2cCookie* imtqI2cCookie = new I2cCookie(addresses::IMTQ, imtq::MAX_REPLY_SIZE, i2cDev); auto imtqHandler = new ImtqHandler(objects::IMTQ_HANDLER, objects::IMTQ_POLLING, imtqI2cCookie, power::Switches::PDU1_CH3_MGT_5V, enableHkSets); @@ -1056,3 +1061,17 @@ ReturnValue_t ObjectFactory::readFirmwareVersion() { } return returnvalue::OK; } + +ReturnValue_t ObjectFactory::createCcsdsIpComponentsAddTmRouting(CcsdsComponentArgs& ccsdsArgs) { + ReturnValue_t result = createCcsdsComponents(ccsdsArgs); +#if OBSW_TM_TO_PTME == 1 + if (ccsdsArgs.normalLiveTmDest != MessageQueueIF::NO_QUEUE) { + ccsdsArgs.pusFunnel.addLiveDestinationByRawId("VC0 NORMAL LIVE TM", ccsdsArgs.normalLiveTmDest, + 0); + } + if (ccsdsArgs.cfdpLiveTmDest != MessageQueueIF::NO_QUEUE) { + ccsdsArgs.cfdpFunnel.addLiveDestinationByRawId("VC0 CFDP LIVE TM", ccsdsArgs.cfdpLiveTmDest, 0); + } +#endif + return result; +} diff --git a/bsp_q7s/objectFactory.h b/bsp_q7s/objectFactory.h index 491720ac..223031e6 100644 --- a/bsp_q7s/objectFactory.h +++ b/bsp_q7s/objectFactory.h @@ -46,7 +46,8 @@ struct CcsdsComponentArgs { PusTmFunnel& pusFunnel; CfdpTmFunnel& cfdpFunnel; CcsdsIpCoreHandler** ipCoreHandler; - AcceptsTelemetryIF* liveDestination = nullptr; + MessageQueueId_t normalLiveTmDest = MessageQueueIF::NO_QUEUE; + MessageQueueId_t cfdpLiveTmDest = MessageQueueIF::NO_QUEUE; }; void setStatics(); @@ -74,6 +75,7 @@ void createSolarArrayDeploymentComponents(PowerSwitchIF& pwrSwitcher, GpioIF& gp void createSyrlinksComponents(PowerSwitchIF* pwrSwitcher); void createPayloadComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF& pwrSwitcher); void createReactionWheelComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF* pwrSwitcher); +ReturnValue_t createCcsdsIpComponentsAddTmRouting(CcsdsComponentArgs& args); ReturnValue_t createCcsdsComponents(CcsdsComponentArgs& args); ReturnValue_t readFirmwareVersion(); void createMiscComponents(); diff --git a/common/config/devices/addresses.h b/common/config/devices/addresses.h index c1e65314..e1598574 100644 --- a/common/config/devices/addresses.h +++ b/common/config/devices/addresses.h @@ -54,6 +54,9 @@ enum I2cAddress : address_t { }; enum spiAddresses : address_t { + RTD_IC_0, + RTD_IC_1, + RTD_IC_2, RTD_IC_3, RTD_IC_4, RTD_IC_5, @@ -67,9 +70,6 @@ enum spiAddresses : address_t { RTD_IC_13, RTD_IC_14, RTD_IC_15, - RTD_IC_16, - RTD_IC_17, - RTD_IC_18, RW1, RW2, RW3, diff --git a/common/config/devices/gpioIds.h b/common/config/devices/gpioIds.h index bed82142..2cab2c32 100644 --- a/common/config/devices/gpioIds.h +++ b/common/config/devices/gpioIds.h @@ -37,6 +37,9 @@ enum gpioId_t { TEST_ID_0, TEST_ID_1, + RTD_IC_0, + RTD_IC_1, + RTD_IC_2, RTD_IC_3, RTD_IC_4, RTD_IC_5, @@ -50,9 +53,6 @@ enum gpioId_t { RTD_IC_13, RTD_IC_14, RTD_IC_15, - RTD_IC_16, - RTD_IC_17, - RTD_IC_18, CS_SUS_0, CS_SUS_1, diff --git a/common/config/eive/definitions.h b/common/config/eive/definitions.h index d446aa8d..b51eefdb 100644 --- a/common/config/eive/definitions.h +++ b/common/config/eive/definitions.h @@ -35,6 +35,8 @@ static constexpr uint32_t STR_IMG_HELPER_QUEUE_SIZE = 50; static constexpr uint8_t LIVE_TM = 0; +static constexpr size_t MAX_SPACEPACKET_TC_SIZE = 2048; + /* Limits for filename and path checks */ static constexpr uint32_t MAX_PATH_SIZE = 200; static constexpr uint32_t MAX_FILENAME_SIZE = 100; @@ -48,6 +50,8 @@ static constexpr uint32_t LEGACY_SA_DEPL_CHANNEL_ALTERNATION_INTERVAL_SECS = 5; // Maximum allowed burn time allowed by the software. static constexpr uint32_t SA_DEPL_MAX_BURN_TIME = 180; +static constexpr size_t CFDP_MAX_FILE_SEGMENT_LEN = 900; + static constexpr uint32_t CCSDS_HANDLER_QUEUE_SIZE = 50; static constexpr uint8_t NUMBER_OF_VIRTUAL_CHANNELS = 4; static constexpr uint32_t VC0_LIVE_TM_QUEUE_SIZE = 300; @@ -58,14 +62,25 @@ static constexpr uint32_t NOK_STORE_QUEUE_SIZE = 350; static constexpr uint32_t HK_STORE_QUEUE_SIZE = 300; static constexpr uint32_t CFDP_STORE_QUEUE_SIZE = 300; +static constexpr uint32_t LIVE_CHANNEL_NORMAL_QUEUE_SIZE = 250; +static constexpr uint32_t LIVE_CHANNEL_CFDP_QUEUE_SIZE = 350; + +static constexpr uint32_t CFDP_MAX_FSM_CALL_COUNT_SRC_HANDLER = 10; +static constexpr uint32_t CFDP_MAX_FSM_CALL_COUNT_DEST_HANDLER = 300; +static constexpr uint32_t CFDP_SHORT_DELAY_MS = 40; +static constexpr uint32_t CFDP_REGULAR_DELAY_MS = 200; + static constexpr uint32_t MAX_PUS_FUNNEL_QUEUE_DEPTH = 100; -static constexpr uint32_t MAX_CFDP_FUNNEL_QUEUE_DEPTH = 80; +static constexpr uint32_t MAX_CFDP_FUNNEL_QUEUE_DEPTH = LIVE_CHANNEL_CFDP_QUEUE_SIZE; static constexpr uint32_t VERIFICATION_SERVICE_QUEUE_DEPTH = 120; static constexpr uint32_t HK_SERVICE_QUEUE_DEPTH = 60; static constexpr uint32_t ACTION_SERVICE_QUEUE_DEPTH = 60; -static constexpr uint32_t MAX_STORED_CMDS_UDP = 150; -static constexpr uint32_t MAX_STORED_CMDS_TCP = 180; +static constexpr uint32_t UDP_MAX_STORED_CMDS = 200; +static constexpr uint32_t UDP_MSG_QUEUE_DEPTH = UDP_MAX_STORED_CMDS; +static constexpr uint32_t TCP_MAX_STORED_CMDS = 350; +static constexpr uint32_t TCP_MSG_QUEUE_DEPTH = TCP_MAX_STORED_CMDS; +static constexpr uint32_t TCP_MAX_NUMBER_TMS_SENT_PER_CYCLE = TCP_MSG_QUEUE_DEPTH; namespace spiSched { diff --git a/common/config/eive/eventSubsystemIds.h b/common/config/eive/eventSubsystemIds.h index 84ac42d5..370a00b8 100644 --- a/common/config/eive/eventSubsystemIds.h +++ b/common/config/eive/eventSubsystemIds.h @@ -41,6 +41,7 @@ enum : uint8_t { PERSISTENT_TM_STORE = 143, SYRLINKS_COM = 144, SUS_HANDLER = 145, + CFDP_APP = 146, COMMON_SUBSYSTEM_ID_END }; diff --git a/common/config/eive/objects.h b/common/config/eive/objects.h index d6b15b8d..c7e56715 100644 --- a/common/config/eive/objects.h +++ b/common/config/eive/objects.h @@ -166,6 +166,7 @@ enum commonObjects : uint32_t { CFDP_TM_FUNNEL = 0x73000102, CFDP_HANDLER = 0x73000205, CFDP_DISTRIBUTOR = 0x73000206, + CFDP_FAULT_HANDLER = 0x73000207, MISC_TM_STORE = 0x73020001, OK_TM_STORE = 0x73020002, NOT_OK_TM_STORE = 0x73020003, diff --git a/common/config/eive/resultClassIds.h b/common/config/eive/resultClassIds.h index 9e2a3f2f..35b2a419 100644 --- a/common/config/eive/resultClassIds.h +++ b/common/config/eive/resultClassIds.h @@ -41,6 +41,7 @@ enum commonClassIds : uint8_t { LOCAL_PARAM_HANDLER, // LPH PERSISTENT_TM_STORE, // PTM TM_SINK, // TMS + VIRTUAL_CHANNEL, // VCS COMMON_CLASS_ID_END // [EXPORT] : [END] }; } diff --git a/dummies/helperFactory.cpp b/dummies/helperFactory.cpp index b23720b4..42ec1eec 100644 --- a/dummies/helperFactory.cpp +++ b/dummies/helperFactory.cpp @@ -95,7 +95,7 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpio } if (cfg.addAcsBoardDummies) { - std::array assemblyDhbs; + std::array assemblyDhbs{}; assemblyDhbs[0] = new MgmLIS3MDLDummy(objects::MGM_0_LIS3_HANDLER, objects::DUMMY_COM_IF, comCookieDummy); assemblyDhbs[1] = @@ -117,7 +117,7 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpio } if (cfg.addSusDummies) { - std::array suses; + std::array suses{}; suses[0] = new SusDummy(objects::SUS_0_N_LOC_XFYFZM_PT_XF, objects::DUMMY_COM_IF, comCookieDummy); suses[1] = diff --git a/fsfw b/fsfw index 0f604b35..cc3e64e7 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 0f604b35c6d3a2518e3c3ce3947825102e9fc4f4 +Subproject commit cc3e64e70d90f6a2b5c59215b2569c1771e890f0 diff --git a/generators/bsp_hosted_events.csv b/generators/bsp_hosted_events.csv index 2cd6ca2f..de7416f5 100644 --- a/generators/bsp_hosted_events.csv +++ b/generators/bsp_hosted_events.csv @@ -86,6 +86,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path 10802;0x2a32;SERIALIZATION_ERROR;LOW;No description;fsfw/src/fsfw/cfdp/handler/defs.h 10803;0x2a33;FILESTORE_ERROR;LOW;No description;fsfw/src/fsfw/cfdp/handler/defs.h 10804;0x2a34;FILENAME_TOO_LARGE_ERROR;LOW;P1: Transaction step ID, P2: 0 for source file name, 1 for dest file name;fsfw/src/fsfw/cfdp/handler/defs.h +10805;0x2a35;HANDLING_CFDP_REQUEST_FAILED;LOW;CFDP request handling failed. P2: Returncode.;fsfw/src/fsfw/cfdp/handler/defs.h 11200;0x2bc0;SAFE_RATE_VIOLATION;MEDIUM;The limits for the rotation in safe mode were violated.;mission/acs/defs.h 11201;0x2bc1;SAFE_RATE_RECOVERY;MEDIUM;The system has recovered from a safe rate rotation violation.;mission/acs/defs.h 11202;0x2bc2;MULTIPLE_RW_INVALID;HIGH;Multiple RWs are invalid, uncommandable and therefore higher ACS modes cannot be maintained.;mission/acs/defs.h @@ -311,4 +312,5 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path 14313;0x37e9;DUMP_HK_CANCELLED;LOW;P1: Number of dumped packets. P2: Total dumped bytes.;mission/persistentTmStoreDefs.h 14314;0x37ea;DUMP_CFDP_CANCELLED;LOW;P1: Number of dumped packets. P2: Total dumped bytes.;mission/persistentTmStoreDefs.h 14500;0x38a4;TEMPERATURE_ALL_ONES_START;MEDIUM;Detected invalid values, starting invalid message counting;mission/acs/SusHandler.h -14501;0x38a5;TEMPERATURE_ALL_ONES_RECOVERY;INFO;Detected valid values again, resetting invalid message counter. P1: Invalid message counter.;mission/acs/SusHandler.h +14501;0x38a5;TEMPERATURE_ALL_ONES_RECOVERY;INFO;Detected valid values for a prolonged time again, resetting all counters. P1: Number of periods with invalid messages. P2: Maximum invalid message counter.;mission/acs/SusHandler.h +14600;0x3908;FAULT_HANDLER_TRIGGERED;LOW;P1: CFDP fault handler code. P2: CFDP condition code.;mission/cfdp/defs.h diff --git a/generators/bsp_hosted_objects.csv b/generators/bsp_hosted_objects.csv index 689a58f2..254d093a 100644 --- a/generators/bsp_hosted_objects.csv +++ b/generators/bsp_hosted_objects.csv @@ -153,6 +153,7 @@ 0x73000102;CFDP_TM_FUNNEL 0x73000205;CFDP_HANDLER 0x73000206;CFDP_DISTRIBUTOR +0x73000207;CFDP_FAULT_HANDLER 0x73010000;EIVE_SYSTEM 0x73010001;ACS_SUBSYSTEM 0x73010002;PL_SUBSYSTEM diff --git a/generators/bsp_hosted_returnvalues.csv b/generators/bsp_hosted_returnvalues.csv index 0dfc94c3..1964e00e 100644 --- a/generators/bsp_hosted_returnvalues.csv +++ b/generators/bsp_hosted_returnvalues.csv @@ -323,193 +323,203 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path 0x3405;DC_NotActive;No description;5;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h 0x3406;DC_TooMuchData;No description;6;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h 0x3407;DC_Busy;No description;7;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h -0x3601;CFDP_InvalidTlvType;No description;1;CFDP;fsfw/src/fsfw/cfdp/definitions.h -0x3602;CFDP_InvalidDirectiveField;No description;2;CFDP;fsfw/src/fsfw/cfdp/definitions.h -0x3603;CFDP_InvalidPduDatafieldLen;No description;3;CFDP;fsfw/src/fsfw/cfdp/definitions.h -0x3604;CFDP_InvalidAckDirectiveFields;No description;4;CFDP;fsfw/src/fsfw/cfdp/definitions.h -0x3605;CFDP_MetadataCantParseOptions;No description;5;CFDP;fsfw/src/fsfw/cfdp/definitions.h -0x3606;CFDP_NakCantParseOptions;No description;6;CFDP;fsfw/src/fsfw/cfdp/definitions.h -0x3607;CFDP_FinishedCantParseFsResponses;No description;7;CFDP;fsfw/src/fsfw/cfdp/definitions.h -0x3608;CFDP_FilestoreRequiresSecondFile;No description;8;CFDP;fsfw/src/fsfw/cfdp/definitions.h -0x3609;CFDP_FilestoreResponseCantParseFsMessage;No description;9;CFDP;fsfw/src/fsfw/cfdp/definitions.h -0x360a;CFDP_InvalidPduFormat;No description;10;CFDP;fsfw/src/fsfw/cfdp/definitions.h -0x3701;TSI_BadTimestamp;No description;1;TIME_STAMPER_IF;fsfw/src/fsfw/timemanager/TimeStampIF.h -0x38a1;SGP4_InvalidEccentricity;No description;161;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h -0x38a2;SGP4_InvalidMeanMotion;No description;162;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h -0x38a3;SGP4_InvalidPerturbationElements;No description;163;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h -0x38a4;SGP4_InvalidSemiLatusRectum;No description;164;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h -0x38a5;SGP4_InvalidEpochElements;No description;165;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h -0x38a6;SGP4_SatelliteHasDecayed;No description;166;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h -0x38b1;SGP4_TleTooOld;No description;177;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h -0x38b2;SGP4_TleNotInitialized;No description;178;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h -0x3901;MUX_NotEnoughResources;No description;1;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h -0x3902;MUX_InsufficientMemory;No description;2;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h -0x3903;MUX_NoPrivilege;No description;3;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h -0x3904;MUX_WrongAttributeSetting;No description;4;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h -0x3905;MUX_MutexAlreadyLocked;No description;5;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h -0x3906;MUX_MutexNotFound;No description;6;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h -0x3907;MUX_MutexMaxLocks;No description;7;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h -0x3908;MUX_CurrThreadAlreadyOwnsMutex;No description;8;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h -0x3909;MUX_CurrThreadDoesNotOwnMutex;No description;9;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h -0x390a;MUX_MutexTimeout;No description;10;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h -0x390b;MUX_MutexInvalidId;No description;11;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h -0x390c;MUX_MutexDestroyedWhileWaiting;No description;12;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h -0x3a01;MQI_Empty;No description;1;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h -0x3a02;MQI_Full;No space left for more messages;2;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h -0x3a03;MQI_NoReplyPartner;Returned if a reply method was called without partner;3;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h -0x3a04;MQI_DestinationInvalid;Returned if the target destination is invalid.;4;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h -0x3b00;SPH_ConnBroken;No description;0;SEMAPHORE_IF;fsfw/src/fsfw/osal/common/TcpTmTcServer.h -0x3b01;SPH_SemaphoreTimeout;No description;1;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h -0x3b02;SPH_SemaphoreNotOwned;No description;2;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h -0x3b03;SPH_SemaphoreInvalid;No description;3;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h -0x3c00;LPIF_PoolEntryNotFound;No description;0;LOCAL_POOL_OWNER_IF;fsfw/src/fsfw/datapoollocal/localPoolDefinitions.h -0x3c01;LPIF_PoolEntryTypeConflict;No description;1;LOCAL_POOL_OWNER_IF;fsfw/src/fsfw/datapoollocal/localPoolDefinitions.h -0x3da0;PVA_InvalidReadWriteMode;No description;160;POOL_VARIABLE_IF;fsfw/src/fsfw/datapool/PoolVariableIF.h -0x3da1;PVA_InvalidPoolEntry;No description;161;POOL_VARIABLE_IF;fsfw/src/fsfw/datapool/PoolVariableIF.h -0x3e00;HKM_QueueOrDestinationInvalid;No description;0;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h -0x3e01;HKM_WrongHkPacketType;No description;1;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h -0x3e02;HKM_ReportingStatusUnchanged;No description;2;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h -0x3e03;HKM_PeriodicHelperInvalid;No description;3;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h -0x3e04;HKM_PoolobjectNotFound;No description;4;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h -0x3e05;HKM_DatasetNotFound;No description;5;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h -0x3f01;DLEE_StreamTooShort;No description;1;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h -0x3f02;DLEE_DecodingError;No description;2;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h -0x4201;PUS11_InvalidTypeTimeWindow;No description;1;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h -0x4202;PUS11_InvalidTimeWindow;No description;2;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h -0x4203;PUS11_TimeshiftingNotPossible;No description;3;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h -0x4204;PUS11_InvalidRelativeTime;No description;4;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h -0x4205;PUS11_ContainedTcTooSmall;No description;5;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h -0x4206;PUS11_ContainedTcCrcMissmatch;No description;6;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h -0x4300;FILS_GenericFileError;No description;0;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x4301;FILS_GenericDirError;No description;1;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x4302;FILS_FilesystemInactive;No description;2;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x4303;FILS_GenericRenameError;No description;3;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x4304;FILS_IsBusy;No description;4;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x4305;FILS_InvalidParameters;No description;5;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x430a;FILS_FileDoesNotExist;No description;10;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x430b;FILS_FileAlreadyExists;No description;11;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x430c;FILS_NotAFile;No description;12;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x430d;FILS_FileLocked;No description;13;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x430e;FILS_PermissionDenied;No description;14;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x4315;FILS_DirectoryDoesNotExist;No description;21;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x4316;FILS_DirectoryAlreadyExists;No description;22;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x4317;FILS_NotADirectory;No description;23;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x4318;FILS_DirectoryNotEmpty;No description;24;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x431e;FILS_SequencePacketMissingWrite;No description;30;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x431f;FILS_SequencePacketMissingRead;No description;31;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x4400;UXOS_ExecutionFinished;Execution of the current command has finished;0;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h -0x4401;UXOS_CommandPending;Command is pending. This will also be returned if the user tries to load another command but a command is still pending;1;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h -0x4402;UXOS_BytesRead;Some bytes have been read from the executing process;2;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h -0x4403;UXOS_CommandError;Command execution failed;3;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h -0x4404;UXOS_NoCommandLoadedOrPending;;4;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h -0x4406;UXOS_PcloseCallError;No description;6;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h -0x4500;HSPI_OpeningFileFailed;No description;0;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h -0x4501;HSPI_FullDuplexTransferFailed;No description;1;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h -0x4502;HSPI_HalfDuplexTransferFailed;No description;2;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h -0x4503;HSPI_Timeout;No description;3;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h -0x4504;HSPI_Busy;No description;4;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h -0x4505;HSPI_GenericError;No description;5;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h -0x4601;HURT_UartReadFailure;No description;1;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h -0x4602;HURT_UartReadSizeMissmatch;No description;2;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h -0x4603;HURT_UartRxBufferTooSmall;No description;3;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h -0x4801;HGIO_UnknownGpioId;No description;1;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h -0x4802;HGIO_DriveGpioFailure;No description;2;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h -0x4803;HGIO_GpioTypeFailure;No description;3;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h -0x4804;HGIO_GpioInvalidInstance;No description;4;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h -0x4805;HGIO_GpioDuplicateDetected;No description;5;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h -0x4806;HGIO_GpioInitFailed;No description;6;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h -0x4807;HGIO_GpioGetValueFailed;No description;7;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h -0x4c00;SPPA_NoPacketFound;No description;0;SPACE_PACKET_PARSER;fsfw/src/fsfw/tmtcservices/SpacePacketParser.h -0x4c01;SPPA_SplitPacket;No description;1;SPACE_PACKET_PARSER;fsfw/src/fsfw/tmtcservices/SpacePacketParser.h -0x4fa1;HEATER_CommandNotSupported;No description;161;HEATER_HANDLER;mission/tcs/HeaterHandler.h -0x4fa2;HEATER_InitFailed;No description;162;HEATER_HANDLER;mission/tcs/HeaterHandler.h -0x4fa3;HEATER_InvalidSwitchNr;No description;163;HEATER_HANDLER;mission/tcs/HeaterHandler.h -0x4fa4;HEATER_MainSwitchSetTimeout;No description;164;HEATER_HANDLER;mission/tcs/HeaterHandler.h -0x4fa5;HEATER_CommandAlreadyWaiting;No description;165;HEATER_HANDLER;mission/tcs/HeaterHandler.h -0x50a0;SYRLINKS_CrcFailure;No description;160;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h -0x50a1;SYRLINKS_UartFraminOrParityErrorAck;No description;161;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h -0x50a2;SYRLINKS_BadCharacterAck;No description;162;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h -0x50a3;SYRLINKS_BadParameterValueAck;No description;163;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h -0x50a4;SYRLINKS_BadEndOfFrameAck;No description;164;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h -0x50a5;SYRLINKS_UnknownCommandIdAck;No description;165;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h -0x50a6;SYRLINKS_BadCrcAck;No description;166;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h -0x50a7;SYRLINKS_ReplyWrongSize;No description;167;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h -0x50a8;SYRLINKS_MissingStartFrameCharacter;No description;168;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h -0x5100;IMTQ_InvalidCommandCode;No description;0;IMTQ_HANDLER;mission/acs/imtqHelpers.h -0x5101;IMTQ_MgmMeasurementLowLevelError;No description;1;IMTQ_HANDLER;mission/acs/imtqHelpers.h -0x5102;IMTQ_ActuateCmdLowLevelError;No description;2;IMTQ_HANDLER;mission/acs/imtqHelpers.h -0x5103;IMTQ_ParameterMissing;No description;3;IMTQ_HANDLER;mission/acs/imtqHelpers.h -0x5104;IMTQ_ParameterInvalid;No description;4;IMTQ_HANDLER;mission/acs/imtqHelpers.h -0x5105;IMTQ_CcUnavailable;No description;5;IMTQ_HANDLER;mission/acs/imtqHelpers.h -0x5106;IMTQ_InternalProcessingError;No description;6;IMTQ_HANDLER;mission/acs/imtqHelpers.h -0x5107;IMTQ_RejectedWithoutReason;No description;7;IMTQ_HANDLER;mission/acs/imtqHelpers.h -0x5108;IMTQ_CmdErrUnknown;No description;8;IMTQ_HANDLER;mission/acs/imtqHelpers.h -0x5109;IMTQ_StartupCfgError;No description;9;IMTQ_HANDLER;mission/acs/imtqHelpers.h -0x510a;IMTQ_UnexpectedSelfTestReply;The status reply to a self test command was received but no self test command has been sent. This should normally never happen.;10;IMTQ_HANDLER;mission/acs/imtqHelpers.h -0x52b0;RWHA_SpiWriteFailure;No description;176;RW_HANDLER;mission/acs/rwHelpers.h -0x52b1;RWHA_SpiReadFailure;Used by the spi send function to tell a failing read call;177;RW_HANDLER;mission/acs/rwHelpers.h -0x52b2;RWHA_MissingStartSign;Can be used by the HDLC decoding mechanism to inform about a missing start sign 0x7E;178;RW_HANDLER;mission/acs/rwHelpers.h -0x52b3;RWHA_InvalidSubstitute;Can be used by the HDLC decoding mechanism to inform about an invalid substitution combination;179;RW_HANDLER;mission/acs/rwHelpers.h -0x52b4;RWHA_MissingEndSign;HDLC decoding mechanism never receives the end sign 0x7E;180;RW_HANDLER;mission/acs/rwHelpers.h -0x52b5;RWHA_NoReply;Reaction wheel only responds with empty frames.;181;RW_HANDLER;mission/acs/rwHelpers.h -0x52b6;RWHA_NoStartMarker;Expected a start marker as first byte;182;RW_HANDLER;mission/acs/rwHelpers.h -0x52b7;RWHA_SpiReadTimeout;Timeout when reading reply;183;RW_HANDLER;mission/acs/rwHelpers.h -0x53a0;STRH_TemperatureReqFailed;Status in temperature reply signals error;160;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53a1;STRH_PingFailed;Ping command failed;161;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53a2;STRH_VersionReqFailed;Status in version reply signals error;162;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53a3;STRH_InterfaceReqFailed;Status in interface reply signals error;163;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53a4;STRH_PowerReqFailed;Status in power reply signals error;164;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53a5;STRH_SetParamFailed;Status of reply to parameter set command signals error;165;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53a6;STRH_ActionFailed;Status of reply to action command signals error;166;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53a7;STRH_FilePathTooLong;Received invalid path string. Exceeds allowed length;167;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53a8;STRH_FilenameTooLong;Name of file received with command is too long;168;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53a9;STRH_InvalidProgram;Received version reply with invalid program ID;169;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53aa;STRH_ReplyError;Status field reply signals error;170;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53ab;STRH_CommandTooShort;Received command which is too short (some data is missing for proper execution);171;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53ac;STRH_InvalidLength;Received command with invalid length (too few or too many parameters);172;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53ad;STRH_RegionMismatch;Region mismatch between send and received data;173;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53ae;STRH_AddressMismatch;Address mismatch between send and received data;174;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53af;STRH_LengthMismatch;Length field mismatch between send and received data;175;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53b0;STRH_FileNotExists;Specified file does not exist;176;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53b1;STRH_InvalidType;Download blob pixel command has invalid type field;177;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53b2;STRH_InvalidId;Received FPGA action command with invalid ID;178;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53b3;STRH_ReplyTooShort;Received reply is too short;179;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53b4;STRH_CrcFailure;Received reply with invalid CRC;180;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53b5;STRH_StrHelperExecuting;Star tracker handler currently executing a command and using the communication interface;181;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53b6;STRH_StartrackerAlreadyBooted;Star tracker is already in firmware mode;182;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53b7;STRH_StartrackerNotRunningFirmware;Star tracker must be in firmware mode to run this command;183;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53b8;STRH_StartrackerNotRunningBootloader;Star tracker must be in bootloader mode to run this command;184;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x58a0;SUSS_InvalidSpeed;Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000];160;SUS_HANDLER;mission/acs/RwHandler.h -0x58a1;SUSS_InvalidRampTime;Action Message with invalid ramp time was received.;161;SUS_HANDLER;mission/acs/RwHandler.h -0x58a2;SUSS_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;SUS_HANDLER;mission/acs/RwHandler.h -0x58a3;SUSS_ExecutionFailed;Command execution failed;163;SUS_HANDLER;mission/acs/RwHandler.h -0x58a4;SUSS_CrcError;Reaction wheel reply has invalid crc;164;SUS_HANDLER;mission/acs/RwHandler.h -0x58a5;SUSS_ValueNotRead;No description;165;SUS_HANDLER;mission/acs/RwHandler.h -0x5d00;GOMS_PacketTooLong;No description;0;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h -0x5d01;GOMS_InvalidTableId;No description;1;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h -0x5d02;GOMS_InvalidAddress;No description;2;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h -0x5d03;GOMS_InvalidParamSize;No description;3;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h -0x5d04;GOMS_InvalidPayloadSize;No description;4;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h -0x5d05;GOMS_UnknownReplyId;No description;5;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h -0x60a0;CCSDS_CommandNotImplemented;Received action message with unknown action id;160;CCSDS_HANDLER;mission/com/CcsdsIpCoreHandler.h -0x6201;JSONBASE_JsonFileNotExists;Specified json file does not exist;1;ARCSEC_JSON_BASE;mission/acs/str/ArcsecJsonParamBase.h -0x6202;JSONBASE_SetNotExists;Requested set does not exist in json file;2;ARCSEC_JSON_BASE;mission/acs/str/ArcsecJsonParamBase.h -0x6203;JSONBASE_ParamNotExists;Requested parameter does not exist in json file;3;ARCSEC_JSON_BASE;mission/acs/str/ArcsecJsonParamBase.h -0x63a0;NVMB_KeyNotExists;Specified key does not exist in json file;160;NVM_PARAM_BASE;mission/memory/NvmParameterBase.h -0x66a0;SADPL_CommandNotSupported;No description;160;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h -0x66a1;SADPL_DeploymentAlreadyExecuting;No description;161;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h -0x66a2;SADPL_MainSwitchTimeoutFailure;No description;162;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h -0x66a3;SADPL_SwitchingDeplSa1Failed;No description;163;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h -0x66a4;SADPL_SwitchingDeplSa2Failed;No description;164;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h -0x6900;ACSCTRL_FileDeletionFailed;File deletion failed and at least one file is still existent.;0;ACS_CTRL;mission/controller/AcsController.h -0x6a02;ACSMEKF_MekfUninitialized;No description;2;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h -0x6a03;ACSMEKF_MekfNoGyrData;No description;3;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h -0x6a04;ACSMEKF_MekfNoModelVectors;No description;4;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h -0x6a05;ACSMEKF_MekfNoSusMgmStrData;No description;5;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h -0x6a06;ACSMEKF_MekfCovarianceInversionFailed;No description;6;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h -0x6a07;ACSMEKF_MekfNotFinite;No description;7;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h -0x6a08;ACSMEKF_MekfInitialized;No description;8;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h -0x6a09;ACSMEKF_MekfRunning;No description;9;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h -0x6d00;PTM_DumpDone;No description;0;PERSISTENT_TM_STORE;mission/tmtc/PersistentTmStore.h -0x6d01;PTM_BusyDumping;No description;1;PERSISTENT_TM_STORE;mission/tmtc/PersistentTmStore.h -0x6e00;TMS_IsBusy;No description;0;TM_SINK;mission/tmtc/DirectTmSinkIF.h +0x3601;CFDP_InvalidTlvType;No description;1;CFDP_BASE;fsfw/src/fsfw/cfdp/definitions.h +0x3602;CFDP_InvalidDirectiveField;No description;2;CFDP_BASE;fsfw/src/fsfw/cfdp/definitions.h +0x3603;CFDP_InvalidPduDatafieldLen;No description;3;CFDP_BASE;fsfw/src/fsfw/cfdp/definitions.h +0x3604;CFDP_InvalidAckDirectiveFields;No description;4;CFDP_BASE;fsfw/src/fsfw/cfdp/definitions.h +0x3605;CFDP_MetadataCantParseOptions;No description;5;CFDP_BASE;fsfw/src/fsfw/cfdp/definitions.h +0x3606;CFDP_NakCantParseOptions;No description;6;CFDP_BASE;fsfw/src/fsfw/cfdp/definitions.h +0x3607;CFDP_FinishedCantParseFsResponses;No description;7;CFDP_BASE;fsfw/src/fsfw/cfdp/definitions.h +0x3608;CFDP_FilestoreRequiresSecondFile;No description;8;CFDP_BASE;fsfw/src/fsfw/cfdp/definitions.h +0x3609;CFDP_FilestoreResponseCantParseFsMessage;No description;9;CFDP_BASE;fsfw/src/fsfw/cfdp/definitions.h +0x360a;CFDP_InvalidPduFormat;No description;10;CFDP_BASE;fsfw/src/fsfw/cfdp/definitions.h +0x3700;CFDP_SourceTransactionPending;No description;0;CFDP_HANDLER;fsfw/src/fsfw/cfdp/handler/defs.h +0x3701;CFDP_FileDoesNotExist;No description;1;CFDP_HANDLER;fsfw/src/fsfw/cfdp/handler/defs.h +0x3702;CFDP_FileSegmentLenInvalid;No description;2;CFDP_HANDLER;fsfw/src/fsfw/cfdp/handler/defs.h +0x3703;CFDP_SourceNameEmpty;No description;3;CFDP_HANDLER;fsfw/src/fsfw/cfdp/handler/defs.h +0x3704;CFDP_DestNameEmpty;No description;4;CFDP_HANDLER;fsfw/src/fsfw/cfdp/handler/defs.h +0x3705;CFDP_WrongRemoteCfgEntityId;No description;5;CFDP_HANDLER;fsfw/src/fsfw/cfdp/handler/defs.h +0x3706;CFDP_TargetMsgQueueFull;No description;6;CFDP_HANDLER;fsfw/src/fsfw/cfdp/handler/defs.h +0x3707;CFDP_TmStoreFull;No description;7;CFDP_HANDLER;fsfw/src/fsfw/cfdp/handler/defs.h +0x3801;TSI_BadTimestamp;No description;1;TIME_STAMPER_IF;fsfw/src/fsfw/timemanager/TimeStampIF.h +0x39a1;SGP4_InvalidEccentricity;No description;161;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h +0x39a2;SGP4_InvalidMeanMotion;No description;162;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h +0x39a3;SGP4_InvalidPerturbationElements;No description;163;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h +0x39a4;SGP4_InvalidSemiLatusRectum;No description;164;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h +0x39a5;SGP4_InvalidEpochElements;No description;165;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h +0x39a6;SGP4_SatelliteHasDecayed;No description;166;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h +0x39b1;SGP4_TleTooOld;No description;177;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h +0x39b2;SGP4_TleNotInitialized;No description;178;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h +0x3a01;MUX_NotEnoughResources;No description;1;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h +0x3a02;MUX_InsufficientMemory;No description;2;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h +0x3a03;MUX_NoPrivilege;No description;3;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h +0x3a04;MUX_WrongAttributeSetting;No description;4;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h +0x3a05;MUX_MutexAlreadyLocked;No description;5;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h +0x3a06;MUX_MutexNotFound;No description;6;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h +0x3a07;MUX_MutexMaxLocks;No description;7;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h +0x3a08;MUX_CurrThreadAlreadyOwnsMutex;No description;8;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h +0x3a09;MUX_CurrThreadDoesNotOwnMutex;No description;9;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h +0x3a0a;MUX_MutexTimeout;No description;10;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h +0x3a0b;MUX_MutexInvalidId;No description;11;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h +0x3a0c;MUX_MutexDestroyedWhileWaiting;No description;12;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h +0x3b01;MQI_Empty;No description;1;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h +0x3b02;MQI_Full;No space left for more messages;2;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h +0x3b03;MQI_NoReplyPartner;Returned if a reply method was called without partner;3;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h +0x3b04;MQI_DestinationInvalid;Returned if the target destination is invalid.;4;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h +0x3c01;SPH_SemaphoreTimeout;No description;1;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h +0x3c02;SPH_SemaphoreNotOwned;No description;2;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h +0x3c03;SPH_SemaphoreInvalid;No description;3;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h +0x3d00;LPIF_PoolEntryNotFound;No description;0;LOCAL_POOL_OWNER_IF;fsfw/src/fsfw/datapoollocal/localPoolDefinitions.h +0x3d01;LPIF_PoolEntryTypeConflict;No description;1;LOCAL_POOL_OWNER_IF;fsfw/src/fsfw/datapoollocal/localPoolDefinitions.h +0x3ea0;PVA_InvalidReadWriteMode;No description;160;POOL_VARIABLE_IF;fsfw/src/fsfw/datapool/PoolVariableIF.h +0x3ea1;PVA_InvalidPoolEntry;No description;161;POOL_VARIABLE_IF;fsfw/src/fsfw/datapool/PoolVariableIF.h +0x3f00;HKM_QueueOrDestinationInvalid;No description;0;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h +0x3f01;HKM_WrongHkPacketType;No description;1;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h +0x3f02;HKM_ReportingStatusUnchanged;No description;2;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h +0x3f03;HKM_PeriodicHelperInvalid;No description;3;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h +0x3f04;HKM_PoolobjectNotFound;No description;4;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h +0x3f05;HKM_DatasetNotFound;No description;5;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h +0x4001;DLEE_StreamTooShort;No description;1;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h +0x4002;DLEE_DecodingError;No description;2;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h +0x4301;PUS11_InvalidTypeTimeWindow;No description;1;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h +0x4302;PUS11_InvalidTimeWindow;No description;2;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h +0x4303;PUS11_TimeshiftingNotPossible;No description;3;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h +0x4304;PUS11_InvalidRelativeTime;No description;4;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h +0x4305;PUS11_ContainedTcTooSmall;No description;5;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h +0x4306;PUS11_ContainedTcCrcMissmatch;No description;6;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h +0x4400;FILS_GenericFileError;No description;0;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x4401;FILS_GenericDirError;No description;1;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x4402;FILS_FilesystemInactive;No description;2;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x4403;FILS_GenericRenameError;No description;3;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x4404;FILS_IsBusy;No description;4;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x4405;FILS_InvalidParameters;No description;5;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x440a;FILS_FileDoesNotExist;No description;10;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x440b;FILS_FileAlreadyExists;No description;11;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x440c;FILS_NotAFile;No description;12;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x440d;FILS_FileLocked;No description;13;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x440e;FILS_PermissionDenied;No description;14;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x4415;FILS_DirectoryDoesNotExist;No description;21;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x4416;FILS_DirectoryAlreadyExists;No description;22;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x4417;FILS_NotADirectory;No description;23;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x4418;FILS_DirectoryNotEmpty;No description;24;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x441e;FILS_SequencePacketMissingWrite;No description;30;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x441f;FILS_SequencePacketMissingRead;No description;31;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x4500;UXOS_ExecutionFinished;Execution of the current command has finished;0;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h +0x4501;UXOS_CommandPending;Command is pending. This will also be returned if the user tries to load another command but a command is still pending;1;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h +0x4502;UXOS_BytesRead;Some bytes have been read from the executing process;2;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h +0x4503;UXOS_CommandError;Command execution failed;3;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h +0x4504;UXOS_NoCommandLoadedOrPending;;4;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h +0x4506;UXOS_PcloseCallError;No description;6;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h +0x4600;HSPI_OpeningFileFailed;No description;0;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h +0x4601;HSPI_FullDuplexTransferFailed;No description;1;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h +0x4602;HSPI_HalfDuplexTransferFailed;No description;2;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h +0x4603;HSPI_Timeout;No description;3;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h +0x4604;HSPI_Busy;No description;4;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h +0x4605;HSPI_GenericError;No description;5;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h +0x4701;HURT_UartReadFailure;No description;1;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h +0x4702;HURT_UartReadSizeMissmatch;No description;2;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h +0x4703;HURT_UartRxBufferTooSmall;No description;3;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h +0x4901;HGIO_UnknownGpioId;No description;1;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h +0x4902;HGIO_DriveGpioFailure;No description;2;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h +0x4903;HGIO_GpioTypeFailure;No description;3;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h +0x4904;HGIO_GpioInvalidInstance;No description;4;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h +0x4905;HGIO_GpioDuplicateDetected;No description;5;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h +0x4906;HGIO_GpioInitFailed;No description;6;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h +0x4907;HGIO_GpioGetValueFailed;No description;7;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h +0x4d00;SPPA_NoPacketFound;No description;0;SPACE_PACKET_PARSER;fsfw/src/fsfw/tmtcservices/SpacePacketParser.h +0x4d01;SPPA_SplitPacket;No description;1;SPACE_PACKET_PARSER;fsfw/src/fsfw/tmtcservices/SpacePacketParser.h +0x50a1;HEATER_CommandNotSupported;No description;161;HEATER_HANDLER;mission/tcs/HeaterHandler.h +0x50a2;HEATER_InitFailed;No description;162;HEATER_HANDLER;mission/tcs/HeaterHandler.h +0x50a3;HEATER_InvalidSwitchNr;No description;163;HEATER_HANDLER;mission/tcs/HeaterHandler.h +0x50a4;HEATER_MainSwitchSetTimeout;No description;164;HEATER_HANDLER;mission/tcs/HeaterHandler.h +0x50a5;HEATER_CommandAlreadyWaiting;No description;165;HEATER_HANDLER;mission/tcs/HeaterHandler.h +0x51a0;SYRLINKS_CrcFailure;No description;160;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h +0x51a1;SYRLINKS_UartFraminOrParityErrorAck;No description;161;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h +0x51a2;SYRLINKS_BadCharacterAck;No description;162;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h +0x51a3;SYRLINKS_BadParameterValueAck;No description;163;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h +0x51a4;SYRLINKS_BadEndOfFrameAck;No description;164;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h +0x51a5;SYRLINKS_UnknownCommandIdAck;No description;165;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h +0x51a6;SYRLINKS_BadCrcAck;No description;166;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h +0x51a7;SYRLINKS_ReplyWrongSize;No description;167;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h +0x51a8;SYRLINKS_MissingStartFrameCharacter;No description;168;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h +0x5200;IMTQ_InvalidCommandCode;No description;0;IMTQ_HANDLER;mission/acs/imtqHelpers.h +0x5201;IMTQ_MgmMeasurementLowLevelError;No description;1;IMTQ_HANDLER;mission/acs/imtqHelpers.h +0x5202;IMTQ_ActuateCmdLowLevelError;No description;2;IMTQ_HANDLER;mission/acs/imtqHelpers.h +0x5203;IMTQ_ParameterMissing;No description;3;IMTQ_HANDLER;mission/acs/imtqHelpers.h +0x5204;IMTQ_ParameterInvalid;No description;4;IMTQ_HANDLER;mission/acs/imtqHelpers.h +0x5205;IMTQ_CcUnavailable;No description;5;IMTQ_HANDLER;mission/acs/imtqHelpers.h +0x5206;IMTQ_InternalProcessingError;No description;6;IMTQ_HANDLER;mission/acs/imtqHelpers.h +0x5207;IMTQ_RejectedWithoutReason;No description;7;IMTQ_HANDLER;mission/acs/imtqHelpers.h +0x5208;IMTQ_CmdErrUnknown;No description;8;IMTQ_HANDLER;mission/acs/imtqHelpers.h +0x5209;IMTQ_StartupCfgError;No description;9;IMTQ_HANDLER;mission/acs/imtqHelpers.h +0x520a;IMTQ_UnexpectedSelfTestReply;The status reply to a self test command was received but no self test command has been sent. This should normally never happen.;10;IMTQ_HANDLER;mission/acs/imtqHelpers.h +0x53b0;RWHA_SpiWriteFailure;No description;176;RW_HANDLER;mission/acs/rwHelpers.h +0x53b1;RWHA_SpiReadFailure;Used by the spi send function to tell a failing read call;177;RW_HANDLER;mission/acs/rwHelpers.h +0x53b2;RWHA_MissingStartSign;Can be used by the HDLC decoding mechanism to inform about a missing start sign 0x7E;178;RW_HANDLER;mission/acs/rwHelpers.h +0x53b3;RWHA_InvalidSubstitute;Can be used by the HDLC decoding mechanism to inform about an invalid substitution combination;179;RW_HANDLER;mission/acs/rwHelpers.h +0x53b4;RWHA_MissingEndSign;HDLC decoding mechanism never receives the end sign 0x7E;180;RW_HANDLER;mission/acs/rwHelpers.h +0x53b5;RWHA_NoReply;Reaction wheel only responds with empty frames.;181;RW_HANDLER;mission/acs/rwHelpers.h +0x53b6;RWHA_NoStartMarker;Expected a start marker as first byte;182;RW_HANDLER;mission/acs/rwHelpers.h +0x53b7;RWHA_SpiReadTimeout;Timeout when reading reply;183;RW_HANDLER;mission/acs/rwHelpers.h +0x54a0;STRH_TemperatureReqFailed;Status in temperature reply signals error;160;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54a1;STRH_PingFailed;Ping command failed;161;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54a2;STRH_VersionReqFailed;Status in version reply signals error;162;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54a3;STRH_InterfaceReqFailed;Status in interface reply signals error;163;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54a4;STRH_PowerReqFailed;Status in power reply signals error;164;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54a5;STRH_SetParamFailed;Status of reply to parameter set command signals error;165;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54a6;STRH_ActionFailed;Status of reply to action command signals error;166;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54a7;STRH_FilePathTooLong;Received invalid path string. Exceeds allowed length;167;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54a8;STRH_FilenameTooLong;Name of file received with command is too long;168;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54a9;STRH_InvalidProgram;Received version reply with invalid program ID;169;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54aa;STRH_ReplyError;Status field reply signals error;170;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54ab;STRH_CommandTooShort;Received command which is too short (some data is missing for proper execution);171;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54ac;STRH_InvalidLength;Received command with invalid length (too few or too many parameters);172;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54ad;STRH_RegionMismatch;Region mismatch between send and received data;173;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54ae;STRH_AddressMismatch;Address mismatch between send and received data;174;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54af;STRH_LengthMismatch;Length field mismatch between send and received data;175;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54b0;STRH_FileNotExists;Specified file does not exist;176;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54b1;STRH_InvalidType;Download blob pixel command has invalid type field;177;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54b2;STRH_InvalidId;Received FPGA action command with invalid ID;178;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54b3;STRH_ReplyTooShort;Received reply is too short;179;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54b4;STRH_CrcFailure;Received reply with invalid CRC;180;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54b5;STRH_StrHelperExecuting;Star tracker handler currently executing a command and using the communication interface;181;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54b6;STRH_StartrackerAlreadyBooted;Star tracker is already in firmware mode;182;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54b7;STRH_StartrackerNotRunningFirmware;Star tracker must be in firmware mode to run this command;183;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54b8;STRH_StartrackerNotRunningBootloader;Star tracker must be in bootloader mode to run this command;184;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x59a0;SUSS_InvalidSpeed;Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000];160;SUS_HANDLER;mission/acs/RwHandler.h +0x59a1;SUSS_InvalidRampTime;Action Message with invalid ramp time was received.;161;SUS_HANDLER;mission/acs/RwHandler.h +0x59a2;SUSS_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;SUS_HANDLER;mission/acs/RwHandler.h +0x59a3;SUSS_ExecutionFailed;Command execution failed;163;SUS_HANDLER;mission/acs/RwHandler.h +0x59a4;SUSS_CrcError;Reaction wheel reply has invalid crc;164;SUS_HANDLER;mission/acs/RwHandler.h +0x59a5;SUSS_ValueNotRead;No description;165;SUS_HANDLER;mission/acs/RwHandler.h +0x5e00;GOMS_PacketTooLong;No description;0;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h +0x5e01;GOMS_InvalidTableId;No description;1;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h +0x5e02;GOMS_InvalidAddress;No description;2;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h +0x5e03;GOMS_InvalidParamSize;No description;3;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h +0x5e04;GOMS_InvalidPayloadSize;No description;4;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h +0x5e05;GOMS_UnknownReplyId;No description;5;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h +0x61a0;CCSDS_CommandNotImplemented;Received action message with unknown action id;160;CCSDS_HANDLER;mission/com/CcsdsIpCoreHandler.h +0x6301;JSONBASE_JsonFileNotExists;Specified json file does not exist;1;ARCSEC_JSON_BASE;mission/acs/str/ArcsecJsonParamBase.h +0x6302;JSONBASE_SetNotExists;Requested set does not exist in json file;2;ARCSEC_JSON_BASE;mission/acs/str/ArcsecJsonParamBase.h +0x6303;JSONBASE_ParamNotExists;Requested parameter does not exist in json file;3;ARCSEC_JSON_BASE;mission/acs/str/ArcsecJsonParamBase.h +0x64a0;NVMB_KeyNotExists;Specified key does not exist in json file;160;NVM_PARAM_BASE;mission/memory/NvmParameterBase.h +0x67a0;SADPL_CommandNotSupported;No description;160;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h +0x67a1;SADPL_DeploymentAlreadyExecuting;No description;161;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h +0x67a2;SADPL_MainSwitchTimeoutFailure;No description;162;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h +0x67a3;SADPL_SwitchingDeplSa1Failed;No description;163;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h +0x67a4;SADPL_SwitchingDeplSa2Failed;No description;164;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h +0x6a00;ACSCTRL_FileDeletionFailed;File deletion failed and at least one file is still existent.;0;ACS_CTRL;mission/controller/AcsController.h +0x6b02;ACSMEKF_MekfUninitialized;No description;2;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h +0x6b03;ACSMEKF_MekfNoGyrData;No description;3;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h +0x6b04;ACSMEKF_MekfNoModelVectors;No description;4;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h +0x6b05;ACSMEKF_MekfNoSusMgmStrData;No description;5;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h +0x6b06;ACSMEKF_MekfCovarianceInversionFailed;No description;6;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h +0x6b07;ACSMEKF_MekfNotFinite;No description;7;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h +0x6b08;ACSMEKF_MekfInitialized;No description;8;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h +0x6b09;ACSMEKF_MekfRunning;No description;9;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h +0x6e00;PTM_DumpDone;No description;0;PERSISTENT_TM_STORE;mission/tmtc/PersistentTmStore.h +0x6e01;PTM_BusyDumping;No description;1;PERSISTENT_TM_STORE;mission/tmtc/PersistentTmStore.h +0x6f00;TMS_IsBusy;No description;0;TM_SINK;mission/tmtc/DirectTmSinkIF.h +0x6f01;TMS_PartiallyWritten;No description;1;TM_SINK;mission/tmtc/DirectTmSinkIF.h +0x6f02;TMS_NoWriteActive;No description;2;TM_SINK;mission/tmtc/DirectTmSinkIF.h +0x7000;VCS_ChannelDoesNotExist;No description;0;VIRTUAL_CHANNEL;mission/com/VirtualChannel.h diff --git a/generators/bsp_hosted_subsystems.csv b/generators/bsp_hosted_subsystems.csv index c9c90629..36828fda 100644 --- a/generators/bsp_hosted_subsystems.csv +++ b/generators/bsp_hosted_subsystems.csv @@ -61,3 +61,4 @@ 143;PERSISTENT_TM_STORE 144;SYRLINKS_COM 145;SUS_HANDLER +146;CFDP_APP diff --git a/generators/bsp_q7s_events.csv b/generators/bsp_q7s_events.csv index 2cd6ca2f..de7416f5 100644 --- a/generators/bsp_q7s_events.csv +++ b/generators/bsp_q7s_events.csv @@ -86,6 +86,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path 10802;0x2a32;SERIALIZATION_ERROR;LOW;No description;fsfw/src/fsfw/cfdp/handler/defs.h 10803;0x2a33;FILESTORE_ERROR;LOW;No description;fsfw/src/fsfw/cfdp/handler/defs.h 10804;0x2a34;FILENAME_TOO_LARGE_ERROR;LOW;P1: Transaction step ID, P2: 0 for source file name, 1 for dest file name;fsfw/src/fsfw/cfdp/handler/defs.h +10805;0x2a35;HANDLING_CFDP_REQUEST_FAILED;LOW;CFDP request handling failed. P2: Returncode.;fsfw/src/fsfw/cfdp/handler/defs.h 11200;0x2bc0;SAFE_RATE_VIOLATION;MEDIUM;The limits for the rotation in safe mode were violated.;mission/acs/defs.h 11201;0x2bc1;SAFE_RATE_RECOVERY;MEDIUM;The system has recovered from a safe rate rotation violation.;mission/acs/defs.h 11202;0x2bc2;MULTIPLE_RW_INVALID;HIGH;Multiple RWs are invalid, uncommandable and therefore higher ACS modes cannot be maintained.;mission/acs/defs.h @@ -311,4 +312,5 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path 14313;0x37e9;DUMP_HK_CANCELLED;LOW;P1: Number of dumped packets. P2: Total dumped bytes.;mission/persistentTmStoreDefs.h 14314;0x37ea;DUMP_CFDP_CANCELLED;LOW;P1: Number of dumped packets. P2: Total dumped bytes.;mission/persistentTmStoreDefs.h 14500;0x38a4;TEMPERATURE_ALL_ONES_START;MEDIUM;Detected invalid values, starting invalid message counting;mission/acs/SusHandler.h -14501;0x38a5;TEMPERATURE_ALL_ONES_RECOVERY;INFO;Detected valid values again, resetting invalid message counter. P1: Invalid message counter.;mission/acs/SusHandler.h +14501;0x38a5;TEMPERATURE_ALL_ONES_RECOVERY;INFO;Detected valid values for a prolonged time again, resetting all counters. P1: Number of periods with invalid messages. P2: Maximum invalid message counter.;mission/acs/SusHandler.h +14600;0x3908;FAULT_HANDLER_TRIGGERED;LOW;P1: CFDP fault handler code. P2: CFDP condition code.;mission/cfdp/defs.h diff --git a/generators/bsp_q7s_objects.csv b/generators/bsp_q7s_objects.csv index 10cfed26..1ada26dd 100644 --- a/generators/bsp_q7s_objects.csv +++ b/generators/bsp_q7s_objects.csv @@ -158,6 +158,7 @@ 0x73000102;CFDP_TM_FUNNEL 0x73000205;CFDP_HANDLER 0x73000206;CFDP_DISTRIBUTOR +0x73000207;CFDP_FAULT_HANDLER 0x73010000;EIVE_SYSTEM 0x73010001;ACS_SUBSYSTEM 0x73010002;PL_SUBSYSTEM diff --git a/generators/bsp_q7s_returnvalues.csv b/generators/bsp_q7s_returnvalues.csv index 0e804457..9aa12b12 100644 --- a/generators/bsp_q7s_returnvalues.csv +++ b/generators/bsp_q7s_returnvalues.csv @@ -323,289 +323,299 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path 0x3405;DC_NotActive;No description;5;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h 0x3406;DC_TooMuchData;No description;6;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h 0x3407;DC_Busy;No description;7;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h -0x3601;CFDP_InvalidTlvType;No description;1;CFDP;fsfw/src/fsfw/cfdp/definitions.h -0x3602;CFDP_InvalidDirectiveField;No description;2;CFDP;fsfw/src/fsfw/cfdp/definitions.h -0x3603;CFDP_InvalidPduDatafieldLen;No description;3;CFDP;fsfw/src/fsfw/cfdp/definitions.h -0x3604;CFDP_InvalidAckDirectiveFields;No description;4;CFDP;fsfw/src/fsfw/cfdp/definitions.h -0x3605;CFDP_MetadataCantParseOptions;No description;5;CFDP;fsfw/src/fsfw/cfdp/definitions.h -0x3606;CFDP_NakCantParseOptions;No description;6;CFDP;fsfw/src/fsfw/cfdp/definitions.h -0x3607;CFDP_FinishedCantParseFsResponses;No description;7;CFDP;fsfw/src/fsfw/cfdp/definitions.h -0x3608;CFDP_FilestoreRequiresSecondFile;No description;8;CFDP;fsfw/src/fsfw/cfdp/definitions.h -0x3609;CFDP_FilestoreResponseCantParseFsMessage;No description;9;CFDP;fsfw/src/fsfw/cfdp/definitions.h -0x360a;CFDP_InvalidPduFormat;No description;10;CFDP;fsfw/src/fsfw/cfdp/definitions.h -0x3701;TSI_BadTimestamp;No description;1;TIME_STAMPER_IF;fsfw/src/fsfw/timemanager/TimeStampIF.h -0x38a1;SGP4_InvalidEccentricity;No description;161;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h -0x38a2;SGP4_InvalidMeanMotion;No description;162;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h -0x38a3;SGP4_InvalidPerturbationElements;No description;163;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h -0x38a4;SGP4_InvalidSemiLatusRectum;No description;164;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h -0x38a5;SGP4_InvalidEpochElements;No description;165;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h -0x38a6;SGP4_SatelliteHasDecayed;No description;166;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h -0x38b1;SGP4_TleTooOld;No description;177;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h -0x38b2;SGP4_TleNotInitialized;No description;178;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h -0x3901;MUX_NotEnoughResources;No description;1;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h -0x3902;MUX_InsufficientMemory;No description;2;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h -0x3903;MUX_NoPrivilege;No description;3;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h -0x3904;MUX_WrongAttributeSetting;No description;4;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h -0x3905;MUX_MutexAlreadyLocked;No description;5;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h -0x3906;MUX_MutexNotFound;No description;6;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h -0x3907;MUX_MutexMaxLocks;No description;7;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h -0x3908;MUX_CurrThreadAlreadyOwnsMutex;No description;8;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h -0x3909;MUX_CurrThreadDoesNotOwnMutex;No description;9;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h -0x390a;MUX_MutexTimeout;No description;10;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h -0x390b;MUX_MutexInvalidId;No description;11;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h -0x390c;MUX_MutexDestroyedWhileWaiting;No description;12;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h -0x3a01;MQI_Empty;No description;1;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h -0x3a02;MQI_Full;No space left for more messages;2;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h -0x3a03;MQI_NoReplyPartner;Returned if a reply method was called without partner;3;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h -0x3a04;MQI_DestinationInvalid;Returned if the target destination is invalid.;4;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h -0x3b00;SPH_ConnBroken;No description;0;SEMAPHORE_IF;fsfw/src/fsfw/osal/common/TcpTmTcServer.h -0x3b01;SPH_SemaphoreTimeout;No description;1;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h -0x3b02;SPH_SemaphoreNotOwned;No description;2;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h -0x3b03;SPH_SemaphoreInvalid;No description;3;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h -0x3c00;LPIF_PoolEntryNotFound;No description;0;LOCAL_POOL_OWNER_IF;fsfw/src/fsfw/datapoollocal/localPoolDefinitions.h -0x3c01;LPIF_PoolEntryTypeConflict;No description;1;LOCAL_POOL_OWNER_IF;fsfw/src/fsfw/datapoollocal/localPoolDefinitions.h -0x3da0;PVA_InvalidReadWriteMode;No description;160;POOL_VARIABLE_IF;fsfw/src/fsfw/datapool/PoolVariableIF.h -0x3da1;PVA_InvalidPoolEntry;No description;161;POOL_VARIABLE_IF;fsfw/src/fsfw/datapool/PoolVariableIF.h -0x3e00;HKM_QueueOrDestinationInvalid;No description;0;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h -0x3e01;HKM_WrongHkPacketType;No description;1;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h -0x3e02;HKM_ReportingStatusUnchanged;No description;2;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h -0x3e03;HKM_PeriodicHelperInvalid;No description;3;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h -0x3e04;HKM_PoolobjectNotFound;No description;4;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h -0x3e05;HKM_DatasetNotFound;No description;5;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h -0x3f01;DLEE_StreamTooShort;No description;1;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h -0x3f02;DLEE_DecodingError;No description;2;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h -0x4201;PUS11_InvalidTypeTimeWindow;No description;1;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h -0x4202;PUS11_InvalidTimeWindow;No description;2;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h -0x4203;PUS11_TimeshiftingNotPossible;No description;3;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h -0x4204;PUS11_InvalidRelativeTime;No description;4;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h -0x4205;PUS11_ContainedTcTooSmall;No description;5;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h -0x4206;PUS11_ContainedTcCrcMissmatch;No description;6;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h -0x4300;FILS_GenericFileError;No description;0;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x4301;FILS_GenericDirError;No description;1;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x4302;FILS_FilesystemInactive;No description;2;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x4303;FILS_GenericRenameError;No description;3;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x4304;FILS_IsBusy;No description;4;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x4305;FILS_InvalidParameters;No description;5;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x430a;FILS_FileDoesNotExist;No description;10;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x430b;FILS_FileAlreadyExists;No description;11;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x430c;FILS_NotAFile;No description;12;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x430d;FILS_FileLocked;No description;13;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x430e;FILS_PermissionDenied;No description;14;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x4315;FILS_DirectoryDoesNotExist;No description;21;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x4316;FILS_DirectoryAlreadyExists;No description;22;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x4317;FILS_NotADirectory;No description;23;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x4318;FILS_DirectoryNotEmpty;No description;24;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x431e;FILS_SequencePacketMissingWrite;No description;30;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x431f;FILS_SequencePacketMissingRead;No description;31;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h -0x4400;UXOS_ExecutionFinished;Execution of the current command has finished;0;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h -0x4401;UXOS_CommandPending;Command is pending. This will also be returned if the user tries to load another command but a command is still pending;1;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h -0x4402;UXOS_BytesRead;Some bytes have been read from the executing process;2;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h -0x4403;UXOS_CommandError;Command execution failed;3;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h -0x4404;UXOS_NoCommandLoadedOrPending;;4;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h -0x4406;UXOS_PcloseCallError;No description;6;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h -0x4500;HSPI_OpeningFileFailed;No description;0;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h -0x4501;HSPI_FullDuplexTransferFailed;No description;1;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h -0x4502;HSPI_HalfDuplexTransferFailed;No description;2;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h -0x4503;HSPI_Timeout;No description;3;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h -0x4504;HSPI_Busy;No description;4;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h -0x4505;HSPI_GenericError;No description;5;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h -0x4601;HURT_UartReadFailure;No description;1;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h -0x4602;HURT_UartReadSizeMissmatch;No description;2;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h -0x4603;HURT_UartRxBufferTooSmall;No description;3;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h -0x4801;HGIO_UnknownGpioId;No description;1;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h -0x4802;HGIO_DriveGpioFailure;No description;2;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h -0x4803;HGIO_GpioTypeFailure;No description;3;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h -0x4804;HGIO_GpioInvalidInstance;No description;4;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h -0x4805;HGIO_GpioDuplicateDetected;No description;5;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h -0x4806;HGIO_GpioInitFailed;No description;6;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h -0x4807;HGIO_GpioGetValueFailed;No description;7;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h -0x4c00;SPPA_NoPacketFound;No description;0;SPACE_PACKET_PARSER;fsfw/src/fsfw/tmtcservices/SpacePacketParser.h -0x4c01;SPPA_SplitPacket;No description;1;SPACE_PACKET_PARSER;fsfw/src/fsfw/tmtcservices/SpacePacketParser.h -0x4fa1;HEATER_CommandNotSupported;No description;161;HEATER_HANDLER;mission/tcs/HeaterHandler.h -0x4fa2;HEATER_InitFailed;No description;162;HEATER_HANDLER;mission/tcs/HeaterHandler.h -0x4fa3;HEATER_InvalidSwitchNr;No description;163;HEATER_HANDLER;mission/tcs/HeaterHandler.h -0x4fa4;HEATER_MainSwitchSetTimeout;No description;164;HEATER_HANDLER;mission/tcs/HeaterHandler.h -0x4fa5;HEATER_CommandAlreadyWaiting;No description;165;HEATER_HANDLER;mission/tcs/HeaterHandler.h -0x50a0;SYRLINKS_CrcFailure;No description;160;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h -0x50a1;SYRLINKS_UartFraminOrParityErrorAck;No description;161;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h -0x50a2;SYRLINKS_BadCharacterAck;No description;162;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h -0x50a3;SYRLINKS_BadParameterValueAck;No description;163;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h -0x50a4;SYRLINKS_BadEndOfFrameAck;No description;164;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h -0x50a5;SYRLINKS_UnknownCommandIdAck;No description;165;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h -0x50a6;SYRLINKS_BadCrcAck;No description;166;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h -0x50a7;SYRLINKS_ReplyWrongSize;No description;167;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h -0x50a8;SYRLINKS_MissingStartFrameCharacter;No description;168;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h -0x5100;IMTQ_InvalidCommandCode;No description;0;IMTQ_HANDLER;mission/acs/imtqHelpers.h -0x5101;IMTQ_MgmMeasurementLowLevelError;No description;1;IMTQ_HANDLER;mission/acs/imtqHelpers.h -0x5102;IMTQ_ActuateCmdLowLevelError;No description;2;IMTQ_HANDLER;mission/acs/imtqHelpers.h -0x5103;IMTQ_ParameterMissing;No description;3;IMTQ_HANDLER;mission/acs/imtqHelpers.h -0x5104;IMTQ_ParameterInvalid;No description;4;IMTQ_HANDLER;mission/acs/imtqHelpers.h -0x5105;IMTQ_CcUnavailable;No description;5;IMTQ_HANDLER;mission/acs/imtqHelpers.h -0x5106;IMTQ_InternalProcessingError;No description;6;IMTQ_HANDLER;mission/acs/imtqHelpers.h -0x5107;IMTQ_RejectedWithoutReason;No description;7;IMTQ_HANDLER;mission/acs/imtqHelpers.h -0x5108;IMTQ_CmdErrUnknown;No description;8;IMTQ_HANDLER;mission/acs/imtqHelpers.h -0x5109;IMTQ_StartupCfgError;No description;9;IMTQ_HANDLER;mission/acs/imtqHelpers.h -0x510a;IMTQ_UnexpectedSelfTestReply;The status reply to a self test command was received but no self test command has been sent. This should normally never happen.;10;IMTQ_HANDLER;mission/acs/imtqHelpers.h -0x52b0;RWHA_SpiWriteFailure;No description;176;RW_HANDLER;mission/acs/rwHelpers.h -0x52b1;RWHA_SpiReadFailure;Used by the spi send function to tell a failing read call;177;RW_HANDLER;mission/acs/rwHelpers.h -0x52b2;RWHA_MissingStartSign;Can be used by the HDLC decoding mechanism to inform about a missing start sign 0x7E;178;RW_HANDLER;mission/acs/rwHelpers.h -0x52b3;RWHA_InvalidSubstitute;Can be used by the HDLC decoding mechanism to inform about an invalid substitution combination;179;RW_HANDLER;mission/acs/rwHelpers.h -0x52b4;RWHA_MissingEndSign;HDLC decoding mechanism never receives the end sign 0x7E;180;RW_HANDLER;mission/acs/rwHelpers.h -0x52b5;RWHA_NoReply;Reaction wheel only responds with empty frames.;181;RW_HANDLER;mission/acs/rwHelpers.h -0x52b6;RWHA_NoStartMarker;Expected a start marker as first byte;182;RW_HANDLER;mission/acs/rwHelpers.h -0x52b7;RWHA_SpiReadTimeout;Timeout when reading reply;183;RW_HANDLER;mission/acs/rwHelpers.h -0x53a0;STRH_TemperatureReqFailed;Status in temperature reply signals error;160;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53a1;STRH_PingFailed;Ping command failed;161;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53a2;STRH_VersionReqFailed;Status in version reply signals error;162;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53a3;STRH_InterfaceReqFailed;Status in interface reply signals error;163;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53a4;STRH_PowerReqFailed;Status in power reply signals error;164;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53a5;STRH_SetParamFailed;Status of reply to parameter set command signals error;165;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53a6;STRH_ActionFailed;Status of reply to action command signals error;166;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53a7;STRH_FilePathTooLong;Received invalid path string. Exceeds allowed length;167;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53a8;STRH_FilenameTooLong;Name of file received with command is too long;168;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53a9;STRH_InvalidProgram;Received version reply with invalid program ID;169;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53aa;STRH_ReplyError;Status field reply signals error;170;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53ab;STRH_CommandTooShort;Received command which is too short (some data is missing for proper execution);171;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53ac;STRH_InvalidLength;Received command with invalid length (too few or too many parameters);172;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53ad;STRH_RegionMismatch;Region mismatch between send and received data;173;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53ae;STRH_AddressMismatch;Address mismatch between send and received data;174;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53af;STRH_LengthMismatch;Length field mismatch between send and received data;175;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53b0;STRH_FileNotExists;Specified file does not exist;176;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53b1;STRH_InvalidType;Download blob pixel command has invalid type field;177;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53b2;STRH_InvalidId;Received FPGA action command with invalid ID;178;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53b3;STRH_ReplyTooShort;Received reply is too short;179;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53b4;STRH_CrcFailure;Received reply with invalid CRC;180;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53b5;STRH_StrHelperExecuting;Star tracker handler currently executing a command and using the communication interface;181;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53b6;STRH_StartrackerAlreadyBooted;Star tracker is already in firmware mode;182;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53b7;STRH_StartrackerNotRunningFirmware;Star tracker must be in firmware mode to run this command;183;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x53b8;STRH_StartrackerNotRunningBootloader;Star tracker must be in bootloader mode to run this command;184;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x54e0;DWLPWRON_InvalidMode;Received command has invalid JESD mode (valid modes are 0 - 5);224;DWLPWRON_CMD;linux/payload/plocMpsocHelpers.h -0x54e1;DWLPWRON_InvalidLaneRate;Received command has invalid lane rate (valid lane rate are 0 - 9);225;DWLPWRON_CMD;linux/payload/plocMpsocHelpers.h -0x5700;PLSPVhLP_RequestDone;No description;0;PLOC_SUPV_HELPER;linux/payload/PlocSupvUartMan.h -0x5701;PLSPVhLP_NoPacketFound;No description;1;PLOC_SUPV_HELPER;linux/payload/PlocSupvUartMan.h -0x5702;PLSPVhLP_DecodeBufTooSmall;No description;2;PLOC_SUPV_HELPER;linux/payload/PlocSupvUartMan.h -0x5703;PLSPVhLP_PossiblePacketLossConsecutiveStart;No description;3;PLOC_SUPV_HELPER;linux/payload/PlocSupvUartMan.h -0x5704;PLSPVhLP_PossiblePacketLossConsecutiveEnd;No description;4;PLOC_SUPV_HELPER;linux/payload/PlocSupvUartMan.h -0x5705;PLSPVhLP_HdlcError;No description;5;PLOC_SUPV_HELPER;linux/payload/PlocSupvUartMan.h -0x57a0;PLSPVhLP_FileClosedAccidentally;File accidentally close;160;PLOC_SUPV_HELPER;linux/payload/PlocSupvUartMan.h -0x57a1;PLSPVhLP_ProcessTerminated;Process has been terminated by command;161;PLOC_SUPV_HELPER;linux/payload/PlocSupvUartMan.h -0x57a2;PLSPVhLP_PathNotExists;Received command with invalid pathname;162;PLOC_SUPV_HELPER;linux/payload/PlocSupvUartMan.h -0x57a3;PLSPVhLP_EventBufferReplyInvalidApid;Expected event buffer TM but received space packet with other APID;163;PLOC_SUPV_HELPER;linux/payload/PlocSupvUartMan.h -0x58a0;SUSS_InvalidSpeed;Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000];160;SUS_HANDLER;mission/acs/RwHandler.h -0x58a1;SUSS_InvalidRampTime;Action Message with invalid ramp time was received.;161;SUS_HANDLER;mission/acs/RwHandler.h -0x58a2;SUSS_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;SUS_HANDLER;mission/acs/RwHandler.h -0x58a3;SUSS_ExecutionFailed;Command execution failed;163;SUS_HANDLER;mission/acs/RwHandler.h -0x58a4;SUSS_CrcError;Reaction wheel reply has invalid crc;164;SUS_HANDLER;mission/acs/RwHandler.h -0x58a5;SUSS_ValueNotRead;No description;165;SUS_HANDLER;mission/acs/RwHandler.h -0x59a0;IPCI_PapbBusy;No description;160;CCSDS_IP_CORE_BRIDGE;linux/ipcore/PapbVcInterface.h -0x5aa0;PTME_UnknownVcId;No description;160;PTME;linux/ipcore/Ptme.h -0x5c01;STRHLP_SdNotMounted;SD card specified in path string not mounted;1;STR_HELPER;linux/acs/StrComHandler.h -0x5c02;STRHLP_FileNotExists;Specified file does not exist on filesystem;2;STR_HELPER;linux/acs/StrComHandler.h -0x5c03;STRHLP_PathNotExists;Specified path does not exist;3;STR_HELPER;linux/acs/StrComHandler.h -0x5c04;STRHLP_FileCreationFailed;Failed to create download image or read flash file;4;STR_HELPER;linux/acs/StrComHandler.h -0x5c05;STRHLP_RegionMismatch;Region in flash write/read reply does not match expected region;5;STR_HELPER;linux/acs/StrComHandler.h -0x5c06;STRHLP_AddressMismatch;Address in flash write/read reply does not match expected address;6;STR_HELPER;linux/acs/StrComHandler.h -0x5c07;STRHLP_LengthMismatch;Length in flash write/read reply does not match expected length;7;STR_HELPER;linux/acs/StrComHandler.h -0x5c08;STRHLP_StatusError;Status field in reply signals error;8;STR_HELPER;linux/acs/StrComHandler.h -0x5c09;STRHLP_InvalidTypeId;Reply has invalid type ID (should be of action reply type);9;STR_HELPER;linux/acs/StrComHandler.h -0x5c0a;STRHLP_ReceptionTimeout;No description;10;STR_HELPER;linux/acs/StrComHandler.h -0x5c0b;STRHLP_DecodingError;No description;11;STR_HELPER;linux/acs/StrComHandler.h -0x5d00;GOMS_PacketTooLong;No description;0;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h -0x5d01;GOMS_InvalidTableId;No description;1;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h -0x5d02;GOMS_InvalidAddress;No description;2;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h -0x5d03;GOMS_InvalidParamSize;No description;3;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h -0x5d04;GOMS_InvalidPayloadSize;No description;4;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h -0x5d05;GOMS_UnknownReplyId;No description;5;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h -0x5ea0;PLMEMDUMP_MramAddressTooHigh;The capacity of the MRAM amounts to 512 kB. Thus the maximum address must not be higher than 0x7d000.;160;PLOC_MEMORY_DUMPER;linux/payload/PlocMemoryDumper.h -0x5ea1;PLMEMDUMP_MramInvalidAddressCombination;The specified end address is lower than the start address;161;PLOC_MEMORY_DUMPER;linux/payload/PlocMemoryDumper.h -0x5fa0;PDEC_AbandonedCltuRetval;No description;160;PDEC_HANDLER;linux/ipcore/pdec.h -0x5fa1;PDEC_FrameDirtyRetval;No description;161;PDEC_HANDLER;linux/ipcore/pdec.h -0x5fa2;PDEC_FrameIllegalMultipleReasons;No description;162;PDEC_HANDLER;linux/ipcore/pdec.h -0x5fa3;PDEC_AdDiscardedLockoutRetval;No description;163;PDEC_HANDLER;linux/ipcore/pdec.h -0x5fa4;PDEC_AdDiscardedWaitRetval;No description;164;PDEC_HANDLER;linux/ipcore/pdec.h -0x5fa5;PDEC_AdDiscardedNsVs;No description;165;PDEC_HANDLER;linux/ipcore/pdec.h -0x5fa6;PDEC_NoReportRetval;No description;166;PDEC_HANDLER;linux/ipcore/pdec.h -0x5fa7;PDEC_ErrorVersionNumberRetval;No description;167;PDEC_HANDLER;linux/ipcore/pdec.h -0x5fa8;PDEC_IllegalCombinationRetval;No description;168;PDEC_HANDLER;linux/ipcore/pdec.h -0x5fa9;PDEC_InvalidScIdRetval;No description;169;PDEC_HANDLER;linux/ipcore/pdec.h -0x5faa;PDEC_InvalidVcIdMsbRetval;No description;170;PDEC_HANDLER;linux/ipcore/pdec.h -0x5fab;PDEC_InvalidVcIdLsbRetval;No description;171;PDEC_HANDLER;linux/ipcore/pdec.h -0x5fac;PDEC_NsNotZeroRetval;No description;172;PDEC_HANDLER;linux/ipcore/pdec.h -0x5fae;PDEC_InvalidBcCc;No description;174;PDEC_HANDLER;linux/ipcore/pdec.h -0x5fb0;PDEC_CommandNotImplemented;Received action message with unknown action id;176;PDEC_HANDLER;linux/ipcore/pdec.h -0x60a0;CCSDS_CommandNotImplemented;Received action message with unknown action id;160;CCSDS_HANDLER;mission/com/CcsdsIpCoreHandler.h -0x61a0;RS_RateNotSupported;The commanded rate is not supported by the current FPGA design;160;RATE_SETTER;linux/ipcore/PtmeConfig.h -0x61a1;RS_BadBitRate;Bad bitrate has been commanded (e.g. 0);161;RATE_SETTER;linux/ipcore/PtmeConfig.h -0x61a2;RS_ClkInversionFailed;Failed to invert clock and thus change the time the data is updated with respect to the tx clock;162;RATE_SETTER;linux/ipcore/PtmeConfig.h -0x61a3;RS_TxManipulatorConfigFailed;Failed to change configuration bit of tx clock manipulator;163;RATE_SETTER;linux/ipcore/PtmeConfig.h -0x6201;JSONBASE_JsonFileNotExists;Specified json file does not exist;1;ARCSEC_JSON_BASE;mission/acs/str/ArcsecJsonParamBase.h -0x6202;JSONBASE_SetNotExists;Requested set does not exist in json file;2;ARCSEC_JSON_BASE;mission/acs/str/ArcsecJsonParamBase.h -0x6203;JSONBASE_ParamNotExists;Requested parameter does not exist in json file;3;ARCSEC_JSON_BASE;mission/acs/str/ArcsecJsonParamBase.h -0x63a0;NVMB_KeyNotExists;Specified key does not exist in json file;160;NVM_PARAM_BASE;mission/memory/NvmParameterBase.h -0x64a0;FSHLP_SdNotMounted;SD card specified with path string not mounted;160;FILE_SYSTEM_HELPER;bsp_q7s/fs/FilesystemHelper.h -0x64a1;FSHLP_FileNotExists;Specified file does not exist on filesystem;161;FILE_SYSTEM_HELPER;bsp_q7s/fs/FilesystemHelper.h -0x65a0;PLMPHLP_FileWriteError;File error occured for file transfers from OBC to the MPSoC.;160;PLOC_MPSOC_HELPER;linux/payload/PlocMpsocSpecialComHelper.h -0x65a1;PLMPHLP_FileReadError;File error occured for file transfers from MPSoC to OBC.;161;PLOC_MPSOC_HELPER;linux/payload/PlocMpsocSpecialComHelper.h -0x66a0;SADPL_CommandNotSupported;No description;160;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h -0x66a1;SADPL_DeploymentAlreadyExecuting;No description;161;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h -0x66a2;SADPL_MainSwitchTimeoutFailure;No description;162;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h -0x66a3;SADPL_SwitchingDeplSa1Failed;No description;163;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h -0x66a4;SADPL_SwitchingDeplSa2Failed;No description;164;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h -0x67a0;MPSOCRTVIF_CrcFailure;Space Packet received from PLOC has invalid CRC;160;MPSOC_RETURN_VALUES_IF;linux/payload/mpsocRetvals.h -0x67a1;MPSOCRTVIF_ReceivedAckFailure;Received ACK failure reply from PLOC;161;MPSOC_RETURN_VALUES_IF;linux/payload/mpsocRetvals.h -0x67a2;MPSOCRTVIF_ReceivedExeFailure;Received execution failure reply from PLOC;162;MPSOC_RETURN_VALUES_IF;linux/payload/mpsocRetvals.h -0x67a3;MPSOCRTVIF_InvalidApid;Received space packet with invalid APID from PLOC;163;MPSOC_RETURN_VALUES_IF;linux/payload/mpsocRetvals.h -0x67a4;MPSOCRTVIF_InvalidLength;Received command with invalid length;164;MPSOC_RETURN_VALUES_IF;linux/payload/mpsocRetvals.h -0x67a5;MPSOCRTVIF_FilenameTooLong;Filename of file in OBC filesystem is too long;165;MPSOC_RETURN_VALUES_IF;linux/payload/mpsocRetvals.h -0x67a6;MPSOCRTVIF_MpsocHelperExecuting;MPSoC helper is currently executing a command;166;MPSOC_RETURN_VALUES_IF;linux/payload/mpsocRetvals.h -0x67a7;MPSOCRTVIF_MpsocFilenameTooLong;Filename of MPSoC file is to long (max. 256 bytes);167;MPSOC_RETURN_VALUES_IF;linux/payload/mpsocRetvals.h -0x67a8;MPSOCRTVIF_InvalidParameter;Command has invalid parameter;168;MPSOC_RETURN_VALUES_IF;linux/payload/mpsocRetvals.h -0x67a9;MPSOCRTVIF_NameTooLong;Received command has file string with invalid length;169;MPSOC_RETURN_VALUES_IF;linux/payload/mpsocRetvals.h -0x68a0;SPVRTVIF_CrcFailure;Space Packet received from PLOC supervisor has invalid CRC;160;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h -0x68a1;SPVRTVIF_InvalidServiceId;No description;161;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h -0x68a2;SPVRTVIF_ReceivedAckFailure;Received ACK failure reply from PLOC supervisor;162;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h -0x68a3;SPVRTVIF_ReceivedExeFailure;Received execution failure reply from PLOC supervisor;163;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h -0x68a4;SPVRTVIF_InvalidApid;Received space packet with invalid APID from PLOC supervisor;164;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h -0x68a5;SPVRTVIF_GetTimeFailure;Failed to read current system time;165;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h -0x68a6;SPVRTVIF_InvalidWatchdog;Received command with invalid watchdog parameter. Valid watchdogs are 0 for PS, 1 for PL and 2 for INT;166;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h -0x68a7;SPVRTVIF_InvalidWatchdogTimeout;Received watchdog timeout config command with invalid timeout. Valid timeouts must be in the range between 1000 and 360000 ms.;167;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h -0x68a8;SPVRTVIF_InvalidLatchupId;Received latchup config command with invalid latchup ID;168;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h -0x68a9;SPVRTVIF_SweepPeriodTooSmall;Received set adc sweep period command with invalid sweep period. Must be larger than 21.;169;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h -0x68aa;SPVRTVIF_InvalidTestParam;Receive auto EM test command with invalid test param. Valid params are 1 and 2.;170;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h -0x68ab;SPVRTVIF_MramPacketParsingFailure;Returned when scanning for MRAM dump packets failed.;171;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h -0x68ac;SPVRTVIF_InvalidMramAddresses;Returned when the start and stop addresses of the MRAM dump or MRAM wipe commands are invalid (e.g. start address bigger than stop address);172;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h -0x68ad;SPVRTVIF_NoMramPacket;Expect reception of an MRAM dump packet but received space packet with other apid.;173;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h -0x68ae;SPVRTVIF_PathDoesNotExist;Path to PLOC directory on SD card does not exist;174;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h -0x68af;SPVRTVIF_MramFileNotExists;MRAM dump file does not exists. The file should actually already have been created with the reception of the first dump packet.;175;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h -0x68b0;SPVRTVIF_InvalidReplyLength;No description;176;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h -0x68b1;SPVRTVIF_InvalidLength;Received action command has invalid length;177;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h -0x68b2;SPVRTVIF_FilenameTooLong;Filename too long;178;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h -0x68b3;SPVRTVIF_UpdateStatusReportInvalidLength;Received update status report with invalid packet length field;179;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h -0x68b4;SPVRTVIF_UpdateCrcFailure;Update status report does not contain expected CRC. There might be a bit flip in the update memory region.;180;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h -0x68b5;SPVRTVIF_SupvHelperExecuting;Supervisor helper task ist currently executing a command (wait until helper tas has finished or interrupt by sending the terminate command);181;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h -0x68c0;SPVRTVIF_BufTooSmall;No description;192;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h -0x68c1;SPVRTVIF_NoReplyTimeout;No description;193;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h -0x6900;ACSCTRL_FileDeletionFailed;File deletion failed and at least one file is still existent.;0;ACS_CTRL;mission/controller/AcsController.h -0x6a02;ACSMEKF_MekfUninitialized;No description;2;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h -0x6a03;ACSMEKF_MekfNoGyrData;No description;3;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h -0x6a04;ACSMEKF_MekfNoModelVectors;No description;4;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h -0x6a05;ACSMEKF_MekfNoSusMgmStrData;No description;5;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h -0x6a06;ACSMEKF_MekfCovarianceInversionFailed;No description;6;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h -0x6a07;ACSMEKF_MekfNotFinite;No description;7;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h -0x6a08;ACSMEKF_MekfInitialized;No description;8;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h -0x6a09;ACSMEKF_MekfRunning;No description;9;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h -0x6b00;SDMA_OpOngoing;No description;0;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h -0x6b01;SDMA_AlreadyOn;No description;1;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h -0x6b02;SDMA_AlreadyMounted;No description;2;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h -0x6b03;SDMA_AlreadyOff;No description;3;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h -0x6b0a;SDMA_StatusFileNexists;No description;10;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h -0x6b0b;SDMA_StatusFileFormatInvalid;No description;11;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h -0x6b0c;SDMA_MountError;No description;12;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h -0x6b0d;SDMA_UnmountError;No description;13;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h -0x6b0e;SDMA_SystemCallError;No description;14;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h -0x6b0f;SDMA_PopenCallError;No description;15;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h -0x6c00;LPH_SdNotReady;No description;0;LOCAL_PARAM_HANDLER;bsp_q7s/memory/LocalParameterHandler.h -0x6d00;PTM_DumpDone;No description;0;PERSISTENT_TM_STORE;mission/tmtc/PersistentTmStore.h -0x6d01;PTM_BusyDumping;No description;1;PERSISTENT_TM_STORE;mission/tmtc/PersistentTmStore.h -0x6e00;TMS_IsBusy;No description;0;TM_SINK;mission/tmtc/DirectTmSinkIF.h -0x7000;SCBU_KeyNotFound;No description;0;SCRATCH_BUFFER;bsp_q7s/memory/scratchApi.h +0x3601;CFDP_InvalidTlvType;No description;1;CFDP_BASE;fsfw/src/fsfw/cfdp/definitions.h +0x3602;CFDP_InvalidDirectiveField;No description;2;CFDP_BASE;fsfw/src/fsfw/cfdp/definitions.h +0x3603;CFDP_InvalidPduDatafieldLen;No description;3;CFDP_BASE;fsfw/src/fsfw/cfdp/definitions.h +0x3604;CFDP_InvalidAckDirectiveFields;No description;4;CFDP_BASE;fsfw/src/fsfw/cfdp/definitions.h +0x3605;CFDP_MetadataCantParseOptions;No description;5;CFDP_BASE;fsfw/src/fsfw/cfdp/definitions.h +0x3606;CFDP_NakCantParseOptions;No description;6;CFDP_BASE;fsfw/src/fsfw/cfdp/definitions.h +0x3607;CFDP_FinishedCantParseFsResponses;No description;7;CFDP_BASE;fsfw/src/fsfw/cfdp/definitions.h +0x3608;CFDP_FilestoreRequiresSecondFile;No description;8;CFDP_BASE;fsfw/src/fsfw/cfdp/definitions.h +0x3609;CFDP_FilestoreResponseCantParseFsMessage;No description;9;CFDP_BASE;fsfw/src/fsfw/cfdp/definitions.h +0x360a;CFDP_InvalidPduFormat;No description;10;CFDP_BASE;fsfw/src/fsfw/cfdp/definitions.h +0x3700;CFDP_SourceTransactionPending;No description;0;CFDP_HANDLER;fsfw/src/fsfw/cfdp/handler/defs.h +0x3701;CFDP_FileDoesNotExist;No description;1;CFDP_HANDLER;fsfw/src/fsfw/cfdp/handler/defs.h +0x3702;CFDP_FileSegmentLenInvalid;No description;2;CFDP_HANDLER;fsfw/src/fsfw/cfdp/handler/defs.h +0x3703;CFDP_SourceNameEmpty;No description;3;CFDP_HANDLER;fsfw/src/fsfw/cfdp/handler/defs.h +0x3704;CFDP_DestNameEmpty;No description;4;CFDP_HANDLER;fsfw/src/fsfw/cfdp/handler/defs.h +0x3705;CFDP_WrongRemoteCfgEntityId;No description;5;CFDP_HANDLER;fsfw/src/fsfw/cfdp/handler/defs.h +0x3706;CFDP_TargetMsgQueueFull;No description;6;CFDP_HANDLER;fsfw/src/fsfw/cfdp/handler/defs.h +0x3707;CFDP_TmStoreFull;No description;7;CFDP_HANDLER;fsfw/src/fsfw/cfdp/handler/defs.h +0x3801;TSI_BadTimestamp;No description;1;TIME_STAMPER_IF;fsfw/src/fsfw/timemanager/TimeStampIF.h +0x39a1;SGP4_InvalidEccentricity;No description;161;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h +0x39a2;SGP4_InvalidMeanMotion;No description;162;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h +0x39a3;SGP4_InvalidPerturbationElements;No description;163;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h +0x39a4;SGP4_InvalidSemiLatusRectum;No description;164;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h +0x39a5;SGP4_InvalidEpochElements;No description;165;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h +0x39a6;SGP4_SatelliteHasDecayed;No description;166;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h +0x39b1;SGP4_TleTooOld;No description;177;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h +0x39b2;SGP4_TleNotInitialized;No description;178;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h +0x3a01;MUX_NotEnoughResources;No description;1;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h +0x3a02;MUX_InsufficientMemory;No description;2;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h +0x3a03;MUX_NoPrivilege;No description;3;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h +0x3a04;MUX_WrongAttributeSetting;No description;4;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h +0x3a05;MUX_MutexAlreadyLocked;No description;5;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h +0x3a06;MUX_MutexNotFound;No description;6;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h +0x3a07;MUX_MutexMaxLocks;No description;7;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h +0x3a08;MUX_CurrThreadAlreadyOwnsMutex;No description;8;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h +0x3a09;MUX_CurrThreadDoesNotOwnMutex;No description;9;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h +0x3a0a;MUX_MutexTimeout;No description;10;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h +0x3a0b;MUX_MutexInvalidId;No description;11;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h +0x3a0c;MUX_MutexDestroyedWhileWaiting;No description;12;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h +0x3b01;MQI_Empty;No description;1;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h +0x3b02;MQI_Full;No space left for more messages;2;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h +0x3b03;MQI_NoReplyPartner;Returned if a reply method was called without partner;3;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h +0x3b04;MQI_DestinationInvalid;Returned if the target destination is invalid.;4;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h +0x3c01;SPH_SemaphoreTimeout;No description;1;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h +0x3c02;SPH_SemaphoreNotOwned;No description;2;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h +0x3c03;SPH_SemaphoreInvalid;No description;3;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h +0x3d00;LPIF_PoolEntryNotFound;No description;0;LOCAL_POOL_OWNER_IF;fsfw/src/fsfw/datapoollocal/localPoolDefinitions.h +0x3d01;LPIF_PoolEntryTypeConflict;No description;1;LOCAL_POOL_OWNER_IF;fsfw/src/fsfw/datapoollocal/localPoolDefinitions.h +0x3ea0;PVA_InvalidReadWriteMode;No description;160;POOL_VARIABLE_IF;fsfw/src/fsfw/datapool/PoolVariableIF.h +0x3ea1;PVA_InvalidPoolEntry;No description;161;POOL_VARIABLE_IF;fsfw/src/fsfw/datapool/PoolVariableIF.h +0x3f00;HKM_QueueOrDestinationInvalid;No description;0;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h +0x3f01;HKM_WrongHkPacketType;No description;1;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h +0x3f02;HKM_ReportingStatusUnchanged;No description;2;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h +0x3f03;HKM_PeriodicHelperInvalid;No description;3;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h +0x3f04;HKM_PoolobjectNotFound;No description;4;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h +0x3f05;HKM_DatasetNotFound;No description;5;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h +0x4001;DLEE_StreamTooShort;No description;1;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h +0x4002;DLEE_DecodingError;No description;2;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h +0x4301;PUS11_InvalidTypeTimeWindow;No description;1;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h +0x4302;PUS11_InvalidTimeWindow;No description;2;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h +0x4303;PUS11_TimeshiftingNotPossible;No description;3;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h +0x4304;PUS11_InvalidRelativeTime;No description;4;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h +0x4305;PUS11_ContainedTcTooSmall;No description;5;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h +0x4306;PUS11_ContainedTcCrcMissmatch;No description;6;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h +0x4400;FILS_GenericFileError;No description;0;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x4401;FILS_GenericDirError;No description;1;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x4402;FILS_FilesystemInactive;No description;2;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x4403;FILS_GenericRenameError;No description;3;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x4404;FILS_IsBusy;No description;4;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x4405;FILS_InvalidParameters;No description;5;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x440a;FILS_FileDoesNotExist;No description;10;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x440b;FILS_FileAlreadyExists;No description;11;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x440c;FILS_NotAFile;No description;12;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x440d;FILS_FileLocked;No description;13;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x440e;FILS_PermissionDenied;No description;14;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x4415;FILS_DirectoryDoesNotExist;No description;21;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x4416;FILS_DirectoryAlreadyExists;No description;22;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x4417;FILS_NotADirectory;No description;23;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x4418;FILS_DirectoryNotEmpty;No description;24;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x441e;FILS_SequencePacketMissingWrite;No description;30;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x441f;FILS_SequencePacketMissingRead;No description;31;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h +0x4500;UXOS_ExecutionFinished;Execution of the current command has finished;0;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h +0x4501;UXOS_CommandPending;Command is pending. This will also be returned if the user tries to load another command but a command is still pending;1;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h +0x4502;UXOS_BytesRead;Some bytes have been read from the executing process;2;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h +0x4503;UXOS_CommandError;Command execution failed;3;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h +0x4504;UXOS_NoCommandLoadedOrPending;;4;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h +0x4506;UXOS_PcloseCallError;No description;6;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h +0x4600;HSPI_OpeningFileFailed;No description;0;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h +0x4601;HSPI_FullDuplexTransferFailed;No description;1;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h +0x4602;HSPI_HalfDuplexTransferFailed;No description;2;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h +0x4603;HSPI_Timeout;No description;3;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h +0x4604;HSPI_Busy;No description;4;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h +0x4605;HSPI_GenericError;No description;5;HAL_SPI;fsfw/src/fsfw_hal/common/spi/spiCommon.h +0x4701;HURT_UartReadFailure;No description;1;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h +0x4702;HURT_UartReadSizeMissmatch;No description;2;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h +0x4703;HURT_UartRxBufferTooSmall;No description;3;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h +0x4901;HGIO_UnknownGpioId;No description;1;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h +0x4902;HGIO_DriveGpioFailure;No description;2;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h +0x4903;HGIO_GpioTypeFailure;No description;3;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h +0x4904;HGIO_GpioInvalidInstance;No description;4;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h +0x4905;HGIO_GpioDuplicateDetected;No description;5;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h +0x4906;HGIO_GpioInitFailed;No description;6;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h +0x4907;HGIO_GpioGetValueFailed;No description;7;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h +0x4d00;SPPA_NoPacketFound;No description;0;SPACE_PACKET_PARSER;fsfw/src/fsfw/tmtcservices/SpacePacketParser.h +0x4d01;SPPA_SplitPacket;No description;1;SPACE_PACKET_PARSER;fsfw/src/fsfw/tmtcservices/SpacePacketParser.h +0x50a1;HEATER_CommandNotSupported;No description;161;HEATER_HANDLER;mission/tcs/HeaterHandler.h +0x50a2;HEATER_InitFailed;No description;162;HEATER_HANDLER;mission/tcs/HeaterHandler.h +0x50a3;HEATER_InvalidSwitchNr;No description;163;HEATER_HANDLER;mission/tcs/HeaterHandler.h +0x50a4;HEATER_MainSwitchSetTimeout;No description;164;HEATER_HANDLER;mission/tcs/HeaterHandler.h +0x50a5;HEATER_CommandAlreadyWaiting;No description;165;HEATER_HANDLER;mission/tcs/HeaterHandler.h +0x51a0;SYRLINKS_CrcFailure;No description;160;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h +0x51a1;SYRLINKS_UartFraminOrParityErrorAck;No description;161;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h +0x51a2;SYRLINKS_BadCharacterAck;No description;162;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h +0x51a3;SYRLINKS_BadParameterValueAck;No description;163;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h +0x51a4;SYRLINKS_BadEndOfFrameAck;No description;164;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h +0x51a5;SYRLINKS_UnknownCommandIdAck;No description;165;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h +0x51a6;SYRLINKS_BadCrcAck;No description;166;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h +0x51a7;SYRLINKS_ReplyWrongSize;No description;167;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h +0x51a8;SYRLINKS_MissingStartFrameCharacter;No description;168;SYRLINKS_HANDLER;mission/com/SyrlinksHandler.h +0x5200;IMTQ_InvalidCommandCode;No description;0;IMTQ_HANDLER;mission/acs/imtqHelpers.h +0x5201;IMTQ_MgmMeasurementLowLevelError;No description;1;IMTQ_HANDLER;mission/acs/imtqHelpers.h +0x5202;IMTQ_ActuateCmdLowLevelError;No description;2;IMTQ_HANDLER;mission/acs/imtqHelpers.h +0x5203;IMTQ_ParameterMissing;No description;3;IMTQ_HANDLER;mission/acs/imtqHelpers.h +0x5204;IMTQ_ParameterInvalid;No description;4;IMTQ_HANDLER;mission/acs/imtqHelpers.h +0x5205;IMTQ_CcUnavailable;No description;5;IMTQ_HANDLER;mission/acs/imtqHelpers.h +0x5206;IMTQ_InternalProcessingError;No description;6;IMTQ_HANDLER;mission/acs/imtqHelpers.h +0x5207;IMTQ_RejectedWithoutReason;No description;7;IMTQ_HANDLER;mission/acs/imtqHelpers.h +0x5208;IMTQ_CmdErrUnknown;No description;8;IMTQ_HANDLER;mission/acs/imtqHelpers.h +0x5209;IMTQ_StartupCfgError;No description;9;IMTQ_HANDLER;mission/acs/imtqHelpers.h +0x520a;IMTQ_UnexpectedSelfTestReply;The status reply to a self test command was received but no self test command has been sent. This should normally never happen.;10;IMTQ_HANDLER;mission/acs/imtqHelpers.h +0x53b0;RWHA_SpiWriteFailure;No description;176;RW_HANDLER;mission/acs/rwHelpers.h +0x53b1;RWHA_SpiReadFailure;Used by the spi send function to tell a failing read call;177;RW_HANDLER;mission/acs/rwHelpers.h +0x53b2;RWHA_MissingStartSign;Can be used by the HDLC decoding mechanism to inform about a missing start sign 0x7E;178;RW_HANDLER;mission/acs/rwHelpers.h +0x53b3;RWHA_InvalidSubstitute;Can be used by the HDLC decoding mechanism to inform about an invalid substitution combination;179;RW_HANDLER;mission/acs/rwHelpers.h +0x53b4;RWHA_MissingEndSign;HDLC decoding mechanism never receives the end sign 0x7E;180;RW_HANDLER;mission/acs/rwHelpers.h +0x53b5;RWHA_NoReply;Reaction wheel only responds with empty frames.;181;RW_HANDLER;mission/acs/rwHelpers.h +0x53b6;RWHA_NoStartMarker;Expected a start marker as first byte;182;RW_HANDLER;mission/acs/rwHelpers.h +0x53b7;RWHA_SpiReadTimeout;Timeout when reading reply;183;RW_HANDLER;mission/acs/rwHelpers.h +0x54a0;STRH_TemperatureReqFailed;Status in temperature reply signals error;160;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54a1;STRH_PingFailed;Ping command failed;161;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54a2;STRH_VersionReqFailed;Status in version reply signals error;162;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54a3;STRH_InterfaceReqFailed;Status in interface reply signals error;163;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54a4;STRH_PowerReqFailed;Status in power reply signals error;164;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54a5;STRH_SetParamFailed;Status of reply to parameter set command signals error;165;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54a6;STRH_ActionFailed;Status of reply to action command signals error;166;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54a7;STRH_FilePathTooLong;Received invalid path string. Exceeds allowed length;167;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54a8;STRH_FilenameTooLong;Name of file received with command is too long;168;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54a9;STRH_InvalidProgram;Received version reply with invalid program ID;169;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54aa;STRH_ReplyError;Status field reply signals error;170;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54ab;STRH_CommandTooShort;Received command which is too short (some data is missing for proper execution);171;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54ac;STRH_InvalidLength;Received command with invalid length (too few or too many parameters);172;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54ad;STRH_RegionMismatch;Region mismatch between send and received data;173;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54ae;STRH_AddressMismatch;Address mismatch between send and received data;174;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54af;STRH_LengthMismatch;Length field mismatch between send and received data;175;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54b0;STRH_FileNotExists;Specified file does not exist;176;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54b1;STRH_InvalidType;Download blob pixel command has invalid type field;177;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54b2;STRH_InvalidId;Received FPGA action command with invalid ID;178;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54b3;STRH_ReplyTooShort;Received reply is too short;179;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54b4;STRH_CrcFailure;Received reply with invalid CRC;180;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54b5;STRH_StrHelperExecuting;Star tracker handler currently executing a command and using the communication interface;181;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54b6;STRH_StartrackerAlreadyBooted;Star tracker is already in firmware mode;182;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54b7;STRH_StartrackerNotRunningFirmware;Star tracker must be in firmware mode to run this command;183;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x54b8;STRH_StartrackerNotRunningBootloader;Star tracker must be in bootloader mode to run this command;184;STR_HANDLER;mission/acs/str/StarTrackerHandler.h +0x55e0;DWLPWRON_InvalidMode;Received command has invalid JESD mode (valid modes are 0 - 5);224;DWLPWRON_CMD;linux/payload/plocMpsocHelpers.h +0x55e1;DWLPWRON_InvalidLaneRate;Received command has invalid lane rate (valid lane rate are 0 - 9);225;DWLPWRON_CMD;linux/payload/plocMpsocHelpers.h +0x5800;PLSPVhLP_RequestDone;No description;0;PLOC_SUPV_HELPER;linux/payload/PlocSupvUartMan.h +0x5801;PLSPVhLP_NoPacketFound;No description;1;PLOC_SUPV_HELPER;linux/payload/PlocSupvUartMan.h +0x5802;PLSPVhLP_DecodeBufTooSmall;No description;2;PLOC_SUPV_HELPER;linux/payload/PlocSupvUartMan.h +0x5803;PLSPVhLP_PossiblePacketLossConsecutiveStart;No description;3;PLOC_SUPV_HELPER;linux/payload/PlocSupvUartMan.h +0x5804;PLSPVhLP_PossiblePacketLossConsecutiveEnd;No description;4;PLOC_SUPV_HELPER;linux/payload/PlocSupvUartMan.h +0x5805;PLSPVhLP_HdlcError;No description;5;PLOC_SUPV_HELPER;linux/payload/PlocSupvUartMan.h +0x58a0;PLSPVhLP_FileClosedAccidentally;File accidentally close;160;PLOC_SUPV_HELPER;linux/payload/PlocSupvUartMan.h +0x58a1;PLSPVhLP_ProcessTerminated;Process has been terminated by command;161;PLOC_SUPV_HELPER;linux/payload/PlocSupvUartMan.h +0x58a2;PLSPVhLP_PathNotExists;Received command with invalid pathname;162;PLOC_SUPV_HELPER;linux/payload/PlocSupvUartMan.h +0x58a3;PLSPVhLP_EventBufferReplyInvalidApid;Expected event buffer TM but received space packet with other APID;163;PLOC_SUPV_HELPER;linux/payload/PlocSupvUartMan.h +0x59a0;SUSS_InvalidSpeed;Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000];160;SUS_HANDLER;mission/acs/RwHandler.h +0x59a1;SUSS_InvalidRampTime;Action Message with invalid ramp time was received.;161;SUS_HANDLER;mission/acs/RwHandler.h +0x59a2;SUSS_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;SUS_HANDLER;mission/acs/RwHandler.h +0x59a3;SUSS_ExecutionFailed;Command execution failed;163;SUS_HANDLER;mission/acs/RwHandler.h +0x59a4;SUSS_CrcError;Reaction wheel reply has invalid crc;164;SUS_HANDLER;mission/acs/RwHandler.h +0x59a5;SUSS_ValueNotRead;No description;165;SUS_HANDLER;mission/acs/RwHandler.h +0x5aa0;IPCI_PapbBusy;No description;160;CCSDS_IP_CORE_BRIDGE;linux/ipcore/PapbVcInterface.h +0x5ba0;PTME_UnknownVcId;No description;160;PTME;linux/ipcore/Ptme.h +0x5d01;STRHLP_SdNotMounted;SD card specified in path string not mounted;1;STR_HELPER;linux/acs/StrComHandler.h +0x5d02;STRHLP_FileNotExists;Specified file does not exist on filesystem;2;STR_HELPER;linux/acs/StrComHandler.h +0x5d03;STRHLP_PathNotExists;Specified path does not exist;3;STR_HELPER;linux/acs/StrComHandler.h +0x5d04;STRHLP_FileCreationFailed;Failed to create download image or read flash file;4;STR_HELPER;linux/acs/StrComHandler.h +0x5d05;STRHLP_RegionMismatch;Region in flash write/read reply does not match expected region;5;STR_HELPER;linux/acs/StrComHandler.h +0x5d06;STRHLP_AddressMismatch;Address in flash write/read reply does not match expected address;6;STR_HELPER;linux/acs/StrComHandler.h +0x5d07;STRHLP_LengthMismatch;Length in flash write/read reply does not match expected length;7;STR_HELPER;linux/acs/StrComHandler.h +0x5d08;STRHLP_StatusError;Status field in reply signals error;8;STR_HELPER;linux/acs/StrComHandler.h +0x5d09;STRHLP_InvalidTypeId;Reply has invalid type ID (should be of action reply type);9;STR_HELPER;linux/acs/StrComHandler.h +0x5d0a;STRHLP_ReceptionTimeout;No description;10;STR_HELPER;linux/acs/StrComHandler.h +0x5d0b;STRHLP_DecodingError;No description;11;STR_HELPER;linux/acs/StrComHandler.h +0x5e00;GOMS_PacketTooLong;No description;0;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h +0x5e01;GOMS_InvalidTableId;No description;1;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h +0x5e02;GOMS_InvalidAddress;No description;2;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h +0x5e03;GOMS_InvalidParamSize;No description;3;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h +0x5e04;GOMS_InvalidPayloadSize;No description;4;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h +0x5e05;GOMS_UnknownReplyId;No description;5;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h +0x5fa0;PLMEMDUMP_MramAddressTooHigh;The capacity of the MRAM amounts to 512 kB. Thus the maximum address must not be higher than 0x7d000.;160;PLOC_MEMORY_DUMPER;linux/payload/PlocMemoryDumper.h +0x5fa1;PLMEMDUMP_MramInvalidAddressCombination;The specified end address is lower than the start address;161;PLOC_MEMORY_DUMPER;linux/payload/PlocMemoryDumper.h +0x60a0;PDEC_AbandonedCltuRetval;No description;160;PDEC_HANDLER;linux/ipcore/pdec.h +0x60a1;PDEC_FrameDirtyRetval;No description;161;PDEC_HANDLER;linux/ipcore/pdec.h +0x60a2;PDEC_FrameIllegalMultipleReasons;No description;162;PDEC_HANDLER;linux/ipcore/pdec.h +0x60a3;PDEC_AdDiscardedLockoutRetval;No description;163;PDEC_HANDLER;linux/ipcore/pdec.h +0x60a4;PDEC_AdDiscardedWaitRetval;No description;164;PDEC_HANDLER;linux/ipcore/pdec.h +0x60a5;PDEC_AdDiscardedNsVs;No description;165;PDEC_HANDLER;linux/ipcore/pdec.h +0x60a6;PDEC_NoReportRetval;No description;166;PDEC_HANDLER;linux/ipcore/pdec.h +0x60a7;PDEC_ErrorVersionNumberRetval;No description;167;PDEC_HANDLER;linux/ipcore/pdec.h +0x60a8;PDEC_IllegalCombinationRetval;No description;168;PDEC_HANDLER;linux/ipcore/pdec.h +0x60a9;PDEC_InvalidScIdRetval;No description;169;PDEC_HANDLER;linux/ipcore/pdec.h +0x60aa;PDEC_InvalidVcIdMsbRetval;No description;170;PDEC_HANDLER;linux/ipcore/pdec.h +0x60ab;PDEC_InvalidVcIdLsbRetval;No description;171;PDEC_HANDLER;linux/ipcore/pdec.h +0x60ac;PDEC_NsNotZeroRetval;No description;172;PDEC_HANDLER;linux/ipcore/pdec.h +0x60ae;PDEC_InvalidBcCc;No description;174;PDEC_HANDLER;linux/ipcore/pdec.h +0x60b0;PDEC_CommandNotImplemented;Received action message with unknown action id;176;PDEC_HANDLER;linux/ipcore/pdec.h +0x61a0;CCSDS_CommandNotImplemented;Received action message with unknown action id;160;CCSDS_HANDLER;mission/com/CcsdsIpCoreHandler.h +0x62a0;RS_RateNotSupported;The commanded rate is not supported by the current FPGA design;160;RATE_SETTER;linux/ipcore/PtmeConfig.h +0x62a1;RS_BadBitRate;Bad bitrate has been commanded (e.g. 0);161;RATE_SETTER;linux/ipcore/PtmeConfig.h +0x62a2;RS_ClkInversionFailed;Failed to invert clock and thus change the time the data is updated with respect to the tx clock;162;RATE_SETTER;linux/ipcore/PtmeConfig.h +0x62a3;RS_TxManipulatorConfigFailed;Failed to change configuration bit of tx clock manipulator;163;RATE_SETTER;linux/ipcore/PtmeConfig.h +0x6301;JSONBASE_JsonFileNotExists;Specified json file does not exist;1;ARCSEC_JSON_BASE;mission/acs/str/ArcsecJsonParamBase.h +0x6302;JSONBASE_SetNotExists;Requested set does not exist in json file;2;ARCSEC_JSON_BASE;mission/acs/str/ArcsecJsonParamBase.h +0x6303;JSONBASE_ParamNotExists;Requested parameter does not exist in json file;3;ARCSEC_JSON_BASE;mission/acs/str/ArcsecJsonParamBase.h +0x64a0;NVMB_KeyNotExists;Specified key does not exist in json file;160;NVM_PARAM_BASE;mission/memory/NvmParameterBase.h +0x65a0;FSHLP_SdNotMounted;SD card specified with path string not mounted;160;FILE_SYSTEM_HELPER;bsp_q7s/fs/FilesystemHelper.h +0x65a1;FSHLP_FileNotExists;Specified file does not exist on filesystem;161;FILE_SYSTEM_HELPER;bsp_q7s/fs/FilesystemHelper.h +0x66a0;PLMPHLP_FileWriteError;File error occured for file transfers from OBC to the MPSoC.;160;PLOC_MPSOC_HELPER;linux/payload/PlocMpsocSpecialComHelper.h +0x66a1;PLMPHLP_FileReadError;File error occured for file transfers from MPSoC to OBC.;161;PLOC_MPSOC_HELPER;linux/payload/PlocMpsocSpecialComHelper.h +0x67a0;SADPL_CommandNotSupported;No description;160;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h +0x67a1;SADPL_DeploymentAlreadyExecuting;No description;161;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h +0x67a2;SADPL_MainSwitchTimeoutFailure;No description;162;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h +0x67a3;SADPL_SwitchingDeplSa1Failed;No description;163;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h +0x67a4;SADPL_SwitchingDeplSa2Failed;No description;164;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h +0x68a0;MPSOCRTVIF_CrcFailure;Space Packet received from PLOC has invalid CRC;160;MPSOC_RETURN_VALUES_IF;linux/payload/mpsocRetvals.h +0x68a1;MPSOCRTVIF_ReceivedAckFailure;Received ACK failure reply from PLOC;161;MPSOC_RETURN_VALUES_IF;linux/payload/mpsocRetvals.h +0x68a2;MPSOCRTVIF_ReceivedExeFailure;Received execution failure reply from PLOC;162;MPSOC_RETURN_VALUES_IF;linux/payload/mpsocRetvals.h +0x68a3;MPSOCRTVIF_InvalidApid;Received space packet with invalid APID from PLOC;163;MPSOC_RETURN_VALUES_IF;linux/payload/mpsocRetvals.h +0x68a4;MPSOCRTVIF_InvalidLength;Received command with invalid length;164;MPSOC_RETURN_VALUES_IF;linux/payload/mpsocRetvals.h +0x68a5;MPSOCRTVIF_FilenameTooLong;Filename of file in OBC filesystem is too long;165;MPSOC_RETURN_VALUES_IF;linux/payload/mpsocRetvals.h +0x68a6;MPSOCRTVIF_MpsocHelperExecuting;MPSoC helper is currently executing a command;166;MPSOC_RETURN_VALUES_IF;linux/payload/mpsocRetvals.h +0x68a7;MPSOCRTVIF_MpsocFilenameTooLong;Filename of MPSoC file is to long (max. 256 bytes);167;MPSOC_RETURN_VALUES_IF;linux/payload/mpsocRetvals.h +0x68a8;MPSOCRTVIF_InvalidParameter;Command has invalid parameter;168;MPSOC_RETURN_VALUES_IF;linux/payload/mpsocRetvals.h +0x68a9;MPSOCRTVIF_NameTooLong;Received command has file string with invalid length;169;MPSOC_RETURN_VALUES_IF;linux/payload/mpsocRetvals.h +0x69a0;SPVRTVIF_CrcFailure;Space Packet received from PLOC supervisor has invalid CRC;160;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h +0x69a1;SPVRTVIF_InvalidServiceId;No description;161;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h +0x69a2;SPVRTVIF_ReceivedAckFailure;Received ACK failure reply from PLOC supervisor;162;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h +0x69a3;SPVRTVIF_ReceivedExeFailure;Received execution failure reply from PLOC supervisor;163;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h +0x69a4;SPVRTVIF_InvalidApid;Received space packet with invalid APID from PLOC supervisor;164;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h +0x69a5;SPVRTVIF_GetTimeFailure;Failed to read current system time;165;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h +0x69a6;SPVRTVIF_InvalidWatchdog;Received command with invalid watchdog parameter. Valid watchdogs are 0 for PS, 1 for PL and 2 for INT;166;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h +0x69a7;SPVRTVIF_InvalidWatchdogTimeout;Received watchdog timeout config command with invalid timeout. Valid timeouts must be in the range between 1000 and 360000 ms.;167;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h +0x69a8;SPVRTVIF_InvalidLatchupId;Received latchup config command with invalid latchup ID;168;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h +0x69a9;SPVRTVIF_SweepPeriodTooSmall;Received set adc sweep period command with invalid sweep period. Must be larger than 21.;169;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h +0x69aa;SPVRTVIF_InvalidTestParam;Receive auto EM test command with invalid test param. Valid params are 1 and 2.;170;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h +0x69ab;SPVRTVIF_MramPacketParsingFailure;Returned when scanning for MRAM dump packets failed.;171;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h +0x69ac;SPVRTVIF_InvalidMramAddresses;Returned when the start and stop addresses of the MRAM dump or MRAM wipe commands are invalid (e.g. start address bigger than stop address);172;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h +0x69ad;SPVRTVIF_NoMramPacket;Expect reception of an MRAM dump packet but received space packet with other apid.;173;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h +0x69ae;SPVRTVIF_PathDoesNotExist;Path to PLOC directory on SD card does not exist;174;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h +0x69af;SPVRTVIF_MramFileNotExists;MRAM dump file does not exists. The file should actually already have been created with the reception of the first dump packet.;175;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h +0x69b0;SPVRTVIF_InvalidReplyLength;No description;176;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h +0x69b1;SPVRTVIF_InvalidLength;Received action command has invalid length;177;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h +0x69b2;SPVRTVIF_FilenameTooLong;Filename too long;178;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h +0x69b3;SPVRTVIF_UpdateStatusReportInvalidLength;Received update status report with invalid packet length field;179;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h +0x69b4;SPVRTVIF_UpdateCrcFailure;Update status report does not contain expected CRC. There might be a bit flip in the update memory region.;180;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h +0x69b5;SPVRTVIF_SupvHelperExecuting;Supervisor helper task ist currently executing a command (wait until helper tas has finished or interrupt by sending the terminate command);181;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h +0x69c0;SPVRTVIF_BufTooSmall;No description;192;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h +0x69c1;SPVRTVIF_NoReplyTimeout;No description;193;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h +0x6a00;ACSCTRL_FileDeletionFailed;File deletion failed and at least one file is still existent.;0;ACS_CTRL;mission/controller/AcsController.h +0x6b02;ACSMEKF_MekfUninitialized;No description;2;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h +0x6b03;ACSMEKF_MekfNoGyrData;No description;3;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h +0x6b04;ACSMEKF_MekfNoModelVectors;No description;4;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h +0x6b05;ACSMEKF_MekfNoSusMgmStrData;No description;5;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h +0x6b06;ACSMEKF_MekfCovarianceInversionFailed;No description;6;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h +0x6b07;ACSMEKF_MekfNotFinite;No description;7;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h +0x6b08;ACSMEKF_MekfInitialized;No description;8;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h +0x6b09;ACSMEKF_MekfRunning;No description;9;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h +0x6c00;SDMA_OpOngoing;No description;0;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h +0x6c01;SDMA_AlreadyOn;No description;1;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h +0x6c02;SDMA_AlreadyMounted;No description;2;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h +0x6c03;SDMA_AlreadyOff;No description;3;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h +0x6c0a;SDMA_StatusFileNexists;No description;10;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h +0x6c0b;SDMA_StatusFileFormatInvalid;No description;11;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h +0x6c0c;SDMA_MountError;No description;12;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h +0x6c0d;SDMA_UnmountError;No description;13;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h +0x6c0e;SDMA_SystemCallError;No description;14;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h +0x6c0f;SDMA_PopenCallError;No description;15;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h +0x6d00;LPH_SdNotReady;No description;0;LOCAL_PARAM_HANDLER;bsp_q7s/memory/LocalParameterHandler.h +0x6e00;PTM_DumpDone;No description;0;PERSISTENT_TM_STORE;mission/tmtc/PersistentTmStore.h +0x6e01;PTM_BusyDumping;No description;1;PERSISTENT_TM_STORE;mission/tmtc/PersistentTmStore.h +0x6f00;TMS_IsBusy;No description;0;TM_SINK;mission/tmtc/DirectTmSinkIF.h +0x6f01;TMS_PartiallyWritten;No description;1;TM_SINK;mission/tmtc/DirectTmSinkIF.h +0x6f02;TMS_NoWriteActive;No description;2;TM_SINK;mission/tmtc/DirectTmSinkIF.h +0x7000;VCS_ChannelDoesNotExist;No description;0;VIRTUAL_CHANNEL;mission/com/VirtualChannel.h +0x7200;SCBU_KeyNotFound;No description;0;SCRATCH_BUFFER;bsp_q7s/memory/scratchApi.h diff --git a/generators/bsp_q7s_subsystems.csv b/generators/bsp_q7s_subsystems.csv index c9c90629..36828fda 100644 --- a/generators/bsp_q7s_subsystems.csv +++ b/generators/bsp_q7s_subsystems.csv @@ -61,3 +61,4 @@ 143;PERSISTENT_TM_STORE 144;SYRLINKS_COM 145;SUS_HANDLER +146;CFDP_APP diff --git a/generators/events/translateEvents.cpp b/generators/events/translateEvents.cpp index 9bb03ff0..099a4c7a 100644 --- a/generators/events/translateEvents.cpp +++ b/generators/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** - * @brief Auto-generated event translation file. Contains 313 translations. + * @brief Auto-generated event translation file. Contains 315 translations. * @details - * Generated on: 2023-10-11 10:54:39 + * Generated on: 2023-10-27 14:24:05 */ #include "translateEvents.h" @@ -92,6 +92,7 @@ const char *MSG_QUEUE_ERROR_STRING = "MSG_QUEUE_ERROR"; const char *SERIALIZATION_ERROR_STRING = "SERIALIZATION_ERROR"; const char *FILESTORE_ERROR_STRING = "FILESTORE_ERROR"; const char *FILENAME_TOO_LARGE_ERROR_STRING = "FILENAME_TOO_LARGE_ERROR"; +const char *HANDLING_CFDP_REQUEST_FAILED_STRING = "HANDLING_CFDP_REQUEST_FAILED"; const char *SAFE_RATE_VIOLATION_STRING = "SAFE_RATE_VIOLATION"; const char *SAFE_RATE_RECOVERY_STRING = "SAFE_RATE_RECOVERY"; const char *MULTIPLE_RW_INVALID_STRING = "MULTIPLE_RW_INVALID"; @@ -318,6 +319,7 @@ const char *DUMP_HK_CANCELLED_STRING = "DUMP_HK_CANCELLED"; const char *DUMP_CFDP_CANCELLED_STRING = "DUMP_CFDP_CANCELLED"; const char *TEMPERATURE_ALL_ONES_START_STRING = "TEMPERATURE_ALL_ONES_START"; const char *TEMPERATURE_ALL_ONES_RECOVERY_STRING = "TEMPERATURE_ALL_ONES_RECOVERY"; +const char *FAULT_HANDLER_TRIGGERED_STRING = "FAULT_HANDLER_TRIGGERED"; const char *translateEvents(Event event) { switch ((event & 0xFFFF)) { @@ -495,6 +497,8 @@ const char *translateEvents(Event event) { return FILESTORE_ERROR_STRING; case (10804): return FILENAME_TOO_LARGE_ERROR_STRING; + case (10805): + return HANDLING_CFDP_REQUEST_FAILED_STRING; case (11200): return SAFE_RATE_VIOLATION_STRING; case (11201): @@ -947,6 +951,8 @@ const char *translateEvents(Event event) { return TEMPERATURE_ALL_ONES_START_STRING; case (14501): return TEMPERATURE_ALL_ONES_RECOVERY_STRING; + case (14600): + return FAULT_HANDLER_TRIGGERED_STRING; default: return "UNKNOWN_EVENT"; } diff --git a/generators/objects/translateObjects.cpp b/generators/objects/translateObjects.cpp index 0599cc18..5cc157c2 100644 --- a/generators/objects/translateObjects.cpp +++ b/generators/objects/translateObjects.cpp @@ -1,8 +1,8 @@ /** * @brief Auto-generated object translation file. * @details - * Contains 178 translations. - * Generated on: 2023-10-11 10:54:39 + * Contains 179 translations. + * Generated on: 2023-10-27 14:24:05 */ #include "translateObjects.h" @@ -166,6 +166,7 @@ const char *PUS_TM_FUNNEL_STRING = "PUS_TM_FUNNEL"; const char *CFDP_TM_FUNNEL_STRING = "CFDP_TM_FUNNEL"; const char *CFDP_HANDLER_STRING = "CFDP_HANDLER"; const char *CFDP_DISTRIBUTOR_STRING = "CFDP_DISTRIBUTOR"; +const char *CFDP_FAULT_HANDLER_STRING = "CFDP_FAULT_HANDLER"; const char *EIVE_SYSTEM_STRING = "EIVE_SYSTEM"; const char *ACS_SUBSYSTEM_STRING = "ACS_SUBSYSTEM"; const char *PL_SUBSYSTEM_STRING = "PL_SUBSYSTEM"; @@ -507,6 +508,8 @@ const char *translateObject(object_id_t object) { return CFDP_HANDLER_STRING; case 0x73000206: return CFDP_DISTRIBUTOR_STRING; + case 0x73000207: + return CFDP_FAULT_HANDLER_STRING; case 0x73010000: return EIVE_SYSTEM_STRING; case 0x73010001: diff --git a/linux/ObjectFactory.cpp b/linux/ObjectFactory.cpp index cb3e043b..756dc0af 100644 --- a/linux/ObjectFactory.cpp +++ b/linux/ObjectFactory.cpp @@ -206,74 +206,78 @@ void ObjectFactory::createRtdComponents(std::string spiDev, GpioIF* gpioComIF, GpioCallback* gpioRtdIc0 = new GpioCallback("Chip select RTD IC0", Direction::OUT, Levels::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC_3, gpioRtdIc0); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_0, gpioRtdIc0); GpioCallback* gpioRtdIc1 = new GpioCallback("Chip select RTD IC1", Direction::OUT, Levels::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC_4, gpioRtdIc1); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_1, gpioRtdIc1); GpioCallback* gpioRtdIc2 = new GpioCallback("Chip select RTD IC2", Direction::OUT, Levels::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC_5, gpioRtdIc2); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_2, gpioRtdIc2); GpioCallback* gpioRtdIc3 = new GpioCallback("Chip select RTD IC3", Direction::OUT, Levels::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC_6, gpioRtdIc3); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_3, gpioRtdIc3); GpioCallback* gpioRtdIc4 = new GpioCallback("Chip select RTD IC4", Direction::OUT, Levels::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC_7, gpioRtdIc4); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_4, gpioRtdIc4); GpioCallback* gpioRtdIc5 = new GpioCallback("Chip select RTD IC5", Direction::OUT, Levels::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC_8, gpioRtdIc5); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_5, gpioRtdIc5); GpioCallback* gpioRtdIc6 = new GpioCallback("Chip select RTD IC6", Direction::OUT, Levels::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC_9, gpioRtdIc6); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_6, gpioRtdIc6); GpioCallback* gpioRtdIc7 = new GpioCallback("Chip select RTD IC7", Direction::OUT, Levels::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC_10, gpioRtdIc7); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_7, gpioRtdIc7); GpioCallback* gpioRtdIc8 = new GpioCallback("Chip select RTD IC8", Direction::OUT, Levels::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC_11, gpioRtdIc8); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_8, gpioRtdIc8); GpioCallback* gpioRtdIc9 = new GpioCallback("Chip select RTD IC9", Direction::OUT, Levels::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC_12, gpioRtdIc9); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_9, gpioRtdIc9); GpioCallback* gpioRtdIc10 = new GpioCallback("Chip select RTD IC10", Direction::OUT, Levels::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC_13, gpioRtdIc10); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_10, gpioRtdIc10); GpioCallback* gpioRtdIc11 = new GpioCallback("Chip select RTD IC11", Direction::OUT, Levels::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC_14, gpioRtdIc11); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_11, gpioRtdIc11); GpioCallback* gpioRtdIc12 = new GpioCallback("Chip select RTD IC12", Direction::OUT, Levels::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC_15, gpioRtdIc12); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_12, gpioRtdIc12); GpioCallback* gpioRtdIc13 = new GpioCallback("Chip select RTD IC13", Direction::OUT, Levels::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC_16, gpioRtdIc13); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_13, gpioRtdIc13); GpioCallback* gpioRtdIc14 = new GpioCallback("Chip select RTD IC14", Direction::OUT, Levels::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC_17, gpioRtdIc14); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_14, gpioRtdIc14); GpioCallback* gpioRtdIc15 = new GpioCallback("Chip select RTD IC15", Direction::OUT, Levels::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); - rtdGpioCookie->addGpio(gpioIds::RTD_IC_18, gpioRtdIc15); + rtdGpioCookie->addGpio(gpioIds::RTD_IC_15, gpioRtdIc15); gpioChecker(gpioComIF->addGpios(rtdGpioCookie), "RTDs"); #if OBSW_ADD_RTD_DEVICES == 1 using namespace EiveMax31855; + // ! NOTE ! + // The chip selects for device 9 and 11 are swapped here. It is strongly suspected the cables + // for those devices were swapped during integration. This is probably the easiest way to + // fix the issue. std::array, NUM_RTDS> cookieArgs = {{ + {addresses::RTD_IC_0, gpioIds::RTD_IC_0}, + {addresses::RTD_IC_1, gpioIds::RTD_IC_1}, + {addresses::RTD_IC_2, gpioIds::RTD_IC_2}, {addresses::RTD_IC_3, gpioIds::RTD_IC_3}, {addresses::RTD_IC_4, gpioIds::RTD_IC_4}, {addresses::RTD_IC_5, gpioIds::RTD_IC_5}, {addresses::RTD_IC_6, gpioIds::RTD_IC_6}, {addresses::RTD_IC_7, gpioIds::RTD_IC_7}, {addresses::RTD_IC_8, gpioIds::RTD_IC_8}, - {addresses::RTD_IC_9, gpioIds::RTD_IC_9}, - {addresses::RTD_IC_10, gpioIds::RTD_IC_10}, {addresses::RTD_IC_11, gpioIds::RTD_IC_11}, + {addresses::RTD_IC_10, gpioIds::RTD_IC_10}, + {addresses::RTD_IC_9, gpioIds::RTD_IC_9}, {addresses::RTD_IC_12, gpioIds::RTD_IC_12}, {addresses::RTD_IC_13, gpioIds::RTD_IC_13}, {addresses::RTD_IC_14, gpioIds::RTD_IC_14}, {addresses::RTD_IC_15, gpioIds::RTD_IC_15}, - {addresses::RTD_IC_16, gpioIds::RTD_IC_16}, - {addresses::RTD_IC_17, gpioIds::RTD_IC_17}, - {addresses::RTD_IC_18, gpioIds::RTD_IC_18}, }}; // HSPD: Heatspreader diff --git a/linux/callbacks/gpioCallbacks.cpp b/linux/callbacks/gpioCallbacks.cpp index 969aada0..4c05bac3 100644 --- a/linux/callbacks/gpioCallbacks.cpp +++ b/linux/callbacks/gpioCallbacks.cpp @@ -21,6 +21,18 @@ void gpioCallbacks::spiCsDecoderCallback(gpioId_t gpioId, gpio::GpioOperation gp if (value == gpio::Levels::HIGH) { switch (gpioId) { + case (gpioIds::RTD_IC_0): { + disableDecoderTcsIc1(gpioIF); + break; + } + case (gpioIds::RTD_IC_1): { + disableDecoderTcsIc1(gpioIF); + break; + } + case (gpioIds::RTD_IC_2): { + disableDecoderTcsIc1(gpioIF); + break; + } case (gpioIds::RTD_IC_3): { disableDecoderTcsIc1(gpioIF); break; @@ -42,15 +54,15 @@ void gpioCallbacks::spiCsDecoderCallback(gpioId_t gpioId, gpio::GpioOperation gp break; } case (gpioIds::RTD_IC_8): { - disableDecoderTcsIc1(gpioIF); + disableDecoderTcsIc2(gpioIF); break; } case (gpioIds::RTD_IC_9): { - disableDecoderTcsIc1(gpioIF); + disableDecoderTcsIc2(gpioIF); break; } case (gpioIds::RTD_IC_10): { - disableDecoderTcsIc1(gpioIF); + disableDecoderTcsIc2(gpioIF); break; } case (gpioIds::RTD_IC_11): { @@ -73,18 +85,6 @@ void gpioCallbacks::spiCsDecoderCallback(gpioId_t gpioId, gpio::GpioOperation gp disableDecoderTcsIc2(gpioIF); break; } - case (gpioIds::RTD_IC_16): { - disableDecoderTcsIc2(gpioIF); - break; - } - case (gpioIds::RTD_IC_17): { - disableDecoderTcsIc2(gpioIF); - break; - } - case (gpioIds::RTD_IC_18): { - disableDecoderTcsIc2(gpioIF); - break; - } case (gpioIds::CS_SUS_0): { disableDecoderInterfaceBoardIc1(gpioIF); break; @@ -154,82 +154,82 @@ void gpioCallbacks::spiCsDecoderCallback(gpioId_t gpioId, gpio::GpioOperation gp } } else if (value == gpio::Levels::LOW) { switch (gpioId) { - case (gpioIds::RTD_IC_3): { + case (gpioIds::RTD_IC_0): { selectY7(gpioIF); enableDecoderTcsIc1(gpioIF); break; } + case (gpioIds::RTD_IC_1): { + selectY6(gpioIF); + enableDecoderTcsIc1(gpioIF); + break; + } + case (gpioIds::RTD_IC_2): { + selectY5(gpioIF); + enableDecoderTcsIc1(gpioIF); + break; + } + case (gpioIds::RTD_IC_3): { + selectY4(gpioIF); + enableDecoderTcsIc1(gpioIF); + break; + } case (gpioIds::RTD_IC_4): { - selectY6(gpioIF); + selectY3(gpioIF); enableDecoderTcsIc1(gpioIF); break; } case (gpioIds::RTD_IC_5): { - selectY5(gpioIF); + selectY2(gpioIF); enableDecoderTcsIc1(gpioIF); break; } case (gpioIds::RTD_IC_6): { - selectY4(gpioIF); + selectY1(gpioIF); enableDecoderTcsIc1(gpioIF); break; } case (gpioIds::RTD_IC_7): { - selectY3(gpioIF); - enableDecoderTcsIc1(gpioIF); - break; - } - case (gpioIds::RTD_IC_8): { - selectY2(gpioIF); - enableDecoderTcsIc1(gpioIF); - break; - } - case (gpioIds::RTD_IC_9): { - selectY1(gpioIF); - enableDecoderTcsIc1(gpioIF); - break; - } - case (gpioIds::RTD_IC_10): { selectY0(gpioIF); enableDecoderTcsIc1(gpioIF); break; } - case (gpioIds::RTD_IC_11): { + case (gpioIds::RTD_IC_8): { selectY7(gpioIF); enableDecoderTcsIc2(gpioIF); break; } - case (gpioIds::RTD_IC_12): { + case (gpioIds::RTD_IC_9): { selectY6(gpioIF); enableDecoderTcsIc2(gpioIF); break; } - case (gpioIds::RTD_IC_13): { + case (gpioIds::RTD_IC_10): { selectY5(gpioIF); enableDecoderTcsIc2(gpioIF); break; } - case (gpioIds::RTD_IC_14): { + case (gpioIds::RTD_IC_11): { selectY4(gpioIF); enableDecoderTcsIc2(gpioIF); break; } - case (gpioIds::RTD_IC_15): { + case (gpioIds::RTD_IC_12): { selectY3(gpioIF); enableDecoderTcsIc2(gpioIF); break; } - case (gpioIds::RTD_IC_16): { + case (gpioIds::RTD_IC_13): { selectY2(gpioIF); enableDecoderTcsIc2(gpioIF); break; } - case (gpioIds::RTD_IC_17): { + case (gpioIds::RTD_IC_14): { selectY1(gpioIF); enableDecoderTcsIc2(gpioIF); break; } - case (gpioIds::RTD_IC_18): { + case (gpioIds::RTD_IC_15): { selectY0(gpioIF); enableDecoderTcsIc2(gpioIF); break; diff --git a/linux/fsfwconfig/events/translateEvents.cpp b/linux/fsfwconfig/events/translateEvents.cpp index 9bb03ff0..099a4c7a 100644 --- a/linux/fsfwconfig/events/translateEvents.cpp +++ b/linux/fsfwconfig/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** - * @brief Auto-generated event translation file. Contains 313 translations. + * @brief Auto-generated event translation file. Contains 315 translations. * @details - * Generated on: 2023-10-11 10:54:39 + * Generated on: 2023-10-27 14:24:05 */ #include "translateEvents.h" @@ -92,6 +92,7 @@ const char *MSG_QUEUE_ERROR_STRING = "MSG_QUEUE_ERROR"; const char *SERIALIZATION_ERROR_STRING = "SERIALIZATION_ERROR"; const char *FILESTORE_ERROR_STRING = "FILESTORE_ERROR"; const char *FILENAME_TOO_LARGE_ERROR_STRING = "FILENAME_TOO_LARGE_ERROR"; +const char *HANDLING_CFDP_REQUEST_FAILED_STRING = "HANDLING_CFDP_REQUEST_FAILED"; const char *SAFE_RATE_VIOLATION_STRING = "SAFE_RATE_VIOLATION"; const char *SAFE_RATE_RECOVERY_STRING = "SAFE_RATE_RECOVERY"; const char *MULTIPLE_RW_INVALID_STRING = "MULTIPLE_RW_INVALID"; @@ -318,6 +319,7 @@ const char *DUMP_HK_CANCELLED_STRING = "DUMP_HK_CANCELLED"; const char *DUMP_CFDP_CANCELLED_STRING = "DUMP_CFDP_CANCELLED"; const char *TEMPERATURE_ALL_ONES_START_STRING = "TEMPERATURE_ALL_ONES_START"; const char *TEMPERATURE_ALL_ONES_RECOVERY_STRING = "TEMPERATURE_ALL_ONES_RECOVERY"; +const char *FAULT_HANDLER_TRIGGERED_STRING = "FAULT_HANDLER_TRIGGERED"; const char *translateEvents(Event event) { switch ((event & 0xFFFF)) { @@ -495,6 +497,8 @@ const char *translateEvents(Event event) { return FILESTORE_ERROR_STRING; case (10804): return FILENAME_TOO_LARGE_ERROR_STRING; + case (10805): + return HANDLING_CFDP_REQUEST_FAILED_STRING; case (11200): return SAFE_RATE_VIOLATION_STRING; case (11201): @@ -947,6 +951,8 @@ const char *translateEvents(Event event) { return TEMPERATURE_ALL_ONES_START_STRING; case (14501): return TEMPERATURE_ALL_ONES_RECOVERY_STRING; + case (14600): + return FAULT_HANDLER_TRIGGERED_STRING; default: return "UNKNOWN_EVENT"; } diff --git a/linux/fsfwconfig/objects/translateObjects.cpp b/linux/fsfwconfig/objects/translateObjects.cpp index 0599cc18..5cc157c2 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 178 translations. - * Generated on: 2023-10-11 10:54:39 + * Contains 179 translations. + * Generated on: 2023-10-27 14:24:05 */ #include "translateObjects.h" @@ -166,6 +166,7 @@ const char *PUS_TM_FUNNEL_STRING = "PUS_TM_FUNNEL"; const char *CFDP_TM_FUNNEL_STRING = "CFDP_TM_FUNNEL"; const char *CFDP_HANDLER_STRING = "CFDP_HANDLER"; const char *CFDP_DISTRIBUTOR_STRING = "CFDP_DISTRIBUTOR"; +const char *CFDP_FAULT_HANDLER_STRING = "CFDP_FAULT_HANDLER"; const char *EIVE_SYSTEM_STRING = "EIVE_SYSTEM"; const char *ACS_SUBSYSTEM_STRING = "ACS_SUBSYSTEM"; const char *PL_SUBSYSTEM_STRING = "PL_SUBSYSTEM"; @@ -507,6 +508,8 @@ const char *translateObject(object_id_t object) { return CFDP_HANDLER_STRING; case 0x73000206: return CFDP_DISTRIBUTOR_STRING; + case 0x73000207: + return CFDP_FAULT_HANDLER_STRING; case 0x73010000: return EIVE_SYSTEM_STRING; case 0x73010001: diff --git a/linux/ipcore/PapbVcInterface.cpp b/linux/ipcore/PapbVcInterface.cpp index 5dcb4519..c02d0935 100644 --- a/linux/ipcore/PapbVcInterface.cpp +++ b/linux/ipcore/PapbVcInterface.cpp @@ -8,8 +8,12 @@ #include "fsfw/serviceinterface/ServiceInterface.h" PapbVcInterface::PapbVcInterface(LinuxLibgpioIF* gpioComIF, gpioId_t papbEmptyId, - std::string uioFile, int mapNum) - : gpioComIF(gpioComIF), papbEmptyId(papbEmptyId), uioFile(std::move(uioFile)), mapNum(mapNum) {} + std::string uioFile, int mapNum, size_t maxPacketSize) + : gpioComIF(gpioComIF), + papbEmptyId(papbEmptyId), + packetBuf(maxPacketSize), + uioFile(std::move(uioFile)), + mapNum(mapNum) {} PapbVcInterface::~PapbVcInterface() {} @@ -23,26 +27,60 @@ ReturnValue_t PapbVcInterface::initialize() { return returnvalue::OK; } -ReturnValue_t PapbVcInterface::write(const uint8_t* data, size_t size) { +ReturnValue_t PapbVcInterface::write(const uint8_t* data, size_t size, size_t& writtenSize) { // There are no packets smaller than 4, this is considered a configuration error. if (size < 4) { return returnvalue::FAILED; } + // The user must call advance until completion before starting a new packet transfer. + if (writeActiveStatus) { + return IS_BUSY; + } + if (size > packetBuf.capacity()) { + sif::error << "PapbVcInterface: Packet with size " << size << " larger than maximum configured" + << " byte size " << packetBuf.capacity() << std::endl; + return returnvalue::FAILED; + } + std::memcpy(packetBuf.data(), data, size); + currentPacketSize = size; + currentPacketIndex = 0; if (pollReadyForPacket()) { startPacketTransfer(ByteWidthCfg::ONE); } else { return DirectTmSinkIF::IS_BUSY; } - if (not pollReadyForOctet(MAX_BUSY_POLLS)) { - abortPacketTransfer(); - return returnvalue::FAILED; + return advanceWrite(writtenSize); +} + +void PapbVcInterface::startPacketTransfer(ByteWidthCfg initWidth) { + *vcBaseReg = CONFIG_DATA_INPUT | initWidth; + writeActiveStatus = true; +} + +bool PapbVcInterface::pollReadyForPacket() const { + // Check if PAPB interface is ready to receive data. Use the configuration register for this. + // Bit 5, see PTME ptme_001_01-0-7-r2 Table 31. + uint32_t reg = *vcBaseReg; + return (reg >> 6) & 0b1; +} + +ReturnValue_t PapbVcInterface::advanceWrite(size_t& writtenSize) { + if (!writeActiveStatus) { + return NO_WRITE_ACTIVE; } - for (size_t idx = 0; idx < size; idx++) { + if (not pollReadyForPacket()) { + return IS_BUSY; + } + while (currentPacketIndex < currentPacketSize) { if (not pollReadyForOctet(MAX_BUSY_POLLS)) { + if (not pollReadyForPacket()) { + return PARTIALLY_WRITTEN; + } abortPacketTransfer(); return returnvalue::FAILED; } - *(vcBaseReg + DATA_REG_OFFSET) = static_cast(data[idx]); + *(vcBaseReg + DATA_REG_OFFSET) = static_cast(packetBuf[currentPacketIndex++]); + writtenSize++; } if (not pollReadyForOctet(MAX_BUSY_POLLS)) { abortPacketTransfer(); @@ -52,18 +90,7 @@ ReturnValue_t PapbVcInterface::write(const uint8_t* data, size_t size) { return returnvalue::OK; } -void PapbVcInterface::startPacketTransfer(ByteWidthCfg initWidth) { - *vcBaseReg = CONFIG_DATA_INPUT | initWidth; -} - -void PapbVcInterface::completePacketTransfer() { *vcBaseReg = CONFIG_END; } - -bool PapbVcInterface::pollReadyForPacket() const { - // Check if PAPB interface is ready to receive data. Use the configuration register for this. - // Bit 5, see PTME ptme_001_01-0-7-r2 Table 31. - uint32_t reg = *vcBaseReg; - return (reg >> 6) & 0b1; -} +bool PapbVcInterface::writeActive() const { return writeActiveStatus; } bool PapbVcInterface::isVcInterfaceBufferEmpty() { ReturnValue_t result = returnvalue::OK; @@ -101,21 +128,16 @@ inline bool PapbVcInterface::pollReadyForOctet(uint32_t maxCycles) const { return false; } -ReturnValue_t PapbVcInterface::sendTestFrame() { - /** Size of one complete transfer frame data field amounts to 1105 bytes */ - uint8_t testPacket[1105]; - - /** Fill one test packet */ - for (int idx = 0; idx < 1105; idx++) { - testPacket[idx] = static_cast(idx & 0xFF); - } - - ReturnValue_t result = write(testPacket, 1105); - if (result != returnvalue::OK) { - return result; - } - - return returnvalue::OK; +void PapbVcInterface::abortPacketTransfer() { + *vcBaseReg = CONFIG_ABORT; + writeActiveStatus = false; + currentPacketIndex = 0; + currentPacketSize = 0; } -void PapbVcInterface::abortPacketTransfer() { *vcBaseReg = CONFIG_ABORT; } +void PapbVcInterface::completePacketTransfer() { + *vcBaseReg = CONFIG_END; + writeActiveStatus = false; + currentPacketIndex = 0; + currentPacketSize = 0; +} diff --git a/linux/ipcore/PapbVcInterface.h b/linux/ipcore/PapbVcInterface.h index b5160748..ddc9c074 100644 --- a/linux/ipcore/PapbVcInterface.h +++ b/linux/ipcore/PapbVcInterface.h @@ -6,6 +6,7 @@ #include #include +#include #include "OBSWConfig.h" #include "fsfw/returnvalues/returnvalue.h" @@ -30,20 +31,22 @@ class PapbVcInterface : public VirtualChannelIF { * @param uioFile UIO file providing access to the PAPB bus * @param mapNum Map number of UIO map associated with this virtual channel */ - PapbVcInterface(LinuxLibgpioIF* gpioComIF, gpioId_t papbEmptyId, std::string uioFile, int mapNum); + PapbVcInterface(LinuxLibgpioIF* gpioComIF, gpioId_t papbEmptyId, std::string uioFile, int mapNum, + size_t maxPacketSize); virtual ~PapbVcInterface(); + // See interface function documentation for docs on these functions. + bool isBusy() const override; - /** - * - * @param data - * @param size - * @return returnvalue::OK on successfull write, PAPB_BUSY if PAPB is busy. - */ - ReturnValue_t write(const uint8_t* data, size_t size) override; + + ReturnValue_t write(const uint8_t* data, size_t size, size_t& writtenSize) override; + + ReturnValue_t advanceWrite(size_t& remainingSize) override; void cancelTransfer() override; + bool writeActive() const override; + ReturnValue_t initialize() override; private: @@ -86,11 +89,14 @@ class PapbVcInterface : public VirtualChannelIF { /** High when external buffer memory of virtual channel is empty */ gpioId_t papbEmptyId = gpio::NO_GPIO; + std::vector packetBuf; std::string uioFile; int mapNum = 0; + bool writeActiveStatus = false; + size_t currentPacketIndex = 0; + size_t currentPacketSize = 0; mutable struct timespec nextDelay = {.tv_sec = 0, .tv_nsec = 0}; const struct timespec BETWEEN_POLL_DELAY = {.tv_sec = 0, .tv_nsec = 10}; - mutable struct timespec remDelay; volatile uint32_t* vcBaseReg = nullptr; @@ -126,12 +132,6 @@ class PapbVcInterface : public VirtualChannelIF { * the packet buffer of the virtual channel or not. */ bool isVcInterfaceBufferEmpty(); - - /** - * @brief This function sends a complete telemetry transfer frame data field (1105 bytes) - * to the papb interface of the PTME IP Core. Can be used to test the implementation. - */ - ReturnValue_t sendTestFrame(); }; #endif /* LINUX_OBC_PAPBVCINTERFACE_H_ */ diff --git a/linux/ipcore/Ptme.cpp b/linux/ipcore/Ptme.cpp index f33c8725..9b688d16 100644 --- a/linux/ipcore/Ptme.cpp +++ b/linux/ipcore/Ptme.cpp @@ -19,15 +19,12 @@ ReturnValue_t Ptme::initialize() { return returnvalue::OK; } -ReturnValue_t Ptme::writeToVc(uint8_t vcId, const uint8_t* data, size_t size) { - VcInterfaceMapIter vcInterfaceMapIter = vcInterfaceMap.find(vcId); - if (vcInterfaceMapIter == vcInterfaceMap.end()) { - sif::warning << "Ptme::writeToVc: No virtual channel interface found for the virtual " - "channel with id " - << static_cast(vcId) << std::endl; - return UNKNOWN_VC_ID; +bool Ptme::containsVc(uint8_t vcId) const { + auto channelIter = vcInterfaceMap.find(vcId); + if (channelIter == vcInterfaceMap.end()) { + return false; } - return vcInterfaceMapIter->second->write(data, size); + return true; } void Ptme::addVcInterface(VcId_t vcId, VirtualChannelIF* vc) { @@ -50,21 +47,10 @@ void Ptme::addVcInterface(VcId_t vcId, VirtualChannelIF* vc) { } } -bool Ptme::isBusy(uint8_t vcId) const { - const auto& vcInterfaceMapIter = vcInterfaceMap.find(vcId); - if (vcInterfaceMapIter == vcInterfaceMap.end()) { - sif::warning << "Ptme::writeToVc: No virtual channel interface found for the virtual " - "channel with id " - << static_cast(vcId) << std::endl; - return UNKNOWN_VC_ID; +VirtualChannelIF* Ptme::getVirtChannel(uint8_t vcId) { + auto channelIter = vcInterfaceMap.find(vcId); + if (channelIter == vcInterfaceMap.end()) { + return nullptr; } - return vcInterfaceMapIter->second->isBusy(); -} - -void Ptme::cancelTransfer(uint8_t vcId) { - VcInterfaceMapIter vcInterfaceMapIter = vcInterfaceMap.find(vcId); - if (vcInterfaceMapIter == vcInterfaceMap.end()) { - return; - } - return vcInterfaceMapIter->second->cancelTransfer(); + return channelIter->second; } diff --git a/linux/ipcore/Ptme.h b/linux/ipcore/Ptme.h index 2607fc90..d5e77024 100644 --- a/linux/ipcore/Ptme.h +++ b/linux/ipcore/Ptme.h @@ -34,9 +34,8 @@ class Ptme : public PtmeIF, public SystemObject { virtual ~Ptme(); ReturnValue_t initialize() override; - ReturnValue_t writeToVc(uint8_t vcId, const uint8_t* data, size_t size) override; - bool isBusy(uint8_t vcId) const override; - void cancelTransfer(uint8_t vcId) override; + bool containsVc(uint8_t vcId) const override; + VirtualChannelIF* getVirtChannel(uint8_t vcId) override; /** * @brief This function adds the reference to a virtual channel interface to the vcInterface diff --git a/linux/ipcore/PtmeIF.h b/linux/ipcore/PtmeIF.h index 38804484..a5ea0c95 100644 --- a/linux/ipcore/PtmeIF.h +++ b/linux/ipcore/PtmeIF.h @@ -1,6 +1,8 @@ #ifndef LINUX_OBC_PTMEIF_H_ #define LINUX_OBC_PTMEIF_H_ +#include + #include "fsfw/returnvalues/returnvalue.h" /** @@ -14,16 +16,8 @@ class PtmeIF { public: virtual ~PtmeIF(){}; - /** - * @brief Implements to function to write to a specific virtual channel. - * - * @param vcId Virtual channel to write to - * @param data Pointer to buffer holding the data to write - * @param size Number of bytes to write - */ - virtual ReturnValue_t writeToVc(uint8_t vcId, const uint8_t* data, size_t size) = 0; - virtual bool isBusy(uint8_t vcId) const = 0; - virtual void cancelTransfer(uint8_t vcId) = 0; + virtual bool containsVc(uint8_t vcId) const = 0; + virtual VirtualChannelIF* getVirtChannel(uint8_t vcId) = 0; }; #endif /* LINUX_OBC_PTMEIF_H_ */ diff --git a/mission/acs/SusHandler.cpp b/mission/acs/SusHandler.cpp index 4b9778e5..193bdb5c 100644 --- a/mission/acs/SusHandler.cpp +++ b/mission/acs/SusHandler.cpp @@ -97,7 +97,7 @@ ReturnValue_t SusHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8 // appear sometimes for the SUS device: Allow invalid message up to a certain threshold // before triggering FDIR reactions. if (reply->tempRaw == 0xfff and not waitingForRecovery) { - if (invalidMsgCounter == 0) { + if (invalidMsgCounter == 0 and invalidMsgPeriodCounter == 0) { triggerEvent(TEMPERATURE_ALL_ONES_START); } else if (invalidMsgCounter == susMax1227::MAX_INVALID_MSG_COUNT) { triggerEvent(DeviceHandlerIF::DEVICE_WANTS_HARD_REBOOT); @@ -110,8 +110,17 @@ ReturnValue_t SusHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8 return returnvalue::OK; } if (invalidMsgCounter > 0) { - triggerEvent(TEMPERATURE_ALL_ONES_RECOVERY, invalidMsgCounter); + invalidMsgPeriodCounter++; + if (invalidMsgCounter > invalidMsgCounterMax) { + invalidMsgCounterMax = invalidMsgCounter; + } invalidMsgCounter = 0; + invalidMsgCountdown.resetTimer(); + } + if (invalidMsgCountdown.hasTimedOut() and invalidMsgPeriodCounter > 0) { + triggerEvent(TEMPERATURE_ALL_ONES_RECOVERY, invalidMsgPeriodCounter, invalidMsgCounterMax); + invalidMsgPeriodCounter = 0; + invalidMsgCounterMax = 0; } dataset.setValidity(true, true); dataset.tempC = max1227::getTemperature(reply->tempRaw); diff --git a/mission/acs/SusHandler.h b/mission/acs/SusHandler.h index 88e2b163..43c49dcb 100644 --- a/mission/acs/SusHandler.h +++ b/mission/acs/SusHandler.h @@ -20,8 +20,9 @@ class SusHandler : public DeviceHandlerBase { //! [EXPORT] : [COMMENT] Detected invalid values, starting invalid message counting static constexpr Event TEMPERATURE_ALL_ONES_START = event::makeEvent(SUBSYSTEM_ID, 0, severity::MEDIUM); - //! [EXPORT] : [COMMENT] Detected valid values again, resetting invalid message counter. - //! P1: Invalid message counter. + //! [EXPORT] : [COMMENT] Detected valid values for a prolonged time again, resetting all counters. + //! P1: Number of periods with invalid messages. + //! P2: Maximum invalid message counter. static constexpr Event TEMPERATURE_ALL_ONES_RECOVERY = event::makeEvent(SUBSYSTEM_ID, 1, severity::INFO); @@ -54,8 +55,13 @@ class SusHandler : public DeviceHandlerBase { susMax1227::SusDataset dataset; acs::SusRequest request{}; uint8_t susIdx; + + // After 1 minute, trigger the event for the invalid messages. + Countdown invalidMsgCountdown = Countdown(60000); bool waitingForRecovery = true; uint32_t invalidMsgCounter = 0; + uint32_t invalidMsgCounterMax = 0; + uint32_t invalidMsgPeriodCounter = 0; uint32_t transitionDelay = 1000; bool goToNormalMode = false; diff --git a/mission/acs/str/StarTrackerHandler.cpp b/mission/acs/str/StarTrackerHandler.cpp index a6091d7c..541301f1 100644 --- a/mission/acs/str/StarTrackerHandler.cpp +++ b/mission/acs/str/StarTrackerHandler.cpp @@ -49,6 +49,13 @@ StarTrackerHandler::StarTrackerHandler(object_id_t objectId, object_id_t comIF, subscriptionSet(this), logSubscriptionSet(this), debugCameraSet(this), + autoBlobSet(this), + matchedCentroidsSet(this), + blobSet(this), + blobsSet(this), + centroidSet(this), + centroidsSet(this), + contrastSet(this), strHelper(strHelper), paramJsonFile(jsonFileStr), powerSwitch(powerSwitch) { @@ -59,6 +66,8 @@ StarTrackerHandler::StarTrackerHandler(object_id_t objectId, object_id_t comIF, sif::error << "StarTrackerHandler: Invalid str image loader" << std::endl; } eventQueue = QueueFactory::instance()->createMessageQueue(EventMessage::EVENT_MESSAGE_SIZE * 5); + additionalRequestedTm.emplace(startracker::REQ_TEMPERATURE); + currentSecondaryTmIter = additionalRequestedTm.begin(); } StarTrackerHandler::~StarTrackerHandler() {} @@ -165,6 +174,35 @@ ReturnValue_t StarTrackerHandler::executeAction(ActionId_t actionId, MessageQueu ReturnValue_t result = returnvalue::OK; switch (actionId) { + case (startracker::ADD_SECONDARY_TM_TO_NORMAL_MODE): { + if (size < 4) { + return HasActionsIF::INVALID_PARAMETERS; + } + DeviceCommandId_t idToAdd; + result = + SerializeAdapter::deSerialize(&idToAdd, data, &size, SerializeIF::Endianness::NETWORK); + if (result != returnvalue::OK) { + return result; + } + addSecondaryTmForNormalMode(idToAdd); + return EXECUTION_FINISHED; + } + case (startracker::RESET_SECONDARY_TM_SET): { + resetSecondaryTmSet(); + return EXECUTION_FINISHED; + } + case (startracker::READ_SECONDARY_TM_SET): { + std::vector dataVec(additionalRequestedTm.size() * 4); + unsigned idx = 0; + size_t serLen = 0; + for (const auto& cmd : additionalRequestedTm) { + SerializeAdapter::serialize(&cmd, dataVec.data() + idx * 4, &serLen, dataVec.size(), + SerializeIF::Endianness::NETWORK); + idx++; + } + actionHelper.reportData(commandedBy, actionId, dataVec.data(), dataVec.size()); + return EXECUTION_FINISHED; + } case (startracker::STOP_IMAGE_LOADER): { strHelper->stopProcess(); return EXECUTION_FINISHED; @@ -306,13 +344,20 @@ ReturnValue_t StarTrackerHandler::buildNormalDeviceCommand(DeviceCommandId_t* id return NOTHING_TO_SEND; } switch (normalState) { - case NormalState::TEMPERATURE_REQUEST: - *id = startracker::REQ_TEMPERATURE; + case NormalState::SECONDARY_REQUEST: + if (additionalRequestedTm.size() == 0) { + break; + } + *id = *currentSecondaryTmIter; + currentSecondaryTmIter++; + if (currentSecondaryTmIter == additionalRequestedTm.end()) { + currentSecondaryTmIter = additionalRequestedTm.begin(); + } normalState = NormalState::SOLUTION_REQUEST; break; case NormalState::SOLUTION_REQUEST: *id = startracker::REQ_SOLUTION; - normalState = NormalState::TEMPERATURE_REQUEST; + normalState = NormalState::SECONDARY_REQUEST; break; default: sif::debug << "StarTrackerHandler::buildNormalDeviceCommand: Invalid normal step" @@ -472,6 +517,18 @@ ReturnValue_t StarTrackerHandler::buildCommandFromCommand(DeviceCommandId_t devi prepareTimeRequest(); return returnvalue::OK; } + case (startracker::REQ_CENTROID): { + prepareRequestCentroidTm(); + return returnvalue::OK; + } + case (startracker::REQ_CENTROIDS): { + prepareRequestCentroidsTm(); + return returnvalue::OK; + } + case (startracker::REQ_CONTRAST): { + prepareRequestContrastTm(); + return returnvalue::OK; + } case (startracker::BOOT): { prepareBootCommand(); return returnvalue::OK; @@ -607,6 +664,22 @@ ReturnValue_t StarTrackerHandler::buildCommandFromCommand(DeviceCommandId_t devi result = prepareRequestLisaParams(); return result; } + case (startracker::REQ_MATCHED_CENTROIDS): { + result = prepareRequestMatchedCentroidsTm(); + return result; + } + case (startracker::REQ_BLOB): { + result = prepareRequestBlobTm(); + return result; + } + case (startracker::REQ_BLOBS): { + result = prepareRequestBlobsTm(); + return result; + } + case (startracker::REQ_AUTO_BLOB): { + result = prepareRequestAutoBlobTm(); + return returnvalue::OK; + } case (startracker::REQ_MATCHING): { result = prepareRequestMatchingParams(); return result; @@ -729,6 +802,20 @@ void StarTrackerHandler::fillCommandAndReplyMap() { startracker::MAX_FRAME_SIZE * 2 + 2); this->insertInCommandAndReplyMap(startracker::REQ_DEBUG_CAMERA, 3, &debugCameraSet, startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::REQ_AUTO_BLOB, 3, &autoBlobSet, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::REQ_MATCHED_CENTROIDS, 3, &matchedCentroidsSet, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::REQ_BLOB, 3, &blobSet, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::REQ_BLOBS, 3, &blobsSet, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::REQ_CENTROID, 3, ¢roidSet, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::REQ_CENTROIDS, 3, ¢roidsSet, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::REQ_CONTRAST, 3, &contrastSet, + startracker::MAX_FRAME_SIZE * 2 + 2); } ReturnValue_t StarTrackerHandler::isModeCombinationValid(Mode_t mode, Submode_t submode) { @@ -860,6 +947,74 @@ void StarTrackerHandler::setUpJsonCfgs(JsonConfigs& cfgs, const char* paramJsonF JCFG_DONE = true; } +ReturnValue_t StarTrackerHandler::statusFieldCheck(const uint8_t* rawFrame) { + uint8_t status = startracker::getStatusField(rawFrame); + if (status != startracker::STATUS_OK) { + sif::warning << "StarTrackerHandler::handleTm: Reply error: " + << static_cast(status) << std::endl; + return REPLY_ERROR; + } + return returnvalue::OK; +} + +void StarTrackerHandler::addSecondaryTmForNormalMode(DeviceCommandId_t cmd) { + additionalRequestedTm.emplace(cmd); +} + +void StarTrackerHandler::resetSecondaryTmSet() { + additionalRequestedTm.clear(); + additionalRequestedTm.emplace(startracker::REQ_TEMPERATURE); + currentSecondaryTmIter = additionalRequestedTm.begin(); + { + PoolReadGuard pg(&autoBlobSet); + if (pg.getReadResult() == returnvalue::OK) { + autoBlobSet.setValidity(false, true); + } + } + { + PoolReadGuard pg(&matchedCentroidsSet); + if (pg.getReadResult() == returnvalue::OK) { + matchedCentroidsSet.setValidity(false, true); + } + } + { + PoolReadGuard pg(&blobSet); + if (pg.getReadResult() == returnvalue::OK) { + blobSet.setValidity(false, true); + } + } + { + PoolReadGuard pg(&blobsSet); + if (pg.getReadResult() == returnvalue::OK) { + blobsSet.setValidity(false, true); + } + } + { + PoolReadGuard pg(¢roidSet); + if (pg.getReadResult() == returnvalue::OK) { + centroidSet.setValidity(false, true); + } + } + { + PoolReadGuard pg(&contrastSet); + if (pg.getReadResult() == returnvalue::OK) { + contrastSet.setValidity(false, true); + } + } + { + PoolReadGuard pg(¢roidsSet); + if (pg.getReadResult() == returnvalue::OK) { + centroidsSet.setValidity(false, true); + } + } + { + PoolReadGuard pg(&histogramSet); + if (pg.getReadResult() == returnvalue::OK) { + histogramSet.setValidity(false, true); + } + } +} + void StarTrackerHandler::bootBootloader() { if (internalState == InternalState::IDLE) { internalState = InternalState::BOOT_BOOTLOADER; @@ -896,24 +1051,24 @@ ReturnValue_t StarTrackerHandler::scanForReply(const uint8_t* start, size_t rema } case TMTC_ACTIONREPLY: { *foundLen = remainingSize; + fullPacketLen = remainingSize; return scanForActionReply(startracker::getId(start), foundId); - break; } case TMTC_SETPARAMREPLY: { *foundLen = remainingSize; + fullPacketLen = remainingSize; return scanForSetParameterReply(startracker::getId(start), foundId); - break; } case TMTC_PARAMREPLY: { *foundLen = remainingSize; + fullPacketLen = remainingSize; return scanForGetParameterReply(startracker::getId(start), foundId); - break; } case TMTC_TELEMETRYREPLYA: case TMTC_TELEMETRYREPLY: { *foundLen = remainingSize; + fullPacketLen = remainingSize; return scanForTmReply(startracker::getId(start), foundId); - break; } default: { sif::debug << "StarTrackerHandler::scanForReply: Reply has invalid type id" << std::endl; @@ -933,7 +1088,7 @@ ReturnValue_t StarTrackerHandler::interpretDeviceReply(DeviceCommandId_t id, break; } case (startracker::REQ_TIME): { - result = handleTm(packet, timeSet, startracker::TimeSet::SIZE, "REQ_TIME"); + result = handleTm(packet, timeSet, "REQ_TIME"); break; } case (startracker::PING_REQUEST): { @@ -948,7 +1103,7 @@ ReturnValue_t StarTrackerHandler::interpretDeviceReply(DeviceCommandId_t id, break; } case (startracker::REQ_VERSION): { - result = handleTm(packet, versionSet, startracker::VersionSet::SIZE, "REQ_VERSION"); + result = handleTm(packet, versionSet, "REQ_VERSION"); if (result != returnvalue::OK) { return result; } @@ -959,23 +1114,51 @@ ReturnValue_t StarTrackerHandler::interpretDeviceReply(DeviceCommandId_t id, break; } case (startracker::REQ_INTERFACE): { - result = handleTm(packet, interfaceSet, startracker::InterfaceSet::SIZE, "REQ_INTERFACE"); + result = handleTm(packet, interfaceSet, "REQ_INTERFACE"); break; } case (startracker::REQ_POWER): { - result = handleTm(packet, powerSet, startracker::PowerSet::SIZE, "REQ_POWER"); + result = handleTm(packet, powerSet, "REQ_POWER"); break; } case (startracker::REQ_SOLUTION): { - result = handleTm(packet, solutionSet, startracker::SolutionSet::SIZE, "REQ_SOLUTION"); + result = handleTm(packet, solutionSet, "REQ_SOLUTION"); + break; + } + case (startracker::REQ_CONTRAST): { + result = handleTm(packet, contrastSet, "REQ_CONTRAST"); + break; + } + case (startracker::REQ_AUTO_BLOB): { + result = handleAutoBlobTm(packet); + break; + } + case (startracker::REQ_MATCHED_CENTROIDS): { + result = handleMatchedCentroidTm(packet); + break; + } + case (startracker::REQ_BLOB): { + result = handleBlobTm(packet); + break; + } + case (startracker::REQ_BLOBS): { + result = handleBlobsTm(packet); + break; + } + case (startracker::REQ_CENTROID): { + result = handleCentroidTm(packet); + break; + } + case (startracker::REQ_CENTROIDS): { + result = handleCentroidsTm(packet); break; } case (startracker::REQ_TEMPERATURE): { - result = handleTm(packet, temperatureSet, startracker::TemperatureSet::SIZE, "REQ_TEMP"); + result = handleTm(packet, temperatureSet, "REQ_TEMP"); break; } case (startracker::REQ_HISTOGRAM): { - result = handleTm(packet, histogramSet, startracker::HistogramSet::SIZE, "REQ_HISTO"); + result = handleTm(packet, histogramSet, "REQ_HISTO"); break; } case (startracker::SUBSCRIPTION): @@ -1329,6 +1512,56 @@ ReturnValue_t StarTrackerHandler::initializeLocalDataPool(localpool::DataPool& l localDataPoolMap.emplace(startracker::CHKSUM, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::TICKS_AUTO_BLOB, new PoolEntry()); + localDataPoolMap.emplace(startracker::TIME_AUTO_BLOB, new PoolEntry()); + localDataPoolMap.emplace(startracker::AUTO_BLOB_THRESHOLD, new PoolEntry()); + + localDataPoolMap.emplace(startracker::PoolIds::NUM_MATCHED_CENTROIDS, new PoolEntry()); + localDataPoolMap.emplace(startracker::PoolIds::MATCHED_CENTROIDS_STAR_IDS, + new PoolEntry(16)); + localDataPoolMap.emplace(startracker::PoolIds::MATCHED_CENTROIDS_X_COORDS, + new PoolEntry(16)); + localDataPoolMap.emplace(startracker::PoolIds::MATCHED_CENTROIDS_Y_COORDS, + new PoolEntry(16)); + localDataPoolMap.emplace(startracker::PoolIds::MATCHED_CENTROIDS_X_ERRORS, + new PoolEntry(16)); + localDataPoolMap.emplace(startracker::PoolIds::MATCHED_CENTROIDS_Y_ERRORS, + new PoolEntry(16)); + localDataPoolMap.emplace(startracker::PoolIds::TICKS_MATCHED_CENTROIDS, + new PoolEntry()); + localDataPoolMap.emplace(startracker::PoolIds::TIME_MATCHED_CENTROIDS, new PoolEntry()); + + localDataPoolMap.emplace(startracker::PoolIds::BLOB_TICKS, new PoolEntry()); + localDataPoolMap.emplace(startracker::PoolIds::BLOB_TIME, new PoolEntry()); + localDataPoolMap.emplace(startracker::PoolIds::BLOB_COUNT, new PoolEntry()); + + localDataPoolMap.emplace(startracker::PoolIds::BLOBS_TICKS, new PoolEntry()); + localDataPoolMap.emplace(startracker::PoolIds::BLOBS_TIME, new PoolEntry()); + localDataPoolMap.emplace(startracker::PoolIds::BLOBS_COUNT, new PoolEntry()); + localDataPoolMap.emplace(startracker::PoolIds::BLOBS_COUNT_USED, new PoolEntry()); + localDataPoolMap.emplace(startracker::PoolIds::BLOBS_NR_4LINES_SKIPPED, + new PoolEntry()); + localDataPoolMap.emplace(startracker::PoolIds::BLOBS_X_COORDS, new PoolEntry(8)); + localDataPoolMap.emplace(startracker::PoolIds::BLOBS_Y_COORDS, new PoolEntry(8)); + + localDataPoolMap.emplace(startracker::PoolIds::CENTROID_TICKS, new PoolEntry()); + localDataPoolMap.emplace(startracker::PoolIds::CENTROID_TIME, new PoolEntry()); + localDataPoolMap.emplace(startracker::PoolIds::CENTROID_COUNT, new PoolEntry()); + + localDataPoolMap.emplace(startracker::PoolIds::CENTROIDS_TICKS, new PoolEntry()); + localDataPoolMap.emplace(startracker::PoolIds::CENTROIDS_TIME, new PoolEntry()); + localDataPoolMap.emplace(startracker::PoolIds::CENTROIDS_COUNT, new PoolEntry()); + localDataPoolMap.emplace(startracker::PoolIds::CENTROIDS_X_COORDS, new PoolEntry(16)); + localDataPoolMap.emplace(startracker::PoolIds::CENTROIDS_Y_COORDS, new PoolEntry(16)); + localDataPoolMap.emplace(startracker::PoolIds::CENTROIDS_MAGNITUDES, new PoolEntry(16)); + + localDataPoolMap.emplace(startracker::PoolIds::CONTRAST_TICKS, new PoolEntry()); + localDataPoolMap.emplace(startracker::PoolIds::CONTRAST_TIME, new PoolEntry()); + localDataPoolMap.emplace(startracker::PoolIds::CONTRAST_A, new PoolEntry(9)); + localDataPoolMap.emplace(startracker::PoolIds::CONTRAST_B, new PoolEntry(9)); + localDataPoolMap.emplace(startracker::PoolIds::CONTRAST_C, new PoolEntry(9)); + localDataPoolMap.emplace(startracker::PoolIds::CONTRAST_D, new PoolEntry(9)); + poolManager.subscribeForDiagPeriodicPacket( subdp::DiagnosticsHkPeriodicParams(temperatureSet.getSid(), false, 10.0)); poolManager.subscribeForRegularPeriodicPacket( @@ -1343,6 +1576,20 @@ ReturnValue_t StarTrackerHandler::initializeLocalDataPool(localpool::DataPool& l subdp::RegularHkPeriodicParams(histogramSet.getSid(), false, 10.0)); poolManager.subscribeForRegularPeriodicPacket( subdp::RegularHkPeriodicParams(lisaSet.getSid(), false, 10.0)); + poolManager.subscribeForRegularPeriodicPacket( + subdp::RegularHkPeriodicParams(autoBlobSet.getSid(), false, 10.0)); + poolManager.subscribeForRegularPeriodicPacket( + subdp::RegularHkPeriodicParams(matchedCentroidsSet.getSid(), false, 10.0)); + poolManager.subscribeForRegularPeriodicPacket( + subdp::RegularHkPeriodicParams(blobSet.getSid(), false, 10.0)); + poolManager.subscribeForRegularPeriodicPacket( + subdp::RegularHkPeriodicParams(blobsSet.getSid(), false, 10.0)); + poolManager.subscribeForRegularPeriodicPacket( + subdp::RegularHkPeriodicParams(centroidSet.getSid(), false, 10.0)); + poolManager.subscribeForRegularPeriodicPacket( + subdp::RegularHkPeriodicParams(centroidsSet.getSid(), false, 10.0)); + poolManager.subscribeForRegularPeriodicPacket( + subdp::RegularHkPeriodicParams(contrastSet.getSid(), false, 10.0)); return returnvalue::OK; } @@ -1584,8 +1831,36 @@ ReturnValue_t StarTrackerHandler::scanForTmReply(uint8_t replyId, DeviceCommandI *foundId = startracker::REQ_SOLUTION; break; } + case (startracker::ID::BLOB): { + *foundId = startracker::REQ_BLOB; + break; + } + case (startracker::ID::BLOBS): { + *foundId = startracker::REQ_BLOBS; + break; + } + case (startracker::ID::CENTROID): { + *foundId = startracker::REQ_CENTROID; + break; + } + case (startracker::ID::CENTROIDS): { + *foundId = startracker::REQ_CENTROIDS; + break; + } + case (startracker::ID::AUTO_BLOB): { + *foundId = startracker::REQ_AUTO_BLOB; + break; + } + case (startracker::ID::MATCHED_CENTROIDS): { + *foundId = startracker::REQ_MATCHED_CENTROIDS; + break; + } + case (startracker::ID::CONTRAST): { + *foundId = startracker::REQ_CONTRAST; + break; + } default: { - sif::debug << "StarTrackerHandler::scanForTmReply: Reply contains invalid reply id: " + sif::debug << "StarTrackerHandler::scanForTmReply: Reply contains invalid reply ID: " << static_cast(replyId) << std::endl; return returnvalue::FAILED; break; @@ -1760,6 +2035,62 @@ void StarTrackerHandler::prepareHistogramRequest() { rawPacketLen = length; } +ReturnValue_t StarTrackerHandler::prepareRequestAutoBlobTm() { + uint32_t length = 0; + arc_tm_pack_autoblob_req(commandBuffer, &length); + rawPacket = commandBuffer; + rawPacketLen = length; + return returnvalue::OK; +} + +ReturnValue_t StarTrackerHandler::prepareRequestMatchedCentroidsTm() { + uint32_t length = 0; + arc_tm_pack_matchedcentroids_req(commandBuffer, &length); + rawPacket = commandBuffer; + rawPacketLen = length; + return returnvalue::OK; +} + +ReturnValue_t StarTrackerHandler::prepareRequestBlobTm() { + uint32_t length = 0; + arc_tm_pack_blob_req(commandBuffer, &length); + rawPacket = commandBuffer; + rawPacketLen = length; + return returnvalue::OK; +} + +ReturnValue_t StarTrackerHandler::prepareRequestBlobsTm() { + uint32_t length = 0; + arc_tm_pack_blobs_req(commandBuffer, &length); + rawPacket = commandBuffer; + rawPacketLen = length; + return returnvalue::OK; +} + +ReturnValue_t StarTrackerHandler::prepareRequestCentroidTm() { + uint32_t length = 0; + arc_tm_pack_centroid_req(commandBuffer, &length); + rawPacket = commandBuffer; + rawPacketLen = length; + return returnvalue::OK; +} + +ReturnValue_t StarTrackerHandler::prepareRequestCentroidsTm() { + uint32_t length = 0; + arc_tm_pack_centroids_req(commandBuffer, &length); + rawPacket = commandBuffer; + rawPacketLen = length; + return returnvalue::OK; +} + +ReturnValue_t StarTrackerHandler::prepareRequestContrastTm() { + uint32_t length = 0; + arc_tm_pack_contrast_req(commandBuffer, &length); + rawPacket = commandBuffer; + rawPacketLen = length; + return returnvalue::OK; +} + ReturnValue_t StarTrackerHandler::prepareParamCommand(const uint8_t* commandData, size_t commandDataLen, ArcsecJsonParamBase& paramSet, @@ -2038,13 +2369,10 @@ ReturnValue_t StarTrackerHandler::checkProgram() { } ReturnValue_t StarTrackerHandler::handleTm(const uint8_t* rawFrame, LocalPoolDataSetBase& dataset, - size_t size, const char* context) { - ReturnValue_t result = returnvalue::OK; - uint8_t status = startracker::getStatusField(rawFrame); - if (status != startracker::STATUS_OK) { - sif::warning << "StarTrackerHandler::handleTm: Reply error: " - << static_cast(status) << std::endl; - return REPLY_ERROR; + const char* context) { + ReturnValue_t result = statusFieldCheck(rawFrame); + if (result != returnvalue::OK) { + return result; } result = dataset.read(TIMEOUT_TYPE, MUTEX_TIMEOUT); if (result != returnvalue::OK) { @@ -2052,10 +2380,11 @@ ReturnValue_t StarTrackerHandler::handleTm(const uint8_t* rawFrame, LocalPoolDat } const uint8_t* reply = rawFrame + TICKS_OFFSET; dataset.setValidityBufferGeneration(false); - result = dataset.deSerialize(&reply, &size, SerializeIF::Endianness::LITTLE); + size_t sizeLeft = fullPacketLen; + result = dataset.deSerialize(&reply, &sizeLeft, SerializeIF::Endianness::LITTLE); if (result != returnvalue::OK) { - sif::warning << "StarTrackerHandler::handleTm: Deserialization failed for " << context - << std::endl; + sif::warning << "StarTrackerHandler::handleTm: Deserialization failed for " << context << ": 0x" + << std::hex << std::setw(4) << result << std::dec << std::endl; } dataset.setValidityBufferGeneration(true); dataset.setValidity(true, true); @@ -2069,6 +2398,262 @@ ReturnValue_t StarTrackerHandler::handleTm(const uint8_t* rawFrame, LocalPoolDat return result; } +ReturnValue_t StarTrackerHandler::handleAutoBlobTm(const uint8_t* rawFrame) { + ReturnValue_t result = statusFieldCheck(rawFrame); + if (result != returnvalue::OK) { + return result; + } + rawFrame += TICKS_OFFSET; + size_t remainingLen = fullPacketLen; + PoolReadGuard pg(&autoBlobSet); + result = pg.getReadResult(); + if (result != returnvalue::OK) { + return result; + } + result = SerializeAdapter::deSerialize(&autoBlobSet.ticks, &rawFrame, &remainingLen, + SerializeIF::Endianness::LITTLE); + if (result != returnvalue::OK) { + return result; + } + result = SerializeAdapter::deSerialize(&autoBlobSet.timeUs, &rawFrame, &remainingLen, + SerializeIF::Endianness::LITTLE); + if (result != returnvalue::OK) { + return result; + } + result = SerializeAdapter::deSerialize(&autoBlobSet.threshold, &rawFrame, &remainingLen, + SerializeIF::Endianness::LITTLE); + if (result != returnvalue::OK) { + return result; + } + autoBlobSet.setValidity(true, true); + return returnvalue::OK; +} + +ReturnValue_t StarTrackerHandler::handleMatchedCentroidTm(const uint8_t* rawFrame) { + ReturnValue_t result = statusFieldCheck(rawFrame); + if (result != returnvalue::OK) { + return result; + } + rawFrame += TICKS_OFFSET; + size_t remainingLen = fullPacketLen; + PoolReadGuard pg(&matchedCentroidsSet); + result = pg.getReadResult(); + if (result != returnvalue::OK) { + return result; + } + result = SerializeAdapter::deSerialize(&matchedCentroidsSet.ticks, &rawFrame, &remainingLen, + SerializeIF::Endianness::LITTLE); + if (result != returnvalue::OK) { + return result; + } + result = SerializeAdapter::deSerialize(&matchedCentroidsSet.timeUs, &rawFrame, &remainingLen, + SerializeIF::Endianness::LITTLE); + if (result != returnvalue::OK) { + return result; + } + result = SerializeAdapter::deSerialize(&matchedCentroidsSet.numberOfMatchedCentroids, &rawFrame, + &remainingLen, SerializeIF::Endianness::LITTLE); + + if (result != returnvalue::OK) { + return result; + } + // Yeah, we serialize it like that because I can't model anything with that local datapool crap. + for (unsigned idx = 0; idx < 16; idx++) { + result = SerializeAdapter::deSerialize(&matchedCentroidsSet.starIds[idx], &rawFrame, + &remainingLen, SerializeIF::Endianness::LITTLE); + if (result != returnvalue::OK) { + return result; + } + result = SerializeAdapter::deSerialize(&matchedCentroidsSet.xCoords[idx], &rawFrame, + &remainingLen, SerializeIF::Endianness::LITTLE); + if (result != returnvalue::OK) { + return result; + } + result = SerializeAdapter::deSerialize(&matchedCentroidsSet.yCoords[idx], &rawFrame, + &remainingLen, SerializeIF::Endianness::LITTLE); + if (result != returnvalue::OK) { + return result; + } + result = SerializeAdapter::deSerialize(&matchedCentroidsSet.xErrors[idx], &rawFrame, + &remainingLen, SerializeIF::Endianness::LITTLE); + if (result != returnvalue::OK) { + return result; + } + result = SerializeAdapter::deSerialize(&matchedCentroidsSet.yErrors[idx], &rawFrame, + &remainingLen, SerializeIF::Endianness::LITTLE); + if (result != returnvalue::OK) { + return result; + } + } + matchedCentroidsSet.setValidity(true, true); + return returnvalue::OK; +} + +ReturnValue_t StarTrackerHandler::handleBlobTm(const uint8_t* rawFrame) { + ReturnValue_t result = statusFieldCheck(rawFrame); + if (result != returnvalue::OK) { + return result; + } + rawFrame += TICKS_OFFSET; + size_t remainingLen = fullPacketLen; + PoolReadGuard pg(&blobsSet); + result = pg.getReadResult(); + if (result != returnvalue::OK) { + return result; + } + result = SerializeAdapter::deSerialize(&blobSet.ticks, &rawFrame, &remainingLen, + SerializeIF::Endianness::LITTLE); + if (result != returnvalue::OK) { + return result; + } + result = SerializeAdapter::deSerialize(&blobSet.timeUs, &rawFrame, &remainingLen, + SerializeIF::Endianness::LITTLE); + if (result != returnvalue::OK) { + return result; + } + result = SerializeAdapter::deSerialize(&blobSet.blobCount, &rawFrame, &remainingLen, + SerializeIF::Endianness::LITTLE); + if (result != returnvalue::OK) { + return result; + } + blobSet.setValidity(true, true); + return returnvalue::OK; +} + +ReturnValue_t StarTrackerHandler::handleBlobsTm(const uint8_t* rawFrame) { + ReturnValue_t result = statusFieldCheck(rawFrame); + if (result != returnvalue::OK) { + return result; + } + rawFrame += TICKS_OFFSET; + size_t remainingLen = fullPacketLen; + PoolReadGuard pg(&blobsSet); + result = pg.getReadResult(); + if (result != returnvalue::OK) { + return result; + } + result = SerializeAdapter::deSerialize(&blobsSet.ticks, &rawFrame, &remainingLen, + SerializeIF::Endianness::LITTLE); + if (result != returnvalue::OK) { + return result; + } + result = SerializeAdapter::deSerialize(&blobsSet.timeUs, &rawFrame, &remainingLen, + SerializeIF::Endianness::LITTLE); + if (result != returnvalue::OK) { + return result; + } + result = SerializeAdapter::deSerialize(&blobsSet.blobsCount, &rawFrame, &remainingLen, + SerializeIF::Endianness::LITTLE); + if (result != returnvalue::OK) { + return result; + } + result = SerializeAdapter::deSerialize(&blobsSet.blobsCountUsed, &rawFrame, &remainingLen, + SerializeIF::Endianness::LITTLE); + if (result != returnvalue::OK) { + return result; + } + result = SerializeAdapter::deSerialize(&blobsSet.nr4LinesSkipped, &rawFrame, &remainingLen, + SerializeIF::Endianness::LITTLE); + if (result != returnvalue::OK) { + return result; + } + for (unsigned idx = 0; idx < 8; idx++) { + result = SerializeAdapter::deSerialize(&blobsSet.xCoords[idx], &rawFrame, &remainingLen, + SerializeIF::Endianness::LITTLE); + if (result != returnvalue::OK) { + return result; + } + result = SerializeAdapter::deSerialize(&blobsSet.yCoords[idx], &rawFrame, &remainingLen, + SerializeIF::Endianness::LITTLE); + if (result != returnvalue::OK) { + return result; + } + } + blobsSet.setValidity(true, true); + return returnvalue::OK; +} + +ReturnValue_t StarTrackerHandler::handleCentroidTm(const uint8_t* rawFrame) { + ReturnValue_t result = statusFieldCheck(rawFrame); + if (result != returnvalue::OK) { + return result; + } + rawFrame += TICKS_OFFSET; + size_t remainingLen = fullPacketLen; + PoolReadGuard pg(¢roidsSet); + result = pg.getReadResult(); + if (result != returnvalue::OK) { + return result; + } + + result = SerializeAdapter::deSerialize(¢roidSet.ticks, &rawFrame, &remainingLen, + SerializeIF::Endianness::LITTLE); + if (result != returnvalue::OK) { + return result; + } + result = SerializeAdapter::deSerialize(¢roidSet.timeUs, &rawFrame, &remainingLen, + SerializeIF::Endianness::LITTLE); + if (result != returnvalue::OK) { + return result; + } + result = SerializeAdapter::deSerialize(¢roidSet.centroidCount, &rawFrame, &remainingLen, + SerializeIF::Endianness::LITTLE); + if (result != returnvalue::OK) { + return result; + } + centroidSet.setValidity(true, true); + return returnvalue::OK; +} + +ReturnValue_t StarTrackerHandler::handleCentroidsTm(const uint8_t* rawFrame) { + ReturnValue_t result = statusFieldCheck(rawFrame); + if (result != returnvalue::OK) { + return result; + } + rawFrame += TICKS_OFFSET; + size_t remainingLen = fullPacketLen; + PoolReadGuard pg(¢roidsSet); + result = pg.getReadResult(); + if (result != returnvalue::OK) { + return result; + } + + result = SerializeAdapter::deSerialize(¢roidsSet.ticksCentroidsTm, &rawFrame, &remainingLen, + SerializeIF::Endianness::LITTLE); + if (result != returnvalue::OK) { + return result; + } + result = SerializeAdapter::deSerialize(¢roidsSet.timeUsCentroidsTm, &rawFrame, &remainingLen, + SerializeIF::Endianness::LITTLE); + if (result != returnvalue::OK) { + return result; + } + result = SerializeAdapter::deSerialize(¢roidsSet.centroidsCount, &rawFrame, &remainingLen, + SerializeIF::Endianness::LITTLE); + if (result != returnvalue::OK) { + return result; + } + for (unsigned idx = 0; idx < 16; idx++) { + result = SerializeAdapter::deSerialize(¢roidsSet.centroidsXCoords[idx], &rawFrame, + &remainingLen, SerializeIF::Endianness::LITTLE); + if (result != returnvalue::OK) { + return result; + } + result = SerializeAdapter::deSerialize(¢roidsSet.centroidsYCoords[idx], &rawFrame, + &remainingLen, SerializeIF::Endianness::LITTLE); + if (result != returnvalue::OK) { + return result; + } + result = SerializeAdapter::deSerialize(¢roidsSet.centroidsMagnitudes[idx], &rawFrame, + &remainingLen, SerializeIF::Endianness::LITTLE); + if (result != returnvalue::OK) { + return result; + } + } + centroidsSet.setValidity(true, true); + return returnvalue::OK; +} + ReturnValue_t StarTrackerHandler::handleActionReplySet(const uint8_t* rawFrame, LocalPoolDataSetBase& dataset, size_t size) { ReturnValue_t result = returnvalue::OK; @@ -2204,10 +2789,17 @@ ReturnValue_t StarTrackerHandler::checkCommand(ActionId_t actionId) { case startracker::REQ_SUBSCRIPTION: case startracker::REQ_LOG_SUBSCRIPTION: case startracker::REQ_DEBUG_CAMERA: + case startracker::REQ_MATCHED_CENTROIDS: + case startracker::REQ_BLOB: + case startracker::REQ_BLOBS: + case startracker::REQ_CENTROID: + case startracker::REQ_CENTROIDS: + case startracker::REQ_CONTRAST: { if (getMode() == MODE_ON and getSubmode() != startracker::Program::FIRMWARE) { return STARTRACKER_NOT_RUNNING_FIRMWARE; } break; + } case startracker::FIRMWARE_UPDATE: case startracker::FLASH_READ: if (getMode() != MODE_ON or getSubmode() != startracker::Program::BOOTLOADER) { diff --git a/mission/acs/str/StarTrackerHandler.h b/mission/acs/str/StarTrackerHandler.h index 1e790695..3bfdc8fd 100644 --- a/mission/acs/str/StarTrackerHandler.h +++ b/mission/acs/str/StarTrackerHandler.h @@ -8,6 +8,7 @@ #include #include +#include #include #include "OBSWConfig.h" @@ -151,6 +152,7 @@ class StarTrackerHandler : public DeviceHandlerBase { static const uint8_t PARAMS_OFFSET = 2; static const uint8_t TICKS_OFFSET = 3; static const uint8_t TIME_OFFSET = 7; + static const uint8_t TM_PARAM_OFFSET = 15; static const uint8_t PARAMETER_ID_OFFSET = 1; static const uint8_t ACTION_ID_OFFSET = 1; static const uint8_t ACTION_DATA_OFFSET = 3; @@ -204,6 +206,13 @@ class StarTrackerHandler : public DeviceHandlerBase { startracker::SubscriptionSet subscriptionSet; startracker::LogSubscriptionSet logSubscriptionSet; startracker::DebugCameraSet debugCameraSet; + startracker::AutoBlobSet autoBlobSet; + startracker::MatchedCentroidsSet matchedCentroidsSet; + startracker::BlobSet blobSet; + startracker::BlobsSet blobsSet; + startracker::CentroidSet centroidSet; + startracker::CentroidsSet centroidsSet; + startracker::ContrastSet contrastSet; // Pointer to object responsible for uploading and downloading images to/from the star tracker StrComHandler* strHelper = nullptr; @@ -239,9 +248,9 @@ class StarTrackerHandler : public DeviceHandlerBase { std::string paramJsonFile; - enum class NormalState { TEMPERATURE_REQUEST, SOLUTION_REQUEST }; + enum class NormalState { SECONDARY_REQUEST, SOLUTION_REQUEST }; - NormalState normalState = NormalState::TEMPERATURE_REQUEST; + NormalState normalState = NormalState::SECONDARY_REQUEST; enum class StartupState { IDLE, @@ -297,6 +306,11 @@ class StarTrackerHandler : public DeviceHandlerBase { const power::Switch_t powerSwitch = power::NO_SWITCH; + size_t fullPacketLen = 0; + + std::set additionalRequestedTm{}; + std::set::iterator currentSecondaryTmIter; + /** * @brief Handles internal state */ @@ -345,6 +359,18 @@ class StarTrackerHandler : public DeviceHandlerBase { */ ReturnValue_t executeFlashReadCommand(const uint8_t* commandData, size_t commandDataLen); + /** + * Add a TM request to the list of telemetry which will be polled in the secondary step of + * the device communication. + * @param cmd + */ + void addSecondaryTmForNormalMode(DeviceCommandId_t cmd); + + /** + * Reset the secondary set, which will only contain a TEMPERATURE set request after the reset. + */ + void resetSecondaryTmSet(); + /** * @brief Fills command buffer with data to boot image (works only when star tracker is * in bootloader mode). @@ -429,6 +455,13 @@ class StarTrackerHandler : public DeviceHandlerBase { ReturnValue_t prepareRequestCentroidingParams(); ReturnValue_t prepareRequestLisaParams(); ReturnValue_t prepareRequestMatchingParams(); + ReturnValue_t prepareRequestAutoBlobTm(); + ReturnValue_t prepareRequestMatchedCentroidsTm(); + ReturnValue_t prepareRequestBlobTm(); + ReturnValue_t prepareRequestBlobsTm(); + ReturnValue_t prepareRequestCentroidTm(); + ReturnValue_t prepareRequestCentroidsTm(); + ReturnValue_t prepareRequestContrastTm(); ReturnValue_t prepareRequestTrackingParams(); ReturnValue_t prepareRequestValidationParams(); ReturnValue_t prepareRequestAlgoParams(); @@ -477,6 +510,7 @@ class StarTrackerHandler : public DeviceHandlerBase { */ void handleStartup(uint8_t tmType, uint8_t parameterId); + ReturnValue_t statusFieldCheck(const uint8_t* rawFrame); /** * @brief Handles telemtry replies and fills the appropriate dataset * @@ -485,9 +519,16 @@ class StarTrackerHandler : public DeviceHandlerBase { * * @return returnvalue::OK if successful, otherwise error return value */ - ReturnValue_t handleTm(const uint8_t* rawFrame, LocalPoolDataSetBase& dataset, size_t size, + ReturnValue_t handleTm(const uint8_t* rawFrame, LocalPoolDataSetBase& dataset, const char* context); + ReturnValue_t handleAutoBlobTm(const uint8_t* rawFrame); + ReturnValue_t handleMatchedCentroidTm(const uint8_t* rawFrame); + ReturnValue_t handleBlobTm(const uint8_t* rawFrame); + ReturnValue_t handleBlobsTm(const uint8_t* rawFrame); + ReturnValue_t handleCentroidTm(const uint8_t* rawFrame); + ReturnValue_t handleCentroidsTm(const uint8_t* rawFrame); + /** * @brief Checks if star tracker is in valid mode for executing the received command. * diff --git a/mission/acs/str/strHelpers.h b/mission/acs/str/strHelpers.h index c6336186..808d6060 100644 --- a/mission/acs/str/strHelpers.h +++ b/mission/acs/str/strHelpers.h @@ -272,7 +272,50 @@ enum PoolIds : lp_id_t { LOG_SUBSCRIPTION_LEVEL2, LOG_SUBSCRIPTION_MODULE2, DEBUG_CAMERA_TIMING, - DEBUG_CAMERA_TEST + DEBUG_CAMERA_TEST, + + TICKS_AUTO_BLOB, + TIME_AUTO_BLOB, + AUTO_BLOB_THRESHOLD, + + TICKS_MATCHED_CENTROIDS, + TIME_MATCHED_CENTROIDS, + NUM_MATCHED_CENTROIDS, + MATCHED_CENTROIDS_STAR_IDS, + MATCHED_CENTROIDS_X_COORDS, + MATCHED_CENTROIDS_Y_COORDS, + MATCHED_CENTROIDS_X_ERRORS, + MATCHED_CENTROIDS_Y_ERRORS, + + BLOB_TICKS, + BLOB_TIME, + BLOB_COUNT, + + BLOBS_TICKS, + BLOBS_TIME, + BLOBS_COUNT, + BLOBS_COUNT_USED, + BLOBS_NR_4LINES_SKIPPED, + BLOBS_X_COORDS, + BLOBS_Y_COORDS, + + CENTROID_TICKS, + CENTROID_TIME, + CENTROID_COUNT, + + CENTROIDS_TICKS, + CENTROIDS_TIME, + CENTROIDS_COUNT, + CENTROIDS_X_COORDS, + CENTROIDS_Y_COORDS, + CENTROIDS_MAGNITUDES, + + CONTRAST_TICKS, + CONTRAST_TIME, + CONTRAST_A, + CONTRAST_B, + CONTRAST_C, + CONTRAST_D, }; static const DeviceCommandId_t PING_REQUEST = 0; @@ -291,6 +334,7 @@ static const DeviceCommandId_t IMAGE_PROCESSOR = 19; static const DeviceCommandId_t REQ_SOLUTION = 24; static const DeviceCommandId_t REQ_TEMPERATURE = 25; static const DeviceCommandId_t REQ_HISTOGRAM = 28; +static constexpr DeviceCommandId_t REQ_CONTRAST = 29; static const DeviceCommandId_t LIMITS = 40; static const DeviceCommandId_t MOUNTING = 41; static const DeviceCommandId_t CAMERA = 42; @@ -328,6 +372,15 @@ static const DeviceCommandId_t DISABLE_TIMESTAMP_GENERATION = 85; static const DeviceCommandId_t ENABLE_TIMESTAMP_GENERATION = 86; static constexpr DeviceCommandId_t SET_TIME_FROM_SYS_TIME = 87; static constexpr DeviceCommandId_t AUTO_THRESHOLD = 88; +static constexpr DeviceCommandId_t REQ_AUTO_BLOB = 89; +static constexpr DeviceCommandId_t REQ_MATCHED_CENTROIDS = 90; +static constexpr DeviceCommandId_t REQ_BLOB = 91; +static constexpr DeviceCommandId_t REQ_BLOBS = 92; +static constexpr DeviceCommandId_t REQ_CENTROID = 93; +static constexpr DeviceCommandId_t REQ_CENTROIDS = 94; +static constexpr DeviceCommandId_t ADD_SECONDARY_TM_TO_NORMAL_MODE = 95; +static constexpr DeviceCommandId_t RESET_SECONDARY_TM_SET = 96; +static constexpr DeviceCommandId_t READ_SECONDARY_TM_SET = 97; static const DeviceCommandId_t NONE = 0xFFFFFFFF; static const uint32_t VERSION_SET_ID = REQ_VERSION; @@ -352,6 +405,13 @@ static const uint32_t ALGO_SET_ID = REQ_ALGO; static const uint32_t SUBSCRIPTION_SET_ID = REQ_SUBSCRIPTION; static const uint32_t LOG_SUBSCRIPTION_SET_ID = REQ_LOG_SUBSCRIPTION; static const uint32_t DEBUG_CAMERA_SET_ID = REQ_DEBUG_CAMERA; +static const uint32_t AUTO_BLOB_SET_ID = REQ_AUTO_BLOB; +static const uint32_t MATCHED_CENTROIDS_SET_ID = REQ_MATCHED_CENTROIDS; +static const uint32_t BLOB_SET_ID = REQ_BLOB; +static const uint32_t BLOBS_SET_ID = REQ_BLOBS; +static const uint32_t CENTROID_SET_ID = REQ_CENTROID; +static const uint32_t CENTROIDS_SET_ID = REQ_CENTROIDS; +static const uint32_t CONTRAST_SET_ID = REQ_CONTRAST; /** Max size of unencoded frame */ static const size_t MAX_FRAME_SIZE = 1200; @@ -412,6 +472,12 @@ static const uint8_t LOG_LEVEL = 3; static const uint8_t LOG_SUBSCRIPTION = 19; static const uint8_t DEBUG_CAMERA = 20; static const uint8_t AUTO_THRESHOLD = 23; +static constexpr uint8_t BLOB = 25; +static constexpr uint8_t BLOBS = 36; +static constexpr uint8_t CENTROID = 26; +static constexpr uint8_t CENTROIDS = 37; +static constexpr uint8_t AUTO_BLOB = 39; +static constexpr uint8_t MATCHED_CENTROIDS = 40; } // namespace ID namespace Program { @@ -474,8 +540,6 @@ static const uint32_t FLASH_REGION_SIZE = 0x20000; */ class TemperatureSet : public StaticLocalDataSet { public: - static const size_t SIZE = 24; - TemperatureSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, TEMPERATURE_SET_ID) {} TemperatureSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, TEMPERATURE_SET_ID)) {} @@ -505,8 +569,6 @@ class TemperatureSet : public StaticLocalDataSet { */ class VersionSet : public StaticLocalDataSet { public: - static const size_t SIZE = 15; - VersionSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, VERSION_SET_ID) {} VersionSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, VERSION_SET_ID)) {} @@ -536,8 +598,6 @@ class VersionSet : public StaticLocalDataSet { */ class InterfaceSet : public StaticLocalDataSet { public: - static const size_t SIZE = 20; - InterfaceSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, REQ_INTERFACE) {} InterfaceSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, REQ_INTERFACE)) {} @@ -565,8 +625,6 @@ class InterfaceSet : public StaticLocalDataSet { */ class PowerSet : public StaticLocalDataSet { public: - static const size_t SIZE = 76; - PowerSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, REQ_INTERFACE) {} PowerSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, REQ_INTERFACE)) {} @@ -630,8 +688,6 @@ class PowerSet : public StaticLocalDataSet { */ class TimeSet : public StaticLocalDataSet { public: - static const size_t SIZE = 24; - TimeSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, TIME_SET_ID) {} TimeSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, TIME_SET_ID)) {} @@ -658,15 +714,13 @@ class TimeSet : public StaticLocalDataSet { */ class SolutionSet : public StaticLocalDataSet { public: - static const size_t SIZE = 79; - SolutionSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, SOLUTION_SET_ID) {} SolutionSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, SOLUTION_SET_ID)) {} // Ticks timestamp lp_var_t ticks = lp_var_t(sid.objectId, PoolIds::TICKS_SOLUTION_SET, this); - /// Unix time stamp + // Unix time stamp lp_var_t timeUs = lp_var_t(sid.objectId, PoolIds::TIME_SOLUTION_SET, this); // Calibrated quaternion (takes into account the mounting quaternion), typically same as // track q values @@ -1381,6 +1435,123 @@ class ValidationSet : public StaticLocalDataSet { } }; +class AutoBlobSet : public StaticLocalDataSet<3> { + public: + AutoBlobSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, AUTO_BLOB_SET_ID) {} + // Ticks timestamp + lp_var_t ticks = lp_var_t(sid.objectId, PoolIds::TICKS_AUTO_BLOB, this); + // Unix time stamp + lp_var_t timeUs = lp_var_t(sid.objectId, PoolIds::TIME_AUTO_BLOB, this); + lp_var_t threshold = lp_var_t(sid.objectId, PoolIds::AUTO_BLOB_THRESHOLD, this); + + private: +}; + +class MatchedCentroidsSet : public StaticLocalDataSet<20> { + public: + MatchedCentroidsSet(HasLocalDataPoolIF* owner) + : StaticLocalDataSet(owner, MATCHED_CENTROIDS_SET_ID) {} + MatchedCentroidsSet(object_id_t objectId) + : StaticLocalDataSet(sid_t(objectId, MATCHED_CENTROIDS_SET_ID)) {} + // Ticks timestamp + lp_var_t ticks = + lp_var_t(sid.objectId, PoolIds::TICKS_MATCHED_CENTROIDS, this); + // Unix time stamp + lp_var_t timeUs = + lp_var_t(sid.objectId, PoolIds::TIME_MATCHED_CENTROIDS, this); + lp_var_t numberOfMatchedCentroids = + lp_var_t(sid.objectId, PoolIds::NUM_MATCHED_CENTROIDS, this); + lp_vec_t starIds = + lp_vec_t(sid.objectId, PoolIds::MATCHED_CENTROIDS_STAR_IDS, this); + lp_vec_t xCoords = + lp_vec_t(sid.objectId, PoolIds::MATCHED_CENTROIDS_X_COORDS, this); + lp_vec_t yCoords = + lp_vec_t(sid.objectId, PoolIds::MATCHED_CENTROIDS_Y_COORDS, this); + lp_vec_t xErrors = + lp_vec_t(sid.objectId, PoolIds::MATCHED_CENTROIDS_X_ERRORS, this); + lp_vec_t yErrors = + lp_vec_t(sid.objectId, PoolIds::MATCHED_CENTROIDS_Y_ERRORS, this); + + private: +}; + +class BlobSet : public StaticLocalDataSet<5> { + public: + BlobSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, BLOB_SET_ID) {} + // The blob count received from the Blob Telemetry Set (ID 25) + // Ticks timestamp + lp_var_t ticks = lp_var_t(sid.objectId, PoolIds::BLOB_TICKS, this); + // Unix time stamp + lp_var_t timeUs = lp_var_t(sid.objectId, PoolIds::BLOB_TIME, this); + lp_var_t blobCount = lp_var_t(sid.objectId, PoolIds::BLOB_COUNT, this); +}; + +class BlobsSet : public StaticLocalDataSet<10> { + public: + BlobsSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, BLOBS_SET_ID) {} + // Ticks timestamp + lp_var_t ticks = lp_var_t(sid.objectId, PoolIds::BLOBS_TICKS, this); + // Unix time stamp + lp_var_t timeUs = lp_var_t(sid.objectId, PoolIds::BLOBS_TIME, this); + lp_var_t blobsCount = lp_var_t(sid.objectId, PoolIds::BLOBS_COUNT, this); + lp_var_t blobsCountUsed = + lp_var_t(sid.objectId, PoolIds::BLOBS_COUNT_USED, this); + lp_var_t nr4LinesSkipped = + lp_var_t(sid.objectId, PoolIds::BLOBS_NR_4LINES_SKIPPED, this); + lp_vec_t xCoords = + lp_vec_t(sid.objectId, PoolIds::BLOBS_X_COORDS, this); + lp_vec_t yCoords = + lp_vec_t(sid.objectId, PoolIds::BLOBS_Y_COORDS, this); +}; + +class CentroidSet : public StaticLocalDataSet<5> { + public: + CentroidSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, CENTROID_SET_ID) {} + + // Data received from the Centroid Telemetry Set (ID 26) + // Ticks timestamp + lp_var_t ticks = lp_var_t(sid.objectId, PoolIds::CENTROID_TICKS, this); + // Unix time stamp + lp_var_t timeUs = lp_var_t(sid.objectId, PoolIds::CENTROID_TIME, this); + // The centroid count received from the Centroid Telemetry Set (ID 26) + lp_var_t centroidCount = + lp_var_t(sid.objectId, PoolIds::CENTROID_COUNT, this); +}; + +class CentroidsSet : public StaticLocalDataSet<10> { + public: + CentroidsSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, CENTROIDS_SET_ID) {} + + // Data received from the Centroids Telemetry Set (ID 37) + lp_var_t ticksCentroidsTm = + lp_var_t(sid.objectId, PoolIds::CENTROIDS_TICKS, this); + // Unix time stamp + lp_var_t timeUsCentroidsTm = + lp_var_t(sid.objectId, PoolIds::CENTROIDS_TIME, this); + lp_var_t centroidsCount = + lp_var_t(sid.objectId, PoolIds::CENTROIDS_COUNT, this); + lp_vec_t centroidsXCoords = + lp_vec_t(sid.objectId, PoolIds::CENTROIDS_X_COORDS, this); + lp_vec_t centroidsYCoords = + lp_vec_t(sid.objectId, PoolIds::CENTROIDS_Y_COORDS, this); + lp_vec_t centroidsMagnitudes = + lp_vec_t(sid.objectId, PoolIds::CENTROIDS_MAGNITUDES, this); +}; + +class ContrastSet : public StaticLocalDataSet<8> { + public: + ContrastSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, CONTRAST_SET_ID) {} + + // Data received from the Centroids Telemetry Set (ID 29) + lp_var_t ticks = lp_var_t(sid.objectId, PoolIds::CONTRAST_TICKS, this); + // Unix time stamp + lp_var_t timeUs = lp_var_t(sid.objectId, PoolIds::CONTRAST_TIME, this); + lp_vec_t contrastA = lp_vec_t(sid.objectId, PoolIds::CONTRAST_A, this); + lp_vec_t contrastB = lp_vec_t(sid.objectId, PoolIds::CONTRAST_B, this); + lp_vec_t contrastC = lp_vec_t(sid.objectId, PoolIds::CONTRAST_C, this); + lp_vec_t contrastD = lp_vec_t(sid.objectId, PoolIds::CONTRAST_D, this); +}; + /** * @brief Will store the requested algo parameters */ diff --git a/mission/cfdp/CMakeLists.txt b/mission/cfdp/CMakeLists.txt index 71d62ce8..418b66eb 100644 --- a/mission/cfdp/CMakeLists.txt +++ b/mission/cfdp/CMakeLists.txt @@ -1 +1 @@ -target_sources(${LIB_EIVE_MISSION} PRIVATE CfdpHandler.cpp) +target_sources(${LIB_EIVE_MISSION} PRIVATE CfdpHandler.cpp CfdpUser.cpp) diff --git a/mission/cfdp/CfdpFaultHandler.h b/mission/cfdp/CfdpFaultHandler.h new file mode 100644 index 00000000..09ba0847 --- /dev/null +++ b/mission/cfdp/CfdpFaultHandler.h @@ -0,0 +1,38 @@ +#ifndef MISSION_CFDP_CFDPFAULTHANDLER_H_ +#define MISSION_CFDP_CFDPFAULTHANDLER_H_ + +#include "defs.h" +#include "fsfw/cfdp.h" + +namespace cfdp { + +class EiveFaultHandler : public cfdp::FaultHandlerBase, public SystemObject { + public: + EiveFaultHandler(object_id_t objectId) : SystemObject(objectId) {} + + void noticeOfSuspensionCb(cfdp::TransactionId& id, cfdp::ConditionCode code) override { + sif::warning << "Notice of suspension detected for transaction " << id + << " with condition code: " << cfdp::getConditionCodeString(code) << std::endl; + triggerEvent(cfdp::FAULT_HANDLER_TRIGGERED, FaultHandlerCode::NOTICE_OF_SUSPENSION, code); + } + void noticeOfCancellationCb(cfdp::TransactionId& id, cfdp::ConditionCode code) override { + sif::warning << "Notice of suspension detected for transaction " << id + << " with condition code: " << cfdp::getConditionCodeString(code) << std::endl; + triggerEvent(cfdp::FAULT_HANDLER_TRIGGERED, FaultHandlerCode::NOTICE_OF_CANCELLATION, code); + } + void abandonCb(cfdp::TransactionId& id, cfdp::ConditionCode code) override { + sif::warning << "Transaction " << id + << " was abandoned, condition code : " << cfdp::getConditionCodeString(code) + << std::endl; + triggerEvent(cfdp::FAULT_HANDLER_TRIGGERED, FaultHandlerCode::ABANDON_TRANSACTION, code); + } + void ignoreCb(cfdp::TransactionId& id, cfdp::ConditionCode code) override { + sif::warning << "Fault ignored for transaction " << id + << ", condition code: " << cfdp::getConditionCodeString(code) << std::endl; + triggerEvent(cfdp::FAULT_HANDLER_TRIGGERED, FaultHandlerCode::IGNORE_ERROR, code); + } +}; + +} // namespace cfdp + +#endif /* MISSION_CFDP_CFDPFAULTHANDLER_H_ */ diff --git a/mission/cfdp/CfdpHandler.cpp b/mission/cfdp/CfdpHandler.cpp index fa35535c..bb98b946 100644 --- a/mission/cfdp/CfdpHandler.cpp +++ b/mission/cfdp/CfdpHandler.cpp @@ -1,25 +1,36 @@ #include "CfdpHandler.h" +#include +#include + +#include "eive/definitions.h" #include "fsfw/cfdp/pdu/AckPduReader.h" #include "fsfw/cfdp/pdu/PduHeaderReader.h" #include "fsfw/globalfunctions/arrayprinter.h" #include "fsfw/ipc/QueueFactory.h" +#include "fsfw/tasks/TaskFactory.h" #include "fsfw/tmtcservices/TmTcMessage.h" +#include "mission/sysDefs.h" using namespace returnvalue; using namespace cfdp; -CfdpHandler::CfdpHandler(const FsfwHandlerParams& fsfwParams, const CfdpHandlerCfg& cfdpCfg) - : SystemObject(fsfwParams.objectId), - msgQueue(fsfwParams.msgQueue), - destHandler( - DestHandlerParams(LocalEntityCfg(cfdpCfg.id, cfdpCfg.indicCfg, cfdpCfg.faultHandler), - cfdpCfg.userHandler, cfdpCfg.remoteCfgProvider, cfdpCfg.packetInfoList, - cfdpCfg.lostSegmentsList), - FsfwParams(fsfwParams.packetDest, nullptr, this, fsfwParams.tcStore, - fsfwParams.tmStore)) { - destHandler.setMsgQueue(msgQueue); -} +CfdpHandler::CfdpHandler(const FsfwHandlerParams& fsfwHandlerParams, const CfdpHandlerCfg& cfdpCfg, + const std::atomic_bool& throttleSignal) + : SystemObject(fsfwHandlerParams.objectId), + pduQueue(fsfwHandlerParams.tmtcQueue), + cfdpRequestQueue(fsfwHandlerParams.cfdpQueue), + localCfg(cfdpCfg.id, cfdpCfg.indicCfg, cfdpCfg.faultHandler), + remoteCfgProvider(cfdpCfg.remoteCfgProvider), + fsfwParams(fsfwHandlerParams.packetDest, &fsfwHandlerParams.tmtcQueue, this, + fsfwHandlerParams.tcStore, fsfwHandlerParams.tmStore), + destHandler(DestHandlerParams(localCfg, cfdpCfg.userHandler, cfdpCfg.remoteCfgProvider, + cfdpCfg.packetInfoList, cfdpCfg.lostSegmentsList), + this->fsfwParams), + srcHandler(SourceHandlerParams(localCfg, cfdpCfg.userHandler, seqCntProvider), + this->fsfwParams), + ipcStore(fsfwHandlerParams.ipcStore), + throttleSignal(throttleSignal) {} [[nodiscard]] const char* CfdpHandler::getName() const { return "CFDP Handler"; } @@ -27,7 +38,7 @@ CfdpHandler::CfdpHandler(const FsfwHandlerParams& fsfwParams, const CfdpHandlerC return destHandler.getDestHandlerParams().cfg.localId.getValue(); } -[[nodiscard]] MessageQueueId_t CfdpHandler::getRequestQueue() const { return msgQueue.getId(); } +[[nodiscard]] MessageQueueId_t CfdpHandler::getRequestQueue() const { return pduQueue.getId(); } ReturnValue_t CfdpHandler::initialize() { ReturnValue_t result = destHandler.initialize(); @@ -40,29 +51,63 @@ ReturnValue_t CfdpHandler::initialize() { return SystemObject::initialize(); } -ReturnValue_t CfdpHandler::performOperation(uint8_t operationCode) { - // TODO: Receive TC packets and route them to source and dest handler, depending on which is - // correct or more appropriate - ReturnValue_t status; - ReturnValue_t result = OK; - TmTcMessage tmtcMsg; - for (status = msgQueue.receiveMessage(&tmtcMsg); status == returnvalue::OK; - status = msgQueue.receiveMessage(&tmtcMsg)) { - result = handleCfdpPacket(tmtcMsg); +[[noreturn]] ReturnValue_t CfdpHandler::performOperation(uint8_t operationCode) { + while (true) { + bool shortDelay = false; + ReturnValue_t result = handlePduPacketMessages(); if (result != OK) { - status = result; } + result = handleCfdpMessages(); + if (result != OK) { + } + uint32_t fsmCount = 1; + const DestHandler::FsmResult& destResult = destHandler.stateMachine(); + while (destResult.callStatus == CallStatus::CALL_AGAIN) { + if (fsmCount == config::CFDP_MAX_FSM_CALL_COUNT_DEST_HANDLER) { + shortDelay = true; + break; + } + destHandler.stateMachine(); + fsmCount++; + } + fsmCount = 1; + + throttlePeriodOngoing = throttleSignal; + + // CFDP can be throttled by the slowest live TM handler to handle back pressure in a sensible + // way without requiring huge amounts of memory for large files. + if (!throttlePeriodOngoing) { + const SourceHandler::FsmResult& srcResult = srcHandler.stateMachine(); + if (srcResult.packetsSent > 0) { + signals::CFDP_MSG_COUNTER.fetch_add(srcResult.packetsSent, std::memory_order_relaxed); + } + while (srcResult.callStatus == CallStatus::CALL_AGAIN) { + // Limit number of messages. + if (fsmCount == config::CFDP_MAX_FSM_CALL_COUNT_SRC_HANDLER) { + shortDelay = true; + break; + } + srcHandler.stateMachine(); + if (srcResult.packetsSent > 0) { + signals::CFDP_MSG_COUNTER.fetch_add(srcResult.packetsSent, std::memory_order_relaxed); + } + if (srcResult.result == cfdp::TM_STORE_FULL) { + sif::warning << "CFDP Source Handler: TM store is full" << std::endl; + } else if (srcResult.result == cfdp::TARGET_MSG_QUEUE_FULL) { + sif::warning << "CFDP Source Handler: TM queue is full" << std::endl; + } + fsmCount++; + } + } + if (shortDelay) { + TaskFactory::delayTask(config::CFDP_SHORT_DELAY_MS); + continue; + } + TaskFactory::delayTask(config::CFDP_REGULAR_DELAY_MS); } - auto& fsmRes = destHandler.performStateMachine(); - // TODO: Error handling? - while (fsmRes.callStatus == CallStatus::CALL_AGAIN) { - destHandler.performStateMachine(); - // TODO: Error handling? - } - return status; } -ReturnValue_t CfdpHandler::handleCfdpPacket(TmTcMessage& msg) { +ReturnValue_t CfdpHandler::handlePduPacket(TmTcMessage& msg) { auto accessorPair = tcStore->getData(msg.getStorageId()); if (accessorPair.first != OK) { return accessorPair.first; @@ -102,16 +147,19 @@ ReturnValue_t CfdpHandler::handleCfdpPacket(TmTcMessage& msg) { auto passToDestHandler = [&]() { accessorPair.second.release(); PacketInfo info(type, msg.getStorageId(), directive); - result = destHandler.passPacket(info); + return destHandler.passPacket(info); }; auto passToSourceHandler = [&]() { - + accessorPair.second.release(); + PacketInfo info(type, msg.getStorageId(), directive); + // Implement this function. + // result = srcHandler.passPacket(info); }; if (directive == FileDirective::METADATA or directive == FileDirective::EOF_DIRECTIVE or directive == FileDirective::PROMPT) { // Section b) of 4.5.3: These PDUs should always be targeted towards the file receiver a.k.a. // the destination handler - passToDestHandler(); + return passToDestHandler(); } else if (directive == FileDirective::FINISH or directive == FileDirective::NAK or directive == FileDirective::KEEP_ALIVE) { // Section c) of 4.5.3: These PDUs should always be targeted towards the file sender a.k.a. @@ -128,9 +176,78 @@ ReturnValue_t CfdpHandler::handleCfdpPacket(TmTcMessage& msg) { if (ackedDirective == FileDirective::EOF_DIRECTIVE) { passToSourceHandler(); } else if (ackedDirective == FileDirective::FINISH) { - passToDestHandler(); + return passToDestHandler(); } } } return result; } + +ReturnValue_t CfdpHandler::handleCfdpRequest(CommandMessage& msg) { + if (msg.getCommand() == CfdpMessage::PUT_REQUEST) { + sif::info << "Received CFDP put request" << std::endl; + if (srcHandler.getState() != CfdpState::IDLE) { + if (putRequestQueue.full()) { + // TODO: Trigger event and discard request. Queue is full, too many requests. + return FAILED; + } + putRequestQueue.push(CfdpMessage::getStoreId(&msg)); + } else { + PutRequest putRequest; + auto accessorPair = ipcStore.getData(CfdpMessage::getStoreId(&msg)); + const uint8_t* dataPtr = accessorPair.second.data(); + size_t dataSize = accessorPair.second.size(); + ReturnValue_t result = + putRequest.deSerialize(&dataPtr, &dataSize, SerializeIF::Endianness::MACHINE); + if (result != OK) { + return result; + } + RemoteEntityCfg* remoteCfg; + remoteCfgProvider.getRemoteCfg(putRequest.getDestId(), &remoteCfg); + if (remoteCfg == nullptr) { + sif::error << "CfdpHandler: No remote configuration found for destination ID " + << putRequest.getDestId() << std::endl; + // TODO: Trigger event + return FAILED; + } + sif::info << "Starting file copy operation for source file " + << putRequest.getSourceName().getString() << " and dest file " + << putRequest.getDestName().getString() << std::endl; + return srcHandler.transactionStart(putRequest, *remoteCfg); + } + } + return OK; +} + +ReturnValue_t CfdpHandler::handlePduPacketMessages() { + ReturnValue_t status; + ReturnValue_t result = OK; + TmTcMessage pduMsg; + for (status = pduQueue.receiveMessage(&pduMsg); status == returnvalue::OK; + status = pduQueue.receiveMessage(&pduMsg)) { + result = handlePduPacket(pduMsg); + if (result != OK) { + // TODO: Maybe add printout with context specific information? + status = result; + } + } + return status; +} + +ReturnValue_t CfdpHandler::handleCfdpMessages() { + ReturnValue_t status; + ReturnValue_t result; + CommandMessage cfdpMsg; + for (status = cfdpRequestQueue.receiveMessage(&cfdpMsg); status == returnvalue::OK; + status = cfdpRequestQueue.receiveMessage(&cfdpMsg)) { + result = handleCfdpRequest(cfdpMsg); + if (result != OK) { + sif::warning << "Handling CFDP request failed with code 0x" << std::setw(4) << std::hex + << result << std::dec << std::endl; + triggerEvent(cfdp::events::HANDLING_CFDP_REQUEST_FAILED, 0, result); + // TODO: Maybe add printout with context specific information? + status = result; + } + } + return status; +} diff --git a/mission/cfdp/CfdpHandler.h b/mission/cfdp/CfdpHandler.h index 2de9f7dd..b2f49678 100644 --- a/mission/cfdp/CfdpHandler.h +++ b/mission/cfdp/CfdpHandler.h @@ -1,6 +1,11 @@ #ifndef FSFW_EXAMPLE_HOSTED_CFDPHANDLER_H #define FSFW_EXAMPLE_HOSTED_CFDPHANDLER_H +#include +#include +#include +#include + #include #include "fsfw/cfdp/handler/DestHandler.h" @@ -8,22 +13,29 @@ #include "fsfw/tasks/ExecutableObjectIF.h" #include "fsfw/tmtcservices/AcceptsTelecommandsIF.h" #include "fsfw/tmtcservices/TmTcMessage.h" +#include "fsfw/util/SeqCountProvider.h" struct FsfwHandlerParams { FsfwHandlerParams(object_id_t objectId, HasFileSystemIF& vfs, AcceptsTelemetryIF& packetDest, - StorageManagerIF& tcStore, StorageManagerIF& tmStore, MessageQueueIF& msgQueue) + StorageManagerIF& tcStore, StorageManagerIF& tmStore, + StorageManagerIF& ipcStore, MessageQueueIF& tmtcQueue, + MessageQueueIF& cfdpQueue) : objectId(objectId), vfs(vfs), packetDest(packetDest), tcStore(tcStore), tmStore(tmStore), - msgQueue(msgQueue) {} + ipcStore(ipcStore), + tmtcQueue(tmtcQueue), + cfdpQueue(cfdpQueue) {} object_id_t objectId{}; HasFileSystemIF& vfs; AcceptsTelemetryIF& packetDest; StorageManagerIF& tcStore; StorageManagerIF& tmStore; - MessageQueueIF& msgQueue; + StorageManagerIF& ipcStore; + MessageQueueIF& tmtcQueue; + MessageQueueIF& cfdpQueue; }; struct CfdpHandlerCfg { @@ -50,22 +62,39 @@ struct CfdpHandlerCfg { class CfdpHandler : public SystemObject, public ExecutableObjectIF, public AcceptsTelecommandsIF { public: - explicit CfdpHandler(const FsfwHandlerParams& fsfwParams, const CfdpHandlerCfg& cfdpCfg); + explicit CfdpHandler(const FsfwHandlerParams& fsfwParams, const CfdpHandlerCfg& cfdpCfg, + const std::atomic_bool& throttleSignal); [[nodiscard]] const char* getName() const override; [[nodiscard]] uint32_t getIdentifier() const override; [[nodiscard]] MessageQueueId_t getRequestQueue() const override; ReturnValue_t initialize() override; - ReturnValue_t performOperation(uint8_t operationCode) override; + [[noreturn]] ReturnValue_t performOperation(uint8_t operationCode) override; private: - MessageQueueIF& msgQueue; + MessageQueueIF& pduQueue; + MessageQueueIF& cfdpRequestQueue; + bool throttlePeriodOngoing = false; + + cfdp::LocalEntityCfg localCfg; + cfdp::RemoteConfigTableIF& remoteCfgProvider; + cfdp::FsfwParams fsfwParams; + SeqCountProviderU16 seqCntProvider; cfdp::DestHandler destHandler; + cfdp::SourceHandler srcHandler; + etl::queue putRequestQueue; + + StorageManagerIF& ipcStore; StorageManagerIF* tcStore = nullptr; StorageManagerIF* tmStore = nullptr; - ReturnValue_t handleCfdpPacket(TmTcMessage& msg); + const std::atomic_bool& throttleSignal; + + ReturnValue_t handlePduPacketMessages(); + ReturnValue_t handlePduPacket(TmTcMessage& msg); + ReturnValue_t handleCfdpRequest(CommandMessage& msg); + ReturnValue_t handleCfdpMessages(); }; #endif // FSFW_EXAMPLE_HOSTED_CFDPHANDLER_H diff --git a/mission/cfdp/CfdpUser.cpp b/mission/cfdp/CfdpUser.cpp new file mode 100644 index 00000000..c2e6024d --- /dev/null +++ b/mission/cfdp/CfdpUser.cpp @@ -0,0 +1,51 @@ +#include "CfdpUser.h" + +#include + +using namespace returnvalue; + +namespace cfdp { + +EiveUserHandler::EiveUserHandler(HasFileSystemIF& vfs, StorageManagerIF& ipcStore, + MessageQueueId_t cfdpRequestId) + : cfdp::UserBase(vfs), userQueue(QueueFactory::instance()->createMessageQueue(10)) { + if (userQueue == nullptr) { + sif::error << "EiveUserHandler: Queue creation failed" << std::endl; + return; + } + userQueue->setDefaultDestination(cfdpRequestId); + reservedMsgParser = new ReservedMessageParser(ipcStore, *userQueue, cfdpRequestId); +} + +EiveUserHandler::~EiveUserHandler() { QueueFactory::instance()->deleteMessageQueue(userQueue); } + +void EiveUserHandler::transactionIndication(const cfdp::TransactionId& id) {} +void EiveUserHandler::eofSentIndication(const cfdp::TransactionId& id) {} +void EiveUserHandler::transactionFinishedIndication(const cfdp::TransactionFinishedParams& params) { + sif::info << "File transaction finished for transaction with " << params.id << std::endl; +} +void EiveUserHandler::metadataRecvdIndication(const cfdp::MetadataRecvdParams& params) { + sif::info << "Metadata received for transaction with " << params.id << std::endl; + if (params.numberOfMsgsToUser > 0 and params.msgsToUserArray != nullptr) { + ReturnValue_t result = + reservedMsgParser->parse(params.msgsToUserArray, params.numberOfMsgsToUser); + if (result != OK) { + sif::warning << "EiveUserHandler: Parsing reserved CFDP messages failed" << std::endl; + } + } +} +void EiveUserHandler::fileSegmentRecvdIndication(const cfdp::FileSegmentRecvdParams& params) {} +void EiveUserHandler::reportIndication(const cfdp::TransactionId& id, + cfdp::StatusReportIF& report) {} +void EiveUserHandler::suspendedIndication(const cfdp::TransactionId& id, cfdp::ConditionCode code) { +} +void EiveUserHandler::resumedIndication(const cfdp::TransactionId& id, size_t progress) {} +void EiveUserHandler::faultIndication(const cfdp::TransactionId& id, cfdp::ConditionCode code, + size_t progress) {} +void EiveUserHandler::abandonedIndication(const cfdp::TransactionId& id, cfdp::ConditionCode code, + size_t progress) {} +void EiveUserHandler::eofRecvIndication(const cfdp::TransactionId& id) { + sif::info << "EOF PDU received for transaction with " << id << std::endl; +} + +} // namespace cfdp diff --git a/mission/cfdp/CfdpUser.h b/mission/cfdp/CfdpUser.h new file mode 100644 index 00000000..ba981cf1 --- /dev/null +++ b/mission/cfdp/CfdpUser.h @@ -0,0 +1,37 @@ +#ifndef MISSION_CFDP_CFDPUSER_H_ +#define MISSION_CFDP_CFDPUSER_H_ + +#include +#include + +namespace cfdp { + +class EiveUserHandler : public cfdp::UserBase { + public: + explicit EiveUserHandler(HasFileSystemIF& vfs, StorageManagerIF& ipcStore, + MessageQueueId_t cfdpRequestId); + + virtual ~EiveUserHandler(); + + void transactionIndication(const cfdp::TransactionId& id) override; + void eofSentIndication(const cfdp::TransactionId& id) override; + void transactionFinishedIndication(const cfdp::TransactionFinishedParams& params) override; + void metadataRecvdIndication(const cfdp::MetadataRecvdParams& params) override; + void fileSegmentRecvdIndication(const cfdp::FileSegmentRecvdParams& params) override; + void reportIndication(const cfdp::TransactionId& id, cfdp::StatusReportIF& report) override; + void suspendedIndication(const cfdp::TransactionId& id, cfdp::ConditionCode code); + void resumedIndication(const cfdp::TransactionId& id, size_t progress) override; + void faultIndication(const cfdp::TransactionId& id, cfdp::ConditionCode code, + size_t progress) override; + void abandonedIndication(const cfdp::TransactionId& id, cfdp::ConditionCode code, + size_t progress) override; + void eofRecvIndication(const cfdp::TransactionId& id) override; + + private: + MessageQueueIF* userQueue; + ReservedMessageParser* reservedMsgParser; +}; + +} // namespace cfdp + +#endif /* MISSION_CFDP_CFDPUSER_H_ */ diff --git a/mission/cfdp/Config.h b/mission/cfdp/Config.h deleted file mode 100644 index 45f84155..00000000 --- a/mission/cfdp/Config.h +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef MISSION_CFDP_CONFIG_H_ -#define MISSION_CFDP_CONFIG_H_ - -#include "fsfw/cfdp.h" - -namespace cfdp { - -class EiveUserHandler : public cfdp::UserBase { - public: - explicit EiveUserHandler(HasFileSystemIF& vfs) : cfdp::UserBase(vfs) {} - virtual ~EiveUserHandler() = default; - - void transactionIndication(const cfdp::TransactionId& id) override {} - void eofSentIndication(const cfdp::TransactionId& id) override {} - void transactionFinishedIndication(const cfdp::TransactionFinishedParams& params) override { - sif::info << "File transaction finished for transaction with " << params.id << std::endl; - } - void metadataRecvdIndication(const cfdp::MetadataRecvdParams& params) override { - sif::info << "Metadata received for transaction with " << params.id << std::endl; - } - void fileSegmentRecvdIndication(const cfdp::FileSegmentRecvdParams& params) override {} - void reportIndication(const cfdp::TransactionId& id, cfdp::StatusReportIF& report) override {} - void suspendedIndication(const cfdp::TransactionId& id, cfdp::ConditionCode code) override {} - void resumedIndication(const cfdp::TransactionId& id, size_t progress) override {} - void faultIndication(const cfdp::TransactionId& id, cfdp::ConditionCode code, - size_t progress) override {} - void abandonedIndication(const cfdp::TransactionId& id, cfdp::ConditionCode code, - size_t progress) override {} - void eofRecvIndication(const cfdp::TransactionId& id) override { - sif::info << "EOF PDU received for transaction with " << id << std::endl; - } -}; - -class EiveFaultHandler : public cfdp::FaultHandlerBase { - public: - void noticeOfSuspensionCb(cfdp::TransactionId& id, cfdp::ConditionCode code) override { - sif::warning << "Notice of suspension detected for transaction " << id - << " with condition code: " << cfdp::getConditionCodeString(code) << std::endl; - } - void noticeOfCancellationCb(cfdp::TransactionId& id, cfdp::ConditionCode code) override { - sif::warning << "Notice of suspension detected for transaction " << id - << " with condition code: " << cfdp::getConditionCodeString(code) << std::endl; - } - void abandonCb(cfdp::TransactionId& id, cfdp::ConditionCode code) override { - sif::warning << "Transaction " << id - << " was abandoned, condition code : " << cfdp::getConditionCodeString(code) - << std::endl; - } - void ignoreCb(cfdp::TransactionId& id, cfdp::ConditionCode code) override { - sif::warning << "Fault ignored for transaction " << id - << ", condition code: " << cfdp::getConditionCodeString(code) << std::endl; - } -}; - -} // namespace cfdp - -#endif /* MISSION_CFDP_CONFIG_H_ */ diff --git a/mission/cfdp/defs.h b/mission/cfdp/defs.h new file mode 100644 index 00000000..249bec04 --- /dev/null +++ b/mission/cfdp/defs.h @@ -0,0 +1,16 @@ +#ifndef MISSION_CFDP_DEFS_H_ +#define MISSION_CFDP_DEFS_H_ + +#include "eive/eventSubsystemIds.h" +#include "fsfw/events/Event.h" + +namespace cfdp { + +static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::CFDP_APP; + +//! [EXPORT] : [COMMENT] P1: CFDP fault handler code. P2: CFDP condition code. +static constexpr Event FAULT_HANDLER_TRIGGERED = event::makeEvent(SUBSYSTEM_ID, 0, severity::LOW); + +} // namespace cfdp + +#endif /* MISSION_CFDP_DEFS_H_ */ diff --git a/mission/com/LiveTmTask.cpp b/mission/com/LiveTmTask.cpp index 39648c15..56fe5a51 100644 --- a/mission/com/LiveTmTask.cpp +++ b/mission/com/LiveTmTask.cpp @@ -5,8 +5,15 @@ #include #include +#include "mission/sysDefs.h" + +static constexpr bool DEBUG_TM_QUEUE_SPEED = false; +std::atomic_bool signals::CFDP_CHANNEL_THROTTLE_SIGNAL = false; +std::atomic_uint32_t signals::CFDP_MSG_COUNTER = 0; + LiveTmTask::LiveTmTask(object_id_t objectId, PusTmFunnel& pusFunnel, CfdpTmFunnel& cfdpFunnel, - VirtualChannelWithQueue& channel, const std::atomic_bool& ptmeLocked) + VirtualChannel& channel, const std::atomic_bool& ptmeLocked, + uint32_t regularTmQueueDepth, uint32_t cfdpQueueDepth) : SystemObject(objectId), modeHelper(this), pusFunnel(pusFunnel), @@ -14,17 +21,47 @@ LiveTmTask::LiveTmTask(object_id_t objectId, PusTmFunnel& pusFunnel, CfdpTmFunne channel(channel), ptmeLocked(ptmeLocked) { requestQueue = QueueFactory::instance()->createMessageQueue(); + cfdpTmQueue = QueueFactory::instance()->createMessageQueue(cfdpQueueDepth); + regularTmQueue = QueueFactory::instance()->createMessageQueue(regularTmQueueDepth); } ReturnValue_t LiveTmTask::performOperation(uint8_t opCode) { readCommandQueue(); + bool handledTm; + ReturnValue_t result; + uint32_t consecutiveRegularCounter = 0; + uint32_t consecutiveCfdpCounter = 0; + bool isCfdp = false; while (true) { - // The funnel tasks are scheduled here directly as well. - ReturnValue_t result = channel.handleNextTm(!ptmeLocked); - if (result == DirectTmSinkIF::IS_BUSY) { - sif::error << "Lost live TM, PAPB busy" << std::endl; + isCfdp = false; + // TODO: Must read CFDP TM queue and regular TM queue and forward them. Handle regular queue + // first. + handledTm = false; + updateBusyFlag(); + if (!channelIsBusy) { + result = handleRegularTmQueue(); + if (result == MessageQueueIF::EMPTY) { + result = handleCfdpTmQueue(); + isCfdp = true; + } + if (result == returnvalue::OK) { + handledTm = true; + if (DEBUG_TM_QUEUE_SPEED) { + if (isCfdp) { + consecutiveCfdpCounter++; + } else { + consecutiveRegularCounter++; + } + } + } else if (result != MessageQueueIF::EMPTY) { + sif::warning << "LiveTmTask: TM queue failure, returncode 0x" << std::hex << std::setw(4) + << result << std::dec << std::endl; + } } - if (result == MessageQueueIF::EMPTY) { + + cfdpBackpressureHandling(); + + if (!handledTm) { if (tmFunnelCd.hasTimedOut()) { pusFunnel.performOperation(0); cfdpFunnel.performOperation(0); @@ -32,10 +69,19 @@ ReturnValue_t LiveTmTask::performOperation(uint8_t opCode) { } // Read command queue during idle times. readCommandQueue(); + if (DEBUG_TM_QUEUE_SPEED) { + if (consecutiveCfdpCounter > 0) { + sif::debug << "Consecutive CFDP TM handled: " << consecutiveCfdpCounter << std::endl; + } + if (consecutiveRegularCounter > 0) { + sif::debug << "Consecutive regular TM handled: " << consecutiveRegularCounter + << std::endl; + } + consecutiveRegularCounter = 0; + consecutiveCfdpCounter = 0; + } // 40 ms IDLE delay. Might tweak this in the future. TaskFactory::delayTask(40); - } else { - packetCounter++; } } } @@ -94,9 +140,103 @@ void LiveTmTask::readCommandQueue(void) { } } +ReturnValue_t LiveTmTask::handleRegularTmQueue() { + return handleGenericTmQueue(*regularTmQueue, false); +} + +ReturnValue_t LiveTmTask::handleCfdpTmQueue() { return handleGenericTmQueue(*cfdpTmQueue, true); } + +ReturnValue_t LiveTmTask::handleGenericTmQueue(MessageQueueIF& queue, bool isCfdp) { + TmTcMessage message; + ReturnValue_t result = queue.receiveMessage(&message); + if (result == MessageQueueIF::EMPTY) { + return result; + } + if (isCfdp and signals::CFDP_MSG_COUNTER > 0) { + signals::CFDP_MSG_COUNTER--; + } + if (DEBUG_CFDP_TO_LIVE_TM_TASK and signals::CFDP_MSG_COUNTER > 0) { + sif::debug << "LiveTmTask: CFDP message counter: " << signals::CFDP_MSG_COUNTER << std::endl; + } + store_address_t storeId = message.getStorageId(); + const uint8_t* data = nullptr; + size_t size = 0; + result = tmStore->getData(storeId, &data, &size); + if (result != returnvalue::OK) { + sif::warning << "VirtualChannel::performOperation: Failed to read data from TM store" + << std::endl; + tmStore->deleteData(storeId); + return result; + } + + if (!ptmeLocked) { + size_t writtenSize = 0; + result = channel.write(data, size, writtenSize); + if (result == DirectTmSinkIF::PARTIALLY_WRITTEN) { + result = channel.handleWriteCompletionSynchronously(writtenSize, 200); + if (result != returnvalue::OK) { + // TODO: Event? Might lead to dangerous spam though.. + sif::warning << "LiveTmTask: Synchronous write of last segment failed with code 0x" + << std::setw(4) << std::hex << result << std::dec << std::endl; + } + } else if (result != returnvalue::OK) { + sif::error << "LiveTmTask: Channel write failed with code 0x" << std::hex << std::setw(4) + << result << std::dec << std::endl; + } + } + // Try delete in any case, ignore failures (which should not happen), it is more important to + // propagate write errors. + tmStore->deleteData(storeId); + return result; +} + +void LiveTmTask::throttleCfdp() { + throttlePeriodOngoing = true; + signals::CFDP_CHANNEL_THROTTLE_SIGNAL = true; + if (DEBUG_CFDP_TO_LIVE_TM_TASK) { + sif::debug << "Throttling CFDP" << std::endl; + } +} + +void LiveTmTask::releaseCfdp() { + throttlePeriodOngoing = false; + signals::CFDP_CHANNEL_THROTTLE_SIGNAL = false; + if (DEBUG_CFDP_TO_LIVE_TM_TASK) { + sif::debug << "Releasing CFDP" << std::endl; + } +} + +void LiveTmTask::updateBusyFlag() { + // We cache this as a member, because the busy bit can toggle very quickly.. + channelIsBusy = channel.isBusy(); +} + +void LiveTmTask::cfdpBackpressureHandling() { + if (channelIsBusy and !throttlePeriodOngoing) { + // Throttle CFDP packet creator. It is by far the most relevant data creator, so throttling + // it is the easiest way to handle back pressure for now in a sensible way. + if (signals::CFDP_MSG_COUNTER >= (config::LIVE_CHANNEL_CFDP_QUEUE_SIZE / 2)) { + throttleCfdp(); + } + } else if (!channelIsBusy and throttlePeriodOngoing) { + // Half full/empty flow control: Release the CFDP is the queue is empty enough. + if (signals::CFDP_MSG_COUNTER <= (config::LIVE_CHANNEL_CFDP_QUEUE_SIZE / 4)) { + releaseCfdp(); + } + } +} + ModeTreeChildIF& LiveTmTask::getModeTreeChildIF() { return *this; } ReturnValue_t LiveTmTask::initialize() { modeHelper.initialize(); + tmStore = ObjectManager::instance()->get(objects::TM_STORE); + if (tmStore == nullptr) { + return ObjectManagerIF::CHILD_INIT_FAILED; + } return returnvalue::OK; } + +MessageQueueId_t LiveTmTask::getNormalLiveQueueId() const { return regularTmQueue->getId(); } + +MessageQueueId_t LiveTmTask::getCfdpLiveQueueId() const { return cfdpTmQueue->getId(); } diff --git a/mission/com/LiveTmTask.h b/mission/com/LiveTmTask.h index c203f1de..48bbb9f9 100644 --- a/mission/com/LiveTmTask.h +++ b/mission/com/LiveTmTask.h @@ -11,6 +11,12 @@ #include #include +#include + +#include "eive/definitions.h" + +static constexpr bool DEBUG_CFDP_TO_LIVE_TM_TASK = false; + class LiveTmTask : public SystemObject, public HasModesIF, public ExecutableObjectIF, @@ -18,35 +24,51 @@ class LiveTmTask : public SystemObject, public ModeTreeConnectionIF { public: LiveTmTask(object_id_t objectId, PusTmFunnel& pusFunnel, CfdpTmFunnel& cfdpFunnel, - VirtualChannelWithQueue& channel, const std::atomic_bool& ptmeLocked); + VirtualChannel& channel, const std::atomic_bool& ptmeLocked, + uint32_t regularTmQueueDepth, uint32_t cfdpQueueDepth); + MessageQueueId_t getNormalLiveQueueId() const; + MessageQueueId_t getCfdpLiveQueueId() const; ReturnValue_t performOperation(uint8_t opCode) override; ReturnValue_t initialize() override; ReturnValue_t connectModeTreeParent(HasModeTreeChildrenIF& parent) override; private: MessageQueueIF* requestQueue; + MessageQueueIF* cfdpTmQueue; + MessageQueueIF* regularTmQueue; + StorageManagerIF* tmStore = nullptr; ModeHelper modeHelper; Mode_t mode = HasModesIF::MODE_OFF; Countdown tmFunnelCd = Countdown(100); PusTmFunnel& pusFunnel; CfdpTmFunnel& cfdpFunnel; - VirtualChannelWithQueue& channel; - uint32_t packetCounter = 0; + VirtualChannel& channel; const std::atomic_bool& ptmeLocked; + bool throttlePeriodOngoing = false; + bool channelIsBusy = false; void readCommandQueue(void); + ReturnValue_t handleRegularTmQueue(); + ReturnValue_t handleCfdpTmQueue(); + ReturnValue_t handleGenericTmQueue(MessageQueueIF& queue, bool isCfdp); + MessageQueueId_t getCommandQueue() const override; void getMode(Mode_t* mode, Submode_t* submode) override; + void cfdpBackpressureHandling(); + ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode, uint32_t* msToReachTheMode) override; void startTransition(Mode_t mode, Submode_t submode) override; void announceMode(bool recursive) override; + void throttleCfdp(); + void releaseCfdp(); + void updateBusyFlag(); object_id_t getObjectId() const override; const HasHealthIF* getOptHealthIF() const override; diff --git a/mission/com/TmStoreTaskBase.cpp b/mission/com/TmStoreTaskBase.cpp index 80900975..215cef08 100644 --- a/mission/com/TmStoreTaskBase.cpp +++ b/mission/com/TmStoreTaskBase.cpp @@ -138,8 +138,16 @@ ReturnValue_t TmStoreTaskBase::performDump(PersistentTmStoreWithTmQueue& store, return result; } dumpedLen = tmReader.getFullPacketLen(); - result = channel.write(tmReader.getFullData(), dumpedLen); - if (result == DirectTmSinkIF::IS_BUSY) { + size_t writtenSize = 0; + result = channel.write(tmReader.getFullData(), dumpedLen, writtenSize); + if (result == VirtualChannelIF::PARTIALLY_WRITTEN) { + result = channel.handleWriteCompletionSynchronously(writtenSize, 200); + if (result != returnvalue::OK) { + // TODO: Event? Might lead to dangerous spam though.. + sif::warning << "PersistentTmStore: Synchronous write of last segment failed with code 0x" + << std::setw(4) << std::hex << result << std::dec << std::endl; + } + } else if (result == DirectTmSinkIF::IS_BUSY) { sif::warning << "PersistentTmStore: Unexpected VC channel busy" << std::endl; } else if (result != returnvalue::OK) { sif::warning << "PersistentTmStore: Unexpected VC channel write failure" << std::endl; diff --git a/mission/com/VirtualChannel.cpp b/mission/com/VirtualChannel.cpp index ff3749a9..e531727e 100644 --- a/mission/com/VirtualChannel.cpp +++ b/mission/com/VirtualChannel.cpp @@ -1,25 +1,78 @@ #include "VirtualChannel.h" +#include + VirtualChannel::VirtualChannel(object_id_t objectId, uint8_t vcId, const char* vcName, PtmeIF& ptme, const std::atomic_bool& txOn) : SystemObject(objectId), ptme(ptme), vcId(vcId), vcName(vcName), txOn(txOn) {} ReturnValue_t VirtualChannel::initialize() { return returnvalue::OK; } -ReturnValue_t VirtualChannel::sendNextTm(const uint8_t* data, size_t size) { - return write(data, size); +ReturnValue_t VirtualChannel::sendNextTm(const uint8_t* data, size_t size, size_t& writtenSize) { + return write(data, size, writtenSize); } -ReturnValue_t VirtualChannel::write(const uint8_t* data, size_t size) { - return ptme.writeToVc(vcId, data, size); +ReturnValue_t VirtualChannel::write(const uint8_t* data, size_t size, size_t& writtenSize) { + if (!ptme.containsVc(vcId)) { + return CHANNEL_DOES_NOT_EXIST; + } + return ptme.getVirtChannel(vcId)->write(data, size, writtenSize); } uint8_t VirtualChannel::getVcid() const { return vcId; } +ReturnValue_t VirtualChannel::advanceWrite(size_t& writtenSize) { + if (!ptme.containsVc(vcId)) { + return CHANNEL_DOES_NOT_EXIST; + } + return ptme.getVirtChannel(vcId)->advanceWrite(writtenSize); +} + +bool VirtualChannel::writeActive() const { + if (!ptme.containsVc(vcId)) { + return CHANNEL_DOES_NOT_EXIST; + } + return ptme.getVirtChannel(vcId)->writeActive(); +} + const char* VirtualChannel::getName() const { return vcName.c_str(); } -bool VirtualChannel::isBusy() const { return ptme.isBusy(vcId); } +bool VirtualChannel::isBusy() const { + if (!ptme.containsVc(vcId)) { + return CHANNEL_DOES_NOT_EXIST; + } + return ptme.getVirtChannel(vcId)->isBusy(); +} -void VirtualChannel::cancelTransfer() { ptme.cancelTransfer(vcId); } +void VirtualChannel::cancelTransfer() { + if (!ptme.containsVc(vcId)) { + return; + } + ptme.getVirtChannel(vcId)->cancelTransfer(); +} bool VirtualChannel::isTxOn() const { return txOn; } + +ReturnValue_t VirtualChannel::handleWriteCompletionSynchronously(size_t& writtenSize, + unsigned maxCompletionTimeMs) { + unsigned delayMs = 0; + while (true) { + if (isBusy()) { + if (delayMs >= maxCompletionTimeMs) { + break; + } + TaskFactory::delayTask(10); + delayMs += 10; + continue; + } + ReturnValue_t result = advanceWrite(writtenSize); + if (result == returnvalue::OK) { + // Transfer complete + return result; + } else if (result != PARTIALLY_WRITTEN) { + // Some error where we can not or should not continue the transfer. + return result; + } + } + return returnvalue::FAILED; +} diff --git a/mission/com/VirtualChannel.h b/mission/com/VirtualChannel.h index 98aba903..84cdafb3 100644 --- a/mission/com/VirtualChannel.h +++ b/mission/com/VirtualChannel.h @@ -15,6 +15,10 @@ */ class VirtualChannel : public SystemObject, public VirtualChannelIF { public: + static constexpr uint8_t CLASS_ID = CLASS_ID::VIRTUAL_CHANNEL; + + static constexpr ReturnValue_t CHANNEL_DOES_NOT_EXIST = returnvalue::makeCode(CLASS_ID, 0); + /** * @brief Constructor * @@ -25,9 +29,13 @@ class VirtualChannel : public SystemObject, public VirtualChannelIF { const std::atomic_bool& linkStateProvider); ReturnValue_t initialize() override; - ReturnValue_t sendNextTm(const uint8_t* data, size_t size); + ReturnValue_t sendNextTm(const uint8_t* data, size_t size, size_t& writtenSize); bool isBusy() const override; - ReturnValue_t write(const uint8_t* data, size_t size) override; + ReturnValue_t write(const uint8_t* data, size_t size, size_t& writtenSize) override; + ReturnValue_t advanceWrite(size_t& writtenSize) override; + ReturnValue_t handleWriteCompletionSynchronously(size_t& writtenSize, + unsigned maxCompletionTimeMs); + bool writeActive() const override; void cancelTransfer() override; uint8_t getVcid() const; bool isTxOn() const; diff --git a/mission/com/VirtualChannelWithQueue.cpp b/mission/com/VirtualChannelWithQueue.cpp index a90829ab..0d9e4d11 100644 --- a/mission/com/VirtualChannelWithQueue.cpp +++ b/mission/com/VirtualChannelWithQueue.cpp @@ -36,8 +36,19 @@ ReturnValue_t VirtualChannelWithQueue::handleNextTm(bool performWriteOp) { return result; } + // TODO: Hnadle partial write handling + size_t writtenSize = 0; if (performWriteOp) { - result = write(data, size); + result = write(data, size, writtenSize); + if (result == PARTIALLY_WRITTEN) { + result = handleWriteCompletionSynchronously(writtenSize, 200); + if (result != returnvalue::OK) { + // TODO: Event? Might lead to dangerous spam though.. + sif::warning + << "VirtualChannelWithQueue: Synchronous write of last segment failed with code 0x" + << std::setw(4) << std::hex << result << std::dec << std::endl; + } + } } // Try delete in any case, ignore failures (which should not happen), it is more important to // propagate write errors. diff --git a/mission/controller/PowerController.h b/mission/controller/PowerController.h index 1f27616d..b7c3d1a0 100644 --- a/mission/controller/PowerController.h +++ b/mission/controller/PowerController.h @@ -53,13 +53,13 @@ class PowerController : public ExtendedControllerBase, public ReceivesParameterM ReturnValue_t calculateCoulombCounterChargeUpperThreshold(); // Parameters - float batteryInternalResistance = 70.0 / 2.0 / 1000.0; // [Ohm] - float batteryMaximumCapacity = 2.6 * 2; // [Ah] - float coulombCounterVoltageUpperThreshold = 16.2; // [V] - double maxAllowedTimeDiff = 1.5; // [s] - float payloadOpLimitOn = 0.90; // [%] - float payloadOpLimitLow = 0.75; // [%] - float higherModesLimit = 0.6; // [%] + float batteryInternalResistance = 0.06798200367; // [Ohm] + float batteryMaximumCapacity = 2.6 * 2; // [Ah] + float coulombCounterVoltageUpperThreshold = 16.2; // [V] + double maxAllowedTimeDiff = 1.5; // [s] + float payloadOpLimitOn = 0.90; // [%] + float payloadOpLimitLow = 0.75; // [%] + float higherModesLimit = 0.6; // [%] // OCV Look-up-Table {[Ah],[V]} static constexpr uint8_t LOOK_UP_TABLE_MAX_IDX = 99; diff --git a/mission/genericFactory.cpp b/mission/genericFactory.cpp index 3d9d0c81..47cb1a5f 100644 --- a/mission/genericFactory.cpp +++ b/mission/genericFactory.cpp @@ -22,7 +22,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -44,7 +46,6 @@ #include "devices/gpioIds.h" #include "eive/definitions.h" #include "fsfw/pus/Service11TelecommandScheduling.h" -#include "mission/cfdp/Config.h" #include "mission/system/acs/RwAssembly.h" #include "mission/system/acs/acsModeTree.h" #include "mission/system/tcs/tcsModeTree.h" @@ -85,8 +86,6 @@ EntityId REMOTE_CFDP_ID(UnsignedByteField(config::EIVE_GROUND_CFDP_ENT RemoteEntityCfg GROUND_REMOTE_CFG(REMOTE_CFDP_ID); OneRemoteConfigProvider REMOTE_CFG_PROVIDER(GROUND_REMOTE_CFG); HostFilesystem HOST_FS; -EiveUserHandler USER_HANDLER(HOST_FS); -EiveFaultHandler EIVE_FAULT_HANDLER; } // namespace cfdp @@ -98,7 +97,8 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun CfdpTmFunnel** cfdpFunnel, SdCardMountedIF& sdcMan, StorageManagerIF** ipcStore, StorageManagerIF** tmStore, PersistentTmStores& stores, - uint32_t eventManagerQueueDepth, bool enableHkSets) { + uint32_t eventManagerQueueDepth, bool enableHkSets, + bool routeToPersistentStores) { // Framework objects new EventManager(objects::EVENT_MANAGER, eventManagerQueueDepth); auto healthTable = new HealthTable(objects::HEALTH_TABLE); @@ -111,44 +111,45 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun StorageManagerIF* tcStore; { PoolManager::LocalPoolConfig poolCfg = {{250, 16}, {250, 32}, {250, 64}, - {150, 128}, {120, 1024}, {120, 2048}}; + {150, 128}, {120, 1200}, {120, 2048}}; tcStore = new PoolManager(objects::TC_STORE, poolCfg); } { PoolManager::LocalPoolConfig poolCfg = {{600, 32}, {400, 64}, {400, 128}, - {300, 512}, {250, 1024}, {150, 2048}}; + {400, 512}, {800, 1200}, {150, 2048}}; *tmStore = new PoolManager(objects::TM_STORE, poolCfg); } { PoolManager::LocalPoolConfig poolCfg = {{300, 16}, {250, 32}, {150, 64}, {150, 128}, - {100, 256}, {50, 512}, {50, 1024}, {10, 2048}}; + {100, 256}, {50, 512}, {50, 1200}, {10, 2048}}; *ipcStore = new PoolManager(objects::IPC_STORE, poolCfg); } PoolManager::LocalPoolConfig poolCfg = {{300, 32}, {400, 64}, {250, 128}, - {150, 512}, {150, 1024}, {150, 2048}}; + {150, 512}, {400, 1200}, {150, 2048}}; auto* ramToFileStore = new PoolManager(objects::DOWNLINK_RAM_STORE, poolCfg); #if OBSW_ADD_TCPIP_SERVERS == 1 #if OBSW_ADD_TMTC_UDP_SERVER == 1 - auto udpBridge = - new UdpTmTcBridge(objects::UDP_TMTC_SERVER, objects::CCSDS_PACKET_DISTRIBUTOR, 120); + auto udpBridge = new UdpTmTcBridge(objects::UDP_TMTC_SERVER, objects::CCSDS_PACKET_DISTRIBUTOR, + config::UDP_MSG_QUEUE_DEPTH); new UdpTcPollingTask(objects::UDP_TMTC_POLLING_TASK, objects::UDP_TMTC_SERVER); sif::info << "Created UDP server for TMTC commanding with listener port " << udpBridge->getUdpPort() << std::endl; - udpBridge->setMaxNumberOfPacketsStored(config::MAX_STORED_CMDS_UDP); + udpBridge->setMaxNumberOfPacketsStored(config::UDP_MAX_STORED_CMDS); #endif #if OBSW_ADD_TMTC_TCP_SERVER == 1 - auto tcpBridge = - new TcpTmTcBridge(objects::TCP_TMTC_SERVER, objects::CCSDS_PACKET_DISTRIBUTOR, 120); + auto tcpBridge = new TcpTmTcBridge(objects::TCP_TMTC_SERVER, objects::CCSDS_PACKET_DISTRIBUTOR, + config::TCP_MSG_QUEUE_DEPTH); TcpTmTcServer::TcpConfig cfg(true, true); auto tcpServer = new TcpTmTcServer(objects::TCP_TMTC_POLLING_TASK, objects::TCP_TMTC_SERVER, cfg); // TCP is stream based. Use packet ID as start marker when parsing for space packets tcpServer->setSpacePacketParsingOptions({common::PUS_PACKET_ID, common::CFDP_PACKET_ID}); sif::info << "Created TCP server for TMTC commanding with listener port " << tcpServer->getTcpPort() << std::endl; - tcpBridge->setMaxNumberOfPacketsStored(config::MAX_STORED_CMDS_TCP); + tcpBridge->setMaxNumberOfPacketsStored(config::TCP_MAX_STORED_CMDS); + tcpBridge->setNumberOfSentPacketsPerCycle(config::TCP_MAX_NUMBER_TMS_SENT_PER_CYCLE); #endif /* OBSW_USE_TMTC_TCP_BRIDGE == 0 */ #endif /* OBSW_ADD_TCPIP_BRIDGE == 1 */ @@ -223,8 +224,12 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun **ipcStore, config::MAX_CFDP_FUNNEL_QUEUE_DEPTH, sdcMan, config::CFDP_SEQUENCE_COUNT_FILE, core::SAVE_CFDP_SEQUENCE_COUNT); - *cfdpFunnel = new CfdpTmFunnel(cfdpFunnelCfg, stores.cfdpStore->getReportReceptionQueue(0), - *ramToFileStore, config::EIVE_CFDP_APID); + std::optional fileStoreDest{}; + if (routeToPersistentStores) { + fileStoreDest = stores.cfdpStore->getReportReceptionQueue(0); + } + *cfdpFunnel = + new CfdpTmFunnel(cfdpFunnelCfg, fileStoreDest, *ramToFileStore, config::EIVE_CFDP_APID); #if OBSW_ADD_TCPIP_SERVERS == 1 #if OBSW_ADD_TMTC_UDP_SERVER == 1 @@ -274,16 +279,20 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun CfdpDistribCfg distribCfg(objects::CFDP_DISTRIBUTOR, *tcStore, cfdpMsgQueue); new CfdpDistributor(distribCfg); - auto* msgQueue = QueueFactory::instance()->createMessageQueue(32); + auto* tmtcQueue = QueueFactory::instance()->createMessageQueue(32); + auto* cfdpQueue = QueueFactory::instance()->createMessageQueue(16); + auto eiveUserHandler = new cfdp::EiveUserHandler(HOST_FS, **ipcStore, cfdpQueue->getId()); FsfwHandlerParams params(objects::CFDP_HANDLER, HOST_FS, **cfdpFunnel, *tcStore, **tmStore, - *msgQueue); + **ipcStore, *tmtcQueue, *cfdpQueue); cfdp::IndicationCfg indicationCfg; UnsignedByteField apid(config::EIVE_LOCAL_CFDP_ENTITY_ID); cfdp::EntityId localId(apid); GROUND_REMOTE_CFG.defaultChecksum = cfdp::ChecksumType::CRC_32; - CfdpHandlerCfg cfdpCfg(localId, indicationCfg, USER_HANDLER, EIVE_FAULT_HANDLER, PACKET_LIST, + GROUND_REMOTE_CFG.maxFileSegmentLen = config::CFDP_MAX_FILE_SEGMENT_LEN; + auto eiveFaultHandler = new EiveFaultHandler(objects::CFDP_FAULT_HANDLER); + CfdpHandlerCfg cfdpCfg(localId, indicationCfg, *eiveUserHandler, *eiveFaultHandler, PACKET_LIST, LOST_SEGMENTS, REMOTE_CFG_PROVIDER); - auto* cfdpHandler = new CfdpHandler(params, cfdpCfg); + auto* cfdpHandler = new CfdpHandler(params, cfdpCfg, signals::CFDP_CHANNEL_THROTTLE_SIGNAL); // All CFDP packets arrive wrapped inside CCSDS space packets CcsdsDistributorIF::DestInfo info("CFDP Destination", config::EIVE_CFDP_APID, cfdpHandler->getRequestQueue(), true); diff --git a/mission/genericFactory.h b/mission/genericFactory.h index 7845c140..f6c2bf1b 100644 --- a/mission/genericFactory.h +++ b/mission/genericFactory.h @@ -46,7 +46,7 @@ void produceGenericObjects(HealthTableIF** healthTable, PusTmFunnel** pusFunnel, CfdpTmFunnel** cfdpFunnel, SdCardMountedIF& sdcMan, StorageManagerIF** ipcStore, StorageManagerIF** tmStore, PersistentTmStores& stores, uint32_t eventManagerQueueDepth, - bool enableHkSets); + bool enableHkSets, bool routeToPersistentStores); void createGenericHeaterComponents(GpioIF& gpioIF, PowerSwitchIF& pwrSwitcher, HeaterHandler*& heaterHandler); diff --git a/mission/payload/PayloadPcduHandler.cpp b/mission/payload/PayloadPcduHandler.cpp index bda15b20..b3b71aea 100644 --- a/mission/payload/PayloadPcduHandler.cpp +++ b/mission/payload/PayloadPcduHandler.cpp @@ -395,7 +395,6 @@ void PayloadPcduHandler::quickTransitionBackToOff(bool startTransitionToOff, boo void PayloadPcduHandler::checkAdcValues() { using namespace plpcdu; - checkJsonFileInit(); adcSet.processed[U_BAT_DIV_6] = static_cast(adcSet.channels[0]) * VOLTAGE_DIV / MAX122X_BIT * MAX122X_VREF; adcSet.processed[U_NEG_V_FB] = @@ -529,6 +528,10 @@ void PayloadPcduHandler::checkJsonFileInit() { params.initialize(sdcMan->getCurrentMountPrefix()); jsonFileInitComplete = true; } + } else { + if (not sdcMan->isSdCardUsable(std::nullopt)) { + jsonFileInitComplete = false; + } } } @@ -564,6 +567,13 @@ bool PayloadPcduHandler::checkCurrent(float val, float upperBound, Event event) return true; } +ReturnValue_t PayloadPcduHandler::initialize() { + checkJsonFileInit(); + return DeviceHandlerBase::initialize(); +} + +void PayloadPcduHandler::performOperationHook() { checkJsonFileInit(); } + ReturnValue_t PayloadPcduHandler::checkModeCommand(Mode_t commandedMode, Submode_t commandedSubmode, uint32_t* msToReachTheMode) { if (commandedMode != MODE_OFF) { diff --git a/mission/payload/PayloadPcduHandler.h b/mission/payload/PayloadPcduHandler.h index a4574f53..d48d0f89 100644 --- a/mission/payload/PayloadPcduHandler.h +++ b/mission/payload/PayloadPcduHandler.h @@ -67,7 +67,9 @@ class PayloadPcduHandler : public DeviceHandlerBase { SdCardMountedIF* sdcMan, Stack5VHandler& stackHandler, bool periodicPrintout); void setToGoToNormalModeImmediately(bool enable); + void performOperationHook() override; void enablePeriodicPrintout(bool enable, uint8_t divider); + ReturnValue_t initialize() override; #ifdef XIPHOS_Q7S static ReturnValue_t extConvAsTwoCallback(SpiComIF* comIf, SpiCookie* cookie, diff --git a/mission/scheduling.cpp b/mission/scheduling.cpp index 27a6417c..4dc5bade 100644 --- a/mission/scheduling.cpp +++ b/mission/scheduling.cpp @@ -4,13 +4,13 @@ #include "fsfw/tasks/PeriodicTaskIF.h" -void scheduling::scheduleTmpTempSensors(PeriodicTaskIF* tmpTask) { - const std::array tmpIds = {objects::TMP1075_HANDLER_TCS_0, - objects::TMP1075_HANDLER_TCS_1, - objects::TMP1075_HANDLER_PLPCDU_0, - // damaged. - // objects::TMP1075_HANDLER_PLPCDU_1, - objects::TMP1075_HANDLER_IF_BOARD}; +void scheduling::scheduleTmpTempSensors(PeriodicTaskIF* tmpTask, bool schedulePlPcdu1) { + std::vector tmpIds = {objects::TMP1075_HANDLER_TCS_0, objects::TMP1075_HANDLER_TCS_1, + objects::TMP1075_HANDLER_PLPCDU_0, + objects::TMP1075_HANDLER_IF_BOARD}; + if (schedulePlPcdu1) { + tmpIds.push_back(objects::TMP1075_HANDLER_PLPCDU_1); + } for (const auto& tmpId : tmpIds) { tmpTask->addComponent(tmpId, DeviceHandlerIF::PERFORM_OPERATION); tmpTask->addComponent(tmpId, DeviceHandlerIF::SEND_WRITE); diff --git a/mission/scheduling.h b/mission/scheduling.h index 6023d5df..947164e7 100644 --- a/mission/scheduling.h +++ b/mission/scheduling.h @@ -4,7 +4,7 @@ class PeriodicTaskIF; namespace scheduling { -void scheduleTmpTempSensors(PeriodicTaskIF* tmpSensors); +void scheduleTmpTempSensors(PeriodicTaskIF* tmpSensors, bool schedulePlPcdu1); void scheduleRtdSensors(PeriodicTaskIF* periodicTask); } // namespace scheduling diff --git a/mission/sysDefs.h b/mission/sysDefs.h index 4a53a76d..8fade60a 100644 --- a/mission/sysDefs.h +++ b/mission/sysDefs.h @@ -9,7 +9,15 @@ #include #include +#include "eive/eventSubsystemIds.h" + +namespace signals { + +extern std::atomic_bool CFDP_CHANNEL_THROTTLE_SIGNAL; extern std::atomic_uint16_t I2C_FATAL_ERRORS; +extern std::atomic_uint32_t CFDP_MSG_COUNTER; + +} // namespace signals namespace satsystem { diff --git a/mission/system/EiveSystem.cpp b/mission/system/EiveSystem.cpp index 0df0fc95..cd450502 100644 --- a/mission/system/EiveSystem.cpp +++ b/mission/system/EiveSystem.cpp @@ -70,6 +70,9 @@ void EiveSystem::performChildOperation() { } pdecRecoveryLogic(); i2cRecoveryLogic(); + if (forcePlOffState != ForcePlOffState::NONE) { + forceOffPayload(); + } } ReturnValue_t EiveSystem::initialize() { @@ -203,10 +206,14 @@ void EiveSystem::handleEventMessages() { break; } case power::POWER_LEVEL_LOW: { - forceOffPayload(); + forcePlOffState = ForcePlOffState::FORCE_ALL_EXCEPT_SUPV_OFF; break; } - case power::POWER_LEVEL_CRITICAL: + case power::POWER_LEVEL_CRITICAL: { + // Force payload off in any case. It really should not be on when the power level + // becomes critical, but better be safe than sorry.. + forcePlOffState = ForcePlOffState::FORCE_ALL_EXCEPT_SUPV_OFF; + // Also set the STR assembly to faulty, which should cause a fallback to SAFE mode. CommandMessage msg; HealthMessage::setHealthMessage(&msg, HealthMessage::HEALTH_SET, HasHealthIF::FAULTY); ReturnValue_t result = MessageQueueSenderIF::sendMessage( @@ -216,6 +223,7 @@ void EiveSystem::handleEventMessages() { << std::endl; } break; + } } break; default: @@ -403,37 +411,45 @@ void EiveSystem::pdecRecoveryLogic() { void EiveSystem::forceOffPayload() { CommandMessage msg; + ReturnValue_t result; // set PL to faulty HealthMessage::setHealthMessage(&msg, HealthMessage::HEALTH_SET, HasHealthIF::FAULTY); - ReturnValue_t result = commandQueue->sendMessage(plPcduQueueId, &msg); - if (result != returnvalue::OK) { - sif::error << "EIVE System: Sending FAULTY command to PL PCDU failed" << std::endl; + if (forcePlOffState == ForcePlOffState::FORCE_ALL_EXCEPT_SUPV_OFF) { + result = commandQueue->sendMessage(plocMpsocQueueId, &msg); + if (result != returnvalue::OK) { + sif::error << "EIVE System: Sending FAULTY command to PLOC MPSOC failed" << std::endl; + } + result = commandQueue->sendMessage(cameraQueueId, &msg); + if (result != returnvalue::OK) { + sif::error << "EIVE System: Sending FAULTY command to PL CAM failed" << std::endl; + } + result = commandQueue->sendMessage(scexQueueId, &msg); + if (result != returnvalue::OK) { + sif::error << "EIVE System: Sending FAULTY command to SCEX failed" << std::endl; + } + result = commandQueue->sendMessage(radSensorQueueId, &msg); + if (result != returnvalue::OK) { + sif::error << "EIVE System: Sending FAULTY command to RAD SENSOR failed" << std::endl; + } + result = commandQueue->sendMessage(plPcduQueueId, &msg); + if (result != returnvalue::OK) { + sif::error << "EIVE System: Sending FAULTY command to PL PCDU failed" << std::endl; + } + forcePlOffState = ForcePlOffState::WAITING; + supvOffDelay.resetTimer(); } - result = commandQueue->sendMessage(plocMpsocQueueId, &msg); - if (result != returnvalue::OK) { - sif::error << "EIVE System: Sending FAULTY command to PLOC MPSOC failed" << std::endl; + if (forcePlOffState == ForcePlOffState::WAITING and supvOffDelay.hasTimedOut()) { + forcePlOffState = ForcePlOffState::FORCE_SUPV_OFF; } - result = commandQueue->sendMessage(plocSupervisorQueueId, &msg); - if (result != returnvalue::OK) { - sif::error << "EIVE System: Sending FAULTY command to PLOC SUPERVISOR failed" << std::endl; - } - - result = commandQueue->sendMessage(cameraQueueId, &msg); - if (result != returnvalue::OK) { - sif::error << "EIVE System: Sending FAULTY command to PL CAM failed" << std::endl; - } - - result = commandQueue->sendMessage(scexQueueId, &msg); - if (result != returnvalue::OK) { - sif::error << "EIVE System: Sending FAULTY command to SCEX failed" << std::endl; - } - - result = commandQueue->sendMessage(radSensorQueueId, &msg); - if (result != returnvalue::OK) { - sif::error << "EIVE System: Sending FAULTY command to RAD SENSOR failed" << std::endl; + if (forcePlOffState == ForcePlOffState::FORCE_SUPV_OFF) { + result = commandQueue->sendMessage(plocSupervisorQueueId, &msg); + if (result != returnvalue::OK) { + sif::error << "EIVE System: Sending FAULTY command to PLOC SUPERVISOR failed" << std::endl; + } + forcePlOffState = ForcePlOffState::NONE; } } diff --git a/mission/system/EiveSystem.h b/mission/system/EiveSystem.h index 78f8bdc9..fed5791a 100644 --- a/mission/system/EiveSystem.h +++ b/mission/system/EiveSystem.h @@ -22,6 +22,12 @@ class EiveSystem : public Subsystem, public HasActionsIF { [[nodiscard]] MessageQueueId_t getCommandQueue() const override; private: + enum class ForcePlOffState { + NONE, + FORCE_ALL_EXCEPT_SUPV_OFF, + WAITING, + FORCE_SUPV_OFF + } forcePlOffState = ForcePlOffState::NONE; enum class I2cRebootState { NONE, SYSTEM_MODE_BOOT, @@ -37,6 +43,7 @@ class EiveSystem : public Subsystem, public HasActionsIF { bool alreadyTriedI2cRecovery = false; uint8_t frameDirtyErrorCounter = 0; + Countdown supvOffDelay = Countdown(3000); Countdown frameDirtyCheckCd = Countdown(10000); // If the PDEC reset was already attempted in the last 2 minutes, there is a high chance that // only a full reboot will fix the issue. diff --git a/mission/system/systemTree.cpp b/mission/system/systemTree.cpp index c9894f21..eeb0c08c 100644 --- a/mission/system/systemTree.cpp +++ b/mission/system/systemTree.cpp @@ -10,6 +10,7 @@ #include "eive/objects.h" #include "mission/com/defs.h" +#include "mission/sysDefs.h" #include "mission/system/acs/acsModeTree.h" #include "mission/system/power/epsModeTree.h" #include "mission/system/tcs/tcsModeTree.h" @@ -54,7 +55,8 @@ void satsystem::init(bool commandPlPcdu1) { EIVE_SYSTEM.setInitialMode(satsystem::Mode::BOOT, 0); } -EiveSystem satsystem::EIVE_SYSTEM = EiveSystem(objects::EIVE_SYSTEM, 12, 24, I2C_FATAL_ERRORS); +EiveSystem satsystem::EIVE_SYSTEM = + EiveSystem(objects::EIVE_SYSTEM, 12, 24, signals::I2C_FATAL_ERRORS); auto EIVE_SEQUENCE_BOOT = std::make_pair(satsystem::Mode::BOOT, FixedArrayList()); auto EIVE_TABLE_BOOT_TGT = diff --git a/mission/tmtc/CfdpTmFunnel.cpp b/mission/tmtc/CfdpTmFunnel.cpp index 93c294a4..daf53925 100644 --- a/mission/tmtc/CfdpTmFunnel.cpp +++ b/mission/tmtc/CfdpTmFunnel.cpp @@ -3,8 +3,10 @@ #include "fsfw/ipc/QueueFactory.h" #include "fsfw/tmtcpacket/ccsds/SpacePacketCreator.h" #include "fsfw/tmtcservices/TmTcMessage.h" +#include "mission/sysDefs.h" -CfdpTmFunnel::CfdpTmFunnel(TmFunnelBase::FunnelCfg cfg, MessageQueueId_t fileStoreDest, +CfdpTmFunnel::CfdpTmFunnel(TmFunnelBase::FunnelCfg cfg, + std::optional fileStoreDest, StorageManagerIF& ramToFileStore, uint16_t cfdpInCcsdsApid) : TmFunnelBase(cfg), fileStoreDest(fileStoreDest), @@ -25,7 +27,9 @@ ReturnValue_t CfdpTmFunnel::performOperation(uint8_t) { saveSequenceCount = false; } status = tmQueue->receiveMessage(¤tMessage); + uint32_t handledPackets = 0; while (status == returnvalue::OK) { + handledPackets++; status = handlePacket(currentMessage); if (status != returnvalue::OK) { sif::warning << "CfdpTmFunnel packet handling failed" << std::endl; @@ -38,6 +42,11 @@ ReturnValue_t CfdpTmFunnel::performOperation(uint8_t) { } status = tmQueue->receiveMessage(¤tMessage); } + if (handledPackets > 0) { + // Very useful for profiling and debugging + // sif::debug << "CfdpFunnel: Handled " << handledPackets << " packets in one cycle" << + // std::endl; + } if (status == MessageQueueIF::EMPTY) { return returnvalue::OK; @@ -57,7 +66,7 @@ ReturnValue_t CfdpTmFunnel::handlePacket(TmTcMessage& msg) { auto spacePacketHeader = SpacePacketCreator(ccsds::PacketType::TM, false, cfdpInCcsdsApid, ccsds::SequenceFlags::UNSEGMENTED, sourceSequenceCount++, 0); - sourceSequenceCount = sourceSequenceCount & ccsds::LIMIT_SEQUENCE_COUNT; + sourceSequenceCount = sourceSequenceCount % ccsds::LIMIT_SEQUENCE_COUNT; spacePacketHeader.setCcsdsLenFromTotalDataFieldLen(cfdpPacketLen); uint8_t* newPacketData = nullptr; store_address_t newStoreId{}; @@ -88,14 +97,22 @@ ReturnValue_t CfdpTmFunnel::handlePacket(TmTcMessage& msg) { msg.setStorageId(newStoreId); store_address_t origStoreId = newStoreId; - store_address_t storageId; - result = ramToFileStore.addData(&storageId, newPacketData, packetLen); - TmTcMessage fileMsg(storageId); - if (result != returnvalue::OK) { - sif::error << "PusLiveDemux::handlePacket: Store too full to create data copy" << std::endl; - } else { - tmQueue->sendMessage(fileStoreDest, &fileMsg); + if (fileStoreDest.has_value()) { + store_address_t storageId; + result = ramToFileStore.addData(&storageId, newPacketData, packetLen); + TmTcMessage fileMsg(storageId); + if (result == returnvalue::OK) { + tmQueue->sendMessage(fileStoreDest.value(), &fileMsg); + } else if (result == StorageManagerIF::DATA_STORAGE_FULL) { + sif::error << "CfdpTmFunnel::handlePacket: RAM to File Store too full to create data copy" + << std::endl; + } } - return demultiplexLivePackets(origStoreId, newPacketData, packetLen); } + +uint32_t CfdpTmFunnel::addLiveDestination(const char* name, + const AcceptsTelemetryIF& downlinkDestination, + uint8_t vcid) { + return TmFunnelBase::addLiveDestination(name, downlinkDestination, vcid); +} diff --git a/mission/tmtc/CfdpTmFunnel.h b/mission/tmtc/CfdpTmFunnel.h index 7b9efd34..b3f0948b 100644 --- a/mission/tmtc/CfdpTmFunnel.h +++ b/mission/tmtc/CfdpTmFunnel.h @@ -13,16 +13,18 @@ class CfdpTmFunnel : public TmFunnelBase { public: - CfdpTmFunnel(TmFunnelBase::FunnelCfg cfg, MessageQueueId_t fileStoreDest, + CfdpTmFunnel(TmFunnelBase::FunnelCfg cfg, std::optional fileStoreDest, StorageManagerIF& ramToFileStore, uint16_t cfdpInCcsdsApid); [[nodiscard]] const char* getName() const override; + uint32_t addLiveDestination(const char* name, const AcceptsTelemetryIF& downlinkDestination, + uint8_t vcid = 0) override; ReturnValue_t performOperation(uint8_t opCode); ReturnValue_t initialize() override; private: ReturnValue_t handlePacket(TmTcMessage& msg); - MessageQueueId_t fileStoreDest; + std::optional fileStoreDest; StorageManagerIF& ramToFileStore; uint16_t cfdpInCcsdsApid; }; diff --git a/mission/tmtc/DirectTmSinkIF.h b/mission/tmtc/DirectTmSinkIF.h index 11a17c79..ff8ab6fe 100644 --- a/mission/tmtc/DirectTmSinkIF.h +++ b/mission/tmtc/DirectTmSinkIF.h @@ -13,18 +13,45 @@ class DirectTmSinkIF { static constexpr uint8_t CLASS_ID = CLASS_ID::TM_SINK; static constexpr ReturnValue_t IS_BUSY = returnvalue::makeCode(CLASS_ID, 0); + static constexpr ReturnValue_t PARTIALLY_WRITTEN = returnvalue::makeCode(CLASS_ID, 1); + static constexpr ReturnValue_t NO_WRITE_ACTIVE = returnvalue::makeCode(CLASS_ID, 2); /** - * @brief Implements the functionality to write to a TM sink directly + * @brief Implements the functionality to write to a TM sink directly. + * + * The write might not be completed immediately! If PARTIALLY_WRITTEN is returned, the user + * should poll the ready for packet status bit and call @advanceWrite continuously until + * the transfer is completed. * * @param data Pointer to buffer holding the data to write * @param size Number of bytes to write - * @return returnvalue::OK on success, returnvalue::FAILED on failure, IS_BUSY - * if the TM sink is busy. + * @param writtenSize Size written during write call. + * @return returnvalue::OK on full write success, IS_BUSY if a previous write transfer has not + * been completed yet or the PAPB interface is not ready for a packet, PARTIALLY_WRITTEN + * if some bytes were written, but the transfer has not been completed yet. */ - virtual ReturnValue_t write(const uint8_t* data, size_t size) = 0; + virtual ReturnValue_t write(const uint8_t* data, size_t size, size_t& writtenSize) = 0; + /** + * Advances a active file transfer. + * @param writtenSize + * @return returnvalue::OK if the packet write process is complete, PARTIALLY_WRITTEN if + * some bytes were written but the transfer is not complete yet. + * NO_WRITE_ACTIVE if this is called without a valid previous write call. + */ + virtual ReturnValue_t advanceWrite(size_t& writtenSize) = 0; + + /** + * Is busy, so no write operation can not be started and write advancement + * is not possible. + * @return + */ virtual bool isBusy() const = 0; + /** + * The PAPB interface is currently busy writing a packet and a new packet can not be written yet. + * @return + */ + virtual bool writeActive() const = 0; }; #endif /* MISSION_TMTC_DIRECTTMSINKIF_H_ */ diff --git a/mission/tmtc/PusLiveDemux.cpp b/mission/tmtc/PusLiveDemux.cpp index 8ba69e07..6a30d780 100644 --- a/mission/tmtc/PusLiveDemux.cpp +++ b/mission/tmtc/PusLiveDemux.cpp @@ -9,8 +9,13 @@ ReturnValue_t PusLiveDemux::demultiplexPackets(StorageManagerIF& tmStore, store_address_t origStoreId, const uint8_t* tmData, size_t tmSize) { ReturnValue_t result = returnvalue::OK; + // sif::debug << "tm size: " << tmSize << " for " << destinations.size() << " destinations" << + // std::endl; for (unsigned int idx = 0; idx < destinations.size(); idx++) { const auto& dest = destinations[idx]; + if (dest.isFull) { + continue; + } if ((destinations.size() > 1) and (idx < (destinations.size() - 1))) { // Create copy of data to ensure each TM recipient has its own copy. That way, we don't need // to bother with send order and where the data is deleted. @@ -18,9 +23,20 @@ ReturnValue_t PusLiveDemux::demultiplexPackets(StorageManagerIF& tmStore, result = tmStore.addData(&storeId, tmData, tmSize); if (result == returnvalue::OK) { message.setStorageId(storeId); - } else { + } else if (result == StorageManagerIF::DATA_STORAGE_FULL) { #if FSFW_CPP_OSTREAM_ENABLED == 1 sif::error << "PusLiveDemux::handlePacket: Store too full to create data copy" << std::endl; + uint8_t fillCounts[16]; + uint8_t written = 0; + tmStore.getFillCount(fillCounts, &written); + sif::error << "Fill counts: ["; + for (uint8_t fillIdx = 0; fillIdx < written; fillIdx++) { + sif::error << fillCounts[fillIdx]; + if (fillIdx < written - 1) { + sif::error << ", "; + } + } + sif::error << "]" << std::endl; #endif } } else { @@ -39,8 +55,25 @@ ReturnValue_t PusLiveDemux::demultiplexPackets(StorageManagerIF& tmStore, return result; } -void PusLiveDemux::addDestination(const char* name, const AcceptsTelemetryIF& downlinkDestination, - uint8_t vcid) { - auto queueId = downlinkDestination.getReportReceptionQueue(vcid); - destinations.emplace_back(name, queueId, vcid); +uint32_t PusLiveDemux::addDestination(const char* name, + const AcceptsTelemetryIF& downlinkDestination, uint8_t vcid) { + return addDestinationByRawId(name, downlinkDestination.getReportReceptionQueue(vcid), vcid); +} + +void PusLiveDemux::setDestFull(uint32_t listIndex) { + if (destinations.size() > 0 and listIndex <= destinations.size() - 1) { + destinations[listIndex].isFull = true; + } +} + +void PusLiveDemux::setDestAvailable(uint32_t listIndex) { + if (destinations.size() > 0 and listIndex <= destinations.size() - 1) { + destinations[listIndex].isFull = false; + } +} + +uint32_t PusLiveDemux::addDestinationByRawId(const char* name, MessageQueueId_t downlinkDestination, + uint8_t vcid) { + destinations.emplace_back(name, downlinkDestination, vcid); + return destinations.size() - 1; } diff --git a/mission/tmtc/PusLiveDemux.h b/mission/tmtc/PusLiveDemux.h index b9af04ff..d565c194 100644 --- a/mission/tmtc/PusLiveDemux.h +++ b/mission/tmtc/PusLiveDemux.h @@ -14,8 +14,12 @@ class PusLiveDemux { ReturnValue_t demultiplexPackets(StorageManagerIF& tmStore, store_address_t origStoreId, const uint8_t* tmData, size_t tmSize); - void addDestination(const char* name, const AcceptsTelemetryIF& downlinkDestination, - uint8_t vcid = 0); + uint32_t addDestinationByRawId(const char* name, MessageQueueId_t downlinkDestination, + uint8_t vcid = 0); + uint32_t addDestination(const char* name, const AcceptsTelemetryIF& downlinkDestination, + uint8_t vcid = 0); + void setDestFull(uint32_t listIndex); + void setDestAvailable(uint32_t listIndex); private: struct Destination { @@ -24,6 +28,7 @@ class PusLiveDemux { const char* name; MessageQueueId_t queueId; + bool isFull = false; uint8_t virtualChannel = 0; }; diff --git a/mission/tmtc/TmFunnelBase.cpp b/mission/tmtc/TmFunnelBase.cpp index fc2e4b76..c19afd02 100644 --- a/mission/tmtc/TmFunnelBase.cpp +++ b/mission/tmtc/TmFunnelBase.cpp @@ -30,9 +30,10 @@ MessageQueueId_t TmFunnelBase::getReportReceptionQueue(uint8_t virtualChannel) c return tmQueue->getId(); } -void TmFunnelBase::addLiveDestination(const char *name, - const AcceptsTelemetryIF &downlinkDestination, uint8_t vcid) { - liveDemux.addDestination(name, downlinkDestination, vcid); +uint32_t TmFunnelBase::addLiveDestination(const char *name, + const AcceptsTelemetryIF &downlinkDestination, + uint8_t vcid) { + return liveDemux.addDestination(name, downlinkDestination, vcid); } ReturnValue_t TmFunnelBase::initialize() { @@ -69,3 +70,9 @@ ReturnValue_t TmFunnelBase::saveSequenceCountToFile() { ofile << sourceSequenceCount << "\n"; return returnvalue::OK; } + +uint32_t TmFunnelBase::addLiveDestinationByRawId(const char *name, + MessageQueueId_t downlinkDestination, + uint8_t vcid) { + return liveDemux.addDestinationByRawId(name, downlinkDestination, vcid); +} diff --git a/mission/tmtc/TmFunnelBase.h b/mission/tmtc/TmFunnelBase.h index 72d91103..bc36d7f5 100644 --- a/mission/tmtc/TmFunnelBase.h +++ b/mission/tmtc/TmFunnelBase.h @@ -37,8 +37,11 @@ class TmFunnelBase : public AcceptsTelemetryIF, public SystemObject { }; explicit TmFunnelBase(FunnelCfg cfg); [[nodiscard]] MessageQueueId_t getReportReceptionQueue(uint8_t virtualChannel) const override; - void addLiveDestination(const char* name, const AcceptsTelemetryIF& downlinkDestination, - uint8_t vcid = 0); + virtual uint32_t addLiveDestinationByRawId(const char* name, MessageQueueId_t downlinkDestination, + uint8_t vcid = 0); + virtual uint32_t addLiveDestination(const char* name, + const AcceptsTelemetryIF& downlinkDestination, + uint8_t vcid = 0); ReturnValue_t demultiplexLivePackets(store_address_t origStoreId, const uint8_t* tmData, size_t tmSize); ReturnValue_t initialize() override; diff --git a/tmtc b/tmtc index e249f147..99c6c8bb 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit e249f147bc1738003d31290df8f2b525d91c3482 +Subproject commit 99c6c8bbd0d791d8b17720de481c6142091a54a4