the stores only keep references to the current time
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
This commit is contained in:
@ -10,10 +10,14 @@ PusTmFunnel::PusTmFunnel(object_id_t objectId, TimeReaderIF &timeReader, Storage
|
||||
SdCardMountedIF &sdcMan, uint32_t messageDepth)
|
||||
: TmFunnelBase(objectId, tmStore, messageDepth),
|
||||
timeReader(timeReader),
|
||||
miscStore(objects::MISC_STORE, "misc", RolloverInterval::HOURLY, 8, sdcMan),
|
||||
miscStore(objects::MISC_STORE, "misc", RolloverInterval::HOURLY, 8, currentTv, sdcMan),
|
||||
eventStore(objects::EVENT_STORE, "event", RolloverInterval::HOURLY, 1, currentTv, sdcMan),
|
||||
sdcMan(sdcMan) {
|
||||
Clock::getClock_timeval(¤tTv);
|
||||
miscStore.addApid(config::EIVE_PUS_APID);
|
||||
miscStore.addService(17);
|
||||
eventStore.addApid(config::EIVE_PUS_APID);
|
||||
eventStore.addService(5);
|
||||
}
|
||||
|
||||
PusTmFunnel::~PusTmFunnel() = default;
|
||||
@ -59,10 +63,11 @@ ReturnValue_t PusTmFunnel::handlePacket(TmTcMessage &message) {
|
||||
if (sdcMan.isSdCardUsable(std::nullopt)) {
|
||||
if (not storesInitialized) {
|
||||
miscStore.updateBaseDir();
|
||||
miscStore.updateCurrentTimestamp();
|
||||
eventStore.updateBaseDir();
|
||||
storesInitialized = true;
|
||||
}
|
||||
miscStore.passPacket(packet);
|
||||
eventStore.passPacket(packet);
|
||||
}
|
||||
|
||||
for (unsigned int idx = 0; idx < destinations.size(); idx++) {
|
||||
@ -101,7 +106,7 @@ const char *PusTmFunnel::getName() const { return "PUS TM Funnel"; }
|
||||
ReturnValue_t PusTmFunnel::initialize() {
|
||||
if (not storesInitialized and sdcMan.isSdCardUsable(std::nullopt)) {
|
||||
miscStore.updateBaseDir();
|
||||
miscStore.updateCurrentTimestamp();
|
||||
eventStore.updateBaseDir();
|
||||
storesInitialized = true;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
|
Reference in New Issue
Block a user