continue rework
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
This commit is contained in:
@ -75,36 +75,6 @@ ReturnValue_t CfdpTmFunnel::handlePacket(TmTcMessage& msg) {
|
||||
tmStore.deleteData(msg.getStorageId());
|
||||
msg.setStorageId(newStoreId);
|
||||
store_address_t origStoreId = newStoreId;
|
||||
for (unsigned int idx = 0; idx < destinations.size(); idx++) {
|
||||
const auto& dest = destinations[idx];
|
||||
if (destinations.size() > 1) {
|
||||
if (idx < destinations.size() - 1) {
|
||||
// Create copy of data to ensure each TM recipient has its own copy. That way, we don't need
|
||||
// to bother with send order and where the data is deleted.
|
||||
store_address_t storeId;
|
||||
result = tmStore.addData(&storeId, newPacketData, packetLen);
|
||||
if (result == returnvalue::OK) {
|
||||
msg.setStorageId(storeId);
|
||||
} else {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "PusTmFunnel::handlePacket: Store too full to create data copy or store "
|
||||
"error"
|
||||
<< std::endl;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
msg.setStorageId(origStoreId);
|
||||
}
|
||||
}
|
||||
result = tmQueue->sendMessage(dest.queueId, &msg);
|
||||
if (result != returnvalue::OK) {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "PusTmFunnel::handlePacket: Error sending TM to downlink handler " << dest.name
|
||||
<< " failed" << std::endl;
|
||||
#endif
|
||||
tmStore.deleteData(msg.getStorageId());
|
||||
}
|
||||
}
|
||||
return result;
|
||||
// TODO: Also route to persistent TM store
|
||||
return demultiplexLivePackets(origStoreId, newPacketData, packetLen);
|
||||
}
|
||||
|
Reference in New Issue
Block a user