20 lines
574 B
C++
20 lines
574 B
C++
#include "TmStoreRouter.h"
|
|
|
|
#include <fsfw/ipc/MessageQueueIF.h>
|
|
|
|
PersistentTmStoreRouter::PersistentTmStoreRouter() = default;
|
|
|
|
bool PersistentTmStoreRouter::packetMatches(PusTmReader& reader, MessageQueueId_t& destination) {
|
|
for (const auto filterAndDest : routerMap) {
|
|
if (filterAndDest.first.packetMatches(reader)) {
|
|
destination = filterAndDest.second;
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
void PersistentTmStoreRouter::addRouting(PusPacketFilter filter, MessageQueueId_t destination) {
|
|
routerMap.emplace_back(std::move(filter), destination);
|
|
}
|