each store has own tc queue now
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
|
||||
#include <fsfw/objectmanager/SystemObject.h>
|
||||
#include <fsfw/timemanager/CdsShortTimeStamper.h>
|
||||
#include <fsfw/tmstorage/TmStoreFrontendIF.h>
|
||||
#include <fsfw/tmstorage/TmStoreFrontendSimpleIF.h>
|
||||
#include <fsfw/tmtcpacket/pus/tm/PusTmReader.h>
|
||||
#include <fsfw/tmtcservices/AcceptsTelemetryIF.h>
|
||||
#include <mission/memory/SdCardMountedIF.h>
|
||||
@ -21,7 +21,7 @@ struct PacketFilter {
|
||||
|
||||
enum class RolloverInterval { MINUTELY, HOURLY, DAILY };
|
||||
|
||||
class TmStore : public SystemObject {
|
||||
class TmStore : public TmStoreFrontendSimpleIF, public SystemObject {
|
||||
public:
|
||||
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PERSISTENT_TM_STORE;
|
||||
|
||||
@ -34,6 +34,8 @@ class TmStore : public SystemObject {
|
||||
RolloverInterval intervalUnit, uint32_t intervalCount, timeval& currentTv,
|
||||
StorageManagerIF& tmStore, SdCardMountedIF& sdcMan);
|
||||
|
||||
ReturnValue_t handleCommandQueue(StorageManagerIF& ipcStore, TmFunnelBase& tmFunnel);
|
||||
|
||||
void addApid(uint16_t apid);
|
||||
void addService(uint8_t service);
|
||||
void addServiceSubservice(uint8_t service, uint8_t subservice);
|
||||
@ -48,11 +50,7 @@ class TmStore : public SystemObject {
|
||||
private:
|
||||
static constexpr size_t MAX_FILESIZE = 8192;
|
||||
|
||||
/**
|
||||
* To get the queue where commands shall be sent.
|
||||
* @return Id of command queue.
|
||||
*/
|
||||
MessageQueueId_t getCommandQueue();
|
||||
MessageQueueIF* tcQueue;
|
||||
PacketFilter filter;
|
||||
CdsShortTimeStamper timeReader;
|
||||
bool baseDirUninitialized = true;
|
||||
@ -67,9 +65,15 @@ class TmStore : public SystemObject {
|
||||
SdCardMountedIF& sdcMan;
|
||||
StorageManagerIF& tmStore;
|
||||
|
||||
/**
|
||||
* To get the queue where commands shall be sent.
|
||||
* @return Id of command queue.
|
||||
*/
|
||||
[[nodiscard]] MessageQueueId_t getCommandQueue() const override;
|
||||
|
||||
void calcDiffSeconds(RolloverInterval intervalUnit, uint32_t intervalCount);
|
||||
void assignAndOrCreateMostRecentFile();
|
||||
void pathToTod(const std::filesystem::path& path, Clock::TimeOfDay_t& tod);
|
||||
static void pathToTod(const std::filesystem::path& path, Clock::TimeOfDay_t& tod);
|
||||
void fileToPackets(const std::filesystem::path& path, uint32_t unixStamp, TmFunnelBase& funnel);
|
||||
ReturnValue_t storePacket(PusTmReader& reader);
|
||||
};
|
||||
|
Reference in New Issue
Block a user