add dumpFrom method
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:
@ -57,6 +57,10 @@ ReturnValue_t TmStore::passPacket(PusTmReader& reader) {
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
void TmStore::dumpFrom(uint32_t fromUnixSeconds, TmFunnelBase &tmFunnel) {
|
||||
return dumpFromUpTo(fromUnixSeconds, currentTv.tv_sec, tmFunnel);
|
||||
}
|
||||
|
||||
ReturnValue_t TmStore::storePacket(PusTmReader& reader) {
|
||||
using namespace std::filesystem;
|
||||
if (baseDirUninitialized) {
|
||||
@ -208,8 +212,12 @@ void TmStore::dumpFromUpTo(uint32_t fromUnixSeconds, uint32_t upToUnixSeconds,
|
||||
TmFunnelBase& funnel) {
|
||||
using namespace std::filesystem;
|
||||
for (auto const& file : directory_iterator(basePath)) {
|
||||
if (file.is_directory() or
|
||||
(mostRecentFile.has_value() and (mostRecentFile.value() == file.path()))) {
|
||||
if (file.is_directory()) {
|
||||
continue;
|
||||
}
|
||||
if (mostRecentFile.has_value() and mostRecentTv.has_value() and
|
||||
(file.path() == mostRecentFile.value()) and
|
||||
(upToUnixSeconds < static_cast<uint32_t>(mostRecentTv.value().tv_sec))) {
|
||||
continue;
|
||||
}
|
||||
Clock::TimeOfDay_t tod;
|
||||
|
Reference in New Issue
Block a user