Merge remote-tracking branch 'origin/main' into cfdp-source-handler
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
This commit is contained in:
@ -4,7 +4,8 @@
|
||||
#include "fsfw/tmtcpacket/ccsds/SpacePacketCreator.h"
|
||||
#include "fsfw/tmtcservices/TmTcMessage.h"
|
||||
|
||||
CfdpTmFunnel::CfdpTmFunnel(TmFunnelBase::FunnelCfg cfg, std::optional<MessageQueueId_t> fileStoreDest,
|
||||
CfdpTmFunnel::CfdpTmFunnel(TmFunnelBase::FunnelCfg cfg,
|
||||
std::optional<MessageQueueId_t> fileStoreDest,
|
||||
StorageManagerIF& ramToFileStore, uint16_t cfdpInCcsdsApid)
|
||||
: TmFunnelBase(cfg),
|
||||
fileStoreDest(fileStoreDest),
|
||||
@ -42,7 +43,8 @@ ReturnValue_t CfdpTmFunnel::performOperation(uint8_t) {
|
||||
}
|
||||
if (handledPackets > 0) {
|
||||
// Very useful for profiling and debugging
|
||||
//sif::debug << "CfdpFunnel: Handled " << handledPackets << " packets in one cycle" << std::endl;
|
||||
// sif::debug << "CfdpFunnel: Handled " << handledPackets << " packets in one cycle" <<
|
||||
// std::endl;
|
||||
}
|
||||
|
||||
if (status == MessageQueueIF::EMPTY) {
|
||||
@ -94,16 +96,16 @@ ReturnValue_t CfdpTmFunnel::handlePacket(TmTcMessage& msg) {
|
||||
msg.setStorageId(newStoreId);
|
||||
store_address_t origStoreId = newStoreId;
|
||||
|
||||
if(fileStoreDest.has_value()) {
|
||||
if (fileStoreDest.has_value()) {
|
||||
store_address_t storageId;
|
||||
result = ramToFileStore.addData(&storageId, newPacketData, packetLen);
|
||||
TmTcMessage fileMsg(storageId);
|
||||
if (result == returnvalue::OK) {
|
||||
tmQueue->sendMessage(fileStoreDest.value(), &fileMsg);
|
||||
} else if(result == StorageManagerIF::DATA_STORAGE_FULL) {
|
||||
sif::error << "CfdpTmFunnel::handlePacket: RAM to File Store too full to create data copy" << std::endl;
|
||||
} else if (result == StorageManagerIF::DATA_STORAGE_FULL) {
|
||||
sif::error << "CfdpTmFunnel::handlePacket: RAM to File Store too full to create data copy"
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
}
|
||||
return demultiplexLivePackets(origStoreId, newPacketData, packetLen);
|
||||
}
|
||||
|
Reference in New Issue
Block a user