add misc store
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:
@ -1,12 +1,15 @@
|
||||
#include "PusTmFunnel.h"
|
||||
|
||||
#include "eive/objects.h"
|
||||
#include "fsfw/ipc/QueueFactory.h"
|
||||
#include "fsfw/objectmanager.h"
|
||||
#include "fsfw/tmtcpacket/pus/tm/PusTmZcWriter.h"
|
||||
|
||||
PusTmFunnel::PusTmFunnel(object_id_t objectId, TimeReaderIF &timeReader, StorageManagerIF &tmStore,
|
||||
uint32_t messageDepth)
|
||||
: TmFunnelBase(objectId, tmStore, messageDepth), timeReader(timeReader) {}
|
||||
SdCardMountedIF &sdcMan, uint32_t messageDepth)
|
||||
: TmFunnelBase(objectId, tmStore, messageDepth),
|
||||
timeReader(timeReader),
|
||||
miscStore(objects::MISC_STORE, "misc", RolloverInterval::HOURLY, 8, sdcMan) {}
|
||||
|
||||
PusTmFunnel::~PusTmFunnel() = default;
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "TmStore.h"
|
||||
#include "fsfw/timemanager/TimeReaderIF.h"
|
||||
|
||||
/**
|
||||
@ -26,7 +27,7 @@
|
||||
class PusTmFunnel : public TmFunnelBase {
|
||||
public:
|
||||
explicit PusTmFunnel(object_id_t objectId, TimeReaderIF &timeReader, StorageManagerIF &tmStore,
|
||||
uint32_t messageDepth = 10);
|
||||
SdCardMountedIF &sdcMan, uint32_t messageDepth = 10);
|
||||
[[nodiscard]] const char *getName() const override;
|
||||
~PusTmFunnel() override;
|
||||
|
||||
@ -35,6 +36,7 @@ class PusTmFunnel : public TmFunnelBase {
|
||||
private:
|
||||
uint16_t sourceSequenceCount = 0;
|
||||
TimeReaderIF &timeReader;
|
||||
TmStore miscStore;
|
||||
|
||||
ReturnValue_t handlePacket(TmTcMessage &message);
|
||||
};
|
||||
|
@ -10,8 +10,8 @@
|
||||
using namespace returnvalue;
|
||||
|
||||
TmStore::TmStore(object_id_t objectId, std::string baseName, RolloverInterval intervalUnit,
|
||||
uint32_t intervalCount, PacketFilter filter, SdCardMountedIF& sdcMan)
|
||||
: SystemObject(objectId), filter(filter), baseName(std::move(baseName)), sdcMan(sdcMan) {
|
||||
uint32_t intervalCount, SdCardMountedIF& sdcMan)
|
||||
: SystemObject(objectId), baseName(std::move(baseName)), sdcMan(sdcMan) {
|
||||
calcDiffSeconds(intervalUnit, intervalCount);
|
||||
}
|
||||
|
||||
@ -150,4 +150,17 @@ void TmStore::assignAndOrCreateMostRecentFile() {
|
||||
}
|
||||
}
|
||||
|
||||
ReturnValue_t TmStore::storePacketInternal(PusTmReader& reader) { return returnvalue::OK; }
|
||||
void TmStore::addApid(uint16_t apid) {
|
||||
if (not filter.apid) {
|
||||
filter.apid = std::vector<uint16_t>(apid);
|
||||
return;
|
||||
}
|
||||
filter.apid.value().push_back(apid);
|
||||
}
|
||||
|
||||
void TmStore::addService(uint8_t service) {
|
||||
if (not filter.services) {
|
||||
filter.services = std::vector<uint8_t>(service);
|
||||
}
|
||||
filter.services.value().push_back(service);
|
||||
}
|
||||
|
@ -20,7 +20,10 @@ enum class RolloverInterval { HOURLY, DAILY };
|
||||
class TmStore : public SystemObject {
|
||||
public:
|
||||
TmStore(object_id_t objectId, std::string baseName, RolloverInterval intervalUnit,
|
||||
uint32_t intervalCount, PacketFilter filter, SdCardMountedIF& sdcMan);
|
||||
uint32_t intervalCount, SdCardMountedIF& sdcMan);
|
||||
|
||||
void addApid(uint16_t apid);
|
||||
void addService(uint8_t service);
|
||||
|
||||
void updateBaseDir();
|
||||
ReturnValue_t updateCurrentTimestamp();
|
||||
@ -48,7 +51,6 @@ class TmStore : public SystemObject {
|
||||
|
||||
void calcDiffSeconds(RolloverInterval intervalUnit, uint32_t intervalCount);
|
||||
void assignAndOrCreateMostRecentFile();
|
||||
ReturnValue_t storePacketInternal(PusTmReader& reader);
|
||||
};
|
||||
|
||||
#endif /* MISSION_TMTC_TMSTOREBACKEND_H_ */
|
||||
|
Reference in New Issue
Block a user