Persistent TM Store #320
@ -86,7 +86,9 @@ ReturnValue_t TmStore::storePacket(PusTmReader& reader) {
|
|||||||
MessageQueueId_t TmStore::getCommandQueue() { return MessageQueueIF::NO_QUEUE; }
|
MessageQueueId_t TmStore::getCommandQueue() { return MessageQueueIF::NO_QUEUE; }
|
||||||
|
|
||||||
void TmStore::calcDiffSeconds(RolloverInterval intervalUnit, uint32_t intervalCount) {
|
void TmStore::calcDiffSeconds(RolloverInterval intervalUnit, uint32_t intervalCount) {
|
||||||
if (intervalUnit == RolloverInterval::HOURLY) {
|
if (intervalUnit == RolloverInterval::MINUTELY) {
|
||||||
|
rolloverDiffSeconds = 60 * intervalCount;
|
||||||
|
} else if (intervalUnit == RolloverInterval::HOURLY) {
|
||||||
rolloverDiffSeconds = 60 * 60 * intervalCount;
|
rolloverDiffSeconds = 60 * 60 * intervalCount;
|
||||||
} else if (intervalUnit == RolloverInterval::DAILY) {
|
} else if (intervalUnit == RolloverInterval::DAILY) {
|
||||||
rolloverDiffSeconds = 60 * 60 * 24 * intervalCount;
|
rolloverDiffSeconds = 60 * 60 * 24 * intervalCount;
|
||||||
|
@ -15,7 +15,7 @@ struct PacketFilter {
|
|||||||
std::optional<std::vector<std::pair<uint8_t, uint8_t>>> serviceSubservices;
|
std::optional<std::vector<std::pair<uint8_t, uint8_t>>> serviceSubservices;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class RolloverInterval { HOURLY, DAILY };
|
enum class RolloverInterval { MINUTELY, HOURLY, DAILY };
|
||||||
|
|
||||||
class TmStore : public SystemObject {
|
class TmStore : public SystemObject {
|
||||||
public:
|
public:
|
||||||
@ -41,7 +41,7 @@ class TmStore : public SystemObject {
|
|||||||
std::string baseName;
|
std::string baseName;
|
||||||
std::filesystem::path baseDir;
|
std::filesystem::path baseDir;
|
||||||
uint32_t rolloverDiffSeconds = 0;
|
uint32_t rolloverDiffSeconds = 0;
|
||||||
std::array<uint8_t, 8192> fileBuf{};
|
std::array<uint8_t, MAX_FILESIZE> fileBuf{};
|
||||||
timeval& currentTv;
|
timeval& currentTv;
|
||||||
std::optional<timeval> mostRecentTv;
|
std::optional<timeval> mostRecentTv;
|
||||||
std::optional<std::filesystem::path> mostRecentFile;
|
std::optional<std::filesystem::path> mostRecentFile;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user