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:
29
mission/tmtc/PusTmRouteByFilterHelper.h
Normal file
29
mission/tmtc/PusTmRouteByFilterHelper.h
Normal file
@ -0,0 +1,29 @@
|
||||
#ifndef MISSION_TMTC_PUSTMROUTER_H_
|
||||
#define MISSION_TMTC_PUSTMROUTER_H_
|
||||
|
||||
#include <fsfw/ipc/messageQueueDefinitions.h>
|
||||
#include <mission/tmtc/PusPacketFilter.h>
|
||||
|
||||
/**
|
||||
* Simple composition of concrecte @PusPacketFilters which also maps them to
|
||||
* a destination ID.
|
||||
*/
|
||||
class PusTmRouteByFilterHelper {
|
||||
public:
|
||||
PusTmRouteByFilterHelper();
|
||||
|
||||
/**
|
||||
* Checks whether the packet matches any of the inserted filters and returns
|
||||
* the destination if it does. Currently only supports one destination.
|
||||
* @param reader
|
||||
* @param destination
|
||||
* @return
|
||||
*/
|
||||
bool packetMatches(PusTmReader& reader, MessageQueueId_t& destination);
|
||||
void addRouting(PusPacketFilter filter, MessageQueueId_t destination);
|
||||
|
||||
private:
|
||||
std::vector<std::pair<PusPacketFilter, MessageQueueId_t>> routerMap;
|
||||
};
|
||||
|
||||
#endif /* MISSION_TMTC_PUSTMROUTER_H_ */
|
Reference in New Issue
Block a user