eive-obsw/mission/tmtc/TmStore.h

39 lines
1008 B
C
Raw Normal View History

2022-10-24 10:57:30 +02:00
#ifndef MISSION_TMTC_TMSTOREBACKEND_H_
#define MISSION_TMTC_TMSTOREBACKEND_H_
2022-10-25 18:20:21 +02:00
#include <mission/memory/SdCardMountedIF.h>
#include <fsfw/objectmanager/SystemObject.h>
2022-10-24 10:57:30 +02:00
#include <fsfw/tmstorage/TmStoreFrontendIF.h>
2022-10-25 18:20:21 +02:00
#include <fsfw/tmtcpacket/pus/tm/PusTmReader.h>
2022-10-24 10:57:30 +02:00
#include <fsfw/tmtcservices/AcceptsTelemetryIF.h>
2022-10-25 18:20:21 +02:00
struct PacketFilter {
std::optional<uint16_t> apid;
std::optional<uint8_t> service;
std::optional<std::pair<uint8_t, uint8_t>> serviceSubservice;
};
class TmStore : public SystemObject {
2022-10-24 10:57:30 +02:00
public:
2022-10-25 18:20:21 +02:00
TmStore(object_id_t objectId, SdCardMountedIF& sdcMan);
ReturnValue_t passPacket(PusTmReader& reader);
2022-10-24 10:57:30 +02:00
private:
/**
* To get the queue where commands shall be sent.
* @return Id of command queue.
*/
2022-10-25 18:20:21 +02:00
MessageQueueId_t getCommandQueue();
2022-10-24 10:57:30 +02:00
2022-10-25 18:20:21 +02:00
SdCardMountedIF& sdcMan;
2022-10-24 10:57:30 +02:00
2022-10-25 18:20:21 +02:00
std::vector<uint16_t> apidToStore;
std::vector<uint8_t> servicesToStore;
std::vector<std::pair<uint8_t, uint8_t>> serviceSubserviceCombinationToStore;
2022-10-24 10:57:30 +02:00
};
#endif /* MISSION_TMTC_TMSTOREBACKEND_H_ */