Persistent TM Store #320

Merged
muellerr merged 109 commits from mueller/pus-15-tm-storage into develop 2023-02-24 19:03:39 +01:00
273 changed files with 6722 additions and 14661 deletions
Showing only changes of commit c493273a21 - Show all commits

View File

@ -4,6 +4,7 @@
#include <algorithm> #include <algorithm>
#include <filesystem> #include <filesystem>
#include <cinttypes>
using namespace returnvalue; using namespace returnvalue;
@ -66,8 +67,17 @@ ReturnValue_t TmStore::storePacket(PusTmReader& reader) {
if (file.is_directory()) { if (file.is_directory()) {
continue; continue;
} }
auto path = file.path(); auto pathStr = file.path().string();
Clock::TimeOfDay_t tod;
if(pathStr.find(baseName) == std::string::npos) {
continue;
}
float seconds = 0.0;
char* prefix = nullptr;
// TODO: Scan file timestamp from name somehow. Maybe use scanf or similar? // TODO: Scan file timestamp from name somehow. Maybe use scanf or similar?
int count = sscanf(pathStr.c_str(), "%s%4" SCNu32 "-%2" SCNu32 "-%2"
SCNu32 "T%2" SCNu32 ":%2" SCNu32 ":%fZ", prefix, &tod.year, &tod.month, &tod.day,
&tod.hour, &tod.minute, &seconds);
} }
} }
// TODO: Need to find the file of the most recent file. // TODO: Need to find the file of the most recent file.

2
tmtc

Submodule tmtc updated: 96e27e7163...a55572db28