tweak events.. comntinue later
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit Details

This commit is contained in:
Robin Müller 2023-03-10 21:13:11 +01:00
parent b603554a80
commit 97698a08d5
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
4 changed files with 11 additions and 7 deletions

View File

@ -28,15 +28,15 @@ static constexpr Event BUSY_DUMPING_EVENT = event::makeEvent(SUBSYSTEM_ID, 2, se
//! [EXPORT] : [COMMENT] Dump was cancelled. P1: Object ID of store.
static constexpr Event DUMP_WAS_CANCELLED = event::makeEvent(SUBSYSTEM_ID, 3, severity::LOW);
//! [EXPORT] : [COMMENT] P1: Start time as UNIX seconds. P2: End time as UNIX seconds.
//! [EXPORT] : [COMMENT] P1: Number of dumped packets.
static constexpr Event DUMP_OK_STORE_DONE = event::makeEvent(SUBSYSTEM_ID, 5, severity::INFO);
//! [EXPORT] : [COMMENT] P1: Start time as UNIX seconds. P2: End time as UNIX seconds.
//! [EXPORT] : [COMMENT] P1: Number of dumped packets.
static constexpr Event DUMP_NOK_STORE_DONE = event::makeEvent(SUBSYSTEM_ID, 6, severity::INFO);
//! [EXPORT] : [COMMENT] P1: Start time as UNIX seconds. P2: End time as UNIX seconds.
//! [EXPORT] : [COMMENT] P1: Number of dumped packets.
static constexpr Event DUMP_MISC_STORE_DONE = event::makeEvent(SUBSYSTEM_ID, 7, severity::INFO);
//! [EXPORT] : [COMMENT] P1: Start time as UNIX seconds. P2: End time as UNIX seconds.
//! [EXPORT] : [COMMENT] P1: Number of dumped packets.
static constexpr Event DUMP_HK_STORE_DONE = event::makeEvent(SUBSYSTEM_ID, 8, severity::INFO);
//! [EXPORT] : [COMMENT] P1: Start time as UNIX seconds. P2: End time as UNIX seconds.
//! [EXPORT] : [COMMENT] P1: Number of dumped packets.
static constexpr Event DUMP_CFDP_STORE_DONE = event::makeEvent(SUBSYSTEM_ID, 9, severity::INFO);
}; // namespace persTmStore

View File

@ -18,6 +18,7 @@ class PersistentSingleTmStoreTask : public TmStoreTaskBase, public ExecutableObj
private:
PersistentTmStoreWithTmQueue& storeWithQueue;
Event eventIfDumpDone;
uint32_t numberOfDumpedPackets = 0;
Countdown tcHandlingCd = Countdown(400);
bool initStoresIfPossible();

View File

@ -216,6 +216,8 @@ ReturnValue_t PersistentTmStore::loadNextDumpFile() {
sif::error << "PersistentTmStore: Could not retrieve file size: " << e.message() << std::endl;
continue;
}
sif::debug << "Path: " << dumpParams.dirEntry.path() << std::endl;
// Can't even read CCSDS header.
if (dumpParams.fileSize <= 6) {
continue;

View File

@ -11,7 +11,8 @@ TmStoreTaskBase::TmStoreTaskBase(object_id_t objectId, StorageManagerIF& ipcStor
VirtualChannel& channel, SdCardMountedIF& sdcMan)
: SystemObject(objectId), ipcStore(ipcStore), channel(channel), sdcMan(sdcMan) {}
bool TmStoreTaskBase::handleOneStore(PersistentTmStoreWithTmQueue& store, Event eventIfDone) {
bool TmStoreTaskBase::handleOneStore(PersistentTmStoreWithTmQueue& store, Event eventIfDone,
uint32_t& numberOfDumpedPackets) {
ReturnValue_t result;
bool tmToStoreReceived = false;
bool tcRequestReceived = false;
@ -33,7 +34,7 @@ bool TmStoreTaskBase::handleOneStore(PersistentTmStoreWithTmQueue& store, Event
uint32_t startTime;
uint32_t endTime;
store.getStartAndEndTimeCurrentOrLastDump(startTime, endTime);
triggerEvent(eventIfDone, startTime, endTime);
triggerEvent(eventIfDone, numberOfDumpedPackets);
dumpsPerformed = true;
} else if (result == returnvalue::OK) {
dumpsPerformed = true;