From c63093d6cfb45d7df6ab8f74350c10f8ad7377b3 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 14 Aug 2023 14:57:18 +0200 Subject: [PATCH 01/82] bump fsfw --- fsfw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsfw b/fsfw index d575da85..67c38f32 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit d575da85407e029dabecaffa5368f0c9f1034941 +Subproject commit 67c38f327ed22afacecf3e2a6fdc589c6812f77f From 88286eaca01c22862c512912bcb4b58b8d0d0019 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 14 Aug 2023 15:58:12 +0200 Subject: [PATCH 02/82] this compiles --- bsp_q7s/em/emObjectFactory.cpp | 1 + fsfw | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bsp_q7s/em/emObjectFactory.cpp b/bsp_q7s/em/emObjectFactory.cpp index 3c3ba290..976602d4 100644 --- a/bsp_q7s/em/emObjectFactory.cpp +++ b/bsp_q7s/em/emObjectFactory.cpp @@ -111,6 +111,7 @@ void ObjectFactory::produce(void* args) { new CoreController(objects::CORE_CONTROLLER, enableHkSets); auto* stackHandler = new Stack5VHandler(*pwrSwitcher); + static_cast(stackHandler); // Initialize chip select to avoid SPI bus issues. createRadSensorChipSelect(gpioComIF); diff --git a/fsfw b/fsfw index 67c38f32..036667a9 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 67c38f327ed22afacecf3e2a6fdc589c6812f77f +Subproject commit 036667a969c82272eeb65adfdb068e34e318ef75 From ede0805ee8af7221651b01afbff6be56f24d51b6 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 14 Aug 2023 16:29:51 +0200 Subject: [PATCH 03/82] instantiated source handler --- mission/cfdp/CfdpHandler.cpp | 22 +++++++++++----------- mission/cfdp/CfdpHandler.h | 8 ++++++++ tmtc | 2 +- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/mission/cfdp/CfdpHandler.cpp b/mission/cfdp/CfdpHandler.cpp index fa35535c..8a9e155e 100644 --- a/mission/cfdp/CfdpHandler.cpp +++ b/mission/cfdp/CfdpHandler.cpp @@ -9,17 +9,17 @@ 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) + : SystemObject(fsfwHandlerParams.objectId), + msgQueue(fsfwHandlerParams.msgQueue), + localCfg(cfdpCfg.id, cfdpCfg.indicCfg, cfdpCfg.faultHandler), + fsfwParams(fsfwHandlerParams.packetDest, &fsfwHandlerParams.msgQueue, 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) {} [[nodiscard]] const char* CfdpHandler::getName() const { return "CFDP Handler"; } diff --git a/mission/cfdp/CfdpHandler.h b/mission/cfdp/CfdpHandler.h index 2de9f7dd..c7f71eda 100644 --- a/mission/cfdp/CfdpHandler.h +++ b/mission/cfdp/CfdpHandler.h @@ -1,6 +1,8 @@ #ifndef FSFW_EXAMPLE_HOSTED_CFDPHANDLER_H #define FSFW_EXAMPLE_HOSTED_CFDPHANDLER_H +#include + #include #include "fsfw/cfdp/handler/DestHandler.h" @@ -8,6 +10,7 @@ #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, @@ -61,7 +64,12 @@ class CfdpHandler : public SystemObject, public ExecutableObjectIF, public Accep private: MessageQueueIF& msgQueue; + cfdp::LocalEntityCfg localCfg; + cfdp::FsfwParams fsfwParams; + SeqCountProviderU16 seqCntProvider; cfdp::DestHandler destHandler; + cfdp::SourceHandler srcHandler; + StorageManagerIF* tcStore = nullptr; StorageManagerIF* tmStore = nullptr; diff --git a/tmtc b/tmtc index 4b054b76..fd3a7990 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 4b054b7628e43975e2401c7db10c358824f7a2d3 +Subproject commit fd3a799019f6910cbbb4447cc9605340d66c2703 From 360911e5eb789af3462fdfe0f0ce3209043cb8ef Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 14 Aug 2023 20:48:37 +0200 Subject: [PATCH 04/82] continue source handler integration --- fsfw | 2 +- mission/cfdp/CfdpHandler.cpp | 21 +++++++++++++-------- mission/cfdp/CfdpHandler.h | 12 ++++++++---- mission/cfdp/Config.h | 13 +++++++++++-- mission/genericFactory.cpp | 10 ++++++---- 5 files changed, 39 insertions(+), 19 deletions(-) diff --git a/fsfw b/fsfw index b39e1c7e..60dcacf4 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit b39e1c7e076914d18fbb78716d3b5b9b12b8504b +Subproject commit 60dcacf432aa0a7b739f8fdf8bf4aaa37ac614e5 diff --git a/mission/cfdp/CfdpHandler.cpp b/mission/cfdp/CfdpHandler.cpp index 8a9e155e..2badd560 100644 --- a/mission/cfdp/CfdpHandler.cpp +++ b/mission/cfdp/CfdpHandler.cpp @@ -11,9 +11,10 @@ using namespace cfdp; CfdpHandler::CfdpHandler(const FsfwHandlerParams& fsfwHandlerParams, const CfdpHandlerCfg& cfdpCfg) : SystemObject(fsfwHandlerParams.objectId), - msgQueue(fsfwHandlerParams.msgQueue), + tmtcQueue(fsfwHandlerParams.tmtcQueue), + cfdpRequestQueue(fsfwHandlerParams.cfdpQueue), localCfg(cfdpCfg.id, cfdpCfg.indicCfg, cfdpCfg.faultHandler), - fsfwParams(fsfwHandlerParams.packetDest, &fsfwHandlerParams.msgQueue, this, + fsfwParams(fsfwHandlerParams.packetDest, &fsfwHandlerParams.tmtcQueue, this, fsfwHandlerParams.tcStore, fsfwHandlerParams.tmStore), destHandler(DestHandlerParams(localCfg, cfdpCfg.userHandler, cfdpCfg.remoteCfgProvider, cfdpCfg.packetInfoList, cfdpCfg.lostSegmentsList), @@ -27,7 +28,7 @@ CfdpHandler::CfdpHandler(const FsfwHandlerParams& fsfwHandlerParams, const CfdpH return destHandler.getDestHandlerParams().cfg.localId.getValue(); } -[[nodiscard]] MessageQueueId_t CfdpHandler::getRequestQueue() const { return msgQueue.getId(); } +[[nodiscard]] MessageQueueId_t CfdpHandler::getRequestQueue() const { return tmtcQueue.getId(); } ReturnValue_t CfdpHandler::initialize() { ReturnValue_t result = destHandler.initialize(); @@ -46,19 +47,23 @@ ReturnValue_t CfdpHandler::performOperation(uint8_t operationCode) { ReturnValue_t status; ReturnValue_t result = OK; TmTcMessage tmtcMsg; - for (status = msgQueue.receiveMessage(&tmtcMsg); status == returnvalue::OK; - status = msgQueue.receiveMessage(&tmtcMsg)) { + for (status = tmtcQueue.receiveMessage(&tmtcMsg); status == returnvalue::OK; + status = tmtcQueue.receiveMessage(&tmtcMsg)) { result = handleCfdpPacket(tmtcMsg); if (result != OK) { status = result; } } - auto& fsmRes = destHandler.performStateMachine(); + const DestHandler::FsmResult& destResult = destHandler.stateMachine(); // TODO: Error handling? - while (fsmRes.callStatus == CallStatus::CALL_AGAIN) { - destHandler.performStateMachine(); + while (destResult.callStatus == CallStatus::CALL_AGAIN) { + destHandler.stateMachine(); // TODO: Error handling? } + const SourceHandler::FsmResult& srcResult = srcHandler.stateMachine(); + while (srcResult.callStatus == CallStatus::CALL_AGAIN) { + srcHandler.stateMachine(); + } return status; } diff --git a/mission/cfdp/CfdpHandler.h b/mission/cfdp/CfdpHandler.h index c7f71eda..da526590 100644 --- a/mission/cfdp/CfdpHandler.h +++ b/mission/cfdp/CfdpHandler.h @@ -14,19 +14,22 @@ struct FsfwHandlerParams { FsfwHandlerParams(object_id_t objectId, HasFileSystemIF& vfs, AcceptsTelemetryIF& packetDest, - StorageManagerIF& tcStore, StorageManagerIF& tmStore, MessageQueueIF& msgQueue) + StorageManagerIF& tcStore, StorageManagerIF& tmStore, MessageQueueIF& tmtcQueue, + MessageQueueIF& cfdpQueue) : objectId(objectId), vfs(vfs), packetDest(packetDest), tcStore(tcStore), tmStore(tmStore), - msgQueue(msgQueue) {} + tmtcQueue(tmtcQueue), + cfdpQueue(cfdpQueue) {} object_id_t objectId{}; HasFileSystemIF& vfs; AcceptsTelemetryIF& packetDest; StorageManagerIF& tcStore; StorageManagerIF& tmStore; - MessageQueueIF& msgQueue; + MessageQueueIF& tmtcQueue; + MessageQueueIF& cfdpQueue; }; struct CfdpHandlerCfg { @@ -63,7 +66,8 @@ class CfdpHandler : public SystemObject, public ExecutableObjectIF, public Accep ReturnValue_t performOperation(uint8_t operationCode) override; private: - MessageQueueIF& msgQueue; + MessageQueueIF& tmtcQueue; + MessageQueueIF& cfdpRequestQueue; cfdp::LocalEntityCfg localCfg; cfdp::FsfwParams fsfwParams; SeqCountProviderU16 seqCntProvider; diff --git a/mission/cfdp/Config.h b/mission/cfdp/Config.h index 45f84155..89a3cdd1 100644 --- a/mission/cfdp/Config.h +++ b/mission/cfdp/Config.h @@ -7,8 +7,13 @@ namespace cfdp { class EiveUserHandler : public cfdp::UserBase { public: - explicit EiveUserHandler(HasFileSystemIF& vfs) : cfdp::UserBase(vfs) {} - virtual ~EiveUserHandler() = default; + explicit EiveUserHandler(HasFileSystemIF& vfs, MessageQueueId_t cfdpRequestId) + : cfdp::UserBase(vfs) { + userQueue = QueueFactory::instance()->createMessageQueue(10); + userQueue->setDefaultDestination(cfdpRequestId); + } + + virtual ~EiveUserHandler() { QueueFactory::instance()->deleteMessageQueue(userQueue); } void transactionIndication(const cfdp::TransactionId& id) override {} void eofSentIndication(const cfdp::TransactionId& id) override {} @@ -16,6 +21,7 @@ class EiveUserHandler : public cfdp::UserBase { sif::info << "File transaction finished for transaction with " << params.id << std::endl; } void metadataRecvdIndication(const cfdp::MetadataRecvdParams& params) override { + // TODO: Parse user messages and convert them into put requests where applicable. sif::info << "Metadata received for transaction with " << params.id << std::endl; } void fileSegmentRecvdIndication(const cfdp::FileSegmentRecvdParams& params) override {} @@ -29,6 +35,9 @@ class EiveUserHandler : public cfdp::UserBase { void eofRecvIndication(const cfdp::TransactionId& id) override { sif::info << "EOF PDU received for transaction with " << id << std::endl; } + + private: + MessageQueueIF* userQueue; }; class EiveFaultHandler : public cfdp::FaultHandlerBase { diff --git a/mission/genericFactory.cpp b/mission/genericFactory.cpp index 3d9d0c81..79035f9c 100644 --- a/mission/genericFactory.cpp +++ b/mission/genericFactory.cpp @@ -85,7 +85,7 @@ 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); +// EiveUserHandler USER_HANDLER(HOST_FS); EiveFaultHandler EIVE_FAULT_HANDLER; } // namespace cfdp @@ -274,14 +274,16 @@ 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 EiveUserHandler(HOST_FS, cfdpQueue->getId()); FsfwHandlerParams params(objects::CFDP_HANDLER, HOST_FS, **cfdpFunnel, *tcStore, **tmStore, - *msgQueue); + *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, + CfdpHandlerCfg cfdpCfg(localId, indicationCfg, *eiveUserHandler, EIVE_FAULT_HANDLER, PACKET_LIST, LOST_SEGMENTS, REMOTE_CFG_PROVIDER); auto* cfdpHandler = new CfdpHandler(params, cfdpCfg); // All CFDP packets arrive wrapped inside CCSDS space packets From d2ae8e93624fbd9b3cff1af498415aede861ca2b Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 14 Aug 2023 21:06:49 +0200 Subject: [PATCH 05/82] better naming --- fsfw | 2 +- mission/cfdp/CfdpHandler.cpp | 12 ++++++------ mission/cfdp/CfdpHandler.h | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/fsfw b/fsfw index 60dcacf4..cb1aaea6 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 60dcacf432aa0a7b739f8fdf8bf4aaa37ac614e5 +Subproject commit cb1aaea6cd10f34bf46adf8f91f86af1fb42041a diff --git a/mission/cfdp/CfdpHandler.cpp b/mission/cfdp/CfdpHandler.cpp index 2badd560..72a54a88 100644 --- a/mission/cfdp/CfdpHandler.cpp +++ b/mission/cfdp/CfdpHandler.cpp @@ -11,7 +11,7 @@ using namespace cfdp; CfdpHandler::CfdpHandler(const FsfwHandlerParams& fsfwHandlerParams, const CfdpHandlerCfg& cfdpCfg) : SystemObject(fsfwHandlerParams.objectId), - tmtcQueue(fsfwHandlerParams.tmtcQueue), + pduQueue(fsfwHandlerParams.tmtcQueue), cfdpRequestQueue(fsfwHandlerParams.cfdpQueue), localCfg(cfdpCfg.id, cfdpCfg.indicCfg, cfdpCfg.faultHandler), fsfwParams(fsfwHandlerParams.packetDest, &fsfwHandlerParams.tmtcQueue, this, @@ -28,7 +28,7 @@ CfdpHandler::CfdpHandler(const FsfwHandlerParams& fsfwHandlerParams, const CfdpH return destHandler.getDestHandlerParams().cfg.localId.getValue(); } -[[nodiscard]] MessageQueueId_t CfdpHandler::getRequestQueue() const { return tmtcQueue.getId(); } +[[nodiscard]] MessageQueueId_t CfdpHandler::getRequestQueue() const { return pduQueue.getId(); } ReturnValue_t CfdpHandler::initialize() { ReturnValue_t result = destHandler.initialize(); @@ -47,9 +47,9 @@ ReturnValue_t CfdpHandler::performOperation(uint8_t operationCode) { ReturnValue_t status; ReturnValue_t result = OK; TmTcMessage tmtcMsg; - for (status = tmtcQueue.receiveMessage(&tmtcMsg); status == returnvalue::OK; - status = tmtcQueue.receiveMessage(&tmtcMsg)) { - result = handleCfdpPacket(tmtcMsg); + for (status = pduQueue.receiveMessage(&tmtcMsg); status == returnvalue::OK; + status = pduQueue.receiveMessage(&tmtcMsg)) { + result = handlePduPacket(tmtcMsg); if (result != OK) { status = result; } @@ -67,7 +67,7 @@ ReturnValue_t CfdpHandler::performOperation(uint8_t operationCode) { 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; diff --git a/mission/cfdp/CfdpHandler.h b/mission/cfdp/CfdpHandler.h index da526590..6ee4b07b 100644 --- a/mission/cfdp/CfdpHandler.h +++ b/mission/cfdp/CfdpHandler.h @@ -66,7 +66,7 @@ class CfdpHandler : public SystemObject, public ExecutableObjectIF, public Accep ReturnValue_t performOperation(uint8_t operationCode) override; private: - MessageQueueIF& tmtcQueue; + MessageQueueIF& pduQueue; MessageQueueIF& cfdpRequestQueue; cfdp::LocalEntityCfg localCfg; cfdp::FsfwParams fsfwParams; @@ -77,7 +77,7 @@ class CfdpHandler : public SystemObject, public ExecutableObjectIF, public Accep StorageManagerIF* tcStore = nullptr; StorageManagerIF* tmStore = nullptr; - ReturnValue_t handleCfdpPacket(TmTcMessage& msg); + ReturnValue_t handlePduPacket(TmTcMessage& msg); }; #endif // FSFW_EXAMPLE_HOSTED_CFDPHANDLER_H From c09c0ee9471a23b919fcca2b55d1219be71e1acf Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 14 Aug 2023 21:22:01 +0200 Subject: [PATCH 06/82] clean up handler a bit --- fsfw | 2 +- mission/cfdp/CfdpHandler.cpp | 56 +++++++++++++++++++++++++++++------- mission/cfdp/CfdpHandler.h | 4 +++ 3 files changed, 50 insertions(+), 12 deletions(-) diff --git a/fsfw b/fsfw index cb1aaea6..8c116852 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit cb1aaea6cd10f34bf46adf8f91f86af1fb42041a +Subproject commit 8c1168524049ef0e5b2144b6c04aeb01538053c2 diff --git a/mission/cfdp/CfdpHandler.cpp b/mission/cfdp/CfdpHandler.cpp index 72a54a88..7545aa11 100644 --- a/mission/cfdp/CfdpHandler.cpp +++ b/mission/cfdp/CfdpHandler.cpp @@ -1,5 +1,7 @@ #include "CfdpHandler.h" +#include + #include "fsfw/cfdp/pdu/AckPduReader.h" #include "fsfw/cfdp/pdu/PduHeaderReader.h" #include "fsfw/globalfunctions/arrayprinter.h" @@ -42,17 +44,14 @@ ReturnValue_t CfdpHandler::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 = pduQueue.receiveMessage(&tmtcMsg); status == returnvalue::OK; - status = pduQueue.receiveMessage(&tmtcMsg)) { - result = handlePduPacket(tmtcMsg); - if (result != OK) { - status = result; - } + ReturnValue_t status = OK; + ReturnValue_t result = handlePduPacketMessages(); + if (result != OK) { + status = result; + } + result = handleCfdpMessages(); + if (result != OK) { + status = result; } const DestHandler::FsmResult& destResult = destHandler.stateMachine(); // TODO: Error handling? @@ -139,3 +138,38 @@ ReturnValue_t CfdpHandler::handlePduPacket(TmTcMessage& msg) { } return result; } + +ReturnValue_t CfdpHandler::handleCfdpRequest(CommandMessage& msg) { + // TODO: Handle CFDP requests here, most importantly put requests. If a put request is received, + // check whether one is pending. If none are, start a transaction with the put request, otherwise + // store for put request inside a FIFO for later processing. + 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) { + 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) { + status = result; + } + } + return status; +} diff --git a/mission/cfdp/CfdpHandler.h b/mission/cfdp/CfdpHandler.h index 6ee4b07b..4bea5b95 100644 --- a/mission/cfdp/CfdpHandler.h +++ b/mission/cfdp/CfdpHandler.h @@ -2,6 +2,7 @@ #define FSFW_EXAMPLE_HOSTED_CFDPHANDLER_H #include +#include #include @@ -77,7 +78,10 @@ class CfdpHandler : public SystemObject, public ExecutableObjectIF, public Accep StorageManagerIF* tcStore = nullptr; StorageManagerIF* tmStore = nullptr; + ReturnValue_t handlePduPacketMessages(); ReturnValue_t handlePduPacket(TmTcMessage& msg); + ReturnValue_t handleCfdpRequest(CommandMessage& msg); + ReturnValue_t handleCfdpMessages(); }; #endif // FSFW_EXAMPLE_HOSTED_CFDPHANDLER_H From 952e1c16e537a2fd713a371d4044d93550f20d64 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 16 Aug 2023 11:38:00 +0200 Subject: [PATCH 07/82] improve structure of CFPD mission code --- mission/cfdp/CMakeLists.txt | 2 +- mission/cfdp/CfdpFaultHandler.h | 31 ++++++++++++++++ mission/cfdp/CfdpUser.cpp | 42 +++++++++++++++++++++ mission/cfdp/CfdpUser.h | 34 +++++++++++++++++ mission/cfdp/Config.h | 66 --------------------------------- mission/genericFactory.cpp | 5 ++- tmtc | 2 +- 7 files changed, 112 insertions(+), 70 deletions(-) create mode 100644 mission/cfdp/CfdpFaultHandler.h create mode 100644 mission/cfdp/CfdpUser.cpp create mode 100644 mission/cfdp/CfdpUser.h delete mode 100644 mission/cfdp/Config.h 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..565606c6 --- /dev/null +++ b/mission/cfdp/CfdpFaultHandler.h @@ -0,0 +1,31 @@ +#ifndef MISSION_CFDP_CFDPFAULTHANDLER_H_ +#define MISSION_CFDP_CFDPFAULTHANDLER_H_ + +#include "fsfw/cfdp.h" + +namespace cfdp { + +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_CFDPFAULTHANDLER_H_ */ diff --git a/mission/cfdp/CfdpUser.cpp b/mission/cfdp/CfdpUser.cpp new file mode 100644 index 00000000..65c1f456 --- /dev/null +++ b/mission/cfdp/CfdpUser.cpp @@ -0,0 +1,42 @@ +#include "CfdpUser.h" + +#include + +namespace cfdp { + +EiveUserHandler::EiveUserHandler(HasFileSystemIF& vfs, MessageQueueId_t cfdpRequestId) + : cfdp::UserBase(vfs) { + userQueue = QueueFactory::instance()->createMessageQueue(10); + userQueue->setDefaultDestination(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) { + // TODO: Parse user messages and convert them into put requests where applicable. + sif::info << "Metadata received for transaction with " << params.id << 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..fa4d0485 --- /dev/null +++ b/mission/cfdp/CfdpUser.h @@ -0,0 +1,34 @@ +#ifndef MISSION_CFDP_CFDPUSER_H_ +#define MISSION_CFDP_CFDPUSER_H_ + +#include + +namespace cfdp { + +class EiveUserHandler : public cfdp::UserBase { + public: + explicit EiveUserHandler(HasFileSystemIF& vfs, 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; +}; + +} // namespace cfdp + +#endif /* MISSION_CFDP_CFDPUSER_H_ */ diff --git a/mission/cfdp/Config.h b/mission/cfdp/Config.h deleted file mode 100644 index 89a3cdd1..00000000 --- a/mission/cfdp/Config.h +++ /dev/null @@ -1,66 +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, MessageQueueId_t cfdpRequestId) - : cfdp::UserBase(vfs) { - userQueue = QueueFactory::instance()->createMessageQueue(10); - userQueue->setDefaultDestination(cfdpRequestId); - } - - virtual ~EiveUserHandler() { QueueFactory::instance()->deleteMessageQueue(userQueue); } - - 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 { - // TODO: Parse user messages and convert them into put requests where applicable. - 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; - } - - private: - MessageQueueIF* userQueue; -}; - -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/genericFactory.cpp b/mission/genericFactory.cpp index 79035f9c..9bd000c7 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" @@ -276,7 +277,7 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun auto* tmtcQueue = QueueFactory::instance()->createMessageQueue(32); auto* cfdpQueue = QueueFactory::instance()->createMessageQueue(16); - auto eiveUserHandler = new EiveUserHandler(HOST_FS, cfdpQueue->getId()); + auto eiveUserHandler = new cfdp::EiveUserHandler(HOST_FS, cfdpQueue->getId()); FsfwHandlerParams params(objects::CFDP_HANDLER, HOST_FS, **cfdpFunnel, *tcStore, **tmStore, *tmtcQueue, *cfdpQueue); cfdp::IndicationCfg indicationCfg; diff --git a/tmtc b/tmtc index fd3a7990..b50c75c1 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit fd3a799019f6910cbbb4447cc9605340d66c2703 +Subproject commit b50c75c13cdbbc3d34d2f072d2bf1cb2fbe734b5 From f62a4ee2b4311e79ffa9c0c73ce290ade27dba06 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 16 Aug 2023 13:16:14 +0200 Subject: [PATCH 08/82] this should make proxy op forwarding work --- fsfw | 2 +- mission/cfdp/CfdpUser.cpp | 35 ++++++++++++++++++++++------------- mission/cfdp/CfdpUser.h | 5 ++++- mission/genericFactory.cpp | 2 +- 4 files changed, 28 insertions(+), 16 deletions(-) diff --git a/fsfw b/fsfw index 8c116852..9ef63825 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 8c1168524049ef0e5b2144b6c04aeb01538053c2 +Subproject commit 9ef63825f3d8486b05c3f6193ae0503833e6f8a4 diff --git a/mission/cfdp/CfdpUser.cpp b/mission/cfdp/CfdpUser.cpp index 65c1f456..c2e6024d 100644 --- a/mission/cfdp/CfdpUser.cpp +++ b/mission/cfdp/CfdpUser.cpp @@ -2,34 +2,43 @@ #include +using namespace returnvalue; + namespace cfdp { -EiveUserHandler::EiveUserHandler(HasFileSystemIF& vfs, MessageQueueId_t cfdpRequestId) - : cfdp::UserBase(vfs) { - userQueue = QueueFactory::instance()->createMessageQueue(10); +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); -} +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) { +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) { - // TODO: Parse user messages and convert them into put requests where applicable. 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::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::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) {} diff --git a/mission/cfdp/CfdpUser.h b/mission/cfdp/CfdpUser.h index fa4d0485..ba981cf1 100644 --- a/mission/cfdp/CfdpUser.h +++ b/mission/cfdp/CfdpUser.h @@ -1,13 +1,15 @@ #ifndef MISSION_CFDP_CFDPUSER_H_ #define MISSION_CFDP_CFDPUSER_H_ +#include #include namespace cfdp { class EiveUserHandler : public cfdp::UserBase { public: - explicit EiveUserHandler(HasFileSystemIF& vfs, MessageQueueId_t cfdpRequestId); + explicit EiveUserHandler(HasFileSystemIF& vfs, StorageManagerIF& ipcStore, + MessageQueueId_t cfdpRequestId); virtual ~EiveUserHandler(); @@ -27,6 +29,7 @@ class EiveUserHandler : public cfdp::UserBase { private: MessageQueueIF* userQueue; + ReservedMessageParser* reservedMsgParser; }; } // namespace cfdp diff --git a/mission/genericFactory.cpp b/mission/genericFactory.cpp index 9bd000c7..73645f79 100644 --- a/mission/genericFactory.cpp +++ b/mission/genericFactory.cpp @@ -277,7 +277,7 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun auto* tmtcQueue = QueueFactory::instance()->createMessageQueue(32); auto* cfdpQueue = QueueFactory::instance()->createMessageQueue(16); - auto eiveUserHandler = new cfdp::EiveUserHandler(HOST_FS, cfdpQueue->getId()); + auto eiveUserHandler = new cfdp::EiveUserHandler(HOST_FS, **ipcStore, cfdpQueue->getId()); FsfwHandlerParams params(objects::CFDP_HANDLER, HOST_FS, **cfdpFunnel, *tcStore, **tmStore, *tmtcQueue, *cfdpQueue); cfdp::IndicationCfg indicationCfg; From 8186a3ef4fe2b2287d8e85752a9c63adb83a9dd5 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 16 Aug 2023 13:22:05 +0200 Subject: [PATCH 09/82] proxy request should now arrive at the handler --- mission/cfdp/CfdpHandler.cpp | 7 ++++++- mission/cfdp/CfdpHandler.h | 6 +++++- mission/genericFactory.cpp | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/mission/cfdp/CfdpHandler.cpp b/mission/cfdp/CfdpHandler.cpp index 7545aa11..b2121022 100644 --- a/mission/cfdp/CfdpHandler.cpp +++ b/mission/cfdp/CfdpHandler.cpp @@ -1,5 +1,6 @@ #include "CfdpHandler.h" +#include #include #include "fsfw/cfdp/pdu/AckPduReader.h" @@ -22,7 +23,8 @@ CfdpHandler::CfdpHandler(const FsfwHandlerParams& fsfwHandlerParams, const CfdpH cfdpCfg.packetInfoList, cfdpCfg.lostSegmentsList), this->fsfwParams), srcHandler(SourceHandlerParams(localCfg, cfdpCfg.userHandler, seqCntProvider), - this->fsfwParams) {} + this->fsfwParams), + ipcStore(fsfwHandlerParams.ipcStore) {} [[nodiscard]] const char* CfdpHandler::getName() const { return "CFDP Handler"; } @@ -143,6 +145,9 @@ ReturnValue_t CfdpHandler::handleCfdpRequest(CommandMessage& msg) { // TODO: Handle CFDP requests here, most importantly put requests. If a put request is received, // check whether one is pending. If none are, start a transaction with the put request, otherwise // store for put request inside a FIFO for later processing. + auto accessorPair = ipcStore.getData(CfdpMessage::getStoreId(&msg)); + + sif::info << "received CFDP request" << std::endl; return OK; } diff --git a/mission/cfdp/CfdpHandler.h b/mission/cfdp/CfdpHandler.h index 4bea5b95..45314d40 100644 --- a/mission/cfdp/CfdpHandler.h +++ b/mission/cfdp/CfdpHandler.h @@ -15,13 +15,15 @@ struct FsfwHandlerParams { FsfwHandlerParams(object_id_t objectId, HasFileSystemIF& vfs, AcceptsTelemetryIF& packetDest, - StorageManagerIF& tcStore, StorageManagerIF& tmStore, MessageQueueIF& tmtcQueue, + StorageManagerIF& tcStore, StorageManagerIF& tmStore, + StorageManagerIF& ipcStore, MessageQueueIF& tmtcQueue, MessageQueueIF& cfdpQueue) : objectId(objectId), vfs(vfs), packetDest(packetDest), tcStore(tcStore), tmStore(tmStore), + ipcStore(ipcStore), tmtcQueue(tmtcQueue), cfdpQueue(cfdpQueue) {} object_id_t objectId{}; @@ -29,6 +31,7 @@ struct FsfwHandlerParams { AcceptsTelemetryIF& packetDest; StorageManagerIF& tcStore; StorageManagerIF& tmStore; + StorageManagerIF& ipcStore; MessageQueueIF& tmtcQueue; MessageQueueIF& cfdpQueue; }; @@ -75,6 +78,7 @@ class CfdpHandler : public SystemObject, public ExecutableObjectIF, public Accep cfdp::DestHandler destHandler; cfdp::SourceHandler srcHandler; + StorageManagerIF& ipcStore; StorageManagerIF* tcStore = nullptr; StorageManagerIF* tmStore = nullptr; diff --git a/mission/genericFactory.cpp b/mission/genericFactory.cpp index 73645f79..e2c4511e 100644 --- a/mission/genericFactory.cpp +++ b/mission/genericFactory.cpp @@ -279,7 +279,7 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun 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, - *tmtcQueue, *cfdpQueue); + **ipcStore, *tmtcQueue, *cfdpQueue); cfdp::IndicationCfg indicationCfg; UnsignedByteField apid(config::EIVE_LOCAL_CFDP_ENTITY_ID); cfdp::EntityId localId(apid); From d6fd28e124dd83662b586740aa2f9a94f74fa5ac Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 16 Aug 2023 13:35:09 +0200 Subject: [PATCH 10/82] fix hosted build --- bsp_hosted/ObjectFactory.cpp | 2 ++ bsp_hosted/scheduling.cpp | 2 +- dummies/helperFactory.cpp | 4 ++-- mission/scheduling.cpp | 9 +++++---- mission/scheduling.h | 2 +- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/bsp_hosted/ObjectFactory.cpp b/bsp_hosted/ObjectFactory.cpp index 4873bc58..2f43393f 100644 --- a/bsp_hosted/ObjectFactory.cpp +++ b/bsp_hosted/ObjectFactory.cpp @@ -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/scheduling.cpp b/bsp_hosted/scheduling.cpp index 5fd53906..e82748f4 100644 --- a/bsp_hosted/scheduling.cpp +++ b/bsp_hosted/scheduling.cpp @@ -201,7 +201,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); 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/mission/scheduling.cpp b/mission/scheduling.cpp index 27a6417c..b23f8b0c 100644 --- a/mission/scheduling.cpp +++ b/mission/scheduling.cpp @@ -4,13 +4,14 @@ #include "fsfw/tasks/PeriodicTaskIF.h" -void scheduling::scheduleTmpTempSensors(PeriodicTaskIF* tmpTask) { - const std::array tmpIds = {objects::TMP1075_HANDLER_TCS_0, +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, - // damaged. - // objects::TMP1075_HANDLER_PLPCDU_1, 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 From 2b5dcf99dce0273728d6aaf682eef5afa7e4f703 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 16 Aug 2023 13:36:34 +0200 Subject: [PATCH 11/82] changelog --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5357e831..6150a955 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,14 @@ will consitute of a breaking change warranting a new major release: # [unreleased] +## Added + +- CFDP source handler, which allow file downlink. + +## Fixed + +- Host build fixes + # [v6.4.0] 2023-08-16 - `eive-tmtc`: v5.4.3 From 033babf50a3ac29a69cc5a7c80c334ca4f63a7f8 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 17 Aug 2023 16:45:29 +0200 Subject: [PATCH 12/82] bump tmtc --- tmtc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmtc b/tmtc index b50c75c1..55624f04 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit b50c75c13cdbbc3d34d2f072d2bf1cb2fbe734b5 +Subproject commit 55624f044759beacd26d82bb60210f77234dbcb7 From 2acb6d81320be74df8eb4ca942deadd046f86551 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 30 Aug 2023 10:56:32 +0200 Subject: [PATCH 13/82] bump tmtc --- tmtc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmtc b/tmtc index 55624f04..8d6ca602 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 55624f044759beacd26d82bb60210f77234dbcb7 +Subproject commit 8d6ca602f2ab8dd6b38e88546f23dd8e809211c2 From 0c1eae3382c66332081bcaddd1390540465f2c88 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 30 Aug 2023 11:35:06 +0200 Subject: [PATCH 14/82] auto-formatting --- fsfw | 2 +- mission/scheduling.cpp | 9 ++++----- tmtc | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/fsfw b/fsfw index 9ef63825..fb1500e0 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 9ef63825f3d8486b05c3f6193ae0503833e6f8a4 +Subproject commit fb1500e041c4d89316a9bceabc89ed870c8032be diff --git a/mission/scheduling.cpp b/mission/scheduling.cpp index b23f8b0c..4dc5bade 100644 --- a/mission/scheduling.cpp +++ b/mission/scheduling.cpp @@ -5,11 +5,10 @@ #include "fsfw/tasks/PeriodicTaskIF.h" 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) { + 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) { diff --git a/tmtc b/tmtc index 8d6ca602..f9f8f948 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 8d6ca602f2ab8dd6b38e88546f23dd8e809211c2 +Subproject commit f9f8f9481fe78aec60a4ad121a72d2011d18363f From 2f6565621b5d742f213298703492a6e510db210b Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 30 Aug 2023 11:38:01 +0200 Subject: [PATCH 15/82] bump tmtc for bugfix --- tmtc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmtc b/tmtc index f9f8f948..c2bed714 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit f9f8f9481fe78aec60a4ad121a72d2011d18363f +Subproject commit c2bed714dc43bc4a8ef4954fe72ae7c98b8bc2c8 From b6b342bf9972f5815245476620a49731d55fe3e1 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 30 Aug 2023 11:47:39 +0200 Subject: [PATCH 16/82] introduce queue for put requests --- mission/cfdp/CfdpHandler.cpp | 21 +++++++++++++++++---- mission/cfdp/CfdpHandler.h | 2 ++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/mission/cfdp/CfdpHandler.cpp b/mission/cfdp/CfdpHandler.cpp index b2121022..92a3827b 100644 --- a/mission/cfdp/CfdpHandler.cpp +++ b/mission/cfdp/CfdpHandler.cpp @@ -143,11 +143,22 @@ ReturnValue_t CfdpHandler::handlePduPacket(TmTcMessage& msg) { ReturnValue_t CfdpHandler::handleCfdpRequest(CommandMessage& msg) { // TODO: Handle CFDP requests here, most importantly put requests. If a put request is received, - // check whether one is pending. If none are, start a transaction with the put request, otherwise - // store for put request inside a FIFO for later processing. + // check whether one is pending. If none are, start a transaction with the put request, + // otherwise store for put request inside a FIFO for later processing. auto accessorPair = ipcStore.getData(CfdpMessage::getStoreId(&msg)); - - sif::info << "received CFDP request" << std::endl; + 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 { + // TODO: Retrieve put request and remote configuration. + // srcHandler.transactionStart() + } + } return OK; } @@ -159,6 +170,7 @@ ReturnValue_t CfdpHandler::handlePduPacketMessages() { status = pduQueue.receiveMessage(&pduMsg)) { result = handlePduPacket(pduMsg); if (result != OK) { + // TODO: Maybe add printout with context specific information? status = result; } } @@ -173,6 +185,7 @@ ReturnValue_t CfdpHandler::handleCfdpMessages() { status = cfdpRequestQueue.receiveMessage(&cfdpMsg)) { result = handleCfdpRequest(cfdpMsg); if (result != OK) { + // TODO: Maybe add printout with context specific information? status = result; } } diff --git a/mission/cfdp/CfdpHandler.h b/mission/cfdp/CfdpHandler.h index 45314d40..2a840fb2 100644 --- a/mission/cfdp/CfdpHandler.h +++ b/mission/cfdp/CfdpHandler.h @@ -1,6 +1,7 @@ #ifndef FSFW_EXAMPLE_HOSTED_CFDPHANDLER_H #define FSFW_EXAMPLE_HOSTED_CFDPHANDLER_H +#include #include #include @@ -77,6 +78,7 @@ class CfdpHandler : public SystemObject, public ExecutableObjectIF, public Accep SeqCountProviderU16 seqCntProvider; cfdp::DestHandler destHandler; cfdp::SourceHandler srcHandler; + etl::queue putRequestQueue; StorageManagerIF& ipcStore; StorageManagerIF* tcStore = nullptr; From fa43c5480bdc6486ce0e7179f8a4df49a8c61245 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 30 Aug 2023 11:58:21 +0200 Subject: [PATCH 17/82] that should cause a transaction start --- mission/cfdp/CfdpHandler.cpp | 19 +++++++++++++++++-- mission/cfdp/CfdpHandler.h | 1 + 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/mission/cfdp/CfdpHandler.cpp b/mission/cfdp/CfdpHandler.cpp index 92a3827b..a5ab231d 100644 --- a/mission/cfdp/CfdpHandler.cpp +++ b/mission/cfdp/CfdpHandler.cpp @@ -17,6 +17,7 @@ CfdpHandler::CfdpHandler(const FsfwHandlerParams& fsfwHandlerParams, const CfdpH 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, @@ -145,7 +146,6 @@ ReturnValue_t CfdpHandler::handleCfdpRequest(CommandMessage& msg) { // TODO: Handle CFDP requests here, most importantly put requests. If a put request is received, // check whether one is pending. If none are, start a transaction with the put request, // otherwise store for put request inside a FIFO for later processing. - auto accessorPair = ipcStore.getData(CfdpMessage::getStoreId(&msg)); if (msg.getCommand() == CfdpMessage::PUT_REQUEST) { sif::info << "Received CFDP put request" << std::endl; if (srcHandler.getState() != CfdpState::IDLE) { @@ -156,7 +156,22 @@ ReturnValue_t CfdpHandler::handleCfdpRequest(CommandMessage& msg) { putRequestQueue.push(CfdpMessage::getStoreId(&msg)); } else { // TODO: Retrieve put request and remote configuration. - // srcHandler.transactionStart() + 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) { + // TODO: Trigger event + return FAILED; + } + return srcHandler.transactionStart(putRequest, *remoteCfg); } } return OK; diff --git a/mission/cfdp/CfdpHandler.h b/mission/cfdp/CfdpHandler.h index 2a840fb2..18cf46b7 100644 --- a/mission/cfdp/CfdpHandler.h +++ b/mission/cfdp/CfdpHandler.h @@ -74,6 +74,7 @@ class CfdpHandler : public SystemObject, public ExecutableObjectIF, public Accep MessageQueueIF& pduQueue; MessageQueueIF& cfdpRequestQueue; cfdp::LocalEntityCfg localCfg; + cfdp::RemoteConfigTableIF& remoteCfgProvider; cfdp::FsfwParams fsfwParams; SeqCountProviderU16 seqCntProvider; cfdp::DestHandler destHandler; From ea2a137aecad485953b06f642dd9c80b6fda0df1 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 30 Aug 2023 13:10:51 +0200 Subject: [PATCH 18/82] add error message --- mission/cfdp/CfdpHandler.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mission/cfdp/CfdpHandler.cpp b/mission/cfdp/CfdpHandler.cpp index a5ab231d..5f3b11e2 100644 --- a/mission/cfdp/CfdpHandler.cpp +++ b/mission/cfdp/CfdpHandler.cpp @@ -168,6 +168,8 @@ ReturnValue_t CfdpHandler::handleCfdpRequest(CommandMessage& msg) { 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; } From 6f2eaee50a13fa82889fcb952d90a70d42d7b54e Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 31 Aug 2023 15:10:43 +0200 Subject: [PATCH 19/82] trigger a useful event --- .../fsfwconfig/events/translateEvents.cpp | 7 +- .../fsfwconfig/objects/translateObjects.cpp | 2 +- fsfw | 2 +- generators/bsp_hosted_events.csv | 1 + generators/bsp_hosted_returnvalues.csv | 387 ++++++------ generators/bsp_q7s_events.csv | 1 + generators/bsp_q7s_returnvalues.csv | 579 +++++++++--------- generators/events/translateEvents.cpp | 7 +- generators/objects/translateObjects.cpp | 2 +- linux/fsfwconfig/events/translateEvents.cpp | 7 +- linux/fsfwconfig/objects/translateObjects.cpp | 2 +- mission/cfdp/CfdpHandler.cpp | 4 + tmtc | 2 +- 13 files changed, 516 insertions(+), 487 deletions(-) diff --git a/bsp_hosted/fsfwconfig/events/translateEvents.cpp b/bsp_hosted/fsfwconfig/events/translateEvents.cpp index 55158be2..0aaf5e9b 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 304 translations. + * @brief Auto-generated event translation file. Contains 305 translations. * @details - * Generated on: 2023-08-15 13:27:11 + * Generated on: 2023-08-31 15:00:35 */ #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"; @@ -486,6 +487,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): diff --git a/bsp_hosted/fsfwconfig/objects/translateObjects.cpp b/bsp_hosted/fsfwconfig/objects/translateObjects.cpp index c7eb075d..e9d99a44 100644 --- a/bsp_hosted/fsfwconfig/objects/translateObjects.cpp +++ b/bsp_hosted/fsfwconfig/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 171 translations. - * Generated on: 2023-08-15 13:27:11 + * Generated on: 2023-08-31 15:00:35 */ #include "translateObjects.h" diff --git a/fsfw b/fsfw index fb1500e0..dfcfb035 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit fb1500e041c4d89316a9bceabc89ed870c8032be +Subproject commit dfcfb035bed4469aad2dad034567309d0dda7d29 diff --git a/generators/bsp_hosted_events.csv b/generators/bsp_hosted_events.csv index b00c56b2..9ac8e0b8 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 diff --git a/generators/bsp_hosted_returnvalues.csv b/generators/bsp_hosted_returnvalues.csv index 50a86ae3..e7b1109a 100644 --- a/generators/bsp_hosted_returnvalues.csv +++ b/generators/bsp_hosted_returnvalues.csv @@ -322,193 +322,200 @@ 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 +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 +0x3c00;SPH_ConnBroken;No description;0;SEMAPHORE_IF;fsfw/src/fsfw/osal/common/TcpTmTcServer.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 diff --git a/generators/bsp_q7s_events.csv b/generators/bsp_q7s_events.csv index b00c56b2..9ac8e0b8 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 diff --git a/generators/bsp_q7s_returnvalues.csv b/generators/bsp_q7s_returnvalues.csv index 1bc91860..355ce26b 100644 --- a/generators/bsp_q7s_returnvalues.csv +++ b/generators/bsp_q7s_returnvalues.csv @@ -322,289 +322,296 @@ 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 +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 +0x3c00;SPH_ConnBroken;No description;0;SEMAPHORE_IF;fsfw/src/fsfw/osal/common/TcpTmTcServer.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 +0x7100;SCBU_KeyNotFound;No description;0;SCRATCH_BUFFER;bsp_q7s/memory/scratchApi.h diff --git a/generators/events/translateEvents.cpp b/generators/events/translateEvents.cpp index 55158be2..0aaf5e9b 100644 --- a/generators/events/translateEvents.cpp +++ b/generators/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** - * @brief Auto-generated event translation file. Contains 304 translations. + * @brief Auto-generated event translation file. Contains 305 translations. * @details - * Generated on: 2023-08-15 13:27:11 + * Generated on: 2023-08-31 15:00:35 */ #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"; @@ -486,6 +487,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): diff --git a/generators/objects/translateObjects.cpp b/generators/objects/translateObjects.cpp index 53be3a34..f62f47e1 100644 --- a/generators/objects/translateObjects.cpp +++ b/generators/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 175 translations. - * Generated on: 2023-08-15 13:27:11 + * Generated on: 2023-08-31 15:00:35 */ #include "translateObjects.h" diff --git a/linux/fsfwconfig/events/translateEvents.cpp b/linux/fsfwconfig/events/translateEvents.cpp index 55158be2..0aaf5e9b 100644 --- a/linux/fsfwconfig/events/translateEvents.cpp +++ b/linux/fsfwconfig/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** - * @brief Auto-generated event translation file. Contains 304 translations. + * @brief Auto-generated event translation file. Contains 305 translations. * @details - * Generated on: 2023-08-15 13:27:11 + * Generated on: 2023-08-31 15:00:35 */ #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"; @@ -486,6 +487,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): diff --git a/linux/fsfwconfig/objects/translateObjects.cpp b/linux/fsfwconfig/objects/translateObjects.cpp index 53be3a34..f62f47e1 100644 --- a/linux/fsfwconfig/objects/translateObjects.cpp +++ b/linux/fsfwconfig/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 175 translations. - * Generated on: 2023-08-15 13:27:11 + * Generated on: 2023-08-31 15:00:35 */ #include "translateObjects.h" diff --git a/mission/cfdp/CfdpHandler.cpp b/mission/cfdp/CfdpHandler.cpp index 5f3b11e2..c531b975 100644 --- a/mission/cfdp/CfdpHandler.cpp +++ b/mission/cfdp/CfdpHandler.cpp @@ -173,6 +173,7 @@ ReturnValue_t CfdpHandler::handleCfdpRequest(CommandMessage& msg) { // TODO: Trigger event return FAILED; } + sif::info << "starting transfer" << std::endl; return srcHandler.transactionStart(putRequest, *remoteCfg); } } @@ -202,6 +203,9 @@ ReturnValue_t CfdpHandler::handleCfdpMessages() { 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; } diff --git a/tmtc b/tmtc index c2bed714..d72b7d9d 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit c2bed714dc43bc4a8ef4954fe72ae7c98b8bc2c8 +Subproject commit d72b7d9d663013ac75350728edffa15f7a379039 From 7e9648eabfc8a4720ea57e561de138d9e847116d Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 31 Aug 2023 15:20:19 +0200 Subject: [PATCH 20/82] CFDP handler --- mission/cfdp/CfdpHandler.cpp | 12 +++++++----- tmtc | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/mission/cfdp/CfdpHandler.cpp b/mission/cfdp/CfdpHandler.cpp index c531b975..e1c70c72 100644 --- a/mission/cfdp/CfdpHandler.cpp +++ b/mission/cfdp/CfdpHandler.cpp @@ -168,12 +168,14 @@ ReturnValue_t CfdpHandler::handleCfdpRequest(CommandMessage& msg) { RemoteEntityCfg* remoteCfg; remoteCfgProvider.getRemoteCfg(putRequest.getDestId(), &remoteCfg); if (remoteCfg == nullptr) { - sif::error << "CfdpHandler: No remote configuration found for destination ID " << - putRequest.getDestId() << std::endl; + sif::error << "CfdpHandler: No remote configuration found for destination ID " + << putRequest.getDestId() << std::endl; // TODO: Trigger event return FAILED; } - sif::info << "starting transfer" << std::endl; + 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); } } @@ -203,8 +205,8 @@ ReturnValue_t CfdpHandler::handleCfdpMessages() { 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; + 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; diff --git a/tmtc b/tmtc index d72b7d9d..7f79ef6c 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit d72b7d9d663013ac75350728edffa15f7a379039 +Subproject commit 7f79ef6c12604fcf827890c7f47aec823f7d3efc From c7b27c009266ec9a3b06f84a3059b57df1a2be43 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 4 Sep 2023 11:03:32 +0200 Subject: [PATCH 21/82] source transactions now working --- fsfw | 2 +- mission/cfdp/CfdpHandler.cpp | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/fsfw b/fsfw index dfcfb035..470f589b 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit dfcfb035bed4469aad2dad034567309d0dda7d29 +Subproject commit 470f589bde405c39f5a7fbf191b11b8b48058128 diff --git a/mission/cfdp/CfdpHandler.cpp b/mission/cfdp/CfdpHandler.cpp index e1c70c72..e8fb7b6c 100644 --- a/mission/cfdp/CfdpHandler.cpp +++ b/mission/cfdp/CfdpHandler.cpp @@ -109,16 +109,19 @@ ReturnValue_t CfdpHandler::handlePduPacket(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. @@ -135,7 +138,7 @@ ReturnValue_t CfdpHandler::handlePduPacket(TmTcMessage& msg) { if (ackedDirective == FileDirective::EOF_DIRECTIVE) { passToSourceHandler(); } else if (ackedDirective == FileDirective::FINISH) { - passToDestHandler(); + return passToDestHandler(); } } } From b7558e95421edb3a22733cb43d0c235e2dafb957 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 4 Sep 2023 11:20:21 +0200 Subject: [PATCH 22/82] update retvals --- bsp_hosted/fsfwconfig/events/translateEvents.cpp | 2 +- bsp_hosted/fsfwconfig/objects/translateObjects.cpp | 2 +- generators/bsp_hosted_returnvalues.csv | 1 - generators/bsp_q7s_returnvalues.csv | 1 - generators/events/translateEvents.cpp | 2 +- generators/objects/translateObjects.cpp | 2 +- linux/fsfwconfig/events/translateEvents.cpp | 2 +- linux/fsfwconfig/objects/translateObjects.cpp | 2 +- tmtc | 2 +- 9 files changed, 7 insertions(+), 9 deletions(-) diff --git a/bsp_hosted/fsfwconfig/events/translateEvents.cpp b/bsp_hosted/fsfwconfig/events/translateEvents.cpp index 0aaf5e9b..1718df9d 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 305 translations. * @details - * Generated on: 2023-08-31 15:00:35 + * Generated on: 2023-09-04 11:19:49 */ #include "translateEvents.h" diff --git a/bsp_hosted/fsfwconfig/objects/translateObjects.cpp b/bsp_hosted/fsfwconfig/objects/translateObjects.cpp index e9d99a44..9a211be6 100644 --- a/bsp_hosted/fsfwconfig/objects/translateObjects.cpp +++ b/bsp_hosted/fsfwconfig/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 171 translations. - * Generated on: 2023-08-31 15:00:35 + * Generated on: 2023-09-04 11:19:49 */ #include "translateObjects.h" diff --git a/generators/bsp_hosted_returnvalues.csv b/generators/bsp_hosted_returnvalues.csv index e7b1109a..8eefe64f 100644 --- a/generators/bsp_hosted_returnvalues.csv +++ b/generators/bsp_hosted_returnvalues.csv @@ -364,7 +364,6 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path 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 -0x3c00;SPH_ConnBroken;No description;0;SEMAPHORE_IF;fsfw/src/fsfw/osal/common/TcpTmTcServer.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 diff --git a/generators/bsp_q7s_returnvalues.csv b/generators/bsp_q7s_returnvalues.csv index 355ce26b..bad1177a 100644 --- a/generators/bsp_q7s_returnvalues.csv +++ b/generators/bsp_q7s_returnvalues.csv @@ -364,7 +364,6 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path 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 -0x3c00;SPH_ConnBroken;No description;0;SEMAPHORE_IF;fsfw/src/fsfw/osal/common/TcpTmTcServer.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 diff --git a/generators/events/translateEvents.cpp b/generators/events/translateEvents.cpp index 0aaf5e9b..1718df9d 100644 --- a/generators/events/translateEvents.cpp +++ b/generators/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** * @brief Auto-generated event translation file. Contains 305 translations. * @details - * Generated on: 2023-08-31 15:00:35 + * Generated on: 2023-09-04 11:19:49 */ #include "translateEvents.h" diff --git a/generators/objects/translateObjects.cpp b/generators/objects/translateObjects.cpp index f62f47e1..15a545c0 100644 --- a/generators/objects/translateObjects.cpp +++ b/generators/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 175 translations. - * Generated on: 2023-08-31 15:00:35 + * Generated on: 2023-09-04 11:19:49 */ #include "translateObjects.h" diff --git a/linux/fsfwconfig/events/translateEvents.cpp b/linux/fsfwconfig/events/translateEvents.cpp index 0aaf5e9b..1718df9d 100644 --- a/linux/fsfwconfig/events/translateEvents.cpp +++ b/linux/fsfwconfig/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** * @brief Auto-generated event translation file. Contains 305 translations. * @details - * Generated on: 2023-08-31 15:00:35 + * Generated on: 2023-09-04 11:19:49 */ #include "translateEvents.h" diff --git a/linux/fsfwconfig/objects/translateObjects.cpp b/linux/fsfwconfig/objects/translateObjects.cpp index f62f47e1..15a545c0 100644 --- a/linux/fsfwconfig/objects/translateObjects.cpp +++ b/linux/fsfwconfig/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 175 translations. - * Generated on: 2023-08-31 15:00:35 + * Generated on: 2023-09-04 11:19:49 */ #include "translateObjects.h" diff --git a/tmtc b/tmtc index 7f79ef6c..25377ccf 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 7f79ef6c12604fcf827890c7f47aec823f7d3efc +Subproject commit 25377ccfa227fb77f4cab3d593f7953516b88bf9 From 9c36898dcd376062e619914d1c1179d8e44bce15 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 5 Sep 2023 16:05:28 +0200 Subject: [PATCH 23/82] increase TM store size a bit --- fsfw | 2 +- mission/genericFactory.cpp | 7 ++++--- tmtc | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/fsfw b/fsfw index 470f589b..448fbd0d 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 470f589bde405c39f5a7fbf191b11b8b48058128 +Subproject commit 448fbd0d388fe0b19de9b65ee7853681306fd546 diff --git a/mission/genericFactory.cpp b/mission/genericFactory.cpp index e2c4511e..9d2778f3 100644 --- a/mission/genericFactory.cpp +++ b/mission/genericFactory.cpp @@ -112,19 +112,19 @@ 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}}; + {300, 512}, {300, 1200}, {120, 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}, @@ -284,6 +284,7 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun UnsignedByteField apid(config::EIVE_LOCAL_CFDP_ENTITY_ID); cfdp::EntityId localId(apid); GROUND_REMOTE_CFG.defaultChecksum = cfdp::ChecksumType::CRC_32; + GROUND_REMOTE_CFG.maxFileSegmentLen = 990; CfdpHandlerCfg cfdpCfg(localId, indicationCfg, *eiveUserHandler, EIVE_FAULT_HANDLER, PACKET_LIST, LOST_SEGMENTS, REMOTE_CFG_PROVIDER); auto* cfdpHandler = new CfdpHandler(params, cfdpCfg); diff --git a/tmtc b/tmtc index 25377ccf..1b0a7aea 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 25377ccfa227fb77f4cab3d593f7953516b88bf9 +Subproject commit 1b0a7aeabda128cb6ae1092541f100df288d38b1 From a7ac38342309a9d13be5d7c9b9ba1db2f61bf2ad Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 6 Sep 2023 10:11:33 +0200 Subject: [PATCH 24/82] stooopid stuff --- fsfw | 2 +- mission/cfdp/CfdpHandler.cpp | 1 + mission/tmtc/PusLiveDemux.cpp | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/fsfw b/fsfw index 448fbd0d..c1431984 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 448fbd0d388fe0b19de9b65ee7853681306fd546 +Subproject commit c1431984947275f7c2c33c1e671b0e4d17c77f71 diff --git a/mission/cfdp/CfdpHandler.cpp b/mission/cfdp/CfdpHandler.cpp index e8fb7b6c..e64bd5df 100644 --- a/mission/cfdp/CfdpHandler.cpp +++ b/mission/cfdp/CfdpHandler.cpp @@ -64,6 +64,7 @@ ReturnValue_t CfdpHandler::performOperation(uint8_t operationCode) { } const SourceHandler::FsmResult& srcResult = srcHandler.stateMachine(); while (srcResult.callStatus == CallStatus::CALL_AGAIN) { + sif::debug << "calling fsm" << std::endl; srcHandler.stateMachine(); } return status; diff --git a/mission/tmtc/PusLiveDemux.cpp b/mission/tmtc/PusLiveDemux.cpp index 8ba69e07..6e9899d4 100644 --- a/mission/tmtc/PusLiveDemux.cpp +++ b/mission/tmtc/PusLiveDemux.cpp @@ -22,6 +22,8 @@ ReturnValue_t PusLiveDemux::demultiplexPackets(StorageManagerIF& tmStore, #if FSFW_CPP_OSTREAM_ENABLED == 1 sif::error << "PusLiveDemux::handlePacket: Store too full to create data copy" << std::endl; #endif + tmStore.deleteData(origStoreId); + break; } } else { message.setStorageId(origStoreId); From c64f1f869332ea27d6b64ce142d28d3edf7a4058 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 6 Sep 2023 13:40:38 +0200 Subject: [PATCH 25/82] a lot of good stuff --- bsp_hosted/CMakeLists.txt | 2 +- bsp_hosted/OBSWConfig.h.in | 2 +- .../{ObjectFactory.cpp => objectFactory.cpp} | 6 +- .../{ObjectFactory.h => objectFactory.h} | 0 bsp_hosted/scheduling.cpp | 38 ++++++++++- common/config/eive/definitions.h | 14 ++++- fsfw | 2 +- mission/cfdp/CfdpHandler.cpp | 63 ++++++++++++------- mission/cfdp/CfdpHandler.h | 2 +- mission/genericFactory.cpp | 22 ++++--- mission/genericFactory.h | 2 +- mission/tmtc/CfdpTmFunnel.cpp | 26 +++++--- mission/tmtc/CfdpTmFunnel.h | 4 +- mission/tmtc/PusLiveDemux.cpp | 17 ++++- tmtc | 2 +- 15 files changed, 145 insertions(+), 57 deletions(-) rename bsp_hosted/{ObjectFactory.cpp => objectFactory.cpp} (97%) rename bsp_hosted/{ObjectFactory.h => objectFactory.h} (100%) 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/ObjectFactory.cpp b/bsp_hosted/objectFactory.cpp similarity index 97% rename from bsp_hosted/ObjectFactory.cpp rename to bsp_hosted/objectFactory.cpp index 2f43393f..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(); 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 e82748f4..95da8ea1 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); @@ -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/common/config/eive/definitions.h b/common/config/eive/definitions.h index b369f512..d5ebe674 100644 --- a/common/config/eive/definitions.h +++ b/common/config/eive/definitions.h @@ -58,14 +58,22 @@ 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 CFDP_MAX_FSM_CALL_COUNT_SRC_HANDLER = 50; +static constexpr uint32_t CFDP_MAX_FSM_CALL_COUNT_DEST_HANDLER = 300; +static constexpr uint32_t CFDP_SHORT_DELAY_MS = 100; +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 = 150; 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 = 300; +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/fsfw b/fsfw index c1431984..c199cbed 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit c1431984947275f7c2c33c1e671b0e4d17c77f71 +Subproject commit c199cbedaa4b7f6ba0b88fae26412cfa65f36739 diff --git a/mission/cfdp/CfdpHandler.cpp b/mission/cfdp/CfdpHandler.cpp index e64bd5df..cc400b9a 100644 --- a/mission/cfdp/CfdpHandler.cpp +++ b/mission/cfdp/CfdpHandler.cpp @@ -3,10 +3,12 @@ #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" using namespace returnvalue; @@ -46,28 +48,47 @@ ReturnValue_t CfdpHandler::initialize() { return SystemObject::initialize(); } -ReturnValue_t CfdpHandler::performOperation(uint8_t operationCode) { - ReturnValue_t status = OK; - ReturnValue_t result = handlePduPacketMessages(); - if (result != OK) { - status = result; +[[noreturn]] ReturnValue_t CfdpHandler::performOperation(uint8_t operationCode) { + while (true) { + bool shortDelay = false; + ReturnValue_t result = handlePduPacketMessages(); + if (result != OK) { + } + result = handleCfdpMessages(); + if (result != OK) { + } + uint32_t fsmCount = 0; + 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 = 0; + const SourceHandler::FsmResult& srcResult = srcHandler.stateMachine(); + 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.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); } - result = handleCfdpMessages(); - if (result != OK) { - status = result; - } - const DestHandler::FsmResult& destResult = destHandler.stateMachine(); - // TODO: Error handling? - while (destResult.callStatus == CallStatus::CALL_AGAIN) { - destHandler.stateMachine(); - // TODO: Error handling? - } - const SourceHandler::FsmResult& srcResult = srcHandler.stateMachine(); - while (srcResult.callStatus == CallStatus::CALL_AGAIN) { - sif::debug << "calling fsm" << std::endl; - srcHandler.stateMachine(); - } - return status; } ReturnValue_t CfdpHandler::handlePduPacket(TmTcMessage& msg) { diff --git a/mission/cfdp/CfdpHandler.h b/mission/cfdp/CfdpHandler.h index 18cf46b7..d409d6bd 100644 --- a/mission/cfdp/CfdpHandler.h +++ b/mission/cfdp/CfdpHandler.h @@ -68,7 +68,7 @@ class CfdpHandler : public SystemObject, public ExecutableObjectIF, public Accep [[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& pduQueue; diff --git a/mission/genericFactory.cpp b/mission/genericFactory.cpp index 9d2778f3..ea7a8bcb 100644 --- a/mission/genericFactory.cpp +++ b/mission/genericFactory.cpp @@ -99,7 +99,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); @@ -118,7 +119,7 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun { PoolManager::LocalPoolConfig poolCfg = {{600, 32}, {400, 64}, {400, 128}, - {300, 512}, {300, 1200}, {120, 2048}}; + {350, 512}, {500, 1200}, {100, 2048}}; *tmStore = new PoolManager(objects::TM_STORE, poolCfg); } @@ -128,28 +129,29 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun *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); + 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); + 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 */ @@ -224,7 +226,11 @@ 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), + 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 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/tmtc/CfdpTmFunnel.cpp b/mission/tmtc/CfdpTmFunnel.cpp index 93c294a4..b5408a49 100644 --- a/mission/tmtc/CfdpTmFunnel.cpp +++ b/mission/tmtc/CfdpTmFunnel.cpp @@ -4,7 +4,7 @@ #include "fsfw/tmtcpacket/ccsds/SpacePacketCreator.h" #include "fsfw/tmtcservices/TmTcMessage.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 +25,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 +40,10 @@ 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; @@ -88,14 +94,16 @@ 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); } diff --git a/mission/tmtc/CfdpTmFunnel.h b/mission/tmtc/CfdpTmFunnel.h index 7b9efd34..5bb5d95b 100644 --- a/mission/tmtc/CfdpTmFunnel.h +++ b/mission/tmtc/CfdpTmFunnel.h @@ -13,7 +13,7 @@ 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; ReturnValue_t performOperation(uint8_t opCode); @@ -22,7 +22,7 @@ class CfdpTmFunnel : public TmFunnelBase { private: ReturnValue_t handlePacket(TmTcMessage& msg); - MessageQueueId_t fileStoreDest; + std::optional fileStoreDest; StorageManagerIF& ramToFileStore; uint16_t cfdpInCcsdsApid; }; diff --git a/mission/tmtc/PusLiveDemux.cpp b/mission/tmtc/PusLiveDemux.cpp index 6e9899d4..23d20eff 100644 --- a/mission/tmtc/PusLiveDemux.cpp +++ b/mission/tmtc/PusLiveDemux.cpp @@ -9,6 +9,7 @@ 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 ((destinations.size() > 1) and (idx < (destinations.size() - 1))) { @@ -18,12 +19,22 @@ 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[10]; + 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 - tmStore.deleteData(origStoreId); - break; + continue; } } else { message.setStorageId(origStoreId); diff --git a/tmtc b/tmtc index 1b0a7aea..649deac8 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 1b0a7aeabda128cb6ae1092541f100df288d38b1 +Subproject commit 649deac81bbc59d70f0cd1f2e442f434d089bbef From 48f3ff05dc0bfb6f4dc186b0335ee2051ae0c9a9 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 6 Sep 2023 20:54:45 +0200 Subject: [PATCH 26/82] bump fsfw --- fsfw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsfw b/fsfw index c199cbed..42a0b153 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit c199cbedaa4b7f6ba0b88fae26412cfa65f36739 +Subproject commit 42a0b153031e90191fb11606c23a51a6c3576aaf From 0fb837323d74485486d51fea48977ca5e3b27a51 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 6 Sep 2023 21:03:08 +0200 Subject: [PATCH 27/82] works properly now --- common/config/eive/definitions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/config/eive/definitions.h b/common/config/eive/definitions.h index d5ebe674..d5e23edc 100644 --- a/common/config/eive/definitions.h +++ b/common/config/eive/definitions.h @@ -60,7 +60,7 @@ static constexpr uint32_t CFDP_STORE_QUEUE_SIZE = 300; static constexpr uint32_t CFDP_MAX_FSM_CALL_COUNT_SRC_HANDLER = 50; static constexpr uint32_t CFDP_MAX_FSM_CALL_COUNT_DEST_HANDLER = 300; -static constexpr uint32_t CFDP_SHORT_DELAY_MS = 100; +static constexpr uint32_t CFDP_SHORT_DELAY_MS = 50; static constexpr uint32_t CFDP_REGULAR_DELAY_MS = 200; static constexpr uint32_t MAX_PUS_FUNNEL_QUEUE_DEPTH = 100; From 4af406b294bd589be6b2df86369e0382f1a739d1 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 7 Sep 2023 16:14:20 +0200 Subject: [PATCH 28/82] changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5461bd3..84b6332d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,8 @@ will consitute of a breaking change warranting a new major release: ## Added -- CFDP source handler, which allow file downlink. +- CFDP source handler, which allow file downlink using the standardized + CFDP interface. ## Fixed From 2b841d2f371e7e254b47499fb4d3f24e267206b5 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 7 Sep 2023 16:19:01 +0200 Subject: [PATCH 29/82] some tweaks for error handling code --- mission/tmtc/PusLiveDemux.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mission/tmtc/PusLiveDemux.cpp b/mission/tmtc/PusLiveDemux.cpp index e900c540..4d78a188 100644 --- a/mission/tmtc/PusLiveDemux.cpp +++ b/mission/tmtc/PusLiveDemux.cpp @@ -23,19 +23,18 @@ ReturnValue_t PusLiveDemux::demultiplexPackets(StorageManagerIF& tmStore, } 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[10]; + uint8_t fillCounts[16]; uint8_t written = 0; tmStore.getFillCount(fillCounts, &written); - sif::error << "Fill counts: "; + 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; + sif::error << "]" << std::endl; #endif - continue; } } else { message.setStorageId(origStoreId); From 101cf54745d3406db6e4d46eead28a7745f4b7d4 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 7 Sep 2023 16:20:31 +0200 Subject: [PATCH 30/82] fix Q7S builds --- bsp_q7s/em/emObjectFactory.cpp | 2 +- bsp_q7s/fmObjectFactory.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bsp_q7s/em/emObjectFactory.cpp b/bsp_q7s/em/emObjectFactory.cpp index 976602d4..0f1c7707 100644 --- a/bsp_q7s/em/emObjectFactory.cpp +++ b/bsp_q7s/em/emObjectFactory.cpp @@ -39,7 +39,7 @@ void ObjectFactory::produce(void* args) { readFirmwareVersion(); ObjectFactory::produceGenericObjects(&healthTable, &pusFunnel, &cfdpFunnel, *SdCardManager::instance(), &ipcStore, &tmStore, stores, 200, - enableHkSets); + enableHkSets, true); LinuxLibgpioIF* gpioComIF = nullptr; SerialComIF* uartComIF = nullptr; diff --git a/bsp_q7s/fmObjectFactory.cpp b/bsp_q7s/fmObjectFactory.cpp index a3ab6bba..0ffa328b 100644 --- a/bsp_q7s/fmObjectFactory.cpp +++ b/bsp_q7s/fmObjectFactory.cpp @@ -36,7 +36,7 @@ void ObjectFactory::produce(void* args) { readFirmwareVersion(); ObjectFactory::produceGenericObjects(&healthTable, &pusFunnel, &cfdpFunnel, *SdCardManager::instance(), &ipcStore, &tmStore, stores, 200, - true); + true, true); LinuxLibgpioIF* gpioComIF = nullptr; SerialComIF* uartComIF = nullptr; From 33d503aef9b106382ca204855359d66d1f559010 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 11 Sep 2023 16:23:52 +0200 Subject: [PATCH 31/82] bump fsfw --- fsfw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsfw b/fsfw index 42a0b153..5bd02019 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 42a0b153031e90191fb11606c23a51a6c3576aaf +Subproject commit 5bd020193bb5a2a1b9e5ceadb12234f1cf75dd44 From 6fe4c71cee6aceddb75355ac41a7352789d5e5d6 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 11 Sep 2023 19:23:48 +0200 Subject: [PATCH 32/82] this is useable --- bsp_q7s/objectFactory.cpp | 4 ++-- mission/sysDefs.h | 5 +++++ mission/system/systemTree.cpp | 4 +++- mission/tmtc/CfdpTmFunnel.cpp | 6 ++++++ mission/tmtc/CfdpTmFunnel.h | 2 ++ mission/tmtc/PusLiveDemux.cpp | 20 ++++++++++++++++++-- mission/tmtc/PusLiveDemux.h | 5 ++++- mission/tmtc/TmFunnelBase.cpp | 7 ++++--- mission/tmtc/TmFunnelBase.h | 5 +++-- 9 files changed, 47 insertions(+), 11 deletions(-) diff --git a/bsp_q7s/objectFactory.cpp b/bsp_q7s/objectFactory.cpp index 39271628..d1eadb57 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; @@ -953,7 +953,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); diff --git a/mission/sysDefs.h b/mission/sysDefs.h index 4a53a76d..00a5635f 100644 --- a/mission/sysDefs.h +++ b/mission/sysDefs.h @@ -9,8 +9,13 @@ #include #include +namespace signals { + +extern std::atomic_bool CFDP_CHANNEL_THROTTLE_SIGNAL; extern std::atomic_uint16_t I2C_FATAL_ERRORS; +} // namespace signals + namespace satsystem { enum Mode : Mode_t { diff --git a/mission/system/systemTree.cpp b/mission/system/systemTree.cpp index 10c40617..8eb693ef 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/tcs/tcsModeTree.h" #include "mission/system/tree/payloadModeTree.h" @@ -51,7 +52,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 d4ea76ba..e50250e8 100644 --- a/mission/tmtc/CfdpTmFunnel.cpp +++ b/mission/tmtc/CfdpTmFunnel.cpp @@ -3,6 +3,7 @@ #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, std::optional fileStoreDest, @@ -109,3 +110,8 @@ ReturnValue_t CfdpTmFunnel::handlePacket(TmTcMessage& msg) { } return demultiplexLivePackets(origStoreId, newPacketData, packetLen); } + +void CfdpTmFunnel::addLiveDestination(const char* name, + const AcceptsTelemetryIF& downlinkDestination, uint8_t vcid) { + uint32_t listIndex = TmFunnelBase::addLiveDestination(name, downlinkDestination, vcid); +} diff --git a/mission/tmtc/CfdpTmFunnel.h b/mission/tmtc/CfdpTmFunnel.h index 5bb5d95b..45642c4a 100644 --- a/mission/tmtc/CfdpTmFunnel.h +++ b/mission/tmtc/CfdpTmFunnel.h @@ -16,6 +16,8 @@ class CfdpTmFunnel : public TmFunnelBase { CfdpTmFunnel(TmFunnelBase::FunnelCfg cfg, std::optional fileStoreDest, StorageManagerIF& ramToFileStore, uint16_t cfdpInCcsdsApid); [[nodiscard]] const char* getName() const override; + void addLiveDestination(const char* name, const AcceptsTelemetryIF& downlinkDestination, + uint8_t vcid = 0) override; ReturnValue_t performOperation(uint8_t opCode); ReturnValue_t initialize() override; diff --git a/mission/tmtc/PusLiveDemux.cpp b/mission/tmtc/PusLiveDemux.cpp index 4d78a188..12c8ccb3 100644 --- a/mission/tmtc/PusLiveDemux.cpp +++ b/mission/tmtc/PusLiveDemux.cpp @@ -13,6 +13,9 @@ ReturnValue_t PusLiveDemux::demultiplexPackets(StorageManagerIF& tmStore, // 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. @@ -52,8 +55,21 @@ ReturnValue_t PusLiveDemux::demultiplexPackets(StorageManagerIF& tmStore, return result; } -void PusLiveDemux::addDestination(const char* name, const AcceptsTelemetryIF& downlinkDestination, - uint8_t vcid) { +uint32_t PusLiveDemux::addDestination(const char* name, + const AcceptsTelemetryIF& downlinkDestination, uint8_t vcid) { auto queueId = downlinkDestination.getReportReceptionQueue(vcid); destinations.emplace_back(name, queueId, vcid); + return destinations.size() - 1; +} + +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; + } } diff --git a/mission/tmtc/PusLiveDemux.h b/mission/tmtc/PusLiveDemux.h index b9af04ff..f4f83958 100644 --- a/mission/tmtc/PusLiveDemux.h +++ b/mission/tmtc/PusLiveDemux.h @@ -14,8 +14,10 @@ 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, + 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 +26,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..4a17984a 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() { diff --git a/mission/tmtc/TmFunnelBase.h b/mission/tmtc/TmFunnelBase.h index 72d91103..7495af4a 100644 --- a/mission/tmtc/TmFunnelBase.h +++ b/mission/tmtc/TmFunnelBase.h @@ -37,8 +37,9 @@ 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 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; From 5d8b81e131173e0c5014355bfa0f34db19e0206f Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 11 Sep 2023 19:27:39 +0200 Subject: [PATCH 33/82] miight be able to work with this --- mission/tmtc/CfdpTmFunnel.cpp | 7 ++++--- mission/tmtc/CfdpTmFunnel.h | 4 ++-- mission/tmtc/PusLiveDemux.h | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/mission/tmtc/CfdpTmFunnel.cpp b/mission/tmtc/CfdpTmFunnel.cpp index e50250e8..268d2d3f 100644 --- a/mission/tmtc/CfdpTmFunnel.cpp +++ b/mission/tmtc/CfdpTmFunnel.cpp @@ -111,7 +111,8 @@ ReturnValue_t CfdpTmFunnel::handlePacket(TmTcMessage& msg) { return demultiplexLivePackets(origStoreId, newPacketData, packetLen); } -void CfdpTmFunnel::addLiveDestination(const char* name, - const AcceptsTelemetryIF& downlinkDestination, uint8_t vcid) { - uint32_t listIndex = TmFunnelBase::addLiveDestination(name, downlinkDestination, vcid); +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 45642c4a..b3f0948b 100644 --- a/mission/tmtc/CfdpTmFunnel.h +++ b/mission/tmtc/CfdpTmFunnel.h @@ -16,8 +16,8 @@ class CfdpTmFunnel : public TmFunnelBase { CfdpTmFunnel(TmFunnelBase::FunnelCfg cfg, std::optional fileStoreDest, StorageManagerIF& ramToFileStore, uint16_t cfdpInCcsdsApid); [[nodiscard]] const char* getName() const override; - void addLiveDestination(const char* name, const AcceptsTelemetryIF& downlinkDestination, - uint8_t vcid = 0) 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; diff --git a/mission/tmtc/PusLiveDemux.h b/mission/tmtc/PusLiveDemux.h index f4f83958..a6ba2c8f 100644 --- a/mission/tmtc/PusLiveDemux.h +++ b/mission/tmtc/PusLiveDemux.h @@ -15,7 +15,7 @@ class PusLiveDemux { const uint8_t* tmData, size_t tmSize); uint32_t addDestination(const char* name, const AcceptsTelemetryIF& downlinkDestination, - uint8_t vcid = 0); + uint8_t vcid = 0); void setDestFull(uint32_t listIndex); void setDestAvailable(uint32_t listIndex); From 6771d656bb5627ba0d6fb8627fa8f2627c1821b6 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 11 Sep 2023 20:16:54 +0200 Subject: [PATCH 34/82] beautiful --- bsp_q7s/em/emObjectFactory.cpp | 8 +++--- bsp_q7s/objectFactory.cpp | 11 +++++---- bsp_q7s/objectFactory.h | 3 ++- common/config/eive/definitions.h | 3 +++ mission/cfdp/CfdpHandler.cpp | 41 ++++++++++++++++++++++--------- mission/cfdp/CfdpHandler.h | 4 +++ mission/com/LiveTmTask.cpp | 42 +++++++++++++++++++++++++++----- mission/com/LiveTmTask.h | 12 +++++++-- mission/tmtc/PusLiveDemux.cpp | 10 +++++--- mission/tmtc/PusLiveDemux.h | 2 ++ mission/tmtc/TmFunnelBase.cpp | 6 +++++ mission/tmtc/TmFunnelBase.h | 2 ++ 12 files changed, 113 insertions(+), 31 deletions(-) diff --git a/bsp_q7s/em/emObjectFactory.cpp b/bsp_q7s/em/emObjectFactory.cpp index 0f1c7707..97ed4c0a 100644 --- a/bsp_q7s/em/emObjectFactory.cpp +++ b/bsp_q7s/em/emObjectFactory.cpp @@ -163,9 +163,11 @@ void ObjectFactory::produce(void* args) { &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); + if (ccsdsArgs.normalLiveTmDest != MessageQueueIF::NO_QUEUE) { + pusFunnel->addLiveDestinationByRawId("VC0 NORMAL LIVE TM", ccsdsArgs.normalLiveTmDest, 0); + } + if (ccsdsArgs.cfdpLiveTmDest != MessageQueueIF::NO_QUEUE) { + cfdpFunnel->addLiveDestinationByRawId("VC0 CFDP LIVE TM", ccsdsArgs.cfdpLiveTmDest, 0); } #endif #endif /* OBSW_ADD_CCSDS_IP_CORES == 1 */ diff --git a/bsp_q7s/objectFactory.cpp b/bsp_q7s/objectFactory.cpp index d1eadb57..2522a7c0 100644 --- a/bsp_q7s/objectFactory.cpp +++ b/bsp_q7s/objectFactory.cpp @@ -777,12 +777,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. diff --git a/bsp_q7s/objectFactory.h b/bsp_q7s/objectFactory.h index 491720ac..bccbdd17 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(); diff --git a/common/config/eive/definitions.h b/common/config/eive/definitions.h index d5e23edc..e62a90aa 100644 --- a/common/config/eive/definitions.h +++ b/common/config/eive/definitions.h @@ -58,6 +58,9 @@ 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 = 300; +static constexpr uint32_t LIVE_CHANNEL_CFDP_QUEUE_SIZE = 300; + static constexpr uint32_t CFDP_MAX_FSM_CALL_COUNT_SRC_HANDLER = 50; static constexpr uint32_t CFDP_MAX_FSM_CALL_COUNT_DEST_HANDLER = 300; static constexpr uint32_t CFDP_SHORT_DELAY_MS = 50; diff --git a/mission/cfdp/CfdpHandler.cpp b/mission/cfdp/CfdpHandler.cpp index c3cde752..8ca37de0 100644 --- a/mission/cfdp/CfdpHandler.cpp +++ b/mission/cfdp/CfdpHandler.cpp @@ -10,6 +10,7 @@ #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; @@ -68,20 +69,38 @@ ReturnValue_t CfdpHandler::initialize() { fsmCount++; } fsmCount = 0; - const SourceHandler::FsmResult& srcResult = srcHandler.stateMachine(); - while (srcResult.callStatus == CallStatus::CALL_AGAIN) { - // Limit number of messages. - if (fsmCount == config::CFDP_MAX_FSM_CALL_COUNT_SRC_HANDLER) { + if (signals::CFDP_CHANNEL_THROTTLE_SIGNAL) { + throttlePeriodSourceHandler.resetTimer(); + throttlePeriodOngoing = true; + signals::CFDP_CHANNEL_THROTTLE_SIGNAL = false; + } + + if (throttlePeriodOngoing) { + if (throttlePeriodSourceHandler.hasTimedOut()) { + throttlePeriodOngoing = false; + + } else { shortDelay = true; - break; } - srcHandler.stateMachine(); - 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; + } + // 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(); + 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.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++; } - fsmCount++; } if (shortDelay) { TaskFactory::delayTask(config::CFDP_SHORT_DELAY_MS); diff --git a/mission/cfdp/CfdpHandler.h b/mission/cfdp/CfdpHandler.h index d409d6bd..46631ac5 100644 --- a/mission/cfdp/CfdpHandler.h +++ b/mission/cfdp/CfdpHandler.h @@ -4,6 +4,7 @@ #include #include #include +#include #include @@ -73,6 +74,9 @@ class CfdpHandler : public SystemObject, public ExecutableObjectIF, public Accep private: MessageQueueIF& pduQueue; MessageQueueIF& cfdpRequestQueue; + Countdown throttlePeriodSourceHandler = Countdown(80); + bool throttlePeriodOngoing = false; + cfdp::LocalEntityCfg localCfg; cfdp::RemoteConfigTableIF& remoteCfgProvider; cfdp::FsfwParams fsfwParams; diff --git a/mission/com/LiveTmTask.cpp b/mission/com/LiveTmTask.cpp index 39648c15..14706705 100644 --- a/mission/com/LiveTmTask.cpp +++ b/mission/com/LiveTmTask.cpp @@ -5,8 +5,13 @@ #include #include +#include "mission/sysDefs.h" + +std::atomic_bool signals::CFDP_CHANNEL_THROTTLE_SIGNAL = false; + 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 +19,34 @@ 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; 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; + // TODO: Must read CFDP TM queue and regular TM queue and forward them. Handle regular queue + // first. + handledTm = false; + if (!channel.isBusy()) { + result = handleRegularTmQueue(); + if (result == MessageQueueIF::EMPTY) { + result = handleCfdpTmQueue(); + } + if (result == returnvalue::OK) { + handledTm = true; + } } - if (result == MessageQueueIF::EMPTY) { + if (channel.isBusy()) { + // 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. It is cleared + // by the data creator. + signals::CFDP_CHANNEL_THROTTLE_SIGNAL = true; + } + if (!handledTm) { if (tmFunnelCd.hasTimedOut()) { pusFunnel.performOperation(0); cfdpFunnel.performOperation(0); @@ -94,9 +116,17 @@ void LiveTmTask::readCommandQueue(void) { } } +ReturnValue_t LiveTmTask::handleRegularTmQueue() { return returnvalue::OK; } + +ReturnValue_t LiveTmTask::handleCfdpTmQueue() { return returnvalue::OK; } + ModeTreeChildIF& LiveTmTask::getModeTreeChildIF() { return *this; } ReturnValue_t LiveTmTask::initialize() { modeHelper.initialize(); 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..d1173ccc 100644 --- a/mission/com/LiveTmTask.h +++ b/mission/com/LiveTmTask.h @@ -18,25 +18,33 @@ 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; ModeHelper modeHelper; Mode_t mode = HasModesIF::MODE_OFF; Countdown tmFunnelCd = Countdown(100); PusTmFunnel& pusFunnel; CfdpTmFunnel& cfdpFunnel; - VirtualChannelWithQueue& channel; + VirtualChannel& channel; uint32_t packetCounter = 0; const std::atomic_bool& ptmeLocked; void readCommandQueue(void); + ReturnValue_t handleRegularTmQueue(); + ReturnValue_t handleCfdpTmQueue(); + MessageQueueId_t getCommandQueue() const override; void getMode(Mode_t* mode, Submode_t* submode) override; diff --git a/mission/tmtc/PusLiveDemux.cpp b/mission/tmtc/PusLiveDemux.cpp index 12c8ccb3..6a30d780 100644 --- a/mission/tmtc/PusLiveDemux.cpp +++ b/mission/tmtc/PusLiveDemux.cpp @@ -57,9 +57,7 @@ ReturnValue_t PusLiveDemux::demultiplexPackets(StorageManagerIF& tmStore, uint32_t PusLiveDemux::addDestination(const char* name, const AcceptsTelemetryIF& downlinkDestination, uint8_t vcid) { - auto queueId = downlinkDestination.getReportReceptionQueue(vcid); - destinations.emplace_back(name, queueId, vcid); - return destinations.size() - 1; + return addDestinationByRawId(name, downlinkDestination.getReportReceptionQueue(vcid), vcid); } void PusLiveDemux::setDestFull(uint32_t listIndex) { @@ -73,3 +71,9 @@ void PusLiveDemux::setDestAvailable(uint32_t listIndex) { 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 a6ba2c8f..d565c194 100644 --- a/mission/tmtc/PusLiveDemux.h +++ b/mission/tmtc/PusLiveDemux.h @@ -14,6 +14,8 @@ class PusLiveDemux { ReturnValue_t demultiplexPackets(StorageManagerIF& tmStore, store_address_t origStoreId, const uint8_t* tmData, size_t tmSize); + 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); diff --git a/mission/tmtc/TmFunnelBase.cpp b/mission/tmtc/TmFunnelBase.cpp index 4a17984a..c19afd02 100644 --- a/mission/tmtc/TmFunnelBase.cpp +++ b/mission/tmtc/TmFunnelBase.cpp @@ -70,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 7495af4a..bc36d7f5 100644 --- a/mission/tmtc/TmFunnelBase.h +++ b/mission/tmtc/TmFunnelBase.h @@ -37,6 +37,8 @@ class TmFunnelBase : public AcceptsTelemetryIF, public SystemObject { }; explicit TmFunnelBase(FunnelCfg cfg); [[nodiscard]] MessageQueueId_t getReportReceptionQueue(uint8_t virtualChannel) const override; + 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); From 52ae402594d282e6ffe37e426bb1b4252599920e Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 11 Sep 2023 20:21:14 +0200 Subject: [PATCH 35/82] missing include --- mission/sysDefs.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mission/sysDefs.h b/mission/sysDefs.h index 00a5635f..e1259c5c 100644 --- a/mission/sysDefs.h +++ b/mission/sysDefs.h @@ -1,6 +1,8 @@ #ifndef MISSION_SYSDEFS_H_ #define MISSION_SYSDEFS_H_ +#include "eive/eventSubsystemIds.h" + #include #include #include From fdd635e43f672c7bdac60a70aa2e5bebbcd1750a Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 12 Sep 2023 10:52:47 +0200 Subject: [PATCH 36/82] bump tmtc --- tmtc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmtc b/tmtc index 68138c6e..1860b754 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 68138c6e798537dee7dbf6f9956af6235cd65d6d +Subproject commit 1860b754cee61b298832ea83d918499c8a3d6e51 From 0a455183f44d2168babece387767160c1da621d9 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 12 Sep 2023 14:22:18 +0200 Subject: [PATCH 37/82] fix FM build --- bsp_q7s/fmObjectFactory.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bsp_q7s/fmObjectFactory.cpp b/bsp_q7s/fmObjectFactory.cpp index 0ffa328b..bff510d7 100644 --- a/bsp_q7s/fmObjectFactory.cpp +++ b/bsp_q7s/fmObjectFactory.cpp @@ -113,9 +113,11 @@ void ObjectFactory::produce(void* args) { &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); + if (ccsdsArgs.normalLiveTmDest != MessageQueueIF::NO_QUEUE) { + pusFunnel->addLiveDestinationByRawId("VC0 NORMAL LIVE TM", ccsdsArgs.normalLiveTmDest, 0); + } + if (ccsdsArgs.cfdpLiveTmDest != MessageQueueIF::NO_QUEUE) { + cfdpFunnel->addLiveDestinationByRawId("VC0 CFDP LIVE TM", ccsdsArgs.cfdpLiveTmDest, 0); } #endif #endif /* OBSW_ADD_CCSDS_IP_CORES == 1 */ From 24de9510381694f4d829aa5af99e51e01ff021a6 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 12 Sep 2023 14:27:14 +0200 Subject: [PATCH 38/82] reduce duplicate code --- bsp_q7s/em/emObjectFactory.cpp | 9 +-------- bsp_q7s/fmObjectFactory.cpp | 13 +------------ bsp_q7s/objectFactory.cpp | 15 +++++++++++++++ bsp_q7s/objectFactory.h | 1 + mission/sysDefs.h | 4 ++-- 5 files changed, 20 insertions(+), 22 deletions(-) diff --git a/bsp_q7s/em/emObjectFactory.cpp b/bsp_q7s/em/emObjectFactory.cpp index 97ed4c0a..223d27dc 100644 --- a/bsp_q7s/em/emObjectFactory.cpp +++ b/bsp_q7s/em/emObjectFactory.cpp @@ -162,15 +162,8 @@ void ObjectFactory::produce(void* args) { CcsdsComponentArgs ccsdsArgs(*gpioComIF, *ipcStore, *tmStore, stores, *pusFunnel, *cfdpFunnel, &ipCoreHandler); createCcsdsComponents(ccsdsArgs); -#if OBSW_TM_TO_PTME == 1 - if (ccsdsArgs.normalLiveTmDest != MessageQueueIF::NO_QUEUE) { - pusFunnel->addLiveDestinationByRawId("VC0 NORMAL LIVE TM", ccsdsArgs.normalLiveTmDest, 0); - } - if (ccsdsArgs.cfdpLiveTmDest != MessageQueueIF::NO_QUEUE) { - cfdpFunnel->addLiveDestinationByRawId("VC0 CFDP LIVE TM", ccsdsArgs.cfdpLiveTmDest, 0); - } -#endif #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 bff510d7..68589752 100644 --- a/bsp_q7s/fmObjectFactory.cpp +++ b/bsp_q7s/fmObjectFactory.cpp @@ -108,18 +108,7 @@ void ObjectFactory::produce(void* args) { #endif /* OBSW_ADD_STAR_TRACKER == 1 */ #if OBSW_ADD_CCSDS_IP_CORES == 1 - CcsdsIpCoreHandler* ipCoreHandler = nullptr; - CcsdsComponentArgs ccsdsArgs(*gpioComIF, *ipcStore, *tmStore, stores, *pusFunnel, *cfdpFunnel, - &ipCoreHandler); - createCcsdsComponents(ccsdsArgs); -#if OBSW_TM_TO_PTME == 1 - if (ccsdsArgs.normalLiveTmDest != MessageQueueIF::NO_QUEUE) { - pusFunnel->addLiveDestinationByRawId("VC0 NORMAL LIVE TM", ccsdsArgs.normalLiveTmDest, 0); - } - if (ccsdsArgs.cfdpLiveTmDest != MessageQueueIF::NO_QUEUE) { - cfdpFunnel->addLiveDestinationByRawId("VC0 CFDP LIVE TM", ccsdsArgs.cfdpLiveTmDest, 0); - } -#endif + createCcsdsIpCoreComponents(); #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 2522a7c0..f54e8dce 100644 --- a/bsp_q7s/objectFactory.cpp +++ b/bsp_q7s/objectFactory.cpp @@ -1057,3 +1057,18 @@ ReturnValue_t ObjectFactory::readFirmwareVersion() { } return returnvalue::OK; } + +ReturnValue_t ObjectFactory::readCcsdsIpCoreComponents(CcsdsComponentArgs& ccsdsArgs) { + CcsdsIpCoreHandler* ipCoreHandler = nullptr; + 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 bccbdd17..60a2ff6d 100644 --- a/bsp_q7s/objectFactory.h +++ b/bsp_q7s/objectFactory.h @@ -83,6 +83,7 @@ void createTestComponents(LinuxLibgpioIF* gpioComIF); void createPlI2cResetGpio(LinuxLibgpioIF* gpioComIF); void testAcsBrdAss(AcsBoardAssembly* assAss); +ReturnValue_t readCcsdsIpCoreComponents(CcsdsComponentArgs& args); }; // namespace ObjectFactory diff --git a/mission/sysDefs.h b/mission/sysDefs.h index e1259c5c..b7cbd4e0 100644 --- a/mission/sysDefs.h +++ b/mission/sysDefs.h @@ -1,8 +1,6 @@ #ifndef MISSION_SYSDEFS_H_ #define MISSION_SYSDEFS_H_ -#include "eive/eventSubsystemIds.h" - #include #include #include @@ -11,6 +9,8 @@ #include #include +#include "eive/eventSubsystemIds.h" + namespace signals { extern std::atomic_bool CFDP_CHANNEL_THROTTLE_SIGNAL; From b6f28eb239511911850c28a03e649100b5ebe449 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 12 Sep 2023 14:29:42 +0200 Subject: [PATCH 39/82] wrong API call --- bsp_q7s/em/emObjectFactory.cpp | 2 +- bsp_q7s/fmObjectFactory.cpp | 5 ++++- bsp_q7s/objectFactory.cpp | 2 +- bsp_q7s/objectFactory.h | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/bsp_q7s/em/emObjectFactory.cpp b/bsp_q7s/em/emObjectFactory.cpp index 223d27dc..074eb438 100644 --- a/bsp_q7s/em/emObjectFactory.cpp +++ b/bsp_q7s/em/emObjectFactory.cpp @@ -161,7 +161,7 @@ void ObjectFactory::produce(void* args) { CcsdsIpCoreHandler* ipCoreHandler = nullptr; CcsdsComponentArgs ccsdsArgs(*gpioComIF, *ipcStore, *tmStore, stores, *pusFunnel, *cfdpFunnel, &ipCoreHandler); - createCcsdsComponents(ccsdsArgs); + createCcsdsIpComponentsAddTmRouting(ccsdsArgs); #endif /* OBSW_ADD_CCSDS_IP_CORES == 1 */ /* Test Task */ diff --git a/bsp_q7s/fmObjectFactory.cpp b/bsp_q7s/fmObjectFactory.cpp index 68589752..f5cad932 100644 --- a/bsp_q7s/fmObjectFactory.cpp +++ b/bsp_q7s/fmObjectFactory.cpp @@ -108,7 +108,10 @@ void ObjectFactory::produce(void* args) { #endif /* OBSW_ADD_STAR_TRACKER == 1 */ #if OBSW_ADD_CCSDS_IP_CORES == 1 - createCcsdsIpCoreComponents(); + CcsdsIpCoreHandler* ipCoreHandler = nullptr; + CcsdsComponentArgs ccsdsArgs(*gpioComIF, *ipcStore, *tmStore, stores, *pusFunnel, *cfdpFunnel, + &ipCoreHandler); + 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 f54e8dce..6aa007a3 100644 --- a/bsp_q7s/objectFactory.cpp +++ b/bsp_q7s/objectFactory.cpp @@ -1058,7 +1058,7 @@ ReturnValue_t ObjectFactory::readFirmwareVersion() { return returnvalue::OK; } -ReturnValue_t ObjectFactory::readCcsdsIpCoreComponents(CcsdsComponentArgs& ccsdsArgs) { +ReturnValue_t ObjectFactory::createCcsdsIpComponentsAddTmRouting(CcsdsComponentArgs& ccsdsArgs) { CcsdsIpCoreHandler* ipCoreHandler = nullptr; ReturnValue_t result = createCcsdsComponents(ccsdsArgs); #if OBSW_TM_TO_PTME == 1 diff --git a/bsp_q7s/objectFactory.h b/bsp_q7s/objectFactory.h index 60a2ff6d..223031e6 100644 --- a/bsp_q7s/objectFactory.h +++ b/bsp_q7s/objectFactory.h @@ -75,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(); @@ -83,7 +84,6 @@ void createTestComponents(LinuxLibgpioIF* gpioComIF); void createPlI2cResetGpio(LinuxLibgpioIF* gpioComIF); void testAcsBrdAss(AcsBoardAssembly* assAss); -ReturnValue_t readCcsdsIpCoreComponents(CcsdsComponentArgs& args); }; // namespace ObjectFactory From 51dafa56be9106fda6be997e7811f9ba82e81b3c Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 12 Sep 2023 14:32:11 +0200 Subject: [PATCH 40/82] remove obsolete TODOs --- mission/cfdp/CfdpHandler.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mission/cfdp/CfdpHandler.cpp b/mission/cfdp/CfdpHandler.cpp index 8ca37de0..07fbecb1 100644 --- a/mission/cfdp/CfdpHandler.cpp +++ b/mission/cfdp/CfdpHandler.cpp @@ -187,9 +187,6 @@ ReturnValue_t CfdpHandler::handlePduPacket(TmTcMessage& msg) { } ReturnValue_t CfdpHandler::handleCfdpRequest(CommandMessage& msg) { - // TODO: Handle CFDP requests here, most importantly put requests. If a put request is received, - // check whether one is pending. If none are, start a transaction with the put request, - // otherwise store for put request inside a FIFO for later processing. if (msg.getCommand() == CfdpMessage::PUT_REQUEST) { sif::info << "Received CFDP put request" << std::endl; if (srcHandler.getState() != CfdpState::IDLE) { @@ -199,7 +196,6 @@ ReturnValue_t CfdpHandler::handleCfdpRequest(CommandMessage& msg) { } putRequestQueue.push(CfdpMessage::getStoreId(&msg)); } else { - // TODO: Retrieve put request and remote configuration. PutRequest putRequest; auto accessorPair = ipcStore.getData(CfdpMessage::getStoreId(&msg)); const uint8_t* dataPtr = accessorPair.second.data(); From 8871146e887eb67d354fcf6a143ca4a8fa768829 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 12 Sep 2023 14:35:10 +0200 Subject: [PATCH 41/82] remove commented code --- mission/genericFactory.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/mission/genericFactory.cpp b/mission/genericFactory.cpp index 70363557..006b295a 100644 --- a/mission/genericFactory.cpp +++ b/mission/genericFactory.cpp @@ -86,7 +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 From 98e1beafdf671027d89536ce6627b53d0dbeef18 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 13 Sep 2023 13:09:07 +0200 Subject: [PATCH 42/82] implemented missing queue handling --- mission/com/LiveTmTask.cpp | 34 ++++++++++++++++++++++++++++++++-- mission/com/LiveTmTask.h | 2 ++ mission/sysDefs.h | 4 ++-- 3 files changed, 36 insertions(+), 4 deletions(-) diff --git a/mission/com/LiveTmTask.cpp b/mission/com/LiveTmTask.cpp index 14706705..e9dcc84b 100644 --- a/mission/com/LiveTmTask.cpp +++ b/mission/com/LiveTmTask.cpp @@ -116,14 +116,44 @@ void LiveTmTask::readCommandQueue(void) { } } -ReturnValue_t LiveTmTask::handleRegularTmQueue() { return returnvalue::OK; } +ReturnValue_t LiveTmTask::handleRegularTmQueue() { return handleGenericTmQueue(*regularTmQueue); } -ReturnValue_t LiveTmTask::handleCfdpTmQueue() { return returnvalue::OK; } +ReturnValue_t LiveTmTask::handleCfdpTmQueue() { return handleGenericTmQueue(*cfdpTmQueue); } + +ReturnValue_t LiveTmTask::handleGenericTmQueue(MessageQueueIF& queue) { + TmTcMessage message; + ReturnValue_t result = queue.receiveMessage(&message); + if (result == MessageQueueIF::EMPTY) { + return result; + } + 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) { + result = channel.write(data, size); + } + // Try delete in any case, ignore failures (which should not happen), it is more important to + // propagate write errors. + tmStore->deleteData(storeId); + return result; +} 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; } diff --git a/mission/com/LiveTmTask.h b/mission/com/LiveTmTask.h index d1173ccc..a271b327 100644 --- a/mission/com/LiveTmTask.h +++ b/mission/com/LiveTmTask.h @@ -31,6 +31,7 @@ class LiveTmTask : public SystemObject, MessageQueueIF* requestQueue; MessageQueueIF* cfdpTmQueue; MessageQueueIF* regularTmQueue; + StorageManagerIF* tmStore = nullptr; ModeHelper modeHelper; Mode_t mode = HasModesIF::MODE_OFF; Countdown tmFunnelCd = Countdown(100); @@ -44,6 +45,7 @@ class LiveTmTask : public SystemObject, ReturnValue_t handleRegularTmQueue(); ReturnValue_t handleCfdpTmQueue(); + ReturnValue_t handleGenericTmQueue(MessageQueueIF& queue); MessageQueueId_t getCommandQueue() const override; diff --git a/mission/sysDefs.h b/mission/sysDefs.h index e1259c5c..b7cbd4e0 100644 --- a/mission/sysDefs.h +++ b/mission/sysDefs.h @@ -1,8 +1,6 @@ #ifndef MISSION_SYSDEFS_H_ #define MISSION_SYSDEFS_H_ -#include "eive/eventSubsystemIds.h" - #include #include #include @@ -11,6 +9,8 @@ #include #include +#include "eive/eventSubsystemIds.h" + namespace signals { extern std::atomic_bool CFDP_CHANNEL_THROTTLE_SIGNAL; From 6fa2cbbbb137132a6ed7aa604031ef85edbfb63c Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 13 Sep 2023 13:38:40 +0200 Subject: [PATCH 43/82] large regular live channel queue size --- common/config/eive/definitions.h | 2 +- tmtc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/config/eive/definitions.h b/common/config/eive/definitions.h index e62a90aa..d746c97d 100644 --- a/common/config/eive/definitions.h +++ b/common/config/eive/definitions.h @@ -58,7 +58,7 @@ 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 = 300; +static constexpr uint32_t LIVE_CHANNEL_NORMAL_QUEUE_SIZE = 400; static constexpr uint32_t LIVE_CHANNEL_CFDP_QUEUE_SIZE = 300; static constexpr uint32_t CFDP_MAX_FSM_CALL_COUNT_SRC_HANDLER = 50; diff --git a/tmtc b/tmtc index 8b45dd8b..8d28b321 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 8b45dd8bff5c0a31cdb2f56edc082624bf1fb936 +Subproject commit 8d28b321d4a1fa4ba7f375bbb0cb36d843c7dcf5 From 9243f917ccfa7227a3c9e4862403a7339931f982 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 14 Sep 2023 10:23:00 +0200 Subject: [PATCH 44/82] STOOOPID bug --- mission/com/LiveTmTask.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mission/com/LiveTmTask.cpp b/mission/com/LiveTmTask.cpp index e9dcc84b..638f2e43 100644 --- a/mission/com/LiveTmTask.cpp +++ b/mission/com/LiveTmTask.cpp @@ -137,7 +137,7 @@ ReturnValue_t LiveTmTask::handleGenericTmQueue(MessageQueueIF& queue) { return result; } - if (ptmeLocked) { + if (!ptmeLocked) { result = channel.write(data, size); } // Try delete in any case, ignore failures (which should not happen), it is more important to From 8071a5713f7518b7134aa6d14282f97b72f75913 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 14 Sep 2023 10:38:43 +0200 Subject: [PATCH 45/82] these queue sizes are sufficient --- bsp_q7s/objectFactory.cpp | 1 - common/config/eive/definitions.h | 4 ++-- mission/com/LiveTmTask.cpp | 24 ++++++++++++++++++++++++ 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/bsp_q7s/objectFactory.cpp b/bsp_q7s/objectFactory.cpp index 6aa007a3..211aa071 100644 --- a/bsp_q7s/objectFactory.cpp +++ b/bsp_q7s/objectFactory.cpp @@ -1059,7 +1059,6 @@ ReturnValue_t ObjectFactory::readFirmwareVersion() { } ReturnValue_t ObjectFactory::createCcsdsIpComponentsAddTmRouting(CcsdsComponentArgs& ccsdsArgs) { - CcsdsIpCoreHandler* ipCoreHandler = nullptr; ReturnValue_t result = createCcsdsComponents(ccsdsArgs); #if OBSW_TM_TO_PTME == 1 if (ccsdsArgs.normalLiveTmDest != MessageQueueIF::NO_QUEUE) { diff --git a/common/config/eive/definitions.h b/common/config/eive/definitions.h index d746c97d..b90f6adb 100644 --- a/common/config/eive/definitions.h +++ b/common/config/eive/definitions.h @@ -58,8 +58,8 @@ 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 = 400; -static constexpr uint32_t LIVE_CHANNEL_CFDP_QUEUE_SIZE = 300; +static constexpr uint32_t LIVE_CHANNEL_NORMAL_QUEUE_SIZE = 250; +static constexpr uint32_t LIVE_CHANNEL_CFDP_QUEUE_SIZE = 250; static constexpr uint32_t CFDP_MAX_FSM_CALL_COUNT_SRC_HANDLER = 50; static constexpr uint32_t CFDP_MAX_FSM_CALL_COUNT_DEST_HANDLER = 300; diff --git a/mission/com/LiveTmTask.cpp b/mission/com/LiveTmTask.cpp index 638f2e43..042104c4 100644 --- a/mission/com/LiveTmTask.cpp +++ b/mission/com/LiveTmTask.cpp @@ -7,6 +7,7 @@ #include "mission/sysDefs.h" +static constexpr bool DEBUG_TM_QUEUE_SPEED = false; std::atomic_bool signals::CFDP_CHANNEL_THROTTLE_SIGNAL = false; LiveTmTask::LiveTmTask(object_id_t objectId, PusTmFunnel& pusFunnel, CfdpTmFunnel& cfdpFunnel, @@ -27,7 +28,11 @@ 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) { + isCfdp = false; // TODO: Must read CFDP TM queue and regular TM queue and forward them. Handle regular queue // first. handledTm = false; @@ -35,9 +40,17 @@ ReturnValue_t LiveTmTask::performOperation(uint8_t opCode) { 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++; + } + } } } if (channel.isBusy()) { @@ -54,6 +67,17 @@ ReturnValue_t LiveTmTask::performOperation(uint8_t opCode) { } // Read command queue during idle times. readCommandQueue(); + if (DEBUG_TM_QUEUE_SPEED) { + if (consecutiveCfdpCounter > 0) { + sif::debug << "Concecutive CFDP TM handled: " << consecutiveCfdpCounter << std::endl; + } + if (consecutiveRegularCounter > 0) { + sif::debug << "Concecutive regular TM handled: " << consecutiveRegularCounter + << std::endl; + } + consecutiveRegularCounter = 0; + consecutiveCfdpCounter = 0; + } // 40 ms IDLE delay. Might tweak this in the future. TaskFactory::delayTask(40); } else { From fa7443d4a9e121be5c9052d6b6ce4019f19c6ce5 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 14 Sep 2023 12:28:40 +0200 Subject: [PATCH 46/82] bump tmtc, small tweaks --- mission/com/LiveTmTask.cpp | 4 +--- mission/com/LiveTmTask.h | 1 - tmtc | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/mission/com/LiveTmTask.cpp b/mission/com/LiveTmTask.cpp index 042104c4..74d79d4d 100644 --- a/mission/com/LiveTmTask.cpp +++ b/mission/com/LiveTmTask.cpp @@ -53,7 +53,7 @@ ReturnValue_t LiveTmTask::performOperation(uint8_t opCode) { } } } - if (channel.isBusy()) { + if (channel.isBusy() and not signals::CFDP_CHANNEL_THROTTLE_SIGNAL) { // 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. It is cleared // by the data creator. @@ -80,8 +80,6 @@ ReturnValue_t LiveTmTask::performOperation(uint8_t opCode) { } // 40 ms IDLE delay. Might tweak this in the future. TaskFactory::delayTask(40); - } else { - packetCounter++; } } } diff --git a/mission/com/LiveTmTask.h b/mission/com/LiveTmTask.h index a271b327..63831158 100644 --- a/mission/com/LiveTmTask.h +++ b/mission/com/LiveTmTask.h @@ -38,7 +38,6 @@ class LiveTmTask : public SystemObject, PusTmFunnel& pusFunnel; CfdpTmFunnel& cfdpFunnel; VirtualChannel& channel; - uint32_t packetCounter = 0; const std::atomic_bool& ptmeLocked; void readCommandQueue(void); diff --git a/tmtc b/tmtc index 8d28b321..bf399c3d 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 8d28b321d4a1fa4ba7f375bbb0cb36d843c7dcf5 +Subproject commit bf399c3d910a034112121f3bfb08494f40d46bf2 From 592561b287e5ff2dfe05b1c24a0426c672309100 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 14 Sep 2023 12:29:11 +0200 Subject: [PATCH 47/82] changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88fb953f..9db182aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ will consitute of a breaking change warranting a new major release: # [unreleased] +`eive-tmtc` v5.6.0 + ## Added - CFDP source handler, which allow file downlink using the standardized From ee6cdaf6192a3166f0cd82ee4241f6794cb4c185 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 11 Oct 2023 12:57:42 +0200 Subject: [PATCH 48/82] bump submodules --- fsfw | 2 +- tmtc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fsfw b/fsfw index 5bd02019..63c23800 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 5bd020193bb5a2a1b9e5ceadb12234f1cf75dd44 +Subproject commit 63c238005e0c00166879eba6a354a64ca1f59e06 diff --git a/tmtc b/tmtc index 0c476271..34a3a67a 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 0c4762712b9f568943b77373efb3ca3814f78c52 +Subproject commit 34a3a67ac71a8ec6bbb019d429a823cb3e20b12a From d84528e643a7381c85553a9bec89c7ebdbae0c15 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 11 Oct 2023 13:47:38 +0200 Subject: [PATCH 49/82] CFDP file segment len is configurable via definitions.h now --- common/config/eive/definitions.h | 2 ++ mission/genericFactory.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/common/config/eive/definitions.h b/common/config/eive/definitions.h index 86a83ac8..2edf434f 100644 --- a/common/config/eive/definitions.h +++ b/common/config/eive/definitions.h @@ -48,6 +48,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 = 300; + 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; diff --git a/mission/genericFactory.cpp b/mission/genericFactory.cpp index 006b295a..0dd965eb 100644 --- a/mission/genericFactory.cpp +++ b/mission/genericFactory.cpp @@ -289,7 +289,7 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun UnsignedByteField apid(config::EIVE_LOCAL_CFDP_ENTITY_ID); cfdp::EntityId localId(apid); GROUND_REMOTE_CFG.defaultChecksum = cfdp::ChecksumType::CRC_32; - GROUND_REMOTE_CFG.maxFileSegmentLen = 990; + GROUND_REMOTE_CFG.maxFileSegmentLen = config::CFDP_MAX_FILE_SEGMENT_LEN; CfdpHandlerCfg cfdpCfg(localId, indicationCfg, *eiveUserHandler, EIVE_FAULT_HANDLER, PACKET_LIST, LOST_SEGMENTS, REMOTE_CFG_PROVIDER); auto* cfdpHandler = new CfdpHandler(params, cfdpCfg); From 8f4c9b272c3887b7362d1423124a5b7975f77e85 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 12 Oct 2023 18:26:55 +0200 Subject: [PATCH 50/82] important bugfix for SSC field --- mission/tmtc/CfdpTmFunnel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mission/tmtc/CfdpTmFunnel.cpp b/mission/tmtc/CfdpTmFunnel.cpp index 268d2d3f..daf53925 100644 --- a/mission/tmtc/CfdpTmFunnel.cpp +++ b/mission/tmtc/CfdpTmFunnel.cpp @@ -66,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{}; From ffe1281eb9454ac0de0263f44ae53294b3bb1920 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 13 Oct 2023 09:20:51 +0200 Subject: [PATCH 51/82] fix PTME --- .../fsfwconfig/events/translateEvents.cpp | 2 +- .../fsfwconfig/objects/translateObjects.cpp | 2 +- common/config/eive/resultClassIds.h | 1 + generators/bsp_hosted_returnvalues.csv | 2 + generators/bsp_q7s_returnvalues.csv | 4 +- generators/events/translateEvents.cpp | 2 +- generators/objects/translateObjects.cpp | 2 +- linux/fsfwconfig/events/translateEvents.cpp | 2 +- linux/fsfwconfig/objects/translateObjects.cpp | 2 +- linux/ipcore/PapbVcInterface.cpp | 53 +++++++++---------- linux/ipcore/PapbVcInterface.h | 12 ++--- linux/ipcore/Ptme.cpp | 34 ++++-------- linux/ipcore/Ptme.h | 5 +- linux/ipcore/PtmeIF.h | 14 ++--- mission/com/TmStoreTaskBase.cpp | 13 ++++- mission/com/VirtualChannel.cpp | 51 +++++++++++++++--- mission/com/VirtualChannel.h | 11 +++- mission/com/VirtualChannelWithQueue.cpp | 13 ++++- mission/tmtc/DirectTmSinkIF.h | 8 ++- tmtc | 2 +- 20 files changed, 141 insertions(+), 94 deletions(-) diff --git a/bsp_hosted/fsfwconfig/events/translateEvents.cpp b/bsp_hosted/fsfwconfig/events/translateEvents.cpp index 9bb03ff0..13b2f7d5 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. * @details - * Generated on: 2023-10-11 10:54:39 + * Generated on: 2023-10-13 09:17:41 */ #include "translateEvents.h" diff --git a/bsp_hosted/fsfwconfig/objects/translateObjects.cpp b/bsp_hosted/fsfwconfig/objects/translateObjects.cpp index 7e795093..00170e41 100644 --- a/bsp_hosted/fsfwconfig/objects/translateObjects.cpp +++ b/bsp_hosted/fsfwconfig/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 174 translations. - * Generated on: 2023-10-11 10:54:39 + * Generated on: 2023-10-13 09:17:41 */ #include "translateObjects.h" 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/generators/bsp_hosted_returnvalues.csv b/generators/bsp_hosted_returnvalues.csv index 0dfc94c3..ea7717f8 100644 --- a/generators/bsp_hosted_returnvalues.csv +++ b/generators/bsp_hosted_returnvalues.csv @@ -513,3 +513,5 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path 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 +0x6e01;TMS_PartiallyWritten;No description;1;TM_SINK;mission/tmtc/DirectTmSinkIF.h +0x6f00;VCS_ChannelDoesNotExist;No description;0;VIRTUAL_CHANNEL;mission/com/VirtualChannel.h diff --git a/generators/bsp_q7s_returnvalues.csv b/generators/bsp_q7s_returnvalues.csv index 0e804457..c47d15e1 100644 --- a/generators/bsp_q7s_returnvalues.csv +++ b/generators/bsp_q7s_returnvalues.csv @@ -608,4 +608,6 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path 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 +0x6e01;TMS_PartiallyWritten;No description;1;TM_SINK;mission/tmtc/DirectTmSinkIF.h +0x6f00;VCS_ChannelDoesNotExist;No description;0;VIRTUAL_CHANNEL;mission/com/VirtualChannel.h +0x7100;SCBU_KeyNotFound;No description;0;SCRATCH_BUFFER;bsp_q7s/memory/scratchApi.h diff --git a/generators/events/translateEvents.cpp b/generators/events/translateEvents.cpp index 9bb03ff0..13b2f7d5 100644 --- a/generators/events/translateEvents.cpp +++ b/generators/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** * @brief Auto-generated event translation file. Contains 313 translations. * @details - * Generated on: 2023-10-11 10:54:39 + * Generated on: 2023-10-13 09:17:41 */ #include "translateEvents.h" diff --git a/generators/objects/translateObjects.cpp b/generators/objects/translateObjects.cpp index 0599cc18..06da3f47 100644 --- a/generators/objects/translateObjects.cpp +++ b/generators/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 178 translations. - * Generated on: 2023-10-11 10:54:39 + * Generated on: 2023-10-13 09:17:41 */ #include "translateObjects.h" diff --git a/linux/fsfwconfig/events/translateEvents.cpp b/linux/fsfwconfig/events/translateEvents.cpp index 9bb03ff0..13b2f7d5 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. * @details - * Generated on: 2023-10-11 10:54:39 + * Generated on: 2023-10-13 09:17:41 */ #include "translateEvents.h" diff --git a/linux/fsfwconfig/objects/translateObjects.cpp b/linux/fsfwconfig/objects/translateObjects.cpp index 0599cc18..06da3f47 100644 --- a/linux/fsfwconfig/objects/translateObjects.cpp +++ b/linux/fsfwconfig/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 178 translations. - * Generated on: 2023-10-11 10:54:39 + * Generated on: 2023-10-13 09:17:41 */ #include "translateObjects.h" diff --git a/linux/ipcore/PapbVcInterface.cpp b/linux/ipcore/PapbVcInterface.cpp index 5dcb4519..5e63aebc 100644 --- a/linux/ipcore/PapbVcInterface.cpp +++ b/linux/ipcore/PapbVcInterface.cpp @@ -23,7 +23,7 @@ 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; @@ -37,19 +37,7 @@ ReturnValue_t PapbVcInterface::write(const uint8_t* data, size_t size) { abortPacketTransfer(); return returnvalue::FAILED; } - for (size_t idx = 0; idx < size; idx++) { - if (not pollReadyForOctet(MAX_BUSY_POLLS)) { - abortPacketTransfer(); - return returnvalue::FAILED; - } - *(vcBaseReg + DATA_REG_OFFSET) = static_cast(data[idx]); - } - if (not pollReadyForOctet(MAX_BUSY_POLLS)) { - abortPacketTransfer(); - return returnvalue::FAILED; - } - completePacketTransfer(); - return returnvalue::OK; + return finishWritePartialOpt(data, size, true); } void PapbVcInterface::startPacketTransfer(ByteWidthCfg initWidth) { @@ -65,6 +53,26 @@ bool PapbVcInterface::pollReadyForPacket() const { return (reg >> 6) & 0b1; } +ReturnValue_t PapbVcInterface::finishWritePartialOpt(const uint8_t* data, size_t remainingSize, + bool handlePartial) { + for (size_t idx = 0; idx < remainingSize; idx++) { + if (not pollReadyForOctet(MAX_BUSY_POLLS)) { + if (not pollReadyForPacket()) { + return PARTIALLY_WRITTEN; + } + abortPacketTransfer(); + return returnvalue::FAILED; + } + *(vcBaseReg + DATA_REG_OFFSET) = static_cast(data[idx]); + } + if (not pollReadyForOctet(MAX_BUSY_POLLS)) { + abortPacketTransfer(); + return returnvalue::FAILED; + } + completePacketTransfer(); + return returnvalue::OK; +} + bool PapbVcInterface::isVcInterfaceBufferEmpty() { ReturnValue_t result = returnvalue::OK; gpio::Levels papbEmptyState = gpio::Levels::HIGH; @@ -101,21 +109,8 @@ 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; +ReturnValue_t PapbVcInterface::finishWrite(const uint8_t* data, size_t remainingSize) { + return finishWritePartialOpt(data, remainingSize, false); } void PapbVcInterface::abortPacketTransfer() { *vcBaseReg = CONFIG_ABORT; } diff --git a/linux/ipcore/PapbVcInterface.h b/linux/ipcore/PapbVcInterface.h index b5160748..72b9b9f3 100644 --- a/linux/ipcore/PapbVcInterface.h +++ b/linux/ipcore/PapbVcInterface.h @@ -40,7 +40,11 @@ class PapbVcInterface : public VirtualChannelIF { * @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 finishWrite(const uint8_t* data, size_t remainingSize) override; + ReturnValue_t finishWritePartialOpt(const uint8_t* data, size_t remainingSize, + bool handlePartial); void cancelTransfer() override; @@ -126,12 +130,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/com/TmStoreTaskBase.cpp b/mission/com/TmStoreTaskBase.cpp index 80900975..8849b241 100644 --- a/mission/com/TmStoreTaskBase.cpp +++ b/mission/com/TmStoreTaskBase.cpp @@ -138,8 +138,17 @@ ReturnValue_t TmStoreTaskBase::performDump(PersistentTmStoreWithTmQueue& store, return result; } dumpedLen = tmReader.getFullPacketLen(); - result = channel.write(tmReader.getFullData(), dumpedLen); - if (result == DirectTmSinkIF::IS_BUSY) { + size_t partiallyWrittenSize = 0; + result = channel.write(tmReader.getFullData(), dumpedLen, partiallyWrittenSize); + if (result == VirtualChannelIF::PARTIALLY_WRITTEN) { + result = channel.handleLastWriteSynchronously(tmReader.getFullData(), partiallyWrittenSize, + dumpedLen - partiallyWrittenSize, 20); + 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::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..b3201334 100644 --- a/mission/com/VirtualChannel.cpp +++ b/mission/com/VirtualChannel.cpp @@ -1,25 +1,64 @@ #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::finishWrite(const uint8_t* data, size_t remainingSize) { + if (!ptme.containsVc(vcId)) { + return CHANNEL_DOES_NOT_EXIST; + } + return ptme.getVirtChannel(vcId)->finishWrite(data, remainingSize); +} + 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::handleLastWriteSynchronously(const uint8_t* data, size_t start, + size_t remLen, unsigned maxDelayMs) { + unsigned delayMs = 0; + while (true) { + if (isBusy()) { + if (delayMs >= maxDelayMs) { + break; + } + TaskFactory::delayTask(10); + delayMs += 10; + continue; + } + return finishWrite(data, start); + } + return returnvalue::FAILED; +} diff --git a/mission/com/VirtualChannel.h b/mission/com/VirtualChannel.h index 98aba903..9995772f 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,12 @@ 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 finishWrite(const uint8_t* data, size_t remainingSize) override; + ReturnValue_t handleLastWriteSynchronously(const uint8_t* data, size_t start, size_t remLen, + unsigned maxDelayMs); void cancelTransfer() override; uint8_t getVcid() const; bool isTxOn() const; diff --git a/mission/com/VirtualChannelWithQueue.cpp b/mission/com/VirtualChannelWithQueue.cpp index a90829ab..621a7268 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 partiallyWrittenSize = 0; if (performWriteOp) { - result = write(data, size); + result = write(data, size, partiallyWrittenSize); + if (result == PARTIALLY_WRITTEN) { + result = handleLastWriteSynchronously(data, size, partiallyWrittenSize, 20); + 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::endl; + } + } } // Try delete in any case, ignore failures (which should not happen), it is more important to // propagate write errors. diff --git a/mission/tmtc/DirectTmSinkIF.h b/mission/tmtc/DirectTmSinkIF.h index 11a17c79..a5f3af42 100644 --- a/mission/tmtc/DirectTmSinkIF.h +++ b/mission/tmtc/DirectTmSinkIF.h @@ -13,6 +13,7 @@ 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); /** * @brief Implements the functionality to write to a TM sink directly @@ -20,9 +21,12 @@ class DirectTmSinkIF { * @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. + * if the TM sink is busy, PARTIALLY_WRITTEN if only a portion of the bytes could be + * written. */ - 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; + + virtual ReturnValue_t finishWrite(const uint8_t* data, size_t remainingSize) = 0; virtual bool isBusy() const = 0; }; diff --git a/tmtc b/tmtc index e249f147..84df438e 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit e249f147bc1738003d31290df8f2b525d91c3482 +Subproject commit 84df438e9d74898cbb3c6319ba55193c0c8d0b0c From 99192606a26d80a2942f1fdefeb106bc298e7a81 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 13 Oct 2023 09:27:24 +0200 Subject: [PATCH 52/82] bugfixes for PAPB IF --- linux/ipcore/PapbVcInterface.cpp | 19 ++++++++++++------- linux/ipcore/PapbVcInterface.h | 3 +-- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/linux/ipcore/PapbVcInterface.cpp b/linux/ipcore/PapbVcInterface.cpp index 5e63aebc..2329a32e 100644 --- a/linux/ipcore/PapbVcInterface.cpp +++ b/linux/ipcore/PapbVcInterface.cpp @@ -37,7 +37,7 @@ ReturnValue_t PapbVcInterface::write(const uint8_t* data, size_t size, size_t& w abortPacketTransfer(); return returnvalue::FAILED; } - return finishWritePartialOpt(data, size, true); + return finishWriteInternal(data, size, writtenSize); } void PapbVcInterface::startPacketTransfer(ByteWidthCfg initWidth) { @@ -53,11 +53,20 @@ bool PapbVcInterface::pollReadyForPacket() const { return (reg >> 6) & 0b1; } -ReturnValue_t PapbVcInterface::finishWritePartialOpt(const uint8_t* data, size_t remainingSize, - bool handlePartial) { +ReturnValue_t PapbVcInterface::finishWrite(const uint8_t* data, size_t remainingSize) { + if (not pollReadyForPacket()) { + return returnvalue::FAILED; + } + size_t dummy = 0; + return finishWriteInternal(data, remainingSize, dummy); +} + +ReturnValue_t PapbVcInterface::finishWriteInternal(const uint8_t* data, size_t remainingSize, + size_t& writtenSize) { for (size_t idx = 0; idx < remainingSize; idx++) { if (not pollReadyForOctet(MAX_BUSY_POLLS)) { if (not pollReadyForPacket()) { + writtenSize = idx; return PARTIALLY_WRITTEN; } abortPacketTransfer(); @@ -109,8 +118,4 @@ inline bool PapbVcInterface::pollReadyForOctet(uint32_t maxCycles) const { return false; } -ReturnValue_t PapbVcInterface::finishWrite(const uint8_t* data, size_t remainingSize) { - return finishWritePartialOpt(data, remainingSize, false); -} - void PapbVcInterface::abortPacketTransfer() { *vcBaseReg = CONFIG_ABORT; } diff --git a/linux/ipcore/PapbVcInterface.h b/linux/ipcore/PapbVcInterface.h index 72b9b9f3..201580bc 100644 --- a/linux/ipcore/PapbVcInterface.h +++ b/linux/ipcore/PapbVcInterface.h @@ -43,8 +43,7 @@ class PapbVcInterface : public VirtualChannelIF { ReturnValue_t write(const uint8_t* data, size_t size, size_t& writtenSize) override; ReturnValue_t finishWrite(const uint8_t* data, size_t remainingSize) override; - ReturnValue_t finishWritePartialOpt(const uint8_t* data, size_t remainingSize, - bool handlePartial); + ReturnValue_t finishWriteInternal(const uint8_t* data, size_t remainingSize, size_t& writtenSize); void cancelTransfer() override; From 7c42e05c2374509d7a4ee14658d45ee4cee753c1 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 13 Oct 2023 09:29:57 +0200 Subject: [PATCH 53/82] wait duration fix --- mission/com/TmStoreTaskBase.cpp | 4 ++-- mission/com/VirtualChannelWithQueue.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mission/com/TmStoreTaskBase.cpp b/mission/com/TmStoreTaskBase.cpp index 8849b241..c51d6f9b 100644 --- a/mission/com/TmStoreTaskBase.cpp +++ b/mission/com/TmStoreTaskBase.cpp @@ -142,11 +142,11 @@ ReturnValue_t TmStoreTaskBase::performDump(PersistentTmStoreWithTmQueue& store, result = channel.write(tmReader.getFullData(), dumpedLen, partiallyWrittenSize); if (result == VirtualChannelIF::PARTIALLY_WRITTEN) { result = channel.handleLastWriteSynchronously(tmReader.getFullData(), partiallyWrittenSize, - dumpedLen - partiallyWrittenSize, 20); + dumpedLen - partiallyWrittenSize, 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::endl; + << 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; diff --git a/mission/com/VirtualChannelWithQueue.cpp b/mission/com/VirtualChannelWithQueue.cpp index 621a7268..53f2ee52 100644 --- a/mission/com/VirtualChannelWithQueue.cpp +++ b/mission/com/VirtualChannelWithQueue.cpp @@ -41,12 +41,12 @@ ReturnValue_t VirtualChannelWithQueue::handleNextTm(bool performWriteOp) { if (performWriteOp) { result = write(data, size, partiallyWrittenSize); if (result == PARTIALLY_WRITTEN) { - result = handleLastWriteSynchronously(data, size, partiallyWrittenSize, 20); + result = handleLastWriteSynchronously(data, size, partiallyWrittenSize, 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::endl; + << std::setw(4) << std::hex << result << std::dec << std::endl; } } } From 8dbc5cad48d24a2bf9ce90c7715c237a79ede1a4 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 13 Oct 2023 09:39:50 +0200 Subject: [PATCH 54/82] more bugfixes --- CHANGELOG.md | 8 ++++++++ linux/ipcore/PapbVcInterface.cpp | 26 +++++++++++++++++++------- linux/ipcore/PapbVcInterface.h | 6 ++++-- mission/com/VirtualChannel.cpp | 6 +++--- mission/com/VirtualChannel.h | 2 +- mission/tmtc/DirectTmSinkIF.h | 3 ++- 6 files changed, 37 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6d88025..b029d621 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,14 @@ will consitute of a breaking change warranting a new major release: # [unreleased] +## 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 + component was adapted to account for this partial success state. The caller must now check + for the `PARTIALLY_WRITTEN` state and must take care of finishing a write in some shape or + form before starting the next packet transfer. + # [v7.1.0] 2023-10-11 - Bumped `eive-tmtc` to v5.8.0. diff --git a/linux/ipcore/PapbVcInterface.cpp b/linux/ipcore/PapbVcInterface.cpp index 2329a32e..88684772 100644 --- a/linux/ipcore/PapbVcInterface.cpp +++ b/linux/ipcore/PapbVcInterface.cpp @@ -28,6 +28,10 @@ ReturnValue_t PapbVcInterface::write(const uint8_t* data, size_t size, size_t& w if (size < 4) { return returnvalue::FAILED; } + // The user must call finishWrite before starting a new packet transfer. + if (partialWriteActive) { + return INCOMPLETE_PARTIAL_WRITE; + } if (pollReadyForPacket()) { startPacketTransfer(ByteWidthCfg::ONE); } else { @@ -37,7 +41,7 @@ ReturnValue_t PapbVcInterface::write(const uint8_t* data, size_t size, size_t& w abortPacketTransfer(); return returnvalue::FAILED; } - return finishWriteInternal(data, size, writtenSize); + return finishWriteInternal(data, 0, size, writtenSize, false); } void PapbVcInterface::startPacketTransfer(ByteWidthCfg initWidth) { @@ -53,26 +57,34 @@ bool PapbVcInterface::pollReadyForPacket() const { return (reg >> 6) & 0b1; } -ReturnValue_t PapbVcInterface::finishWrite(const uint8_t* data, size_t remainingSize) { +ReturnValue_t PapbVcInterface::finishWrite(const uint8_t* data, size_t start, + size_t remainingSize) { if (not pollReadyForPacket()) { return returnvalue::FAILED; } size_t dummy = 0; - return finishWriteInternal(data, remainingSize, dummy); + return finishWriteInternal(data, start, remainingSize, dummy, true); } -ReturnValue_t PapbVcInterface::finishWriteInternal(const uint8_t* data, size_t remainingSize, - size_t& writtenSize) { +ReturnValue_t PapbVcInterface::finishWriteInternal(const uint8_t* data, size_t start, + size_t remainingSize, size_t& writtenSize, + bool abortOnPartialWrite) { for (size_t idx = 0; idx < remainingSize; idx++) { if (not pollReadyForOctet(MAX_BUSY_POLLS)) { if (not pollReadyForPacket()) { - writtenSize = idx; + writtenSize = start + idx; + partialWriteActive = true; + if (abortOnPartialWrite) { + abortPacketTransfer(); + partialWriteActive = false; + return returnvalue::FAILED; + } return PARTIALLY_WRITTEN; } abortPacketTransfer(); return returnvalue::FAILED; } - *(vcBaseReg + DATA_REG_OFFSET) = static_cast(data[idx]); + *(vcBaseReg + DATA_REG_OFFSET) = static_cast(data[start + idx]); } if (not pollReadyForOctet(MAX_BUSY_POLLS)) { abortPacketTransfer(); diff --git a/linux/ipcore/PapbVcInterface.h b/linux/ipcore/PapbVcInterface.h index 201580bc..35bd0439 100644 --- a/linux/ipcore/PapbVcInterface.h +++ b/linux/ipcore/PapbVcInterface.h @@ -42,8 +42,9 @@ class PapbVcInterface : public VirtualChannelIF { */ ReturnValue_t write(const uint8_t* data, size_t size, size_t& writtenSize) override; - ReturnValue_t finishWrite(const uint8_t* data, size_t remainingSize) override; - ReturnValue_t finishWriteInternal(const uint8_t* data, size_t remainingSize, size_t& writtenSize); + ReturnValue_t finishWrite(const uint8_t* data, size_t start, size_t remainingSize) override; + ReturnValue_t finishWriteInternal(const uint8_t* data, size_t start, size_t remainingSize, + size_t& writtenSize, bool abortOnPartialWrite); void cancelTransfer() override; @@ -91,6 +92,7 @@ class PapbVcInterface : public VirtualChannelIF { std::string uioFile; int mapNum = 0; + bool partialWriteActive = false; 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; diff --git a/mission/com/VirtualChannel.cpp b/mission/com/VirtualChannel.cpp index b3201334..140b23f6 100644 --- a/mission/com/VirtualChannel.cpp +++ b/mission/com/VirtualChannel.cpp @@ -21,11 +21,11 @@ ReturnValue_t VirtualChannel::write(const uint8_t* data, size_t size, size_t& wr uint8_t VirtualChannel::getVcid() const { return vcId; } -ReturnValue_t VirtualChannel::finishWrite(const uint8_t* data, size_t remainingSize) { +ReturnValue_t VirtualChannel::finishWrite(const uint8_t* data, size_t start, size_t remainingSize) { if (!ptme.containsVc(vcId)) { return CHANNEL_DOES_NOT_EXIST; } - return ptme.getVirtChannel(vcId)->finishWrite(data, remainingSize); + return ptme.getVirtChannel(vcId)->finishWrite(data, start, remainingSize); } const char* VirtualChannel::getName() const { return vcName.c_str(); } @@ -58,7 +58,7 @@ ReturnValue_t VirtualChannel::handleLastWriteSynchronously(const uint8_t* data, delayMs += 10; continue; } - return finishWrite(data, start); + return finishWrite(data, start, remLen); } return returnvalue::FAILED; } diff --git a/mission/com/VirtualChannel.h b/mission/com/VirtualChannel.h index 9995772f..3d61bd13 100644 --- a/mission/com/VirtualChannel.h +++ b/mission/com/VirtualChannel.h @@ -32,7 +32,7 @@ class VirtualChannel : public SystemObject, public VirtualChannelIF { 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, size_t& writtenSize) override; - ReturnValue_t finishWrite(const uint8_t* data, size_t remainingSize) override; + ReturnValue_t finishWrite(const uint8_t* data, size_t start, size_t remainingSize) override; ReturnValue_t handleLastWriteSynchronously(const uint8_t* data, size_t start, size_t remLen, unsigned maxDelayMs); void cancelTransfer() override; diff --git a/mission/tmtc/DirectTmSinkIF.h b/mission/tmtc/DirectTmSinkIF.h index a5f3af42..e1fcf54f 100644 --- a/mission/tmtc/DirectTmSinkIF.h +++ b/mission/tmtc/DirectTmSinkIF.h @@ -14,6 +14,7 @@ class DirectTmSinkIF { 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 INCOMPLETE_PARTIAL_WRITE = returnvalue::makeCode(CLASS_ID, 2); /** * @brief Implements the functionality to write to a TM sink directly @@ -26,7 +27,7 @@ class DirectTmSinkIF { */ virtual ReturnValue_t write(const uint8_t* data, size_t size, size_t& writtenSize) = 0; - virtual ReturnValue_t finishWrite(const uint8_t* data, size_t remainingSize) = 0; + virtual ReturnValue_t finishWrite(const uint8_t* data, size_t start, size_t remainingSize) = 0; virtual bool isBusy() const = 0; }; From 031be000d4c0472bc8bdb9103ca4e2129465d60a Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 13 Oct 2023 10:04:03 +0200 Subject: [PATCH 55/82] printout correction --- mission/com/LiveTmTask.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/mission/com/LiveTmTask.cpp b/mission/com/LiveTmTask.cpp index 74d79d4d..833f28c1 100644 --- a/mission/com/LiveTmTask.cpp +++ b/mission/com/LiveTmTask.cpp @@ -160,7 +160,19 @@ ReturnValue_t LiveTmTask::handleGenericTmQueue(MessageQueueIF& queue) { } if (!ptmeLocked) { - result = channel.write(data, size); + size_t partiallyWrittenSize = 0; + result = channel.write(data, size, partiallyWrittenSize); + if (result == DirectTmSinkIF::PARTIALLY_WRITTEN) { + // Already throttle CFDP. + signals::CFDP_CHANNEL_THROTTLE_SIGNAL = true; + result = channel.handleLastWriteSynchronously(data, size, partiallyWrittenSize, 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; + } + } } // Try delete in any case, ignore failures (which should not happen), it is more important to // propagate write errors. From 9f600a24ff53cd37f2c8436a981531a70f162678 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 13 Oct 2023 10:57:58 +0200 Subject: [PATCH 56/82] refactored throttle handling --- mission/cfdp/CfdpHandler.cpp | 19 ++++++------------- mission/cfdp/CfdpHandler.h | 6 ++++-- mission/com/LiveTmTask.cpp | 24 +++++++++++++++++++----- mission/com/LiveTmTask.h | 6 ++++++ mission/com/VirtualChannel.cpp | 1 + mission/genericFactory.cpp | 2 +- 6 files changed, 37 insertions(+), 21 deletions(-) diff --git a/mission/cfdp/CfdpHandler.cpp b/mission/cfdp/CfdpHandler.cpp index 07fbecb1..99afb725 100644 --- a/mission/cfdp/CfdpHandler.cpp +++ b/mission/cfdp/CfdpHandler.cpp @@ -15,7 +15,8 @@ using namespace returnvalue; using namespace cfdp; -CfdpHandler::CfdpHandler(const FsfwHandlerParams& fsfwHandlerParams, const CfdpHandlerCfg& cfdpCfg) +CfdpHandler::CfdpHandler(const FsfwHandlerParams& fsfwHandlerParams, const CfdpHandlerCfg& cfdpCfg, + const std::atomic_bool& throttleSignal) : SystemObject(fsfwHandlerParams.objectId), pduQueue(fsfwHandlerParams.tmtcQueue), cfdpRequestQueue(fsfwHandlerParams.cfdpQueue), @@ -28,7 +29,8 @@ CfdpHandler::CfdpHandler(const FsfwHandlerParams& fsfwHandlerParams, const CfdpH this->fsfwParams), srcHandler(SourceHandlerParams(localCfg, cfdpCfg.userHandler, seqCntProvider), this->fsfwParams), - ipcStore(fsfwHandlerParams.ipcStore) {} + ipcStore(fsfwHandlerParams.ipcStore), + throttleSignal(throttleSignal) {} [[nodiscard]] const char* CfdpHandler::getName() const { return "CFDP Handler"; } @@ -69,20 +71,11 @@ ReturnValue_t CfdpHandler::initialize() { fsmCount++; } fsmCount = 0; - if (signals::CFDP_CHANNEL_THROTTLE_SIGNAL) { - throttlePeriodSourceHandler.resetTimer(); + + if (throttleSignal) { throttlePeriodOngoing = true; - signals::CFDP_CHANNEL_THROTTLE_SIGNAL = false; } - if (throttlePeriodOngoing) { - if (throttlePeriodSourceHandler.hasTimedOut()) { - throttlePeriodOngoing = false; - - } else { - shortDelay = true; - } - } // 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) { diff --git a/mission/cfdp/CfdpHandler.h b/mission/cfdp/CfdpHandler.h index 46631ac5..82f27b0b 100644 --- a/mission/cfdp/CfdpHandler.h +++ b/mission/cfdp/CfdpHandler.h @@ -62,7 +62,8 @@ 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; @@ -74,7 +75,6 @@ class CfdpHandler : public SystemObject, public ExecutableObjectIF, public Accep private: MessageQueueIF& pduQueue; MessageQueueIF& cfdpRequestQueue; - Countdown throttlePeriodSourceHandler = Countdown(80); bool throttlePeriodOngoing = false; cfdp::LocalEntityCfg localCfg; @@ -89,6 +89,8 @@ class CfdpHandler : public SystemObject, public ExecutableObjectIF, public Accep StorageManagerIF* tcStore = nullptr; StorageManagerIF* tmStore = nullptr; + const std::atomic_bool& throttleSignal; + ReturnValue_t handlePduPacketMessages(); ReturnValue_t handlePduPacket(TmTcMessage& msg); ReturnValue_t handleCfdpRequest(CommandMessage& msg); diff --git a/mission/com/LiveTmTask.cpp b/mission/com/LiveTmTask.cpp index 833f28c1..f9b01c77 100644 --- a/mission/com/LiveTmTask.cpp +++ b/mission/com/LiveTmTask.cpp @@ -53,11 +53,14 @@ ReturnValue_t LiveTmTask::performOperation(uint8_t opCode) { } } } - if (channel.isBusy() and not signals::CFDP_CHANNEL_THROTTLE_SIGNAL) { + if (channel.isBusy() 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. It is cleared - // by the data creator. - signals::CFDP_CHANNEL_THROTTLE_SIGNAL = true; + // it is the easiest way to handle back pressure for now in a sensible way. + throttleCfdp(); + } else if(!channel.isBusy() and throttlePeriodOngoing) { + if(minimumPeriodThrottleCd.hasTimedOut()) { + releaseCfdp(); + } } if (!handledTm) { if (tmFunnelCd.hasTimedOut()) { @@ -164,7 +167,7 @@ ReturnValue_t LiveTmTask::handleGenericTmQueue(MessageQueueIF& queue) { result = channel.write(data, size, partiallyWrittenSize); if (result == DirectTmSinkIF::PARTIALLY_WRITTEN) { // Already throttle CFDP. - signals::CFDP_CHANNEL_THROTTLE_SIGNAL = true; + throttleCfdp(); result = channel.handleLastWriteSynchronously(data, size, partiallyWrittenSize, 200); if (result != returnvalue::OK) { // TODO: Event? Might lead to dangerous spam though.. @@ -180,6 +183,17 @@ ReturnValue_t LiveTmTask::handleGenericTmQueue(MessageQueueIF& queue) { return result; } +void LiveTmTask::throttleCfdp() { + throttlePeriodOngoing = true; + minimumPeriodThrottleCd.resetTimer(); + signals::CFDP_CHANNEL_THROTTLE_SIGNAL = true; +} + +void LiveTmTask::releaseCfdp() { + throttlePeriodOngoing = false; + signals::CFDP_CHANNEL_THROTTLE_SIGNAL = false; +} + ModeTreeChildIF& LiveTmTask::getModeTreeChildIF() { return *this; } ReturnValue_t LiveTmTask::initialize() { diff --git a/mission/com/LiveTmTask.h b/mission/com/LiveTmTask.h index 63831158..73d2bf16 100644 --- a/mission/com/LiveTmTask.h +++ b/mission/com/LiveTmTask.h @@ -39,6 +39,10 @@ class LiveTmTask : public SystemObject, CfdpTmFunnel& cfdpFunnel; VirtualChannel& channel; const std::atomic_bool& ptmeLocked; + // This countdown ensures that the CFDP is always throttled with a minimum period. Only after + // this period, the CFDP can be released if the channel is not busy. + Countdown minimumPeriodThrottleCd = Countdown(40); + bool throttlePeriodOngoing = false; void readCommandQueue(void); @@ -56,6 +60,8 @@ class LiveTmTask : public SystemObject, void startTransition(Mode_t mode, Submode_t submode) override; void announceMode(bool recursive) override; + void throttleCfdp(); + void releaseCfdp(); object_id_t getObjectId() const override; const HasHealthIF* getOptHealthIF() const override; diff --git a/mission/com/VirtualChannel.cpp b/mission/com/VirtualChannel.cpp index 140b23f6..7ada00aa 100644 --- a/mission/com/VirtualChannel.cpp +++ b/mission/com/VirtualChannel.cpp @@ -58,6 +58,7 @@ ReturnValue_t VirtualChannel::handleLastWriteSynchronously(const uint8_t* data, delayMs += 10; continue; } + sif::debug << "last write after" << delayMs << std::endl; return finishWrite(data, start, remLen); } return returnvalue::FAILED; diff --git a/mission/genericFactory.cpp b/mission/genericFactory.cpp index 0dd965eb..d66ef5f7 100644 --- a/mission/genericFactory.cpp +++ b/mission/genericFactory.cpp @@ -292,7 +292,7 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun GROUND_REMOTE_CFG.maxFileSegmentLen = config::CFDP_MAX_FILE_SEGMENT_LEN; CfdpHandlerCfg cfdpCfg(localId, indicationCfg, *eiveUserHandler, EIVE_FAULT_HANDLER, 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); From 5bcd171108c99ac11290ba2bc79de6f437a9882f Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 13 Oct 2023 11:42:13 +0200 Subject: [PATCH 57/82] lot of debugging and trying out --- common/config/eive/definitions.h | 7 ++++--- mission/cfdp/CfdpHandler.cpp | 4 +--- mission/com/LiveTmTask.cpp | 12 +++++++++++- mission/com/LiveTmTask.h | 5 ++++- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/common/config/eive/definitions.h b/common/config/eive/definitions.h index 2edf434f..777e8924 100644 --- a/common/config/eive/definitions.h +++ b/common/config/eive/definitions.h @@ -48,7 +48,7 @@ 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 = 300; +static constexpr size_t CFDP_MAX_FILE_SEGMENT_LEN = 990; static constexpr uint32_t CCSDS_HANDLER_QUEUE_SIZE = 50; static constexpr uint8_t NUMBER_OF_VIRTUAL_CHANNELS = 4; @@ -61,9 +61,10 @@ 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 = 250; +static constexpr uint32_t LIVE_CHANNEL_CFDP_QUEUE_SIZE = 400; -static constexpr uint32_t CFDP_MAX_FSM_CALL_COUNT_SRC_HANDLER = 50; +static constexpr uint32_t CFDP_THROTTLE_PERIOD_MS = 200; +static constexpr uint32_t CFDP_MAX_FSM_CALL_COUNT_SRC_HANDLER = 20; static constexpr uint32_t CFDP_MAX_FSM_CALL_COUNT_DEST_HANDLER = 300; static constexpr uint32_t CFDP_SHORT_DELAY_MS = 50; static constexpr uint32_t CFDP_REGULAR_DELAY_MS = 200; diff --git a/mission/cfdp/CfdpHandler.cpp b/mission/cfdp/CfdpHandler.cpp index 99afb725..1382a760 100644 --- a/mission/cfdp/CfdpHandler.cpp +++ b/mission/cfdp/CfdpHandler.cpp @@ -72,9 +72,7 @@ ReturnValue_t CfdpHandler::initialize() { } fsmCount = 0; - if (throttleSignal) { - throttlePeriodOngoing = true; - } + 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. diff --git a/mission/com/LiveTmTask.cpp b/mission/com/LiveTmTask.cpp index f9b01c77..2b8bc50c 100644 --- a/mission/com/LiveTmTask.cpp +++ b/mission/com/LiveTmTask.cpp @@ -52,13 +52,16 @@ ReturnValue_t LiveTmTask::performOperation(uint8_t opCode) { } } } + } else { + consecutiveNoBlockWriteCounter = 0; } if (channel.isBusy() 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. throttleCfdp(); } else if(!channel.isBusy() and throttlePeriodOngoing) { - if(minimumPeriodThrottleCd.hasTimedOut()) { + if(minimumPeriodThrottleCd.hasTimedOut() and consecutiveNoBlockWriteCounter >= 10) { + sif::debug << "releasing cfdp" << std::endl; releaseCfdp(); } } @@ -162,10 +165,14 @@ ReturnValue_t LiveTmTask::handleGenericTmQueue(MessageQueueIF& queue) { return result; } + if(ptmeLocked) { + consecutiveNoBlockWriteCounter= 0; + } if (!ptmeLocked) { size_t partiallyWrittenSize = 0; result = channel.write(data, size, partiallyWrittenSize); if (result == DirectTmSinkIF::PARTIALLY_WRITTEN) { + consecutiveNoBlockWriteCounter = 0; // Already throttle CFDP. throttleCfdp(); result = channel.handleLastWriteSynchronously(data, size, partiallyWrittenSize, 200); @@ -175,6 +182,9 @@ ReturnValue_t LiveTmTask::handleGenericTmQueue(MessageQueueIF& queue) { << "LiveTmTask: Synchronous write of last segment failed with code 0x" << std::setw(4) << std::hex << result << std::dec << std::endl; } + minimumPeriodThrottleCd.resetTimer(); + } else { + consecutiveNoBlockWriteCounter++; } } // Try delete in any case, ignore failures (which should not happen), it is more important to diff --git a/mission/com/LiveTmTask.h b/mission/com/LiveTmTask.h index 73d2bf16..121fd44f 100644 --- a/mission/com/LiveTmTask.h +++ b/mission/com/LiveTmTask.h @@ -10,6 +10,8 @@ #include #include #include +#include +#include "eive/definitions.h" class LiveTmTask : public SystemObject, public HasModesIF, @@ -35,13 +37,14 @@ class LiveTmTask : public SystemObject, ModeHelper modeHelper; Mode_t mode = HasModesIF::MODE_OFF; Countdown tmFunnelCd = Countdown(100); + uint32_t consecutiveNoBlockWriteCounter = 0; PusTmFunnel& pusFunnel; CfdpTmFunnel& cfdpFunnel; VirtualChannel& channel; const std::atomic_bool& ptmeLocked; // This countdown ensures that the CFDP is always throttled with a minimum period. Only after // this period, the CFDP can be released if the channel is not busy. - Countdown minimumPeriodThrottleCd = Countdown(40); + Countdown minimumPeriodThrottleCd = Countdown(config::CFDP_THROTTLE_PERIOD_MS); bool throttlePeriodOngoing = false; void readCommandQueue(void); From c95964ce0f8d08acf2c03b858a5082600d0a2178 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 13 Oct 2023 13:21:28 +0200 Subject: [PATCH 58/82] lets see if this works better --- mission/cfdp/CfdpHandler.cpp | 2 +- mission/cfdp/CfdpHandler.h | 2 +- mission/com/LiveTmTask.cpp | 35 ++++++++++++++++------------------- mission/com/LiveTmTask.h | 7 ++++--- mission/sysDefs.h | 1 + 5 files changed, 23 insertions(+), 24 deletions(-) diff --git a/mission/cfdp/CfdpHandler.cpp b/mission/cfdp/CfdpHandler.cpp index 1382a760..c1bb3273 100644 --- a/mission/cfdp/CfdpHandler.cpp +++ b/mission/cfdp/CfdpHandler.cpp @@ -16,7 +16,7 @@ using namespace returnvalue; using namespace cfdp; CfdpHandler::CfdpHandler(const FsfwHandlerParams& fsfwHandlerParams, const CfdpHandlerCfg& cfdpCfg, - const std::atomic_bool& throttleSignal) + const std::atomic_bool& throttleSignal) : SystemObject(fsfwHandlerParams.objectId), pduQueue(fsfwHandlerParams.tmtcQueue), cfdpRequestQueue(fsfwHandlerParams.cfdpQueue), diff --git a/mission/cfdp/CfdpHandler.h b/mission/cfdp/CfdpHandler.h index 82f27b0b..b2f49678 100644 --- a/mission/cfdp/CfdpHandler.h +++ b/mission/cfdp/CfdpHandler.h @@ -63,7 +63,7 @@ struct CfdpHandlerCfg { class CfdpHandler : public SystemObject, public ExecutableObjectIF, public AcceptsTelecommandsIF { public: explicit CfdpHandler(const FsfwHandlerParams& fsfwParams, const CfdpHandlerCfg& cfdpCfg, - const std::atomic_bool& throttleSignal); + const std::atomic_bool& throttleSignal); [[nodiscard]] const char* getName() const override; [[nodiscard]] uint32_t getIdentifier() const override; diff --git a/mission/com/LiveTmTask.cpp b/mission/com/LiveTmTask.cpp index 2b8bc50c..c89369fc 100644 --- a/mission/com/LiveTmTask.cpp +++ b/mission/com/LiveTmTask.cpp @@ -9,6 +9,7 @@ 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, VirtualChannel& channel, const std::atomic_bool& ptmeLocked, @@ -52,16 +53,14 @@ ReturnValue_t LiveTmTask::performOperation(uint8_t opCode) { } } } - } else { - consecutiveNoBlockWriteCounter = 0; } if (channel.isBusy() 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. throttleCfdp(); - } else if(!channel.isBusy() and throttlePeriodOngoing) { - if(minimumPeriodThrottleCd.hasTimedOut() and consecutiveNoBlockWriteCounter >= 10) { - sif::debug << "releasing cfdp" << std::endl; + } else if (!channel.isBusy() 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 / 2) { releaseCfdp(); } } @@ -144,16 +143,21 @@ void LiveTmTask::readCommandQueue(void) { } } -ReturnValue_t LiveTmTask::handleRegularTmQueue() { return handleGenericTmQueue(*regularTmQueue); } +ReturnValue_t LiveTmTask::handleRegularTmQueue() { + return handleGenericTmQueue(*regularTmQueue, false); +} -ReturnValue_t LiveTmTask::handleCfdpTmQueue() { return handleGenericTmQueue(*cfdpTmQueue); } +ReturnValue_t LiveTmTask::handleCfdpTmQueue() { return handleGenericTmQueue(*cfdpTmQueue, true); } -ReturnValue_t LiveTmTask::handleGenericTmQueue(MessageQueueIF& queue) { +ReturnValue_t LiveTmTask::handleGenericTmQueue(MessageQueueIF& queue, bool isCfdp) { TmTcMessage message; ReturnValue_t result = queue.receiveMessage(&message); if (result == MessageQueueIF::EMPTY) { return result; } + if (signals::CFDP_MSG_COUNTER > 0) { + signals::CFDP_MSG_COUNTER--; + } store_address_t storeId = message.getStorageId(); const uint8_t* data = nullptr; size_t size = 0; @@ -165,26 +169,19 @@ ReturnValue_t LiveTmTask::handleGenericTmQueue(MessageQueueIF& queue) { return result; } - if(ptmeLocked) { - consecutiveNoBlockWriteCounter= 0; - } if (!ptmeLocked) { size_t partiallyWrittenSize = 0; result = channel.write(data, size, partiallyWrittenSize); if (result == DirectTmSinkIF::PARTIALLY_WRITTEN) { - consecutiveNoBlockWriteCounter = 0; // Already throttle CFDP. throttleCfdp(); result = channel.handleLastWriteSynchronously(data, size, partiallyWrittenSize, 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; + sif::warning << "LiveTmTask: Synchronous write of last segment failed with code 0x" + << std::setw(4) << std::hex << result << std::dec << std::endl; } - minimumPeriodThrottleCd.resetTimer(); - } else { - consecutiveNoBlockWriteCounter++; + // minimumPeriodThrottleCd.resetTimer(); } } // Try delete in any case, ignore failures (which should not happen), it is more important to @@ -195,7 +192,7 @@ ReturnValue_t LiveTmTask::handleGenericTmQueue(MessageQueueIF& queue) { void LiveTmTask::throttleCfdp() { throttlePeriodOngoing = true; - minimumPeriodThrottleCd.resetTimer(); + // minimumPeriodThrottleCd.resetTimer(); signals::CFDP_CHANNEL_THROTTLE_SIGNAL = true; } diff --git a/mission/com/LiveTmTask.h b/mission/com/LiveTmTask.h index 121fd44f..41b03ece 100644 --- a/mission/com/LiveTmTask.h +++ b/mission/com/LiveTmTask.h @@ -10,7 +10,9 @@ #include #include #include + #include + #include "eive/definitions.h" class LiveTmTask : public SystemObject, @@ -37,21 +39,20 @@ class LiveTmTask : public SystemObject, ModeHelper modeHelper; Mode_t mode = HasModesIF::MODE_OFF; Countdown tmFunnelCd = Countdown(100); - uint32_t consecutiveNoBlockWriteCounter = 0; PusTmFunnel& pusFunnel; CfdpTmFunnel& cfdpFunnel; VirtualChannel& channel; const std::atomic_bool& ptmeLocked; // This countdown ensures that the CFDP is always throttled with a minimum period. Only after // this period, the CFDP can be released if the channel is not busy. - Countdown minimumPeriodThrottleCd = Countdown(config::CFDP_THROTTLE_PERIOD_MS); + // Countdown minimumPeriodThrottleCd = Countdown(config::CFDP_THROTTLE_PERIOD_MS); bool throttlePeriodOngoing = false; void readCommandQueue(void); ReturnValue_t handleRegularTmQueue(); ReturnValue_t handleCfdpTmQueue(); - ReturnValue_t handleGenericTmQueue(MessageQueueIF& queue); + ReturnValue_t handleGenericTmQueue(MessageQueueIF& queue, bool isCfdp); MessageQueueId_t getCommandQueue() const override; diff --git a/mission/sysDefs.h b/mission/sysDefs.h index b7cbd4e0..8fade60a 100644 --- a/mission/sysDefs.h +++ b/mission/sysDefs.h @@ -15,6 +15,7 @@ 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 From be1fb22e39141ff8473c72bacf6dbb8c7de8c0d3 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 13 Oct 2023 14:00:44 +0200 Subject: [PATCH 59/82] somethings wrong, i can feel it --- mission/cfdp/CfdpHandler.cpp | 13 +++++++++++-- mission/com/LiveTmTask.cpp | 11 +++++++---- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/mission/cfdp/CfdpHandler.cpp b/mission/cfdp/CfdpHandler.cpp index c1bb3273..2e28aee0 100644 --- a/mission/cfdp/CfdpHandler.cpp +++ b/mission/cfdp/CfdpHandler.cpp @@ -60,7 +60,7 @@ ReturnValue_t CfdpHandler::initialize() { result = handleCfdpMessages(); if (result != OK) { } - uint32_t fsmCount = 0; + 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) { @@ -70,7 +70,7 @@ ReturnValue_t CfdpHandler::initialize() { destHandler.stateMachine(); fsmCount++; } - fsmCount = 0; + fsmCount = 1; throttlePeriodOngoing = throttleSignal; @@ -78,6 +78,9 @@ ReturnValue_t CfdpHandler::initialize() { // 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) { @@ -85,6 +88,9 @@ ReturnValue_t CfdpHandler::initialize() { 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) { @@ -92,6 +98,9 @@ ReturnValue_t CfdpHandler::initialize() { } fsmCount++; } + if (signals::CFDP_MSG_COUNTER > 0) { + sif::debug << "CFDP msg count: " << signals::CFDP_MSG_COUNTER << std::endl; + } } if (shortDelay) { TaskFactory::delayTask(config::CFDP_SHORT_DELAY_MS); diff --git a/mission/com/LiveTmTask.cpp b/mission/com/LiveTmTask.cpp index c89369fc..a723daa6 100644 --- a/mission/com/LiveTmTask.cpp +++ b/mission/com/LiveTmTask.cpp @@ -54,6 +54,9 @@ ReturnValue_t LiveTmTask::performOperation(uint8_t opCode) { } } } + if (channel.isBusy()) { + sif::debug << "busy" << std::endl; + } if (channel.isBusy() 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. @@ -74,10 +77,10 @@ ReturnValue_t LiveTmTask::performOperation(uint8_t opCode) { readCommandQueue(); if (DEBUG_TM_QUEUE_SPEED) { if (consecutiveCfdpCounter > 0) { - sif::debug << "Concecutive CFDP TM handled: " << consecutiveCfdpCounter << std::endl; + sif::debug << "Consecutive CFDP TM handled: " << consecutiveCfdpCounter << std::endl; } if (consecutiveRegularCounter > 0) { - sif::debug << "Concecutive regular TM handled: " << consecutiveRegularCounter + sif::debug << "Consecutive regular TM handled: " << consecutiveRegularCounter << std::endl; } consecutiveRegularCounter = 0; @@ -181,7 +184,6 @@ ReturnValue_t LiveTmTask::handleGenericTmQueue(MessageQueueIF& queue, bool isCfd sif::warning << "LiveTmTask: Synchronous write of last segment failed with code 0x" << std::setw(4) << std::hex << result << std::dec << std::endl; } - // minimumPeriodThrottleCd.resetTimer(); } } // Try delete in any case, ignore failures (which should not happen), it is more important to @@ -192,13 +194,14 @@ ReturnValue_t LiveTmTask::handleGenericTmQueue(MessageQueueIF& queue, bool isCfd void LiveTmTask::throttleCfdp() { throttlePeriodOngoing = true; - // minimumPeriodThrottleCd.resetTimer(); signals::CFDP_CHANNEL_THROTTLE_SIGNAL = true; + sif::debug << "throttling CFDP" << std::endl; } void LiveTmTask::releaseCfdp() { throttlePeriodOngoing = false; signals::CFDP_CHANNEL_THROTTLE_SIGNAL = false; + sif::debug << "releasing CFDP" << std::endl; } ModeTreeChildIF& LiveTmTask::getModeTreeChildIF() { return *this; } From 2279eab5e764e73b81560a54827010279f962460 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 13 Oct 2023 14:20:50 +0200 Subject: [PATCH 60/82] maybe this works better? --- mission/com/LiveTmTask.cpp | 17 +++++++++++++---- mission/com/LiveTmTask.h | 2 ++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/mission/com/LiveTmTask.cpp b/mission/com/LiveTmTask.cpp index a723daa6..5b337030 100644 --- a/mission/com/LiveTmTask.cpp +++ b/mission/com/LiveTmTask.cpp @@ -37,7 +37,8 @@ ReturnValue_t LiveTmTask::performOperation(uint8_t opCode) { // TODO: Must read CFDP TM queue and regular TM queue and forward them. Handle regular queue // first. handledTm = false; - if (!channel.isBusy()) { + updateBusyFlag(); + if (!channelIsBusy) { result = handleRegularTmQueue(); if (result == MessageQueueIF::EMPTY) { result = handleCfdpTmQueue(); @@ -54,14 +55,14 @@ ReturnValue_t LiveTmTask::performOperation(uint8_t opCode) { } } } - if (channel.isBusy()) { + if (channelIsBusy) { sif::debug << "busy" << std::endl; } - if (channel.isBusy() and !throttlePeriodOngoing) { + 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. throttleCfdp(); - } else if (!channel.isBusy() and throttlePeriodOngoing) { + } 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 / 2) { releaseCfdp(); @@ -184,6 +185,9 @@ ReturnValue_t LiveTmTask::handleGenericTmQueue(MessageQueueIF& queue, bool isCfd sif::warning << "LiveTmTask: Synchronous write of last segment failed with code 0x" << std::setw(4) << std::hex << result << std::dec << std::endl; } + // This is a bit of a hack: If a partial write was performed and synchronously finished, we + // treat this like a busy channel. + channelIsBusy = true; } } // Try delete in any case, ignore failures (which should not happen), it is more important to @@ -204,6 +208,11 @@ void LiveTmTask::releaseCfdp() { 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(); +} + ModeTreeChildIF& LiveTmTask::getModeTreeChildIF() { return *this; } ReturnValue_t LiveTmTask::initialize() { diff --git a/mission/com/LiveTmTask.h b/mission/com/LiveTmTask.h index 41b03ece..0727bad1 100644 --- a/mission/com/LiveTmTask.h +++ b/mission/com/LiveTmTask.h @@ -47,6 +47,7 @@ class LiveTmTask : public SystemObject, // this period, the CFDP can be released if the channel is not busy. // Countdown minimumPeriodThrottleCd = Countdown(config::CFDP_THROTTLE_PERIOD_MS); bool throttlePeriodOngoing = false; + bool channelIsBusy = false; void readCommandQueue(void); @@ -66,6 +67,7 @@ class LiveTmTask : public SystemObject, void announceMode(bool recursive) override; void throttleCfdp(); void releaseCfdp(); + void updateBusyFlag(); object_id_t getObjectId() const override; const HasHealthIF* getOptHealthIF() const override; From 4431883b4ddd982dff6bd1ce446e6a048d7afce0 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 13 Oct 2023 15:10:52 +0200 Subject: [PATCH 61/82] okay, PAPB IF caches packet now --- bsp_q7s/objectFactory.cpp | 20 ++++++---- common/config/eive/definitions.h | 2 + linux/ipcore/PapbVcInterface.cpp | 51 +++++++++++++------------ linux/ipcore/PapbVcInterface.h | 15 +++++--- mission/com/LiveTmTask.cpp | 12 +++--- mission/com/TmStoreTaskBase.cpp | 7 ++-- mission/com/VirtualChannel.cpp | 21 ++++++---- mission/com/VirtualChannel.h | 6 +-- mission/com/VirtualChannelWithQueue.cpp | 6 +-- mission/tmtc/DirectTmSinkIF.h | 3 +- 10 files changed, 80 insertions(+), 63 deletions(-) diff --git a/bsp_q7s/objectFactory.cpp b/bsp_q7s/objectFactory.cpp index 211aa071..c8e6f555 100644 --- a/bsp_q7s/objectFactory.cpp +++ b/bsp_q7s/objectFactory.cpp @@ -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); diff --git a/common/config/eive/definitions.h b/common/config/eive/definitions.h index 777e8924..ee1fd5b7 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; diff --git a/linux/ipcore/PapbVcInterface.cpp b/linux/ipcore/PapbVcInterface.cpp index 88684772..d5207c0b 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() {} @@ -29,9 +33,17 @@ ReturnValue_t PapbVcInterface::write(const uint8_t* data, size_t size, size_t& w return returnvalue::FAILED; } // The user must call finishWrite before starting a new packet transfer. - if (partialWriteActive) { - return INCOMPLETE_PARTIAL_WRITE; + if (writeActive) { + 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 { @@ -41,14 +53,17 @@ ReturnValue_t PapbVcInterface::write(const uint8_t* data, size_t size, size_t& w abortPacketTransfer(); return returnvalue::FAILED; } - return finishWriteInternal(data, 0, size, writtenSize, false); + return advanceWrite(writtenSize); } void PapbVcInterface::startPacketTransfer(ByteWidthCfg initWidth) { *vcBaseReg = CONFIG_DATA_INPUT | initWidth; } -void PapbVcInterface::completePacketTransfer() { *vcBaseReg = CONFIG_END; } +void PapbVcInterface::completePacketTransfer() { + *vcBaseReg = CONFIG_END; + writeActive = false; +} bool PapbVcInterface::pollReadyForPacket() const { // Check if PAPB interface is ready to receive data. Use the configuration register for this. @@ -57,34 +72,20 @@ bool PapbVcInterface::pollReadyForPacket() const { return (reg >> 6) & 0b1; } -ReturnValue_t PapbVcInterface::finishWrite(const uint8_t* data, size_t start, - size_t remainingSize) { +ReturnValue_t PapbVcInterface::advanceWrite(size_t& writtenSize) { if (not pollReadyForPacket()) { - return returnvalue::FAILED; + return IS_BUSY; } - size_t dummy = 0; - return finishWriteInternal(data, start, remainingSize, dummy, true); -} - -ReturnValue_t PapbVcInterface::finishWriteInternal(const uint8_t* data, size_t start, - size_t remainingSize, size_t& writtenSize, - bool abortOnPartialWrite) { - for (size_t idx = 0; idx < remainingSize; idx++) { + for (size_t idx = currentPacketIndex; idx < currentPacketSize; idx++) { if (not pollReadyForOctet(MAX_BUSY_POLLS)) { if (not pollReadyForPacket()) { - writtenSize = start + idx; - partialWriteActive = true; - if (abortOnPartialWrite) { - abortPacketTransfer(); - partialWriteActive = false; - return returnvalue::FAILED; - } return PARTIALLY_WRITTEN; } abortPacketTransfer(); return returnvalue::FAILED; } - *(vcBaseReg + DATA_REG_OFFSET) = static_cast(data[start + idx]); + *(vcBaseReg + DATA_REG_OFFSET) = static_cast(packetBuf[currentPacketIndex]); + writtenSize++; } if (not pollReadyForOctet(MAX_BUSY_POLLS)) { abortPacketTransfer(); diff --git a/linux/ipcore/PapbVcInterface.h b/linux/ipcore/PapbVcInterface.h index 35bd0439..eb707b62 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,7 +31,8 @@ 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(); bool isBusy() const override; @@ -42,9 +44,9 @@ class PapbVcInterface : public VirtualChannelIF { */ ReturnValue_t write(const uint8_t* data, size_t size, size_t& writtenSize) override; - ReturnValue_t finishWrite(const uint8_t* data, size_t start, size_t remainingSize) override; - ReturnValue_t finishWriteInternal(const uint8_t* data, size_t start, size_t remainingSize, - size_t& writtenSize, bool abortOnPartialWrite); + ReturnValue_t advanceWrite(size_t& remainingSize) override; + // ReturnValue_t finishWriteInternal(const uint8_t* data, size_t start, size_t remainingSize, + // size_t& writtenSize, bool abortOnPartialWrite); void cancelTransfer() override; @@ -90,9 +92,12 @@ 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 partialWriteActive = false; + bool writeActive = 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; diff --git a/mission/com/LiveTmTask.cpp b/mission/com/LiveTmTask.cpp index 5b337030..15630be5 100644 --- a/mission/com/LiveTmTask.cpp +++ b/mission/com/LiveTmTask.cpp @@ -53,11 +53,11 @@ ReturnValue_t LiveTmTask::performOperation(uint8_t opCode) { 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 (channelIsBusy) { - sif::debug << "busy" << std::endl; - } 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. @@ -174,12 +174,12 @@ ReturnValue_t LiveTmTask::handleGenericTmQueue(MessageQueueIF& queue, bool isCfd } if (!ptmeLocked) { - size_t partiallyWrittenSize = 0; - result = channel.write(data, size, partiallyWrittenSize); + size_t writtenSize = 0; + result = channel.write(data, size, writtenSize); if (result == DirectTmSinkIF::PARTIALLY_WRITTEN) { // Already throttle CFDP. throttleCfdp(); - result = channel.handleLastWriteSynchronously(data, size, partiallyWrittenSize, 200); + 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" diff --git a/mission/com/TmStoreTaskBase.cpp b/mission/com/TmStoreTaskBase.cpp index c51d6f9b..215cef08 100644 --- a/mission/com/TmStoreTaskBase.cpp +++ b/mission/com/TmStoreTaskBase.cpp @@ -138,11 +138,10 @@ ReturnValue_t TmStoreTaskBase::performDump(PersistentTmStoreWithTmQueue& store, return result; } dumpedLen = tmReader.getFullPacketLen(); - size_t partiallyWrittenSize = 0; - result = channel.write(tmReader.getFullData(), dumpedLen, partiallyWrittenSize); + size_t writtenSize = 0; + result = channel.write(tmReader.getFullData(), dumpedLen, writtenSize); if (result == VirtualChannelIF::PARTIALLY_WRITTEN) { - result = channel.handleLastWriteSynchronously(tmReader.getFullData(), partiallyWrittenSize, - dumpedLen - partiallyWrittenSize, 200); + 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" diff --git a/mission/com/VirtualChannel.cpp b/mission/com/VirtualChannel.cpp index 7ada00aa..d6d792f4 100644 --- a/mission/com/VirtualChannel.cpp +++ b/mission/com/VirtualChannel.cpp @@ -21,11 +21,11 @@ ReturnValue_t VirtualChannel::write(const uint8_t* data, size_t size, size_t& wr uint8_t VirtualChannel::getVcid() const { return vcId; } -ReturnValue_t VirtualChannel::finishWrite(const uint8_t* data, size_t start, size_t remainingSize) { +ReturnValue_t VirtualChannel::advanceWrite(size_t& writtenSize) { if (!ptme.containsVc(vcId)) { return CHANNEL_DOES_NOT_EXIST; } - return ptme.getVirtChannel(vcId)->finishWrite(data, start, remainingSize); + return ptme.getVirtChannel(vcId)->advanceWrite(writtenSize); } const char* VirtualChannel::getName() const { return vcName.c_str(); } @@ -46,20 +46,27 @@ void VirtualChannel::cancelTransfer() { bool VirtualChannel::isTxOn() const { return txOn; } -ReturnValue_t VirtualChannel::handleLastWriteSynchronously(const uint8_t* data, size_t start, - size_t remLen, unsigned maxDelayMs) { +ReturnValue_t VirtualChannel::handleWriteCompletionSynchronously(size_t& writtenSize, + unsigned maxCompletionTimeMs) { unsigned delayMs = 0; while (true) { if (isBusy()) { - if (delayMs >= maxDelayMs) { + if (delayMs >= maxCompletionTimeMs) { break; } TaskFactory::delayTask(10); delayMs += 10; continue; } - sif::debug << "last write after" << delayMs << std::endl; - return finishWrite(data, start, remLen); + ReturnValue_t result = advanceWrite(writtenSize); + if (result == returnvalue::OK) { + sif::debug << "last write after" << delayMs << std::endl; + // 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 3d61bd13..d8ac0228 100644 --- a/mission/com/VirtualChannel.h +++ b/mission/com/VirtualChannel.h @@ -32,9 +32,9 @@ class VirtualChannel : public SystemObject, public VirtualChannelIF { 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, size_t& writtenSize) override; - ReturnValue_t finishWrite(const uint8_t* data, size_t start, size_t remainingSize) override; - ReturnValue_t handleLastWriteSynchronously(const uint8_t* data, size_t start, size_t remLen, - unsigned maxDelayMs); + ReturnValue_t advanceWrite(size_t& writtenSize) override; + ReturnValue_t handleWriteCompletionSynchronously(size_t& writtenSize, + unsigned maxCompletionTimeMs); void cancelTransfer() override; uint8_t getVcid() const; bool isTxOn() const; diff --git a/mission/com/VirtualChannelWithQueue.cpp b/mission/com/VirtualChannelWithQueue.cpp index 53f2ee52..0d9e4d11 100644 --- a/mission/com/VirtualChannelWithQueue.cpp +++ b/mission/com/VirtualChannelWithQueue.cpp @@ -37,11 +37,11 @@ ReturnValue_t VirtualChannelWithQueue::handleNextTm(bool performWriteOp) { } // TODO: Hnadle partial write handling - size_t partiallyWrittenSize = 0; + size_t writtenSize = 0; if (performWriteOp) { - result = write(data, size, partiallyWrittenSize); + result = write(data, size, writtenSize); if (result == PARTIALLY_WRITTEN) { - result = handleLastWriteSynchronously(data, size, partiallyWrittenSize, 200); + result = handleWriteCompletionSynchronously(writtenSize, 200); if (result != returnvalue::OK) { // TODO: Event? Might lead to dangerous spam though.. sif::warning diff --git a/mission/tmtc/DirectTmSinkIF.h b/mission/tmtc/DirectTmSinkIF.h index e1fcf54f..f5b43039 100644 --- a/mission/tmtc/DirectTmSinkIF.h +++ b/mission/tmtc/DirectTmSinkIF.h @@ -14,7 +14,6 @@ class DirectTmSinkIF { 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 INCOMPLETE_PARTIAL_WRITE = returnvalue::makeCode(CLASS_ID, 2); /** * @brief Implements the functionality to write to a TM sink directly @@ -27,7 +26,7 @@ class DirectTmSinkIF { */ virtual ReturnValue_t write(const uint8_t* data, size_t size, size_t& writtenSize) = 0; - virtual ReturnValue_t finishWrite(const uint8_t* data, size_t start, size_t remainingSize) = 0; + virtual ReturnValue_t advanceWrite(size_t& writtenSize) = 0; virtual bool isBusy() const = 0; }; From b8beddc11b2ff7779d6ba1c7b51ccbf5fabb6a2f Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 13 Oct 2023 15:24:06 +0200 Subject: [PATCH 62/82] gens --- .../fsfwconfig/events/translateEvents.cpp | 2 +- .../fsfwconfig/objects/translateObjects.cpp | 2 +- generators/bsp_hosted_returnvalues.csv | 2 +- generators/bsp_q7s_returnvalues.csv | 2 +- generators/events/translateEvents.cpp | 2 +- generators/objects/translateObjects.cpp | 2 +- linux/fsfwconfig/events/translateEvents.cpp | 2 +- linux/fsfwconfig/objects/translateObjects.cpp | 2 +- linux/ipcore/PapbVcInterface.cpp | 28 +++++++++++++------ linux/ipcore/PapbVcInterface.h | 5 ++-- mission/com/VirtualChannel.cpp | 7 +++++ mission/com/VirtualChannel.h | 1 + mission/tmtc/DirectTmSinkIF.h | 25 ++++++++++++++--- tmtc | 2 +- 14 files changed, 61 insertions(+), 23 deletions(-) diff --git a/bsp_hosted/fsfwconfig/events/translateEvents.cpp b/bsp_hosted/fsfwconfig/events/translateEvents.cpp index 56112520..7c04e9f5 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 314 translations. * @details - * Generated on: 2023-10-13 09:44:05 + * Generated on: 2023-10-13 15:23:30 */ #include "translateEvents.h" diff --git a/bsp_hosted/fsfwconfig/objects/translateObjects.cpp b/bsp_hosted/fsfwconfig/objects/translateObjects.cpp index 7916bfeb..5cb8e295 100644 --- a/bsp_hosted/fsfwconfig/objects/translateObjects.cpp +++ b/bsp_hosted/fsfwconfig/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 174 translations. - * Generated on: 2023-10-13 09:44:05 + * Generated on: 2023-10-13 15:23:30 */ #include "translateObjects.h" diff --git a/generators/bsp_hosted_returnvalues.csv b/generators/bsp_hosted_returnvalues.csv index e8d79402..1964e00e 100644 --- a/generators/bsp_hosted_returnvalues.csv +++ b/generators/bsp_hosted_returnvalues.csv @@ -521,5 +521,5 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path 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_IncompletePartialWrite;No description;2;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_q7s_returnvalues.csv b/generators/bsp_q7s_returnvalues.csv index 0d08c2b7..9aa12b12 100644 --- a/generators/bsp_q7s_returnvalues.csv +++ b/generators/bsp_q7s_returnvalues.csv @@ -616,6 +616,6 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path 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_IncompletePartialWrite;No description;2;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/events/translateEvents.cpp b/generators/events/translateEvents.cpp index 56112520..7c04e9f5 100644 --- a/generators/events/translateEvents.cpp +++ b/generators/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** * @brief Auto-generated event translation file. Contains 314 translations. * @details - * Generated on: 2023-10-13 09:44:05 + * Generated on: 2023-10-13 15:23:30 */ #include "translateEvents.h" diff --git a/generators/objects/translateObjects.cpp b/generators/objects/translateObjects.cpp index 96e07335..5b99d6f0 100644 --- a/generators/objects/translateObjects.cpp +++ b/generators/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 178 translations. - * Generated on: 2023-10-13 09:44:05 + * Generated on: 2023-10-13 15:23:30 */ #include "translateObjects.h" diff --git a/linux/fsfwconfig/events/translateEvents.cpp b/linux/fsfwconfig/events/translateEvents.cpp index 56112520..7c04e9f5 100644 --- a/linux/fsfwconfig/events/translateEvents.cpp +++ b/linux/fsfwconfig/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** * @brief Auto-generated event translation file. Contains 314 translations. * @details - * Generated on: 2023-10-13 09:44:05 + * Generated on: 2023-10-13 15:23:30 */ #include "translateEvents.h" diff --git a/linux/fsfwconfig/objects/translateObjects.cpp b/linux/fsfwconfig/objects/translateObjects.cpp index 96e07335..5b99d6f0 100644 --- a/linux/fsfwconfig/objects/translateObjects.cpp +++ b/linux/fsfwconfig/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 178 translations. - * Generated on: 2023-10-13 09:44:05 + * Generated on: 2023-10-13 15:23:30 */ #include "translateObjects.h" diff --git a/linux/ipcore/PapbVcInterface.cpp b/linux/ipcore/PapbVcInterface.cpp index d5207c0b..239ed091 100644 --- a/linux/ipcore/PapbVcInterface.cpp +++ b/linux/ipcore/PapbVcInterface.cpp @@ -32,8 +32,8 @@ ReturnValue_t PapbVcInterface::write(const uint8_t* data, size_t size, size_t& w if (size < 4) { return returnvalue::FAILED; } - // The user must call finishWrite before starting a new packet transfer. - if (writeActive) { + // The user must call advance until completion before starting a new packet transfer. + if (writeActiveStatus) { return IS_BUSY; } if (size > packetBuf.capacity()) { @@ -60,11 +60,6 @@ void PapbVcInterface::startPacketTransfer(ByteWidthCfg initWidth) { *vcBaseReg = CONFIG_DATA_INPUT | initWidth; } -void PapbVcInterface::completePacketTransfer() { - *vcBaseReg = CONFIG_END; - writeActive = false; -} - 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. @@ -73,6 +68,9 @@ bool PapbVcInterface::pollReadyForPacket() const { } ReturnValue_t PapbVcInterface::advanceWrite(size_t& writtenSize) { + if (!writeActiveStatus) { + return NO_WRITE_ACTIVE; + } if (not pollReadyForPacket()) { return IS_BUSY; } @@ -95,6 +93,8 @@ ReturnValue_t PapbVcInterface::advanceWrite(size_t& writtenSize) { return returnvalue::OK; } +bool PapbVcInterface::writeActive() const { return writeActiveStatus; } + bool PapbVcInterface::isVcInterfaceBufferEmpty() { ReturnValue_t result = returnvalue::OK; gpio::Levels papbEmptyState = gpio::Levels::HIGH; @@ -131,4 +131,16 @@ inline bool PapbVcInterface::pollReadyForOctet(uint32_t maxCycles) const { return false; } -void PapbVcInterface::abortPacketTransfer() { *vcBaseReg = CONFIG_ABORT; } +void PapbVcInterface::abortPacketTransfer() { + *vcBaseReg = CONFIG_ABORT; + writeActiveStatus = false; + currentPacketIndex = 0; + currentPacketSize = 0; +} + +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 eb707b62..bcda5709 100644 --- a/linux/ipcore/PapbVcInterface.h +++ b/linux/ipcore/PapbVcInterface.h @@ -50,6 +50,8 @@ class PapbVcInterface : public VirtualChannelIF { void cancelTransfer() override; + bool writeActive() const override; + ReturnValue_t initialize() override; private: @@ -95,12 +97,11 @@ class PapbVcInterface : public VirtualChannelIF { std::vector packetBuf; std::string uioFile; int mapNum = 0; - bool writeActive = false; + 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; diff --git a/mission/com/VirtualChannel.cpp b/mission/com/VirtualChannel.cpp index d6d792f4..93c83eeb 100644 --- a/mission/com/VirtualChannel.cpp +++ b/mission/com/VirtualChannel.cpp @@ -28,6 +28,13 @@ ReturnValue_t VirtualChannel::advanceWrite(size_t& writtenSize) { 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 { diff --git a/mission/com/VirtualChannel.h b/mission/com/VirtualChannel.h index d8ac0228..84cdafb3 100644 --- a/mission/com/VirtualChannel.h +++ b/mission/com/VirtualChannel.h @@ -35,6 +35,7 @@ class VirtualChannel : public SystemObject, public VirtualChannelIF { 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/tmtc/DirectTmSinkIF.h b/mission/tmtc/DirectTmSinkIF.h index f5b43039..6ac182d2 100644 --- a/mission/tmtc/DirectTmSinkIF.h +++ b/mission/tmtc/DirectTmSinkIF.h @@ -14,21 +14,38 @@ class DirectTmSinkIF { 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, PARTIALLY_WRITTEN if only a portion of the bytes could be - * written. + * @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, 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. + */ virtual ReturnValue_t advanceWrite(size_t& writtenSize) = 0; 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/tmtc b/tmtc index 10e163be..60f7ae54 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 10e163be752a6a259b6d3dabea825acc9c9725f8 +Subproject commit 60f7ae5453b387ee5ebcf6a338c34284004dbce7 From 2f25ac8e7d1997637f6c1bbd74724c180b58b378 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 13 Oct 2023 16:25:40 +0200 Subject: [PATCH 63/82] remove old printouts --- common/config/eive/definitions.h | 3 +-- linux/ipcore/PapbVcInterface.cpp | 1 + mission/cfdp/CfdpHandler.cpp | 3 --- mission/com/LiveTmTask.cpp | 2 -- mission/com/VirtualChannel.cpp | 1 - 5 files changed, 2 insertions(+), 8 deletions(-) diff --git a/common/config/eive/definitions.h b/common/config/eive/definitions.h index ee1fd5b7..9274878f 100644 --- a/common/config/eive/definitions.h +++ b/common/config/eive/definitions.h @@ -65,8 +65,7 @@ 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 = 400; -static constexpr uint32_t CFDP_THROTTLE_PERIOD_MS = 200; -static constexpr uint32_t CFDP_MAX_FSM_CALL_COUNT_SRC_HANDLER = 20; +static constexpr uint32_t CFDP_MAX_FSM_CALL_COUNT_SRC_HANDLER = 60; static constexpr uint32_t CFDP_MAX_FSM_CALL_COUNT_DEST_HANDLER = 300; static constexpr uint32_t CFDP_SHORT_DELAY_MS = 50; static constexpr uint32_t CFDP_REGULAR_DELAY_MS = 200; diff --git a/linux/ipcore/PapbVcInterface.cpp b/linux/ipcore/PapbVcInterface.cpp index 239ed091..bc324489 100644 --- a/linux/ipcore/PapbVcInterface.cpp +++ b/linux/ipcore/PapbVcInterface.cpp @@ -58,6 +58,7 @@ ReturnValue_t PapbVcInterface::write(const uint8_t* data, size_t size, size_t& w void PapbVcInterface::startPacketTransfer(ByteWidthCfg initWidth) { *vcBaseReg = CONFIG_DATA_INPUT | initWidth; + writeActiveStatus = true; } bool PapbVcInterface::pollReadyForPacket() const { diff --git a/mission/cfdp/CfdpHandler.cpp b/mission/cfdp/CfdpHandler.cpp index 2e28aee0..bb98b946 100644 --- a/mission/cfdp/CfdpHandler.cpp +++ b/mission/cfdp/CfdpHandler.cpp @@ -98,9 +98,6 @@ ReturnValue_t CfdpHandler::initialize() { } fsmCount++; } - if (signals::CFDP_MSG_COUNTER > 0) { - sif::debug << "CFDP msg count: " << signals::CFDP_MSG_COUNTER << std::endl; - } } if (shortDelay) { TaskFactory::delayTask(config::CFDP_SHORT_DELAY_MS); diff --git a/mission/com/LiveTmTask.cpp b/mission/com/LiveTmTask.cpp index 15630be5..78382168 100644 --- a/mission/com/LiveTmTask.cpp +++ b/mission/com/LiveTmTask.cpp @@ -199,13 +199,11 @@ ReturnValue_t LiveTmTask::handleGenericTmQueue(MessageQueueIF& queue, bool isCfd void LiveTmTask::throttleCfdp() { throttlePeriodOngoing = true; signals::CFDP_CHANNEL_THROTTLE_SIGNAL = true; - sif::debug << "throttling CFDP" << std::endl; } void LiveTmTask::releaseCfdp() { throttlePeriodOngoing = false; signals::CFDP_CHANNEL_THROTTLE_SIGNAL = false; - sif::debug << "releasing CFDP" << std::endl; } void LiveTmTask::updateBusyFlag() { diff --git a/mission/com/VirtualChannel.cpp b/mission/com/VirtualChannel.cpp index 93c83eeb..e531727e 100644 --- a/mission/com/VirtualChannel.cpp +++ b/mission/com/VirtualChannel.cpp @@ -67,7 +67,6 @@ ReturnValue_t VirtualChannel::handleWriteCompletionSynchronously(size_t& written } ReturnValue_t result = advanceWrite(writtenSize); if (result == returnvalue::OK) { - sif::debug << "last write after" << delayMs << std::endl; // Transfer complete return result; } else if (result != PARTIALLY_WRITTEN) { From a47ad98d90e8fd683a7421a6d44bd7a92c04d7b0 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 13 Oct 2023 16:29:02 +0200 Subject: [PATCH 64/82] delete some old code --- mission/com/LiveTmTask.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/mission/com/LiveTmTask.h b/mission/com/LiveTmTask.h index 0727bad1..4b5096de 100644 --- a/mission/com/LiveTmTask.h +++ b/mission/com/LiveTmTask.h @@ -43,9 +43,6 @@ class LiveTmTask : public SystemObject, CfdpTmFunnel& cfdpFunnel; VirtualChannel& channel; const std::atomic_bool& ptmeLocked; - // This countdown ensures that the CFDP is always throttled with a minimum period. Only after - // this period, the CFDP can be released if the channel is not busy. - // Countdown minimumPeriodThrottleCd = Countdown(config::CFDP_THROTTLE_PERIOD_MS); bool throttlePeriodOngoing = false; bool channelIsBusy = false; From e7709b7091b435bb60b162a52754631726f661f2 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 13 Oct 2023 16:42:13 +0200 Subject: [PATCH 65/82] this is even better --- mission/com/LiveTmTask.cpp | 38 ++++++++++++++++++++++---------------- mission/com/LiveTmTask.h | 2 ++ 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/mission/com/LiveTmTask.cpp b/mission/com/LiveTmTask.cpp index 78382168..16f8b346 100644 --- a/mission/com/LiveTmTask.cpp +++ b/mission/com/LiveTmTask.cpp @@ -58,16 +58,9 @@ ReturnValue_t LiveTmTask::performOperation(uint8_t opCode) { << result << std::dec << std::endl; } } - 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. - 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 / 2) { - releaseCfdp(); - } - } + + cfdpBackpressureHandling(); + if (!handledTm) { if (tmFunnelCd.hasTimedOut()) { pusFunnel.performOperation(0); @@ -159,9 +152,10 @@ ReturnValue_t LiveTmTask::handleGenericTmQueue(MessageQueueIF& queue, bool isCfd if (result == MessageQueueIF::EMPTY) { return result; } - if (signals::CFDP_MSG_COUNTER > 0) { + if (isCfdp and signals::CFDP_MSG_COUNTER > 0) { signals::CFDP_MSG_COUNTER--; } + sif::debug << "CFDP msg counter: " << signals::CFDP_MSG_COUNTER << std::endl; store_address_t storeId = message.getStorageId(); const uint8_t* data = nullptr; size_t size = 0; @@ -177,17 +171,12 @@ ReturnValue_t LiveTmTask::handleGenericTmQueue(MessageQueueIF& queue, bool isCfd size_t writtenSize = 0; result = channel.write(data, size, writtenSize); if (result == DirectTmSinkIF::PARTIALLY_WRITTEN) { - // Already throttle CFDP. - throttleCfdp(); 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; } - // This is a bit of a hack: If a partial write was performed and synchronously finished, we - // treat this like a busy channel. - channelIsBusy = true; } } // Try delete in any case, ignore failures (which should not happen), it is more important to @@ -199,11 +188,13 @@ ReturnValue_t LiveTmTask::handleGenericTmQueue(MessageQueueIF& queue, bool isCfd void LiveTmTask::throttleCfdp() { throttlePeriodOngoing = true; signals::CFDP_CHANNEL_THROTTLE_SIGNAL = true; + sif::debug << "throttling CFDP" << std::endl; } void LiveTmTask::releaseCfdp() { throttlePeriodOngoing = false; signals::CFDP_CHANNEL_THROTTLE_SIGNAL = false; + sif::debug << "releasing CFDP" << std::endl; } void LiveTmTask::updateBusyFlag() { @@ -211,6 +202,21 @@ void LiveTmTask::updateBusyFlag() { 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() { diff --git a/mission/com/LiveTmTask.h b/mission/com/LiveTmTask.h index 4b5096de..04409b5d 100644 --- a/mission/com/LiveTmTask.h +++ b/mission/com/LiveTmTask.h @@ -56,6 +56,8 @@ class LiveTmTask : public SystemObject, void getMode(Mode_t* mode, Submode_t* submode) override; + void cfdpBackpressureHandling(); + ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode, uint32_t* msToReachTheMode) override; From 6c4149571d0c4abeeff267edd0c3fe3128e28d98 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 13 Oct 2023 16:47:16 +0200 Subject: [PATCH 66/82] debug flags --- mission/com/LiveTmTask.cpp | 12 +++++++++--- mission/com/LiveTmTask.h | 2 ++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/mission/com/LiveTmTask.cpp b/mission/com/LiveTmTask.cpp index 16f8b346..32916afb 100644 --- a/mission/com/LiveTmTask.cpp +++ b/mission/com/LiveTmTask.cpp @@ -155,7 +155,9 @@ ReturnValue_t LiveTmTask::handleGenericTmQueue(MessageQueueIF& queue, bool isCfd if (isCfdp and signals::CFDP_MSG_COUNTER > 0) { signals::CFDP_MSG_COUNTER--; } - sif::debug << "CFDP msg counter: " << signals::CFDP_MSG_COUNTER << std::endl; + if (DEBUG_CFDP_TO_LIVE_TM_TASK) { + 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; @@ -188,13 +190,17 @@ ReturnValue_t LiveTmTask::handleGenericTmQueue(MessageQueueIF& queue, bool isCfd void LiveTmTask::throttleCfdp() { throttlePeriodOngoing = true; signals::CFDP_CHANNEL_THROTTLE_SIGNAL = true; - sif::debug << "throttling CFDP" << std::endl; + if (DEBUG_CFDP_TO_LIVE_TM_TASK) { + sif::debug << "Throttling CFDP" << std::endl; + } } void LiveTmTask::releaseCfdp() { throttlePeriodOngoing = false; signals::CFDP_CHANNEL_THROTTLE_SIGNAL = false; - sif::debug << "releasing CFDP" << std::endl; + if (DEBUG_CFDP_TO_LIVE_TM_TASK) { + sif::debug << "Releasing CFDP" << std::endl; + } } void LiveTmTask::updateBusyFlag() { diff --git a/mission/com/LiveTmTask.h b/mission/com/LiveTmTask.h index 04409b5d..48bbb9f9 100644 --- a/mission/com/LiveTmTask.h +++ b/mission/com/LiveTmTask.h @@ -15,6 +15,8 @@ #include "eive/definitions.h" +static constexpr bool DEBUG_CFDP_TO_LIVE_TM_TASK = false; + class LiveTmTask : public SystemObject, public HasModesIF, public ExecutableObjectIF, From ce60a639ce63cf31f9ded4c6597c3abbc60551d3 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 13 Oct 2023 16:48:43 +0200 Subject: [PATCH 67/82] small tweak --- mission/com/LiveTmTask.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mission/com/LiveTmTask.cpp b/mission/com/LiveTmTask.cpp index 32916afb..48e7476c 100644 --- a/mission/com/LiveTmTask.cpp +++ b/mission/com/LiveTmTask.cpp @@ -155,7 +155,7 @@ ReturnValue_t LiveTmTask::handleGenericTmQueue(MessageQueueIF& queue, bool isCfd if (isCfdp and signals::CFDP_MSG_COUNTER > 0) { signals::CFDP_MSG_COUNTER--; } - if (DEBUG_CFDP_TO_LIVE_TM_TASK) { + 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(); From d486c046344778118b3c01e695fbc6f43b07b407 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 13 Oct 2023 16:55:19 +0200 Subject: [PATCH 68/82] better docs --- linux/ipcore/PapbVcInterface.h | 11 +++-------- mission/tmtc/DirectTmSinkIF.h | 6 ++++++ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/linux/ipcore/PapbVcInterface.h b/linux/ipcore/PapbVcInterface.h index bcda5709..ddc9c074 100644 --- a/linux/ipcore/PapbVcInterface.h +++ b/linux/ipcore/PapbVcInterface.h @@ -35,18 +35,13 @@ class PapbVcInterface : public VirtualChannelIF { 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, size_t& writtenSize) override; ReturnValue_t advanceWrite(size_t& remainingSize) override; - // ReturnValue_t finishWriteInternal(const uint8_t* data, size_t start, size_t remainingSize, - // size_t& writtenSize, bool abortOnPartialWrite); void cancelTransfer() override; diff --git a/mission/tmtc/DirectTmSinkIF.h b/mission/tmtc/DirectTmSinkIF.h index 6ac182d2..ff8ab6fe 100644 --- a/mission/tmtc/DirectTmSinkIF.h +++ b/mission/tmtc/DirectTmSinkIF.h @@ -37,9 +37,15 @@ class DirectTmSinkIF { * @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. From f14d792658af10aad5e9969dbad2ff50389eca61 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 13 Oct 2023 16:56:10 +0200 Subject: [PATCH 69/82] this should work as well now --- common/config/eive/definitions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/config/eive/definitions.h b/common/config/eive/definitions.h index 9274878f..78b577c1 100644 --- a/common/config/eive/definitions.h +++ b/common/config/eive/definitions.h @@ -65,7 +65,7 @@ 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 = 400; -static constexpr uint32_t CFDP_MAX_FSM_CALL_COUNT_SRC_HANDLER = 60; +static constexpr uint32_t CFDP_MAX_FSM_CALL_COUNT_SRC_HANDLER = 80; static constexpr uint32_t CFDP_MAX_FSM_CALL_COUNT_DEST_HANDLER = 300; static constexpr uint32_t CFDP_SHORT_DELAY_MS = 50; static constexpr uint32_t CFDP_REGULAR_DELAY_MS = 200; From c5c9692ded8bc5463e7040c2a14401cfc6bbf257 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 13 Oct 2023 17:09:50 +0200 Subject: [PATCH 70/82] lets leave it like this. --- common/config/eive/definitions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/config/eive/definitions.h b/common/config/eive/definitions.h index 78b577c1..9274878f 100644 --- a/common/config/eive/definitions.h +++ b/common/config/eive/definitions.h @@ -65,7 +65,7 @@ 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 = 400; -static constexpr uint32_t CFDP_MAX_FSM_CALL_COUNT_SRC_HANDLER = 80; +static constexpr uint32_t CFDP_MAX_FSM_CALL_COUNT_SRC_HANDLER = 60; static constexpr uint32_t CFDP_MAX_FSM_CALL_COUNT_DEST_HANDLER = 300; static constexpr uint32_t CFDP_SHORT_DELAY_MS = 50; static constexpr uint32_t CFDP_REGULAR_DELAY_MS = 200; From 0f5f147b8d0d7db1a863ac3784ceae2a045b23f1 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 13 Oct 2023 17:12:35 +0200 Subject: [PATCH 71/82] changelog --- CHANGELOG.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2f57d3b..2c581221 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,14 +20,16 @@ will consitute of a breaking change warranting a new major release: - CFDP source handler, which allow 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. ## 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 - component was adapted to account for this partial success state. The caller must now check - for the `PARTIALLY_WRITTEN` state and must take care of finishing a write in some shape or - form before starting the next packet transfer. + 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. - Host build fixes # [v7.1.0] 2023-10-11 From ffba0b371ccc7ce3def6cf19ca0ffbcdab4268c1 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 13 Oct 2023 17:28:31 +0200 Subject: [PATCH 72/82] added another fix --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c581221..4e4a138c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ will consitute of a breaking change warranting a new major release: 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 # [v7.1.0] 2023-10-11 From ace75919cafe73a533b29f46c67ae5f57f4381e4 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 18 Oct 2023 12:24:22 +0200 Subject: [PATCH 73/82] more testing --- common/config/eive/definitions.h | 8 ++++---- linux/ipcore/PapbVcInterface.cpp | 11 +++++------ mission/com/LiveTmTask.cpp | 4 ++++ mission/com/VirtualChannel.cpp | 3 +++ 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/common/config/eive/definitions.h b/common/config/eive/definitions.h index 9274878f..9ed032a6 100644 --- a/common/config/eive/definitions.h +++ b/common/config/eive/definitions.h @@ -50,7 +50,7 @@ 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 = 990; +static constexpr size_t CFDP_MAX_FILE_SEGMENT_LEN = 300; static constexpr uint32_t CCSDS_HANDLER_QUEUE_SIZE = 50; static constexpr uint8_t NUMBER_OF_VIRTUAL_CHANNELS = 4; @@ -63,11 +63,11 @@ 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 = 400; +static constexpr uint32_t LIVE_CHANNEL_CFDP_QUEUE_SIZE = 450; -static constexpr uint32_t CFDP_MAX_FSM_CALL_COUNT_SRC_HANDLER = 60; +static constexpr uint32_t CFDP_MAX_FSM_CALL_COUNT_SRC_HANDLER = 50; static constexpr uint32_t CFDP_MAX_FSM_CALL_COUNT_DEST_HANDLER = 300; -static constexpr uint32_t CFDP_SHORT_DELAY_MS = 50; +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; diff --git a/linux/ipcore/PapbVcInterface.cpp b/linux/ipcore/PapbVcInterface.cpp index bc324489..d11b6c9b 100644 --- a/linux/ipcore/PapbVcInterface.cpp +++ b/linux/ipcore/PapbVcInterface.cpp @@ -34,6 +34,7 @@ ReturnValue_t PapbVcInterface::write(const uint8_t* data, size_t size, size_t& w } // The user must call advance until completion before starting a new packet transfer. if (writeActiveStatus) { + sif::debug << "is busy with writing" << std::endl; return IS_BUSY; } if (size > packetBuf.capacity()) { @@ -47,12 +48,9 @@ ReturnValue_t PapbVcInterface::write(const uint8_t* data, size_t size, size_t& w if (pollReadyForPacket()) { startPacketTransfer(ByteWidthCfg::ONE); } else { + sif::debug << "is busy can not even start" << std::endl; return DirectTmSinkIF::IS_BUSY; } - if (not pollReadyForOctet(MAX_BUSY_POLLS)) { - abortPacketTransfer(); - return returnvalue::FAILED; - } return advanceWrite(writtenSize); } @@ -75,15 +73,16 @@ ReturnValue_t PapbVcInterface::advanceWrite(size_t& writtenSize) { if (not pollReadyForPacket()) { return IS_BUSY; } - for (size_t idx = currentPacketIndex; idx < currentPacketSize; idx++) { + while (currentPacketIndex < currentPacketSize) { if (not pollReadyForOctet(MAX_BUSY_POLLS)) { if (not pollReadyForPacket()) { return PARTIALLY_WRITTEN; } + sif::debug << "aborting unexpectedly" << std::endl; abortPacketTransfer(); return returnvalue::FAILED; } - *(vcBaseReg + DATA_REG_OFFSET) = static_cast(packetBuf[currentPacketIndex]); + *(vcBaseReg + DATA_REG_OFFSET) = static_cast(packetBuf[currentPacketIndex++]); writtenSize++; } if (not pollReadyForOctet(MAX_BUSY_POLLS)) { diff --git a/mission/com/LiveTmTask.cpp b/mission/com/LiveTmTask.cpp index 48e7476c..2792125c 100644 --- a/mission/com/LiveTmTask.cpp +++ b/mission/com/LiveTmTask.cpp @@ -173,12 +173,16 @@ ReturnValue_t LiveTmTask::handleGenericTmQueue(MessageQueueIF& queue, bool isCfd size_t writtenSize = 0; result = channel.write(data, size, writtenSize); if (result == DirectTmSinkIF::PARTIALLY_WRITTEN) { + sif::debug << "only partial write" << std::endl; 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 diff --git a/mission/com/VirtualChannel.cpp b/mission/com/VirtualChannel.cpp index e531727e..11678180 100644 --- a/mission/com/VirtualChannel.cpp +++ b/mission/com/VirtualChannel.cpp @@ -67,12 +67,15 @@ ReturnValue_t VirtualChannel::handleWriteCompletionSynchronously(size_t& written } ReturnValue_t result = advanceWrite(writtenSize); if (result == returnvalue::OK) { + sif::debug << "transfer complete" << std::endl; // Transfer complete return result; } else if (result != PARTIALLY_WRITTEN) { + sif::debug << "transfer completion error" << std::endl; // Some error where we can not or should not continue the transfer. return result; } } + sif::debug << "wtf" << std::endl; return returnvalue::FAILED; } From be6d52ff4aab545cf7ce03887c4b4d02020a92fd Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 18 Oct 2023 14:07:33 +0200 Subject: [PATCH 74/82] throw out stuff --- linux/ipcore/PapbVcInterface.cpp | 3 --- mission/com/LiveTmTask.cpp | 6 +++--- mission/com/VirtualChannel.cpp | 3 --- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/linux/ipcore/PapbVcInterface.cpp b/linux/ipcore/PapbVcInterface.cpp index d11b6c9b..c02d0935 100644 --- a/linux/ipcore/PapbVcInterface.cpp +++ b/linux/ipcore/PapbVcInterface.cpp @@ -34,7 +34,6 @@ ReturnValue_t PapbVcInterface::write(const uint8_t* data, size_t size, size_t& w } // The user must call advance until completion before starting a new packet transfer. if (writeActiveStatus) { - sif::debug << "is busy with writing" << std::endl; return IS_BUSY; } if (size > packetBuf.capacity()) { @@ -48,7 +47,6 @@ ReturnValue_t PapbVcInterface::write(const uint8_t* data, size_t size, size_t& w if (pollReadyForPacket()) { startPacketTransfer(ByteWidthCfg::ONE); } else { - sif::debug << "is busy can not even start" << std::endl; return DirectTmSinkIF::IS_BUSY; } return advanceWrite(writtenSize); @@ -78,7 +76,6 @@ ReturnValue_t PapbVcInterface::advanceWrite(size_t& writtenSize) { if (not pollReadyForPacket()) { return PARTIALLY_WRITTEN; } - sif::debug << "aborting unexpectedly" << std::endl; abortPacketTransfer(); return returnvalue::FAILED; } diff --git a/mission/com/LiveTmTask.cpp b/mission/com/LiveTmTask.cpp index 2792125c..e931b8a7 100644 --- a/mission/com/LiveTmTask.cpp +++ b/mission/com/LiveTmTask.cpp @@ -180,9 +180,9 @@ ReturnValue_t LiveTmTask::handleGenericTmQueue(MessageQueueIF& queue, bool isCfd 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; + } 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 diff --git a/mission/com/VirtualChannel.cpp b/mission/com/VirtualChannel.cpp index 11678180..e531727e 100644 --- a/mission/com/VirtualChannel.cpp +++ b/mission/com/VirtualChannel.cpp @@ -67,15 +67,12 @@ ReturnValue_t VirtualChannel::handleWriteCompletionSynchronously(size_t& written } ReturnValue_t result = advanceWrite(writtenSize); if (result == returnvalue::OK) { - sif::debug << "transfer complete" << std::endl; // Transfer complete return result; } else if (result != PARTIALLY_WRITTEN) { - sif::debug << "transfer completion error" << std::endl; // Some error where we can not or should not continue the transfer. return result; } } - sif::debug << "wtf" << std::endl; return returnvalue::FAILED; } From 978dd4a1de3ca831e3172c9f54109e244276455c Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 18 Oct 2023 14:10:57 +0200 Subject: [PATCH 75/82] larger size --- common/config/eive/definitions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/config/eive/definitions.h b/common/config/eive/definitions.h index 9ed032a6..e4aa2daa 100644 --- a/common/config/eive/definitions.h +++ b/common/config/eive/definitions.h @@ -50,7 +50,7 @@ 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 = 300; +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; From 696d8e4e4cedeacc0a78cf5489b126f4d1d3be02 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 18 Oct 2023 14:12:16 +0200 Subject: [PATCH 76/82] threw out other debug output --- mission/com/LiveTmTask.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/mission/com/LiveTmTask.cpp b/mission/com/LiveTmTask.cpp index e931b8a7..56fe5a51 100644 --- a/mission/com/LiveTmTask.cpp +++ b/mission/com/LiveTmTask.cpp @@ -173,7 +173,6 @@ ReturnValue_t LiveTmTask::handleGenericTmQueue(MessageQueueIF& queue, bool isCfd size_t writtenSize = 0; result = channel.write(data, size, writtenSize); if (result == DirectTmSinkIF::PARTIALLY_WRITTEN) { - sif::debug << "only partial write" << std::endl; result = channel.handleWriteCompletionSynchronously(writtenSize, 200); if (result != returnvalue::OK) { // TODO: Event? Might lead to dangerous spam though.. From d1ee938ade9e6e4dc3d49c898ccb1d492e576ecc Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 18 Oct 2023 16:07:00 +0200 Subject: [PATCH 77/82] store still not large enough? --- common/config/eive/definitions.h | 2 +- mission/com/LiveTmTask.h | 2 +- mission/genericFactory.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/config/eive/definitions.h b/common/config/eive/definitions.h index e4aa2daa..d2c0de52 100644 --- a/common/config/eive/definitions.h +++ b/common/config/eive/definitions.h @@ -50,7 +50,7 @@ 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 size_t CFDP_MAX_FILE_SEGMENT_LEN = 500; static constexpr uint32_t CCSDS_HANDLER_QUEUE_SIZE = 50; static constexpr uint8_t NUMBER_OF_VIRTUAL_CHANNELS = 4; diff --git a/mission/com/LiveTmTask.h b/mission/com/LiveTmTask.h index 48bbb9f9..24579cb7 100644 --- a/mission/com/LiveTmTask.h +++ b/mission/com/LiveTmTask.h @@ -15,7 +15,7 @@ #include "eive/definitions.h" -static constexpr bool DEBUG_CFDP_TO_LIVE_TM_TASK = false; +static constexpr bool DEBUG_CFDP_TO_LIVE_TM_TASK = true; class LiveTmTask : public SystemObject, public HasModesIF, diff --git a/mission/genericFactory.cpp b/mission/genericFactory.cpp index d66ef5f7..1dd434d2 100644 --- a/mission/genericFactory.cpp +++ b/mission/genericFactory.cpp @@ -118,7 +118,7 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun { PoolManager::LocalPoolConfig poolCfg = {{600, 32}, {400, 64}, {400, 128}, - {350, 512}, {500, 1200}, {100, 2048}}; + {350, 512}, {600, 1200}, {100, 2048}}; *tmStore = new PoolManager(objects::TM_STORE, poolCfg); } From 6e3a60f9c579a4908c7acbff1035149d55aac853 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 18 Oct 2023 17:24:44 +0200 Subject: [PATCH 78/82] fine tweaking --- common/config/eive/definitions.h | 10 +++++----- mission/genericFactory.cpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/common/config/eive/definitions.h b/common/config/eive/definitions.h index d2c0de52..d51f6c68 100644 --- a/common/config/eive/definitions.h +++ b/common/config/eive/definitions.h @@ -50,7 +50,7 @@ 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 = 500; +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; @@ -63,22 +63,22 @@ 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 = 450; +static constexpr uint32_t LIVE_CHANNEL_CFDP_QUEUE_SIZE = 350; -static constexpr uint32_t CFDP_MAX_FSM_CALL_COUNT_SRC_HANDLER = 50; +static constexpr uint32_t CFDP_MAX_FSM_CALL_COUNT_SRC_HANDLER = 20; 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 = 150; +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 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 = 300; +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; diff --git a/mission/genericFactory.cpp b/mission/genericFactory.cpp index 1dd434d2..25b59f9b 100644 --- a/mission/genericFactory.cpp +++ b/mission/genericFactory.cpp @@ -118,7 +118,7 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun { PoolManager::LocalPoolConfig poolCfg = {{600, 32}, {400, 64}, {400, 128}, - {350, 512}, {600, 1200}, {100, 2048}}; + {400, 512}, {800, 1200}, {150, 2048}}; *tmStore = new PoolManager(objects::TM_STORE, poolCfg); } From aa47881cecf4f34487fae78bf795f4273f26fcfd Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 18 Oct 2023 18:11:56 +0200 Subject: [PATCH 79/82] this is sufficient to sustain even the high rate --- common/config/eive/definitions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/config/eive/definitions.h b/common/config/eive/definitions.h index d51f6c68..b51eefdb 100644 --- a/common/config/eive/definitions.h +++ b/common/config/eive/definitions.h @@ -65,7 +65,7 @@ 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 = 20; +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; From ca33e2987fd452a2e565199f6a225e9b10f059f2 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 18 Oct 2023 18:14:02 +0200 Subject: [PATCH 80/82] disable debugging --- mission/com/LiveTmTask.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mission/com/LiveTmTask.h b/mission/com/LiveTmTask.h index 24579cb7..48bbb9f9 100644 --- a/mission/com/LiveTmTask.h +++ b/mission/com/LiveTmTask.h @@ -15,7 +15,7 @@ #include "eive/definitions.h" -static constexpr bool DEBUG_CFDP_TO_LIVE_TM_TASK = true; +static constexpr bool DEBUG_CFDP_TO_LIVE_TM_TASK = false; class LiveTmTask : public SystemObject, public HasModesIF, From b3f9a82064ecf374118fff016fa55ed41cb0a891 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 18 Oct 2023 18:16:32 +0200 Subject: [PATCH 81/82] changelog update --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 65ec154d..9308d71d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ will consitute of a breaking change warranting a new major release: ## Added -- CFDP source handler, which allow file downlink using the standardized +- 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. From fc626a2ad68d398478d92952183f033001dfd752 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 19 Oct 2023 11:05:07 +0200 Subject: [PATCH 82/82] bump fsfw --- fsfw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsfw b/fsfw index 63c23800..cc3e64e7 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 63c238005e0c00166879eba6a354a64ca1f59e06 +Subproject commit cc3e64e70d90f6a2b5c59215b2569c1771e890f0