CFDP source handler #776

Merged
muellerr merged 96 commits from cfdp-source-handler into main 2023-10-19 11:11:31 +02:00
3 changed files with 20 additions and 12 deletions
Showing only changes of commit ede0805ee8 - Show all commits

View File

@ -9,17 +9,17 @@
using namespace returnvalue; using namespace returnvalue;
using namespace cfdp; using namespace cfdp;
CfdpHandler::CfdpHandler(const FsfwHandlerParams& fsfwParams, const CfdpHandlerCfg& cfdpCfg) CfdpHandler::CfdpHandler(const FsfwHandlerParams& fsfwHandlerParams, const CfdpHandlerCfg& cfdpCfg)
: SystemObject(fsfwParams.objectId), : SystemObject(fsfwHandlerParams.objectId),
msgQueue(fsfwParams.msgQueue), msgQueue(fsfwHandlerParams.msgQueue),
destHandler( localCfg(cfdpCfg.id, cfdpCfg.indicCfg, cfdpCfg.faultHandler),
DestHandlerParams(LocalEntityCfg(cfdpCfg.id, cfdpCfg.indicCfg, cfdpCfg.faultHandler), fsfwParams(fsfwHandlerParams.packetDest, &fsfwHandlerParams.msgQueue, this,
cfdpCfg.userHandler, cfdpCfg.remoteCfgProvider, cfdpCfg.packetInfoList, fsfwHandlerParams.tcStore, fsfwHandlerParams.tmStore),
cfdpCfg.lostSegmentsList), destHandler(DestHandlerParams(localCfg, cfdpCfg.userHandler, cfdpCfg.remoteCfgProvider,
FsfwParams(fsfwParams.packetDest, nullptr, this, fsfwParams.tcStore, cfdpCfg.packetInfoList, cfdpCfg.lostSegmentsList),
fsfwParams.tmStore)) { this->fsfwParams),
destHandler.setMsgQueue(msgQueue); srcHandler(SourceHandlerParams(localCfg, cfdpCfg.userHandler, seqCntProvider),
} this->fsfwParams) {}
[[nodiscard]] const char* CfdpHandler::getName() const { return "CFDP Handler"; } [[nodiscard]] const char* CfdpHandler::getName() const { return "CFDP Handler"; }

View File

@ -1,6 +1,8 @@
#ifndef FSFW_EXAMPLE_HOSTED_CFDPHANDLER_H #ifndef FSFW_EXAMPLE_HOSTED_CFDPHANDLER_H
#define FSFW_EXAMPLE_HOSTED_CFDPHANDLER_H #define FSFW_EXAMPLE_HOSTED_CFDPHANDLER_H
#include <fsfw/cfdp/handler/SourceHandler.h>
#include <utility> #include <utility>
#include "fsfw/cfdp/handler/DestHandler.h" #include "fsfw/cfdp/handler/DestHandler.h"
@ -8,6 +10,7 @@
#include "fsfw/tasks/ExecutableObjectIF.h" #include "fsfw/tasks/ExecutableObjectIF.h"
#include "fsfw/tmtcservices/AcceptsTelecommandsIF.h" #include "fsfw/tmtcservices/AcceptsTelecommandsIF.h"
#include "fsfw/tmtcservices/TmTcMessage.h" #include "fsfw/tmtcservices/TmTcMessage.h"
#include "fsfw/util/SeqCountProvider.h"
struct FsfwHandlerParams { struct FsfwHandlerParams {
FsfwHandlerParams(object_id_t objectId, HasFileSystemIF& vfs, AcceptsTelemetryIF& packetDest, FsfwHandlerParams(object_id_t objectId, HasFileSystemIF& vfs, AcceptsTelemetryIF& packetDest,
@ -61,7 +64,12 @@ class CfdpHandler : public SystemObject, public ExecutableObjectIF, public Accep
private: private:
MessageQueueIF& msgQueue; MessageQueueIF& msgQueue;
cfdp::LocalEntityCfg localCfg;
cfdp::FsfwParams fsfwParams;
SeqCountProviderU16 seqCntProvider;
cfdp::DestHandler destHandler; cfdp::DestHandler destHandler;
cfdp::SourceHandler srcHandler;
StorageManagerIF* tcStore = nullptr; StorageManagerIF* tcStore = nullptr;
StorageManagerIF* tmStore = nullptr; StorageManagerIF* tmStore = nullptr;

2
tmtc

@ -1 +1 @@
Subproject commit 4b054b7628e43975e2401c7db10c358824f7a2d3 Subproject commit fd3a799019f6910cbbb4447cc9605340d66c2703