allow passsing TM dest names
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
2023-02-07 17:18:13 +01:00
parent bc6cecc14a
commit e8120fcdef
7 changed files with 31 additions and 17 deletions

View File

@ -49,7 +49,7 @@ ReturnValue_t PusTmFunnel::handlePacket(TmTcMessage &message) {
packet.updateErrorControl();
for (unsigned int idx = 0; idx < destinations.size(); idx++) {
const auto &destVcidPair = destinations[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
@ -68,10 +68,11 @@ ReturnValue_t PusTmFunnel::handlePacket(TmTcMessage &message) {
message.setStorageId(origStoreId);
}
}
result = tmQueue->sendMessage(destVcidPair.first, &message);
result = tmQueue->sendMessage(dest.queueId, &message);
if (result != returnvalue::OK) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PusTmFunnel::handlePacket: Error sending TM to downlink handler" << std::endl;
sif::error << "PusTmFunnel::handlePacket: Error sending TM to downlink handler " << dest.name
<< " failed" << std::endl;
#endif
tmStore.deleteData(message.getStorageId());
}