From ff9bcd6b1447a57a30b72437e53db50275b4423a Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 14 Dec 2022 10:54:18 +0100 Subject: [PATCH] added remaining missing stores --- common/config/eive/objects.h | 7 ++++--- mission/tmtc/PusTmFunnel.cpp | 18 +++++++++++++++--- mission/tmtc/PusTmFunnel.h | 7 ++----- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/common/config/eive/objects.h b/common/config/eive/objects.h index ede974fb..fa5ebecc 100644 --- a/common/config/eive/objects.h +++ b/common/config/eive/objects.h @@ -146,9 +146,10 @@ enum commonObjects : uint32_t { CFDP_TM_FUNNEL = 0x73000102, CFDP_HANDLER = 0x73000205, CFDP_DISTRIBUTOR = 0x73000206, - MISC_STORE = 0x73020001, - OK_STORE = 0x73020002, - NOT_OK_STORE = 0x73020003, + MISC_TM_STORE = 0x73020001, + OK_TM_STORE = 0x73020002, + NOT_OK_TM_STORE = 0x73020003, + HK_TM_STORE = 0x73020004 }; } diff --git a/mission/tmtc/PusTmFunnel.cpp b/mission/tmtc/PusTmFunnel.cpp index 39ef4bc5..c0aabf89 100644 --- a/mission/tmtc/PusTmFunnel.cpp +++ b/mission/tmtc/PusTmFunnel.cpp @@ -10,22 +10,34 @@ PusTmFunnel::PusTmFunnel(object_id_t objectId, TimeReaderIF &timeReader, Storage SdCardMountedIF &sdcMan, uint32_t messageDepth) : TmFunnelBase(objectId, tmStore, messageDepth), timeReader(timeReader), - miscStore(objects::MISC_STORE, "tm", "misc", RolloverInterval::HOURLY, 8, currentTv, sdcMan), - okStore(objects::OK_STORE, "tm", "ok", RolloverInterval::MINUTELY, 30, currentTv, sdcMan), - notOkStore(objects::NOT_OK_STORE, "tm", "nok", RolloverInterval::MINUTELY, 30, currentTv, + miscStore(objects::MISC_TM_STORE, "tm", "misc", RolloverInterval::HOURLY, 2, currentTv, + sdcMan), + okStore(objects::OK_TM_STORE, "tm", "ok", RolloverInterval::MINUTELY, 30, currentTv, sdcMan), + notOkStore(objects::NOT_OK_TM_STORE, "tm", "nok", RolloverInterval::MINUTELY, 30, currentTv, sdcMan), + hkStore(objects::HK_TM_STORE, "tm", "hk", RolloverInterval::MINUTELY, 15, currentTv, sdcMan), sdcMan(sdcMan) { Clock::getClock_timeval(¤tTv); Clock::getUptime(&lastTvUpdate); miscStore.addApid(config::EIVE_PUS_APID); miscStore.addService(17); + miscStore.addService(200); okStore.addApid(config::EIVE_PUS_APID); okStore.addServiceSubservice(5, 1); okStore.addApid(config::EIVE_PUS_APID); + okStore.addService(8); okStore.addServiceSubservice(1, 1); okStore.addServiceSubservice(1, 3); okStore.addServiceSubservice(1, 5); okStore.addServiceSubservice(1, 7); + notOkStore.addApid(config::EIVE_PUS_APID); + notOkStore.addServiceSubservice(5, 2); + notOkStore.addServiceSubservice(5, 3); + notOkStore.addServiceSubservice(5, 4); + notOkStore.addServiceSubservice(1, 2); + notOkStore.addServiceSubservice(1, 4); + notOkStore.addServiceSubservice(1, 6); + notOkStore.addServiceSubservice(1, 8); } PusTmFunnel::~PusTmFunnel() = default; diff --git a/mission/tmtc/PusTmFunnel.h b/mission/tmtc/PusTmFunnel.h index 26bbfec2..d447e88b 100644 --- a/mission/tmtc/PusTmFunnel.h +++ b/mission/tmtc/PusTmFunnel.h @@ -16,11 +16,7 @@ /** * @brief TM Recipient. * @details - * TODO: Add support for TM storage by using the (or a) LIVE flag provided by the CCSDS or Syrlinks - * handler. If we are in LIVE TM mode, forward TM to downlink destination directly. Otherwise, - * forward to TM storage backend which stores TMs into files. - * Main telemetry receiver. All generated telemetry is funneled into - * this object. + * Main telemetry receiver. All generated telemetry is funneled into this object. * @ingroup utility * @author J. Meier, R. Mueller */ @@ -45,6 +41,7 @@ class PusTmFunnel : public TmFunnelBase { TmStore miscStore; TmStore okStore; TmStore notOkStore; + TmStore hkStore; SdCardMountedIF &sdcMan; ReturnValue_t handlePacket(TmTcMessage &message);