#ifndef MISSION_TMTC_TMSTORETASKBASE_H_ #define MISSION_TMTC_TMSTORETASKBASE_H_ #include #include #include class TmStoreTaskBase : public SystemObject { public: TmStoreTaskBase(object_id_t objectId, StorageManagerIF& ipcStore, VirtualChannel& channel, SdCardMountedIF& sdcMan); protected: /** * Handling for one store. Returns if anything was done. * @param store * @return */ bool handleOneStore(PersistentTmStoreWithTmQueue& store, Countdown& tcHandlingCd); /** * Occasionally check whether SD card is okay to be used. If not, poll whether it is ready to * be used again and re-initialize stores. Returns whether store is okay to be used. */ bool cyclicStoreCheck(); virtual bool initStoresIfPossible() = 0; StorageManagerIF& ipcStore; Countdown sdCardCheckCd = Countdown(800); VirtualChannel& channel; bool storesInitialized = false; SdCardMountedIF& sdcMan; }; #endif /* MISSION_TMTC_TMSTORETASKBASE_H_ */