From fdb0cc0e4495ab458ba66816376cf55ccb29ccd8 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 8 Aug 2022 12:31:19 +0200 Subject: [PATCH] tweaks for CFDP distributor --- src/fsfw/cfdp/CfdpDistributor.cpp | 3 ++- src/fsfw/cfdp/CfdpDistributor.h | 8 +++----- src/fsfw/tcdistribution/CcsdsDistributor.cpp | 2 +- src/fsfw/tcdistribution/PusDistributor.cpp | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/fsfw/cfdp/CfdpDistributor.cpp b/src/fsfw/cfdp/CfdpDistributor.cpp index 14e0180c..0b522d2d 100644 --- a/src/fsfw/cfdp/CfdpDistributor.cpp +++ b/src/fsfw/cfdp/CfdpDistributor.cpp @@ -2,7 +2,8 @@ #include "fsfw/tcdistribution/definitions.h" -CfdpDistributor::CfdpDistributor(CfdpRouterCfg cfg) : TcDistributorBase(cfg.objectId), cfg(cfg) {} +CfdpDistributor::CfdpDistributor(CfdpRouterCfg cfg) + : TcDistributorBase(cfg.objectId, cfg.tcQueue), cfg(cfg) {} ReturnValue_t CfdpDistributor::registerTcDestination(const cfdp::EntityId& address, AcceptsTelecommandsIF& tcDest) { diff --git a/src/fsfw/cfdp/CfdpDistributor.h b/src/fsfw/cfdp/CfdpDistributor.h index cfb31f2b..bf66df5e 100644 --- a/src/fsfw/cfdp/CfdpDistributor.h +++ b/src/fsfw/cfdp/CfdpDistributor.h @@ -13,14 +13,12 @@ #include "fsfw/tmtcservices/VerificationReporter.h" struct CfdpRouterCfg { - CfdpRouterCfg(object_id_t objectId, MessageQueueIF& tmQueue, StorageManagerIF& tcStore, - StorageManagerIF& tmStore) - : objectId(objectId), tmQueue(tmQueue), tcStore(tcStore), tmStore(tmStore) {} + CfdpRouterCfg(object_id_t objectId, StorageManagerIF& tcStore, MessageQueueIF* tcQueue) + : objectId(objectId), tcStore(tcStore), tcQueue(tcQueue) {} object_id_t objectId; - MessageQueueIF& tmQueue; StorageManagerIF& tcStore; - StorageManagerIF& tmStore; + MessageQueueIF* tcQueue; }; /** diff --git a/src/fsfw/tcdistribution/CcsdsDistributor.cpp b/src/fsfw/tcdistribution/CcsdsDistributor.cpp index 6932d2d3..a2080ea8 100644 --- a/src/fsfw/tcdistribution/CcsdsDistributor.cpp +++ b/src/fsfw/tcdistribution/CcsdsDistributor.cpp @@ -98,7 +98,7 @@ void CcsdsDistributor::handlePacketCheckFailure(ReturnValue_t result) { const char* reason = "Unknown reason"; if (result == tmtcdistrib::INVALID_CCSDS_VERSION) { reason = "Invalid CCSDS version"; - } else if (result == tcdistrib::INCOMPLETE_PACKET) { + } else if (result == tmtcdistrib::INCOMPLETE_PACKET) { reason = "Size missmatch between CCSDS data length and packet length"; } else if (result == tmtcdistrib::INVALID_APID) { reason = "No valid handler APID found"; diff --git a/src/fsfw/tcdistribution/PusDistributor.cpp b/src/fsfw/tcdistribution/PusDistributor.cpp index f719b50f..5384b34c 100644 --- a/src/fsfw/tcdistribution/PusDistributor.cpp +++ b/src/fsfw/tcdistribution/PusDistributor.cpp @@ -145,7 +145,7 @@ ReturnValue_t PusDistributor::initialize() { void PusDistributor::checkerFailurePrinter() const { #if FSFW_VERBOSE_LEVEL >= 1 const char* reason = "Unknown reason"; - if (tcStatus == tcdistrib::INCORRECT_CHECKSUM) { + if (tcStatus == tmtcdistrib::INCORRECT_CHECKSUM) { reason = "Checksum Error"; } else if (tcStatus == tmtcdistrib::INCORRECT_PRIMARY_HEADER) { reason = "Incorrect Primary Header";