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:
parent
94fee2d429
commit
d82810d5e7
@ -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;
|
||||
|
@ -39,6 +39,7 @@ class TmStore : public SystemObject {
|
||||
void addServiceSubservice(uint8_t service, uint8_t subservice);
|
||||
|
||||
void deleteUpTo(uint32_t unixSeconds);
|
||||
void dumpFrom(uint32_t fromUnixSeconds, TmFunnelBase& tmFunnel);
|
||||
void dumpFromUpTo(uint32_t fromUnixSeconds, uint32_t upToUnixSeconds, TmFunnelBase& tmFunnel);
|
||||
|
||||
void updateBaseDir();
|
||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
||||
Subproject commit d6445d38a8eb644a5e1bd27f0fc56d29e93c030d
|
||||
Subproject commit 2bd6caa3c21255f2ab5a2773eb83d2fca78c2234
|
Loading…
Reference in New Issue
Block a user