proxy request should now arrive at the handler
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good

This commit is contained in:
Robin Müller 2023-08-16 13:22:05 +02:00
parent f62a4ee2b4
commit 8186a3ef4f
Signed by: muellerr
GPG Key ID: FCE0B2BD2195142F
3 changed files with 12 additions and 3 deletions

View File

@ -1,5 +1,6 @@
#include "CfdpHandler.h"
#include <fsfw/cfdp/CfdpMessage.h>
#include <fsfw/ipc/CommandMessage.h>
#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;
}

View File

@ -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;

View File

@ -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<uint16_t> apid(config::EIVE_LOCAL_CFDP_ENTITY_ID);
cfdp::EntityId localId(apid);