Robin Mueller
00e04e8b77
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
20 lines
590 B
C++
20 lines
590 B
C++
#include "PusTmRouteByFilterHelper.h"
|
|
|
|
#include <fsfw/ipc/MessageQueueIF.h>
|
|
|
|
PusTmRouteByFilterHelper::PusTmRouteByFilterHelper() = default;
|
|
|
|
bool PusTmRouteByFilterHelper::packetMatches(PusTmReader& reader, MessageQueueId_t& destination) {
|
|
for (const auto& filterAndDest : routerMap) {
|
|
if (filterAndDest.first.packetMatches(reader)) {
|
|
destination = filterAndDest.second;
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
void PusTmRouteByFilterHelper::addRouting(PusPacketFilter filter, MessageQueueId_t destination) {
|
|
routerMap.emplace_back(std::move(filter), destination);
|
|
}
|