some more documentation
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
This commit is contained in:
parent
1f6c986a0c
commit
0bba9b53ba
@ -80,8 +80,8 @@ void TmStoreTaskBase::cancelDump(DumpContext& ctx, PersistentTmStore& store, boo
|
|||||||
ReturnValue_t TmStoreTaskBase::handleOneDump(PersistentTmStoreWithTmQueue& store,
|
ReturnValue_t TmStoreTaskBase::handleOneDump(PersistentTmStoreWithTmQueue& store,
|
||||||
DumpContext& dumpContext, bool& dumpPerformed) {
|
DumpContext& dumpContext, bool& dumpPerformed) {
|
||||||
ReturnValue_t result = returnvalue::OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
// The PTME might have been reset an transmitter state change, so there is
|
// The PTME might have been reset an transmitter state change, so there is no point in continuing
|
||||||
// not point in continuing the dump.
|
// the dump.
|
||||||
if (not channel.isTxOn()) {
|
if (not channel.isTxOn()) {
|
||||||
cancelDump(dumpContext, store, false);
|
cancelDump(dumpContext, store, false);
|
||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
|
@ -5,6 +5,10 @@
|
|||||||
#include <mission/tmtc/PersistentTmStoreWithTmQueue.h>
|
#include <mission/tmtc/PersistentTmStoreWithTmQueue.h>
|
||||||
#include <mission/tmtc/VirtualChannel.h>
|
#include <mission/tmtc/VirtualChannel.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generic class which composes a Virtual Channel and a persistent TM stores. This allows dumping
|
||||||
|
* the TM store into the virtual channel directly.
|
||||||
|
*/
|
||||||
class TmStoreTaskBase : public SystemObject {
|
class TmStoreTaskBase : public SystemObject {
|
||||||
public:
|
public:
|
||||||
struct DumpContext {
|
struct DumpContext {
|
||||||
@ -30,7 +34,21 @@ class TmStoreTaskBase : public SystemObject {
|
|||||||
SdCardMountedIF& sdcMan);
|
SdCardMountedIF& sdcMan);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
StorageManagerIF& ipcStore;
|
||||||
|
Countdown sdCardCheckCd = Countdown(800);
|
||||||
|
// 20 minutes are allowed as maximum dump time.
|
||||||
|
Countdown cancelDumpCd = Countdown(60 * 20 * 1000);
|
||||||
|
// If the TM sink is busy for 1 minute for whatever reason, cancel the dump.
|
||||||
|
// TODO: Reset this to default value.
|
||||||
|
Countdown tmSinkBusyCd = Countdown(60 * 20 * 1000); // Countdown(60 * 1000 );
|
||||||
|
VirtualChannel& channel;
|
||||||
|
bool storesInitialized = false;
|
||||||
|
bool fileHasSwapped = false;
|
||||||
|
SdCardMountedIF& sdcMan;
|
||||||
|
|
||||||
|
void cancelDump(DumpContext& ctx, PersistentTmStore& store, bool isTxOn);
|
||||||
/**
|
/**
|
||||||
|
*
|
||||||
* Handling for one store. Returns if anything was done.
|
* Handling for one store. Returns if anything was done.
|
||||||
* @param store
|
* @param store
|
||||||
* @return
|
* @return
|
||||||
@ -48,18 +66,6 @@ class TmStoreTaskBase : public SystemObject {
|
|||||||
|
|
||||||
virtual bool initStoresIfPossible() = 0;
|
virtual bool initStoresIfPossible() = 0;
|
||||||
|
|
||||||
StorageManagerIF& ipcStore;
|
|
||||||
Countdown sdCardCheckCd = Countdown(800);
|
|
||||||
// 20 minutes are allowed as maximum dump time.
|
|
||||||
Countdown cancelDumpCd = Countdown(60 * 20 * 1000);
|
|
||||||
// If the TM sink is busy for 1 minute for whatever reason, cancel the dump.
|
|
||||||
Countdown tmSinkBusyCd = Countdown(60 * 20 * 1000); // Countdown(60 * 1000 );
|
|
||||||
VirtualChannel& channel;
|
|
||||||
bool storesInitialized = false;
|
|
||||||
bool fileHasSwapped = false;
|
|
||||||
SdCardMountedIF& sdcMan;
|
|
||||||
|
|
||||||
void cancelDump(DumpContext& ctx, PersistentTmStore& store, bool isTxOn);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* MISSION_TMTC_TMSTORETASKBASE_H_ */
|
#endif /* MISSION_TMTC_TMSTORETASKBASE_H_ */
|
||||||
|
Loading…
Reference in New Issue
Block a user