eive-obsw/mission/tmtc/TmStore.h
Robin Mueller c599714aea
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
some sort of filter handling
2022-11-11 15:39:27 +01:00

34 lines
1004 B
C++

#ifndef MISSION_TMTC_TMSTOREBACKEND_H_
#define MISSION_TMTC_TMSTOREBACKEND_H_
#include <fsfw/objectmanager/SystemObject.h>
#include <fsfw/tmstorage/TmStoreFrontendIF.h>
#include <fsfw/tmtcpacket/pus/tm/PusTmReader.h>
#include <fsfw/tmtcservices/AcceptsTelemetryIF.h>
#include <mission/memory/SdCardMountedIF.h>
struct PacketFilter {
std::optional<std::vector<uint16_t>> apid;
std::optional<std::vector<uint8_t>> services;
std::optional<std::vector<std::pair<uint8_t, uint8_t>>> serviceSubservices;
};
class TmStore : public SystemObject {
public:
TmStore(object_id_t objectId, std::string baseName, PacketFilter filter, SdCardMountedIF& sdcMan);
ReturnValue_t passPacket(PusTmReader& reader);
ReturnValue_t storePacket(PusTmReader& reader);
private:
/**
* To get the queue where commands shall be sent.
* @return Id of command queue.
*/
MessageQueueId_t getCommandQueue();
PacketFilter filter;
SdCardMountedIF& sdcMan;
};
#endif /* MISSION_TMTC_TMSTOREBACKEND_H_ */