#ifndef MISSION_TMTC_PERSISTENTLOGTMSTORETASK_H_ #define MISSION_TMTC_PERSISTENTLOGTMSTORETASK_H_ #include #include #include #include #include #include #include #include #include struct LogStores { LogStores(PersistentTmStores& stores) : okStore(*stores.okStore), notOkStore(*stores.notOkStore), miscStore(*stores.miscStore) {} PersistentTmStoreWithTmQueue& okStore; PersistentTmStoreWithTmQueue& notOkStore; PersistentTmStoreWithTmQueue& miscStore; }; class PersistentLogTmStoreTask : public TmStoreTaskBase, public ExecutableObjectIF { public: PersistentLogTmStoreTask(object_id_t objectId, StorageManagerIF& ipcStore, LogStores tmStore, VirtualChannel& channel, SdCardMountedIF& sdcMan); ReturnValue_t performOperation(uint8_t opCode) override; private: LogStores stores; DumpContext okStoreContext; DumpContext notOkStoreContext; DumpContext miscStoreContext; Countdown tcHandlingCd = Countdown(400); Countdown graceDelayDuringDumping = Countdown(200); bool someFileWasSwapped = false; bool initStoresIfPossible() override; void startTransition(Mode_t mode, Submode_t submode) override; }; #endif /* MISSION_TMTC_PERSISTENTLOGTMSTORETASK_H_ */