proxy request should now arrive at the handler
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
This commit is contained in:
parent
f62a4ee2b4
commit
8186a3ef4f
@ -1,5 +1,6 @@
|
|||||||
#include "CfdpHandler.h"
|
#include "CfdpHandler.h"
|
||||||
|
|
||||||
|
#include <fsfw/cfdp/CfdpMessage.h>
|
||||||
#include <fsfw/ipc/CommandMessage.h>
|
#include <fsfw/ipc/CommandMessage.h>
|
||||||
|
|
||||||
#include "fsfw/cfdp/pdu/AckPduReader.h"
|
#include "fsfw/cfdp/pdu/AckPduReader.h"
|
||||||
@ -22,7 +23,8 @@ CfdpHandler::CfdpHandler(const FsfwHandlerParams& fsfwHandlerParams, const CfdpH
|
|||||||
cfdpCfg.packetInfoList, cfdpCfg.lostSegmentsList),
|
cfdpCfg.packetInfoList, cfdpCfg.lostSegmentsList),
|
||||||
this->fsfwParams),
|
this->fsfwParams),
|
||||||
srcHandler(SourceHandlerParams(localCfg, cfdpCfg.userHandler, seqCntProvider),
|
srcHandler(SourceHandlerParams(localCfg, cfdpCfg.userHandler, seqCntProvider),
|
||||||
this->fsfwParams) {}
|
this->fsfwParams),
|
||||||
|
ipcStore(fsfwHandlerParams.ipcStore) {}
|
||||||
|
|
||||||
[[nodiscard]] const char* CfdpHandler::getName() const { return "CFDP Handler"; }
|
[[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,
|
// 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
|
// 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.
|
// 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;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,13 +15,15 @@
|
|||||||
|
|
||||||
struct FsfwHandlerParams {
|
struct FsfwHandlerParams {
|
||||||
FsfwHandlerParams(object_id_t objectId, HasFileSystemIF& vfs, AcceptsTelemetryIF& packetDest,
|
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)
|
MessageQueueIF& cfdpQueue)
|
||||||
: objectId(objectId),
|
: objectId(objectId),
|
||||||
vfs(vfs),
|
vfs(vfs),
|
||||||
packetDest(packetDest),
|
packetDest(packetDest),
|
||||||
tcStore(tcStore),
|
tcStore(tcStore),
|
||||||
tmStore(tmStore),
|
tmStore(tmStore),
|
||||||
|
ipcStore(ipcStore),
|
||||||
tmtcQueue(tmtcQueue),
|
tmtcQueue(tmtcQueue),
|
||||||
cfdpQueue(cfdpQueue) {}
|
cfdpQueue(cfdpQueue) {}
|
||||||
object_id_t objectId{};
|
object_id_t objectId{};
|
||||||
@ -29,6 +31,7 @@ struct FsfwHandlerParams {
|
|||||||
AcceptsTelemetryIF& packetDest;
|
AcceptsTelemetryIF& packetDest;
|
||||||
StorageManagerIF& tcStore;
|
StorageManagerIF& tcStore;
|
||||||
StorageManagerIF& tmStore;
|
StorageManagerIF& tmStore;
|
||||||
|
StorageManagerIF& ipcStore;
|
||||||
MessageQueueIF& tmtcQueue;
|
MessageQueueIF& tmtcQueue;
|
||||||
MessageQueueIF& cfdpQueue;
|
MessageQueueIF& cfdpQueue;
|
||||||
};
|
};
|
||||||
@ -75,6 +78,7 @@ class CfdpHandler : public SystemObject, public ExecutableObjectIF, public Accep
|
|||||||
cfdp::DestHandler destHandler;
|
cfdp::DestHandler destHandler;
|
||||||
cfdp::SourceHandler srcHandler;
|
cfdp::SourceHandler srcHandler;
|
||||||
|
|
||||||
|
StorageManagerIF& ipcStore;
|
||||||
StorageManagerIF* tcStore = nullptr;
|
StorageManagerIF* tcStore = nullptr;
|
||||||
StorageManagerIF* tmStore = nullptr;
|
StorageManagerIF* tmStore = nullptr;
|
||||||
|
|
||||||
|
@ -279,7 +279,7 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun
|
|||||||
auto* cfdpQueue = QueueFactory::instance()->createMessageQueue(16);
|
auto* cfdpQueue = QueueFactory::instance()->createMessageQueue(16);
|
||||||
auto eiveUserHandler = new cfdp::EiveUserHandler(HOST_FS, **ipcStore, cfdpQueue->getId());
|
auto eiveUserHandler = new cfdp::EiveUserHandler(HOST_FS, **ipcStore, cfdpQueue->getId());
|
||||||
FsfwHandlerParams params(objects::CFDP_HANDLER, HOST_FS, **cfdpFunnel, *tcStore, **tmStore,
|
FsfwHandlerParams params(objects::CFDP_HANDLER, HOST_FS, **cfdpFunnel, *tcStore, **tmStore,
|
||||||
*tmtcQueue, *cfdpQueue);
|
**ipcStore, *tmtcQueue, *cfdpQueue);
|
||||||
cfdp::IndicationCfg indicationCfg;
|
cfdp::IndicationCfg indicationCfg;
|
||||||
UnsignedByteField<uint16_t> apid(config::EIVE_LOCAL_CFDP_ENTITY_ID);
|
UnsignedByteField<uint16_t> apid(config::EIVE_LOCAL_CFDP_ENTITY_ID);
|
||||||
cfdp::EntityId localId(apid);
|
cfdp::EntityId localId(apid);
|
||||||
|
Loading…
Reference in New Issue
Block a user