dedicated store for RAM to FileStore IPC
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
This commit is contained in:
@ -4,8 +4,12 @@
|
||||
#include "fsfw/tmtcpacket/ccsds/SpacePacketCreator.h"
|
||||
#include "fsfw/tmtcservices/TmTcMessage.h"
|
||||
|
||||
CfdpTmFunnel::CfdpTmFunnel(TmFunnelBase::FunnelCfg cfg, uint16_t cfdpInCcsdsApid)
|
||||
: TmFunnelBase(cfg), cfdpInCcsdsApid(cfdpInCcsdsApid) {}
|
||||
CfdpTmFunnel::CfdpTmFunnel(TmFunnelBase::FunnelCfg cfg, MessageQueueId_t fileStoreDest,
|
||||
StorageManagerIF& ramToFileStore, uint16_t cfdpInCcsdsApid)
|
||||
: TmFunnelBase(cfg),
|
||||
fileStoreDest(fileStoreDest),
|
||||
ramToFileStore(ramToFileStore),
|
||||
cfdpInCcsdsApid(cfdpInCcsdsApid) {}
|
||||
|
||||
const char* CfdpTmFunnel::getName() const { return "CFDP TM Funnel"; }
|
||||
|
||||
@ -76,5 +80,15 @@ ReturnValue_t CfdpTmFunnel::handlePacket(TmTcMessage& msg) {
|
||||
msg.setStorageId(newStoreId);
|
||||
store_address_t origStoreId = newStoreId;
|
||||
// TODO: Also route to persistent TM store
|
||||
|
||||
store_address_t storageId;
|
||||
result = ramToFileStore.addData(&storageId, newPacketData, packetLen);
|
||||
TmTcMessage fileMsg(storageId);
|
||||
if (result != returnvalue::OK) {
|
||||
sif::error << "PusLiveDemux::handlePacket: Store too full to create data copy" << std::endl;
|
||||
} else {
|
||||
tmQueue->sendMessage(fileStoreDest, &fileMsg);
|
||||
}
|
||||
|
||||
return demultiplexLivePackets(origStoreId, newPacketData, packetLen);
|
||||
}
|
||||
|
Reference in New Issue
Block a user