2023-03-09 17:44:05 +01:00
|
|
|
#ifndef MISSION_TMTC_PERSISTENTSINGLETMSTORETASK_H_
|
|
|
|
#define MISSION_TMTC_PERSISTENTSINGLETMSTORETASK_H_
|
|
|
|
|
|
|
|
#include <fsfw/objectmanager/SystemObject.h>
|
|
|
|
#include <fsfw/tasks/ExecutableObjectIF.h>
|
|
|
|
#include <mission/tmtc/PersistentTmStoreWithTmQueue.h>
|
2023-03-09 19:42:20 +01:00
|
|
|
#include <mission/tmtc/TmStoreTaskBase.h>
|
2023-03-09 17:44:05 +01:00
|
|
|
#include <mission/tmtc/VirtualChannel.h>
|
|
|
|
|
2023-03-09 19:42:20 +01:00
|
|
|
class PersistentSingleTmStoreTask : public TmStoreTaskBase, public ExecutableObjectIF {
|
2023-03-09 17:44:05 +01:00
|
|
|
public:
|
|
|
|
PersistentSingleTmStoreTask(object_id_t objectId, StorageManagerIF& ipcStore,
|
2023-03-09 20:16:00 +01:00
|
|
|
PersistentTmStoreWithTmQueue& storeWithQueue, VirtualChannel& channel,
|
2023-03-10 19:01:31 +01:00
|
|
|
Event eventIfDumpDone, SdCardMountedIF& sdcMan);
|
2023-03-09 17:44:05 +01:00
|
|
|
|
|
|
|
ReturnValue_t performOperation(uint8_t opCode) override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
PersistentTmStoreWithTmQueue& storeWithQueue;
|
2023-03-11 14:59:55 +01:00
|
|
|
DumpContext dumpContext;
|
2023-03-10 02:05:51 +01:00
|
|
|
Countdown tcHandlingCd = Countdown(400);
|
2023-03-21 14:09:59 +01:00
|
|
|
Countdown graceDelayDuringDumping = Countdown(100);
|
2023-03-09 20:16:00 +01:00
|
|
|
|
2023-03-10 02:05:51 +01:00
|
|
|
bool initStoresIfPossible();
|
2023-03-09 17:44:05 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* MISSION_TMTC_PERSISTENTSINGLETMSTORETASK_H_ */
|