eive-obsw/mission/tmtc/PersistentSingleTmStoreTask.cpp

24 lines
929 B
C++
Raw Normal View History

2023-03-09 17:44:05 +01:00
#include <fsfw/tasks/TaskFactory.h>
#include <mission/tmtc/PersistentSingleTmStoreTask.h>
PersistentSingleTmStoreTask::PersistentSingleTmStoreTask(object_id_t objectId,
StorageManagerIF& ipcStore,
PersistentTmStoreWithTmQueue& tmStore,
VirtualChannel& channel,
SdCardMountedIF& sdcMan)
: TmStoreTaskBase(objectId, ipcStore, channel, sdcMan), storeWithQueue(tmStore) {}
2023-03-09 17:44:05 +01:00
ReturnValue_t PersistentSingleTmStoreTask::performOperation(uint8_t opCode) {
while (true) {
if (not cyclicStoreCheck()) {
continue;
}
2023-03-09 19:42:20 +01:00
bool busy = handleOneStore(storeWithQueue);
if (not busy) {
TaskFactory::delayTask(10);
2023-03-09 17:44:05 +01:00
}
}
}
void PersistentSingleTmStoreTask::initStoresIfPossible() {}