tweaks for CFDP distributor

This commit is contained in:
Robin Müller 2022-08-08 12:31:19 +02:00
parent 269a3052ca
commit fdb0cc0e44
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
4 changed files with 7 additions and 8 deletions

View File

@ -2,7 +2,8 @@
#include "fsfw/tcdistribution/definitions.h" #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, ReturnValue_t CfdpDistributor::registerTcDestination(const cfdp::EntityId& address,
AcceptsTelecommandsIF& tcDest) { AcceptsTelecommandsIF& tcDest) {

View File

@ -13,14 +13,12 @@
#include "fsfw/tmtcservices/VerificationReporter.h" #include "fsfw/tmtcservices/VerificationReporter.h"
struct CfdpRouterCfg { struct CfdpRouterCfg {
CfdpRouterCfg(object_id_t objectId, MessageQueueIF& tmQueue, StorageManagerIF& tcStore, CfdpRouterCfg(object_id_t objectId, StorageManagerIF& tcStore, MessageQueueIF* tcQueue)
StorageManagerIF& tmStore) : objectId(objectId), tcStore(tcStore), tcQueue(tcQueue) {}
: objectId(objectId), tmQueue(tmQueue), tcStore(tcStore), tmStore(tmStore) {}
object_id_t objectId; object_id_t objectId;
MessageQueueIF& tmQueue;
StorageManagerIF& tcStore; StorageManagerIF& tcStore;
StorageManagerIF& tmStore; MessageQueueIF* tcQueue;
}; };
/** /**

View File

@ -98,7 +98,7 @@ void CcsdsDistributor::handlePacketCheckFailure(ReturnValue_t result) {
const char* reason = "Unknown reason"; const char* reason = "Unknown reason";
if (result == tmtcdistrib::INVALID_CCSDS_VERSION) { if (result == tmtcdistrib::INVALID_CCSDS_VERSION) {
reason = "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"; reason = "Size missmatch between CCSDS data length and packet length";
} else if (result == tmtcdistrib::INVALID_APID) { } else if (result == tmtcdistrib::INVALID_APID) {
reason = "No valid handler APID found"; reason = "No valid handler APID found";

View File

@ -145,7 +145,7 @@ ReturnValue_t PusDistributor::initialize() {
void PusDistributor::checkerFailurePrinter() const { void PusDistributor::checkerFailurePrinter() const {
#if FSFW_VERBOSE_LEVEL >= 1 #if FSFW_VERBOSE_LEVEL >= 1
const char* reason = "Unknown reason"; const char* reason = "Unknown reason";
if (tcStatus == tcdistrib::INCORRECT_CHECKSUM) { if (tcStatus == tmtcdistrib::INCORRECT_CHECKSUM) {
reason = "Checksum Error"; reason = "Checksum Error";
} else if (tcStatus == tmtcdistrib::INCORRECT_PRIMARY_HEADER) { } else if (tcStatus == tmtcdistrib::INCORRECT_PRIMARY_HEADER) {
reason = "Incorrect Primary Header"; reason = "Incorrect Primary Header";