check whether SD card is usable
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:
parent
fcc9858b66
commit
33ac72de83
@ -10,7 +10,8 @@ PusTmFunnel::PusTmFunnel(object_id_t objectId, TimeReaderIF &timeReader, Storage
|
|||||||
SdCardMountedIF &sdcMan, uint32_t messageDepth)
|
SdCardMountedIF &sdcMan, uint32_t messageDepth)
|
||||||
: TmFunnelBase(objectId, tmStore, messageDepth),
|
: TmFunnelBase(objectId, tmStore, messageDepth),
|
||||||
timeReader(timeReader),
|
timeReader(timeReader),
|
||||||
miscStore(objects::MISC_STORE, "misc", RolloverInterval::HOURLY, 8, sdcMan) {
|
miscStore(objects::MISC_STORE, "misc", RolloverInterval::HOURLY, 8, sdcMan),
|
||||||
|
sdcMan(sdcMan) {
|
||||||
miscStore.addApid(config::EIVE_PUS_APID);
|
miscStore.addApid(config::EIVE_PUS_APID);
|
||||||
miscStore.addService(17);
|
miscStore.addService(17);
|
||||||
}
|
}
|
||||||
@ -55,7 +56,9 @@ ReturnValue_t PusTmFunnel::handlePacket(TmTcMessage &message) {
|
|||||||
sourceSequenceCount = sourceSequenceCount % ccsds::LIMIT_SEQUENCE_COUNT;
|
sourceSequenceCount = sourceSequenceCount % ccsds::LIMIT_SEQUENCE_COUNT;
|
||||||
packet.updateErrorControl();
|
packet.updateErrorControl();
|
||||||
|
|
||||||
miscStore.passPacket(packet);
|
if(sdcMan.isSdCardUsable(std::nullopt)) {
|
||||||
|
miscStore.passPacket(packet);
|
||||||
|
}
|
||||||
|
|
||||||
for (unsigned int idx = 0; idx < destinations.size(); idx++) {
|
for (unsigned int idx = 0; idx < destinations.size(); idx++) {
|
||||||
const auto &destVcidPair = destinations[idx];
|
const auto &destVcidPair = destinations[idx];
|
||||||
|
@ -37,6 +37,7 @@ class PusTmFunnel : public TmFunnelBase {
|
|||||||
uint16_t sourceSequenceCount = 0;
|
uint16_t sourceSequenceCount = 0;
|
||||||
TimeReaderIF &timeReader;
|
TimeReaderIF &timeReader;
|
||||||
TmStore miscStore;
|
TmStore miscStore;
|
||||||
|
SdCardMountedIF& sdcMan;
|
||||||
|
|
||||||
ReturnValue_t handlePacket(TmTcMessage &message);
|
ReturnValue_t handlePacket(TmTcMessage &message);
|
||||||
ReturnValue_t initialize() override;
|
ReturnValue_t initialize() override;
|
||||||
|
Loading…
Reference in New Issue
Block a user