eive-obsw/mission/tmtc/TmStore.h

45 lines
1.7 KiB
C
Raw Normal View History

2022-10-24 10:57:30 +02:00
#ifndef MISSION_TMTC_TMSTOREBACKEND_H_
#define MISSION_TMTC_TMSTOREBACKEND_H_
#include <fsfw/tmstorage/TmStoreFrontendIF.h>
#include <fsfw/tmtcservices/AcceptsTelemetryIF.h>
class TmStore : public TmStoreFrontendIF, public AcceptsTelemetryIF {
public:
[[nodiscard]] const char* getName() const override;
[[nodiscard]] MessageQueueId_t getReportReceptionQueue(uint8_t virtualChannel) const override;
private:
/**
* To get the queue where commands shall be sent.
* @return Id of command queue.
*/
MessageQueueId_t getCommandQueue() const override;
TmStoreBackendIF* getBackend() const override;
/**
* Callback from the back-end to indicate a certain packet was received.
* front-end takes care of discarding/downloading the packet.
* @param packet Pointer to the newly received Space Packet.
* @param address Start address of the packet found
* @param isLastPacket Indicates if no more packets can be fetched.
* @return If more packets shall be fetched, returnvalue::OK must be returned.
* Any other code stops fetching packets.
*/
ReturnValue_t packetRetrieved(PusTmReader* packet, uint32_t address) override;
void noMorePacketsInStore() override;
void handleRetrievalFailed(ReturnValue_t errorCode, uint32_t parameter1 = 0,
uint32_t parameter2 = 0) override;
ReturnValue_t fetchPackets(ApidSsc start, ApidSsc end) override;
ReturnValue_t deletePackets(ApidSsc upTo) override;
ReturnValue_t checkPacket(SpacePacketReader* tmPacket) override;
bool isEnabled() const = 0;
void setEnabled(bool enabled) override;
void resetDownlinkedPacketCount() override;
ReturnValue_t setDumpTarget(object_id_t dumpTarget) override;
};
#endif /* MISSION_TMTC_TMSTOREBACKEND_H_ */