From cb2fe300b2153ba6432bcd210579346482a4a8de Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Sun, 26 Mar 2023 15:28:00 +0200 Subject: [PATCH 1/4] enable periodic HK --- CHANGELOG.md | 4 +++ CMakeLists.txt | 2 ++ bsp_q7s/OBSWConfig.h.in | 9 ++++-- bsp_q7s/core/CoreController.cpp | 6 ++-- bsp_q7s/core/CoreController.h | 3 +- bsp_q7s/core/ObjectFactory.cpp | 29 ++++++++++---------- bsp_q7s/core/ObjectFactory.h | 7 +++-- bsp_q7s/em/emObjectFactory.cpp | 17 ++++++++---- bsp_q7s/fmObjectFactory.cpp | 15 ++++++---- linux/ObjectFactory.cpp | 4 +-- linux/ObjectFactory.h | 2 +- linux/acs/startracker/StarTrackerHandler.cpp | 4 ++- mission/acs/ImtqHandler.cpp | 7 +++-- mission/acs/ImtqHandler.h | 3 +- mission/acs/RwHandler.cpp | 4 ++- mission/com/SyrlinksHandler.cpp | 10 +++++-- mission/controller/AcsController.cpp | 17 ++++++------ mission/controller/AcsController.h | 4 ++- mission/controller/ThermalController.cpp | 13 ++++++--- mission/devices/ACUHandler.cpp | 8 +++--- mission/devices/ACUHandler.h | 2 +- mission/devices/BpxBatteryHandler.cpp | 11 ++++++-- mission/devices/BpxBatteryHandler.h | 4 ++- mission/devices/GomspaceDeviceHandler.cpp | 6 ++-- mission/devices/GomspaceDeviceHandler.h | 4 ++- mission/devices/P60DockHandler.cpp | 8 +++--- mission/devices/P60DockHandler.h | 2 +- mission/devices/Pdu1Handler.cpp | 8 +++--- mission/devices/Pdu1Handler.h | 2 +- mission/devices/Pdu2Handler.cpp | 8 +++--- mission/devices/Pdu2Handler.h | 2 +- 31 files changed, 139 insertions(+), 86 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 75b09edc..640ca70c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,10 @@ will consitute of a breaking change warranting a new major release: # [unreleased] +## Changed + +- Enabled periodic hosuekeeping generation for release images. + # [v1.40.0] 2023-03-24 - eive-tmtc: v2.19.4 diff --git a/CMakeLists.txt b/CMakeLists.txt index 6798ded7..93f17cf4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -297,9 +297,11 @@ include(BuildType) set_build_type() set(FSFW_DEBUG_INFO 0) +set(OBSW_ENABLE_PERIODIC_HK 1) set(Q7S_CHECK_FOR_ALREADY_RUNNING_IMG 0) if(RELEASE_BUILD MATCHES 0) set(FSFW_DEBUG_INFO 1) + set(OBSW_ENABLE_PERIODIC_HK 0) set(Q7S_CHECK_FOR_ALREADY_RUNNING_IMG 1) endif() diff --git a/bsp_q7s/OBSWConfig.h.in b/bsp_q7s/OBSWConfig.h.in index 6f4e82e3..272467b5 100644 --- a/bsp_q7s/OBSWConfig.h.in +++ b/bsp_q7s/OBSWConfig.h.in @@ -13,9 +13,12 @@ /** All of the following flags should be enabled for mission code */ /*******************************************************************/ -#define OBSW_ENABLE_PERIODIC_HK 0 +// This enables a lot of periodically generated telemetry, so it can make sense to +// disable this for debugging purposes. +#define OBSW_ENABLE_PERIODIC_HK @OBSW_ENABLE_PERIODIC_HK@ + // This switch will cause the SW to command the EIVE system object to safe mode. This will -// trigger a lot of events, so it can make sense to disable this for debugging purposes +// trigger a lot of events, so it can make sense to disable this for debugging purposes. #define OBSW_COMMAND_SAFE_MODE_AT_STARTUP 1 #define OBSW_ADD_GOMSPACE_PCDU @OBSW_ADD_GOMSPACE_PCDU@ @@ -28,8 +31,8 @@ #define OBSW_ADD_SUS_BOARD_ASS @OBSW_ADD_SUS_BOARD_ASS@ #define OBSW_ADD_ACS_BOARD @OBSW_ADD_ACS_BOARD@ #define OBSW_ADD_ACS_CTRL 1 +#define OBSW_ADD_TCS_CTRL 1 #define OBSW_ADD_GPS_CTRL @OBSW_ADD_GPS_CTRL@ -#define OBSW_ADD_TCS_CTRL @OBSW_ADD_TCS_CTRL@ #define OBSW_ADD_RW @OBSW_ADD_RW@ #define OBSW_ADD_RTD_DEVICES @OBSW_ADD_RTD_DEVICES@ #define OBSW_ADD_SA_DEPL @OBSW_ADD_SA_DEPL@ diff --git a/bsp_q7s/core/CoreController.cpp b/bsp_q7s/core/CoreController.cpp index 9d772a86..e0bd73f8 100644 --- a/bsp_q7s/core/CoreController.cpp +++ b/bsp_q7s/core/CoreController.cpp @@ -31,8 +31,10 @@ xsc::Chip CoreController::CURRENT_CHIP = xsc::Chip::NO_CHIP; xsc::Copy CoreController::CURRENT_COPY = xsc::Copy::NO_COPY; -CoreController::CoreController(object_id_t objectId, const std::atomic_uint16_t &i2cErrors) +CoreController::CoreController(object_id_t objectId, const std::atomic_uint16_t &i2cErrors, + bool enableHkSet) : ExtendedControllerBase(objectId, 5), + enableHkSet(enableHkSet), cmdExecutor(4096), cmdReplyBuf(4096, true), cmdRepliesSizes(128), @@ -136,7 +138,7 @@ ReturnValue_t CoreController::initializeLocalDataPool(localpool::DataPool &local localDataPoolMap.emplace(core::TEMPERATURE, &tempPoolEntry); localDataPoolMap.emplace(core::PS_VOLTAGE, &psVoltageEntry); localDataPoolMap.emplace(core::PL_VOLTAGE, &plVoltageEntry); - poolManager.subscribeForRegularPeriodicPacket({hkSet.getSid(), false, 10.0}); + poolManager.subscribeForRegularPeriodicPacket({hkSet.getSid(), enableHkSet, 12.0}); return returnvalue::OK; } diff --git a/bsp_q7s/core/CoreController.h b/bsp_q7s/core/CoreController.h index aaaba8ac..5bbebfd3 100644 --- a/bsp_q7s/core/CoreController.h +++ b/bsp_q7s/core/CoreController.h @@ -135,7 +135,7 @@ class CoreController : public ExtendedControllerBase { static constexpr Event I2C_UNAVAILABLE_REBOOT = event::makeEvent(SUBSYSTEM_ID, 10, severity::MEDIUM); - CoreController(object_id_t objectId, const std::atomic_uint16_t& i2cErrors); + CoreController(object_id_t objectId, const std::atomic_uint16_t& i2cErrors, bool enableHkSet); virtual ~CoreController(); ReturnValue_t initialize() override; @@ -179,6 +179,7 @@ class CoreController : public ExtendedControllerBase { static constexpr uint32_t BOOT_OFFSET_SECONDS = 15; static constexpr MutexIF::TimeoutType TIMEOUT_TYPE = MutexIF::TimeoutType::WAITING; static constexpr uint32_t MUTEX_TIMEOUT = 20; + bool enableHkSet = false; GpsHyperion::FixMode gpsFix = GpsHyperion::FixMode::UNKNOWN; // States for SD state machine, which is used in non-blocking mode diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index bd3917d5..5237557c 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -187,27 +187,28 @@ void ObjectFactory::createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, //*spiRWComIF = new SpiComIF(objects::SPI_RW_COM_IF, q7s::SPI_RW_DEV, **gpioComIF); } -void ObjectFactory::createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF** pwrSwitcher) { +void ObjectFactory::createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF** pwrSwitcher, + bool enableHkSets) { CspCookie* p60DockCspCookie = new CspCookie(P60Dock::MAX_REPLY_SIZE, addresses::P60DOCK, 500); CspCookie* pdu1CspCookie = new CspCookie(PDU::MAX_REPLY_SIZE, addresses::PDU1, 500); CspCookie* pdu2CspCookie = new CspCookie(PDU::MAX_REPLY_SIZE, addresses::PDU2, 500); CspCookie* acuCspCookie = new CspCookie(ACU::MAX_REPLY_SIZE, addresses::ACU, 500); auto p60Fdir = new GomspacePowerFdir(objects::P60DOCK_HANDLER); - P60DockHandler* p60dockhandler = - new P60DockHandler(objects::P60DOCK_HANDLER, objects::CSP_COM_IF, p60DockCspCookie, p60Fdir); + P60DockHandler* p60dockhandler = new P60DockHandler(objects::P60DOCK_HANDLER, objects::CSP_COM_IF, + p60DockCspCookie, p60Fdir, enableHkSets); auto pdu1Fdir = new GomspacePowerFdir(objects::PDU1_HANDLER); - Pdu1Handler* pdu1handler = - new Pdu1Handler(objects::PDU1_HANDLER, objects::CSP_COM_IF, pdu1CspCookie, pdu1Fdir); + Pdu1Handler* pdu1handler = new Pdu1Handler(objects::PDU1_HANDLER, objects::CSP_COM_IF, + pdu1CspCookie, pdu1Fdir, enableHkSets); auto pdu2Fdir = new GomspacePowerFdir(objects::PDU2_HANDLER); - Pdu2Handler* pdu2handler = - new Pdu2Handler(objects::PDU2_HANDLER, objects::CSP_COM_IF, pdu2CspCookie, pdu2Fdir); + Pdu2Handler* pdu2handler = new Pdu2Handler(objects::PDU2_HANDLER, objects::CSP_COM_IF, + pdu2CspCookie, pdu2Fdir, enableHkSets); auto acuFdir = new GomspacePowerFdir(objects::ACU_HANDLER); - ACUHandler* acuhandler = - new ACUHandler(objects::ACU_HANDLER, objects::CSP_COM_IF, acuCspCookie, acuFdir); + ACUHandler* acuhandler = new ACUHandler(objects::ACU_HANDLER, objects::CSP_COM_IF, acuCspCookie, + acuFdir, enableHkSets); auto pcduHandler = new PcduHandler(objects::PCDU_HANDLER, 50); /** @@ -963,14 +964,14 @@ void ObjectFactory::createStrComponents(PowerSwitchIF* pwrSwitcher) { starTracker->setCustomFdir(strFdir); } -void ObjectFactory::createImtqComponents(PowerSwitchIF* pwrSwitcher) { +void ObjectFactory::createImtqComponents(PowerSwitchIF* pwrSwitcher, bool enableHkSets) { auto* imtqAssy = new ImtqAssembly(objects::IMTQ_ASSY); imtqAssy->connectModeTreeParent(satsystem::acs::ACS_SUBSYSTEM); new ImtqPollingTask(objects::IMTQ_POLLING, I2C_FATAL_ERRORS); I2cCookie* imtqI2cCookie = new I2cCookie(addresses::IMTQ, imtq::MAX_REPLY_SIZE, q7s::I2C_PL_EIVE); auto imtqHandler = new ImtqHandler(objects::IMTQ_HANDLER, objects::IMTQ_POLLING, imtqI2cCookie, - pcdu::Switches::PDU1_CH3_MGT_5V); + pcdu::Switches::PDU1_CH3_MGT_5V, enableHkSets); imtqHandler->enableThermalModule(ThermalStateCfg()); imtqHandler->setPowerSwitcher(pwrSwitcher); imtqHandler->connectModeTreeParent(*imtqAssy); @@ -984,10 +985,10 @@ void ObjectFactory::createImtqComponents(PowerSwitchIF* pwrSwitcher) { #endif } -void ObjectFactory::createBpxBatteryComponent() { +void ObjectFactory::createBpxBatteryComponent(bool enableHkSets) { I2cCookie* bpxI2cCookie = new I2cCookie(addresses::BPX_BATTERY, 100, q7s::I2C_PL_EIVE); - BpxBatteryHandler* bpxHandler = - new BpxBatteryHandler(objects::BPX_BATT_HANDLER, objects::I2C_COM_IF, bpxI2cCookie); + BpxBatteryHandler* bpxHandler = new BpxBatteryHandler( + objects::BPX_BATT_HANDLER, objects::I2C_COM_IF, bpxI2cCookie, enableHkSets); bpxHandler->setStartUpImmediately(); bpxHandler->setToGoToNormalMode(true); #if OBSW_DEBUG_BPX_BATT == 1 diff --git a/bsp_q7s/core/ObjectFactory.h b/bsp_q7s/core/ObjectFactory.h index f71d433f..141f518f 100644 --- a/bsp_q7s/core/ObjectFactory.h +++ b/bsp_q7s/core/ObjectFactory.h @@ -53,7 +53,8 @@ void produce(void* args); void createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, SerialComIF** uartComIF, SpiComIF** spiMainComIF, I2cComIF** i2cComIF); -void createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF** pwrSwitcher); +void createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF** pwrSwitcher, + bool enableHkSets); void createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF, PowerSwitchIF* pwrSwitcher, Stack5VHandler& stackHandler); void createTmpComponents(); @@ -63,8 +64,8 @@ void createAcsBoardComponents(SpiComIF& spiComIF, LinuxLibgpioIF* gpioComIF, Ser PowerSwitchIF& pwrSwitcher); void createHeaterComponents(GpioIF* gpioIF, PowerSwitchIF* pwrSwitcher, HealthTableIF* healthTable, HeaterHandler*& heaterHandler); -void createImtqComponents(PowerSwitchIF* pwrSwitcher); -void createBpxBatteryComponent(); +void createImtqComponents(PowerSwitchIF* pwrSwitcher, bool enableHkSets); +void createBpxBatteryComponent(bool enableHkSets); void createStrComponents(PowerSwitchIF* pwrSwitcher); void createSolarArrayDeploymentComponents(PowerSwitchIF& pwrSwitcher, GpioIF& gpioIF); void createSyrlinksComponents(PowerSwitchIF* pwrSwitcher); diff --git a/bsp_q7s/em/emObjectFactory.cpp b/bsp_q7s/em/emObjectFactory.cpp index 87237916..f90ed5a0 100644 --- a/bsp_q7s/em/emObjectFactory.cpp +++ b/bsp_q7s/em/emObjectFactory.cpp @@ -29,6 +29,11 @@ void ObjectFactory::produce(void* args) { StorageManagerIF* ipcStore = nullptr; StorageManagerIF* tmStore = nullptr; + bool enableHkSets = false; +#if OBSW_ENABLE_PERIODIC_HK == 1 + enableHkSets = true; +#endif + PersistentTmStores stores; ObjectFactory::produceGenericObjects(&healthTable, &pusFunnel, &cfdpFunnel, *SdCardManager::instance(), &ipcStore, &tmStore, stores); @@ -61,12 +66,12 @@ void ObjectFactory::produce(void* args) { auto* comCookieDummy = new ComCookieDummy(); pwrSwitcher = new PcduHandlerDummy(objects::PCDU_HANDLER, objects::DUMMY_COM_IF, comCookieDummy); #else - createPcduComponents(gpioComIF, &pwrSwitcher); + createPcduComponents(gpioComIF, &pwrSwitcher, enableHkSets); #endif dummy::createDummies(dummyCfg, *pwrSwitcher, gpioComIF); - new CoreController(objects::CORE_CONTROLLER, I2C_FATAL_ERRORS); + new CoreController(objects::CORE_CONTROLLER, I2C_FATAL_ERRORS, enableHkSets); // Regular FM code, does not work for EM if the hardware is not connected // createPcduComponents(gpioComIF, &pwrSwitcher); @@ -84,7 +89,7 @@ void ObjectFactory::produce(void* args) { // createRadSensorComponent(gpioComIF); #if OBSW_ADD_ACS_BOARD == 1 - createAcsBoardComponents(gpioComIF, uartComIF, *pwrSwitcher); + createAcsBoardComponents(*spiMainComIF, gpioComIF, uartComIF, *pwrSwitcher); #else // Still add all GPIOs for EM. GpioCookie* acsBoardGpios = new GpioCookie(); @@ -93,7 +98,7 @@ void ObjectFactory::produce(void* args) { #endif #if OBSW_ADD_MGT == 1 - createImtqComponents(pwrSwitcher); + createImtqComponents(pwrSwitcher, enableHkSets); #endif #if OBSW_ADD_SYRLINKS == 1 @@ -105,7 +110,7 @@ void ObjectFactory::produce(void* args) { #endif #if OBSW_ADD_BPX_BATTERY_HANDLER == 1 - createBpxBatteryComponent(); + createBpxBatteryComponent(enableHkSets); #endif #if OBSW_ADD_STAR_TRACKER == 1 @@ -131,7 +136,7 @@ void ObjectFactory::produce(void* args) { createScexComponents(q7s::UART_SCEX_DEV, pwrSwitcher, *SdCardManager::instance(), false, pcdu::Switches::PDU1_CH5_SOLAR_CELL_EXP_5V); #endif - createAcsController(true); + createAcsController(true, enableHkSets); HeaterHandler* heaterHandler = nullptr; ObjectFactory::createGenericHeaterComponents(*gpioComIF, *pwrSwitcher, heaterHandler); createThermalController(*heaterHandler); diff --git a/bsp_q7s/fmObjectFactory.cpp b/bsp_q7s/fmObjectFactory.cpp index f3ce12e1..d9ba0cb0 100644 --- a/bsp_q7s/fmObjectFactory.cpp +++ b/bsp_q7s/fmObjectFactory.cpp @@ -24,6 +24,11 @@ void ObjectFactory::produce(void* args) { StorageManagerIF* ipcStore = nullptr; StorageManagerIF* tmStore = nullptr; + bool enableHkSets = false; +#if OBSW_ENABLE_PERIODIC_HK == 1 + enableHkSets = true; +#endif + PersistentTmStores stores; ObjectFactory::produceGenericObjects(&healthTable, &pusFunnel, &cfdpFunnel, *SdCardManager::instance(), &ipcStore, &tmStore, stores); @@ -38,8 +43,8 @@ void ObjectFactory::produce(void* args) { q7s::gpioCallbacks::initSpiCsDecoder(gpioComIF); gpioCallbacks::disableAllDecoder(gpioComIF); - new CoreController(objects::CORE_CONTROLLER, I2C_FATAL_ERRORS); - createPcduComponents(gpioComIF, &pwrSwitcher); + new CoreController(objects::CORE_CONTROLLER, I2C_FATAL_ERRORS, enableHkSets); + createPcduComponents(gpioComIF, &pwrSwitcher, enableHkSets); auto* stackHandler = new Stack5VHandler(*pwrSwitcher); #if OBSW_ADD_RAD_SENSORS == 1 @@ -66,12 +71,12 @@ void ObjectFactory::produce(void* args) { createPayloadComponents(gpioComIF, *pwrSwitcher); #if OBSW_ADD_MGT == 1 - createImtqComponents(pwrSwitcher); + createImtqComponents(pwrSwitcher, enableHkSets); #endif createReactionWheelComponents(gpioComIF, pwrSwitcher); #if OBSW_ADD_BPX_BATTERY_HANDLER == 1 - createBpxBatteryComponent(); + createBpxBatteryComponent(enableHkSets); #endif #if OBSW_ADD_STAR_TRACKER == 1 @@ -101,6 +106,6 @@ void ObjectFactory::produce(void* args) { createMiscComponents(); createThermalController(*heaterHandler); - createAcsController(true); + createAcsController(true, enableHkSets); satsystem::init(); } diff --git a/linux/ObjectFactory.cpp b/linux/ObjectFactory.cpp index 492bfdcb..4aa1f138 100644 --- a/linux/ObjectFactory.cpp +++ b/linux/ObjectFactory.cpp @@ -327,8 +327,8 @@ void ObjectFactory::createScexComponents(std::string uartDev, PowerSwitchIF* pwr scexHandler->connectModeTreeParent(satsystem::payload::SUBSYSTEM); } -AcsController* ObjectFactory::createAcsController(bool connectSubsystem) { - auto acsCtrl = new AcsController(objects::ACS_CONTROLLER); +AcsController* ObjectFactory::createAcsController(bool connectSubsystem, bool enableHkSets) { + auto acsCtrl = new AcsController(objects::ACS_CONTROLLER, enableHkSets); if (connectSubsystem) { acsCtrl->connectModeTreeParent(satsystem::acs::ACS_SUBSYSTEM); } diff --git a/linux/ObjectFactory.h b/linux/ObjectFactory.h index a234919f..a1956a92 100644 --- a/linux/ObjectFactory.h +++ b/linux/ObjectFactory.h @@ -31,6 +31,6 @@ void createScexComponents(std::string uartDev, PowerSwitchIF* pwrSwitcher, void gpioChecker(ReturnValue_t result, std::string output); -AcsController* createAcsController(bool connectSubsystem); +AcsController* createAcsController(bool connectSubsystem, bool enableHkSets); } // namespace ObjectFactory diff --git a/linux/acs/startracker/StarTrackerHandler.cpp b/linux/acs/startracker/StarTrackerHandler.cpp index 448afc91..4abd58eb 100644 --- a/linux/acs/startracker/StarTrackerHandler.cpp +++ b/linux/acs/startracker/StarTrackerHandler.cpp @@ -261,6 +261,7 @@ void StarTrackerHandler::doStartUp() { default: return; } + solutionSet.setReportingEnabled(true); startupState = StartupState::DONE; internalState = InternalState::IDLE; setMode(_MODE_TO_ON); @@ -272,6 +273,7 @@ void StarTrackerHandler::doShutDown() { internalState = InternalState::IDLE; startupState = StartupState::IDLE; bootState = FwBootState::NONE; + solutionSet.setReportingEnabled(false); setMode(_MODE_POWER_DOWN); } @@ -1271,7 +1273,7 @@ ReturnValue_t StarTrackerHandler::initializeLocalDataPool(localpool::DataPool& l poolManager.subscribeForRegularPeriodicPacket( subdp::RegularHkPeriodicParams(interfaceSet.getSid(), false, 10.0)); poolManager.subscribeForDiagPeriodicPacket( - subdp::DiagnosticsHkPeriodicParams(solutionSet.getSid(), false, 5.0)); + subdp::DiagnosticsHkPeriodicParams(solutionSet.getSid(), false, 12.0)); poolManager.subscribeForRegularPeriodicPacket( subdp::RegularHkPeriodicParams(cameraSet.getSid(), false, 10.0)); poolManager.subscribeForRegularPeriodicPacket( diff --git a/mission/acs/ImtqHandler.cpp b/mission/acs/ImtqHandler.cpp index f5791abd..fdf53611 100644 --- a/mission/acs/ImtqHandler.cpp +++ b/mission/acs/ImtqHandler.cpp @@ -30,8 +30,9 @@ static constexpr bool ACTUATION_WIRETAPPING = false; ImtqHandler::ImtqHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie, - power::Switch_t pwrSwitcher) + power::Switch_t pwrSwitcher, bool enableHkSets) : DeviceHandlerBase(objectId, comIF, comCookie), + enableHkSets(enableHkSets), statusSet(this), dipoleSet(*this), rawMtmNoTorque(this), @@ -778,9 +779,9 @@ ReturnValue_t ImtqHandler::initializeLocalDataPool(localpool::DataPool& localDat localDataPoolMap.emplace(imtq::FINA_NEG_Z_COIL_Z_TEMPERATURE, new PoolEntry({0})); poolManager.subscribeForDiagPeriodicPacket( - subdp::DiagnosticsHkPeriodicParams(hkDatasetNoTorque.getSid(), false, 10.0)); + subdp::DiagnosticsHkPeriodicParams(hkDatasetNoTorque.getSid(), enableHkSets, 12.0)); poolManager.subscribeForDiagPeriodicPacket( - subdp::DiagnosticsHkPeriodicParams(hkDatasetWithTorque.getSid(), false, 10.0)); + subdp::DiagnosticsHkPeriodicParams(hkDatasetWithTorque.getSid(), enableHkSets, 12.0)); poolManager.subscribeForDiagPeriodicPacket( subdp::DiagnosticsHkPeriodicParams(rawMtmNoTorque.getSid(), false, 10.0)); poolManager.subscribeForDiagPeriodicPacket( diff --git a/mission/acs/ImtqHandler.h b/mission/acs/ImtqHandler.h index c276d166..b435e499 100644 --- a/mission/acs/ImtqHandler.h +++ b/mission/acs/ImtqHandler.h @@ -18,7 +18,7 @@ class ImtqHandler : public DeviceHandlerBase { enum NormalPollingMode { UNCALIBRATED = 0, CALIBRATED = 1, BOTH = 2 }; ImtqHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie, - power::Switch_t pwrSwitcher); + power::Switch_t pwrSwitcher, bool enableHkSets); virtual ~ImtqHandler(); void setPollingMode(NormalPollingMode pollMode); @@ -85,6 +85,7 @@ class ImtqHandler : public DeviceHandlerBase { enum class InternalState { NONE, STARTUP, SHUTDOWN } internalState = InternalState::NONE; bool commandExecuted = false; + bool enableHkSets = false; imtq::Request request{}; diff --git a/mission/acs/RwHandler.cpp b/mission/acs/RwHandler.cpp index e70152dd..5ba5d7a3 100644 --- a/mission/acs/RwHandler.cpp +++ b/mission/acs/RwHandler.cpp @@ -33,6 +33,7 @@ void RwHandler::doStartUp() { sif::debug << "RwHandler::doStartUp: Failed to pull enable gpio to high"; } updatePeriodicReply(true, rws::REPLY_ID); + statusSet.setReportingEnabled(true); setMode(_MODE_TO_ON); } @@ -48,6 +49,7 @@ void RwHandler::doShutDown() { statusSet.referenceSpeed = 0.0; statusSet.state = 0; statusSet.setValidity(false, true); + statusSet.setReportingEnabled(false); } { PoolReadGuard pg(&tmDataset); @@ -304,7 +306,7 @@ ReturnValue_t RwHandler::initializeLocalDataPool(localpool::DataPool& localDataP localDataPoolMap.emplace(rws::SPI_REG_OVERRUN_ERRORS, new PoolEntry({0})); localDataPoolMap.emplace(rws::SPI_TOTAL_ERRORS, new PoolEntry({0})); poolManager.subscribeForDiagPeriodicPacket( - subdp::DiagnosticsHkPeriodicParams(statusSet.getSid(), false, 5.0)); + subdp::DiagnosticsHkPeriodicParams(statusSet.getSid(), false, 12.0)); poolManager.subscribeForRegularPeriodicPacket( subdp::RegularHkPeriodicParams(tmDataset.getSid(), false, 30.0)); poolManager.subscribeForRegularPeriodicPacket( diff --git a/mission/com/SyrlinksHandler.cpp b/mission/com/SyrlinksHandler.cpp index c1deaec4..5065f219 100644 --- a/mission/com/SyrlinksHandler.cpp +++ b/mission/com/SyrlinksHandler.cpp @@ -641,12 +641,16 @@ ReturnValue_t SyrlinksHandler::initializeLocalDataPool(localpool::DataPool& loca localDataPoolMap.emplace(syrlinks::TEMP_BASEBAND_BOARD, new PoolEntry({0})); localDataPoolMap.emplace(syrlinks::TEMP_POWER_AMPLIFIER, new PoolEntry({0})); + bool enableHkSets = false; +#if OBSW_ENABLE_PERIODIC_HK == 1 + enableHkSets = true; +#endif poolManager.subscribeForDiagPeriodicPacket( - subdp::DiagnosticsHkPeriodicParams(txDataset.getSid(), false, 5.0)); + subdp::DiagnosticsHkPeriodicParams(txDataset.getSid(), enableHkSets, 60.0)); poolManager.subscribeForDiagPeriodicPacket( - subdp::DiagnosticsHkPeriodicParams(rxDataset.getSid(), false, 5.0)); + subdp::DiagnosticsHkPeriodicParams(rxDataset.getSid(), enableHkSets, 60.0)); poolManager.subscribeForRegularPeriodicPacket( - subdp::RegularHkPeriodicParams(temperatureSet.getSid(), false, 10.0)); + subdp::RegularHkPeriodicParams(temperatureSet.getSid(), enableHkSets, 20.0)); return returnvalue::OK; } diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index 6db48340..2dcae9e5 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -4,8 +4,9 @@ #include #include -AcsController::AcsController(object_id_t objectId) +AcsController::AcsController(object_id_t objectId, bool enableHkSets) : ExtendedControllerBase(objectId), + enableHkSets(enableHkSets), guidance(&acsParameters), safeCtrl(&acsParameters), ptgCtrl(&acsParameters), @@ -574,7 +575,7 @@ ReturnValue_t AcsController::initializeLocalDataPool(localpool::DataPool &localD localDataPoolMap.emplace(acsctrl::PoolIds::MGM_VEC_TOT, &mgmVecTot); localDataPoolMap.emplace(acsctrl::PoolIds::MGM_VEC_TOT_DERIVATIVE, &mgmVecTotDer); localDataPoolMap.emplace(acsctrl::PoolIds::MAG_IGRF_MODEL, &magIgrf); - poolManager.subscribeForRegularPeriodicPacket({mgmDataProcessed.getSid(), false, 5.0}); + poolManager.subscribeForRegularPeriodicPacket({mgmDataProcessed.getSid(), enableHkSets, 12.0}); // SUS Raw localDataPoolMap.emplace(acsctrl::PoolIds::SUS_0_N_LOC_XFYFZM_PT_XF, &sus0ValRaw); localDataPoolMap.emplace(acsctrl::PoolIds::SUS_1_N_LOC_XBYFZM_PT_XB, &sus1ValRaw); @@ -605,7 +606,7 @@ ReturnValue_t AcsController::initializeLocalDataPool(localpool::DataPool &localD localDataPoolMap.emplace(acsctrl::PoolIds::SUS_VEC_TOT, &susVecTot); localDataPoolMap.emplace(acsctrl::PoolIds::SUS_VEC_TOT_DERIVATIVE, &susVecTotDer); localDataPoolMap.emplace(acsctrl::PoolIds::SUN_IJK_MODEL, &sunIjk); - poolManager.subscribeForRegularPeriodicPacket({susDataProcessed.getSid(), false, 5.0}); + poolManager.subscribeForRegularPeriodicPacket({susDataProcessed.getSid(), enableHkSets, 12.0}); // GYR Raw localDataPoolMap.emplace(acsctrl::PoolIds::GYR_0_ADIS, &gyr0VecRaw); localDataPoolMap.emplace(acsctrl::PoolIds::GYR_1_L3, &gyr1VecRaw); @@ -618,30 +619,30 @@ ReturnValue_t AcsController::initializeLocalDataPool(localpool::DataPool &localD localDataPoolMap.emplace(acsctrl::PoolIds::GYR_2_VEC, &gyr2VecProc); localDataPoolMap.emplace(acsctrl::PoolIds::GYR_3_VEC, &gyr3VecProc); localDataPoolMap.emplace(acsctrl::PoolIds::GYR_VEC_TOT, &gyrVecTot); - poolManager.subscribeForDiagPeriodicPacket({gyrDataProcessed.getSid(), false, 5.0}); + poolManager.subscribeForDiagPeriodicPacket({gyrDataProcessed.getSid(), enableHkSets, 12.0}); // GPS Processed localDataPoolMap.emplace(acsctrl::PoolIds::GC_LATITUDE, &gcLatitude); localDataPoolMap.emplace(acsctrl::PoolIds::GD_LONGITUDE, &gdLongitude); localDataPoolMap.emplace(acsctrl::PoolIds::ALTITUDE, &altitude); localDataPoolMap.emplace(acsctrl::PoolIds::GPS_POSITION, &gpsPosition); localDataPoolMap.emplace(acsctrl::PoolIds::GPS_VELOCITY, &gpsVelocity); - poolManager.subscribeForRegularPeriodicPacket({gpsDataProcessed.getSid(), false, 5.0}); + poolManager.subscribeForRegularPeriodicPacket({gpsDataProcessed.getSid(), enableHkSets, 12.0}); // MEKF localDataPoolMap.emplace(acsctrl::PoolIds::QUAT_MEKF, &quatMekf); localDataPoolMap.emplace(acsctrl::PoolIds::SAT_ROT_RATE_MEKF, &satRotRateMekf); localDataPoolMap.emplace(acsctrl::PoolIds::MEKF_STATUS, &mekfStatus); - poolManager.subscribeForDiagPeriodicPacket({mekfData.getSid(), false, 5.0}); + poolManager.subscribeForDiagPeriodicPacket({mekfData.getSid(), enableHkSets, 12.0}); // Ctrl Values localDataPoolMap.emplace(acsctrl::PoolIds::TGT_QUAT, &tgtQuat); localDataPoolMap.emplace(acsctrl::PoolIds::ERROR_QUAT, &errQuat); localDataPoolMap.emplace(acsctrl::PoolIds::ERROR_ANG, &errAng); localDataPoolMap.emplace(acsctrl::PoolIds::TGT_ROT_RATE, &tgtRotRate); - poolManager.subscribeForRegularPeriodicPacket({ctrlValData.getSid(), false, 5.0}); + poolManager.subscribeForRegularPeriodicPacket({ctrlValData.getSid(), enableHkSets, 12.0}); // Actuator CMD localDataPoolMap.emplace(acsctrl::PoolIds::RW_TARGET_TORQUE, &rwTargetTorque); localDataPoolMap.emplace(acsctrl::PoolIds::RW_TARGET_SPEED, &rwTargetSpeed); localDataPoolMap.emplace(acsctrl::PoolIds::MTQ_TARGET_DIPOLE, &mtqTargetDipole); - poolManager.subscribeForRegularPeriodicPacket({actuatorCmdData.getSid(), false, 5.0}); + poolManager.subscribeForRegularPeriodicPacket({actuatorCmdData.getSid(), enableHkSets, 12.0}); return returnvalue::OK; } diff --git a/mission/controller/AcsController.h b/mission/controller/AcsController.h index 1215c1ea..0b28c9ee 100644 --- a/mission/controller/AcsController.h +++ b/mission/controller/AcsController.h @@ -28,7 +28,7 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes public: static constexpr dur_millis_t INIT_DELAY = 500; - AcsController(object_id_t objectId); + AcsController(object_id_t objectId, bool enableHkSets); MessageQueueId_t getCommandQueue() const; ReturnValue_t getParameter(uint8_t domainId, uint8_t parameterId, @@ -46,6 +46,8 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes static constexpr double RW_OFF_TORQUE[4] = {0.0, 0.0, 0.0, 0.0}; static constexpr int32_t RW_OFF_SPEED[4] = {0, 0, 0, 0}; + bool enableHkSets = false; + AcsParameters acsParameters; SensorProcessing sensorProcessing; Navigation navigation; diff --git a/mission/controller/ThermalController.cpp b/mission/controller/ThermalController.cpp index 3879339d..c44f77a6 100644 --- a/mission/controller/ThermalController.cpp +++ b/mission/controller/ThermalController.cpp @@ -196,14 +196,19 @@ ReturnValue_t ThermalController::initializeLocalDataPool(localpool::DataPool& lo localDataPoolMap.emplace(tcsCtrl::HEATER_SWITCH_LIST, &heaterSwitchStates); localDataPoolMap.emplace(tcsCtrl::HEATER_CURRENT, &heaterCurrent); + bool enableHkSets = false; +#if OBSW_ENABLE_PERIODIC_HK == 1 + enableHkSets = true; +#endif poolManager.subscribeForRegularPeriodicPacket( - subdp::RegularHkPeriodicParams(sensorTemperatures.getSid(), false, 10.0)); + subdp::RegularHkPeriodicParams(sensorTemperatures.getSid(), enableHkSets, 60.0)); poolManager.subscribeForRegularPeriodicPacket( - subdp::RegularHkPeriodicParams(susTemperatures.getSid(), false, 10.0)); + subdp::RegularHkPeriodicParams(susTemperatures.getSid(), enableHkSets, 60.0)); poolManager.subscribeForRegularPeriodicPacket( - subdp::RegularHkPeriodicParams(deviceTemperatures.getSid(), false, 10.0)); + subdp::RegularHkPeriodicParams(deviceTemperatures.getSid(), enableHkSets, 60.0)); poolManager.subscribeForDiagPeriodicPacket( - subdp::DiagnosticsHkPeriodicParams(heaterInfo.getSid(), false, 10.0)); + subdp::DiagnosticsHkPeriodicParams(heaterInfo.getSid(), enableHkSets, 30.0)); + return returnvalue::OK; } diff --git a/mission/devices/ACUHandler.cpp b/mission/devices/ACUHandler.cpp index 2a8ffe8b..de227fce 100644 --- a/mission/devices/ACUHandler.cpp +++ b/mission/devices/ACUHandler.cpp @@ -3,8 +3,8 @@ #include "OBSWConfig.h" ACUHandler::ACUHandler(object_id_t objectId, object_id_t comIF, CookieIF *comCookie, - FailureIsolationBase *customFdir) - : GomspaceDeviceHandler(objectId, comIF, comCookie, cfg, customFdir), + FailureIsolationBase *customFdir, bool enableHkSets) + : GomspaceDeviceHandler(objectId, comIF, comCookie, cfg, customFdir, enableHkSets), coreHk(this), auxHk(this) { cfg.maxConfigTableAddress = ACU::MAX_CONFIGTABLE_ADDRESS; @@ -149,9 +149,9 @@ ReturnValue_t ACUHandler::initializeLocalDataPool(localpool::DataPool &localData localDataPoolMap.emplace(pool::ACU_WDT_GND_LEFT, new PoolEntry({0})); poolManager.subscribeForDiagPeriodicPacket( - subdp::DiagnosticsHkPeriodicParams(coreHk.getSid(), false, 10.0)); + subdp::DiagnosticsHkPeriodicParams(coreHk.getSid(), enableHkSets, 20.0)); poolManager.subscribeForRegularPeriodicPacket( - subdp::RegularHkPeriodicParams(auxHk.getSid(), false, 30.0)); + subdp::RegularHkPeriodicParams(auxHk.getSid(), enableHkSets, 3000.0)); return returnvalue::OK; } diff --git a/mission/devices/ACUHandler.h b/mission/devices/ACUHandler.h index ef4feab0..0b4839c6 100644 --- a/mission/devices/ACUHandler.h +++ b/mission/devices/ACUHandler.h @@ -13,7 +13,7 @@ class ACUHandler : public GomspaceDeviceHandler { public: ACUHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie, - FailureIsolationBase* customFdir); + FailureIsolationBase* customFdir, bool enableHkSets); virtual ~ACUHandler(); void setDebugMode(bool enable); diff --git a/mission/devices/BpxBatteryHandler.cpp b/mission/devices/BpxBatteryHandler.cpp index b4bdc307..5dc04b17 100644 --- a/mission/devices/BpxBatteryHandler.cpp +++ b/mission/devices/BpxBatteryHandler.cpp @@ -2,8 +2,12 @@ #include -BpxBatteryHandler::BpxBatteryHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie) - : DeviceHandlerBase(objectId, comIF, comCookie), hkSet(this), cfgSet(this) {} +BpxBatteryHandler::BpxBatteryHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie, + bool enableHkSets) + : DeviceHandlerBase(objectId, comIF, comCookie), + enableHkSets(enableHkSets), + hkSet(this), + cfgSet(this) {} BpxBatteryHandler::~BpxBatteryHandler() {} @@ -268,8 +272,9 @@ ReturnValue_t BpxBatteryHandler::initializeLocalDataPool(localpool::DataPool& lo localDataPoolMap.emplace(BpxBattery::BATTERY_HEATER_MODE, &battheatMode); localDataPoolMap.emplace(BpxBattery::BATTHEAT_LOW_LIMIT, &battheatLow); localDataPoolMap.emplace(BpxBattery::BATTHEAT_HIGH_LIMIT, &battheatHigh); + poolManager.subscribeForRegularPeriodicPacket( - subdp::RegularHkPeriodicParams(hkSet.getSid(), false, 30.0)); + subdp::RegularHkPeriodicParams(hkSet.getSid(), enableHkSets, 20.0)); poolManager.subscribeForRegularPeriodicPacket( subdp::RegularHkPeriodicParams(cfgSet.getSid(), false, 30.0)); return returnvalue::OK; diff --git a/mission/devices/BpxBatteryHandler.h b/mission/devices/BpxBatteryHandler.h index c42ed7fd..368c1636 100644 --- a/mission/devices/BpxBatteryHandler.h +++ b/mission/devices/BpxBatteryHandler.h @@ -8,7 +8,8 @@ class BpxBatteryHandler : public DeviceHandlerBase { public: - BpxBatteryHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie); + BpxBatteryHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie, + bool enableHkSets); virtual ~BpxBatteryHandler(); void setToGoToNormalMode(bool enable); @@ -20,6 +21,7 @@ class BpxBatteryHandler : public DeviceHandlerBase { IDLE = 1, }; + bool enableHkSets = false; States state = States::CHECK_COM; bool commandExecuted = false; bool debugMode = false; diff --git a/mission/devices/GomspaceDeviceHandler.cpp b/mission/devices/GomspaceDeviceHandler.cpp index 389b08c7..ad778cd9 100644 --- a/mission/devices/GomspaceDeviceHandler.cpp +++ b/mission/devices/GomspaceDeviceHandler.cpp @@ -13,8 +13,10 @@ using namespace GOMSPACE; GomspaceDeviceHandler::GomspaceDeviceHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie, TableConfig& tableConfig, - FailureIsolationBase* customFdir) - : DeviceHandlerBase(objectId, comIF, comCookie, customFdir), tableCfg(tableConfig) { + FailureIsolationBase* customFdir, bool enableHkSets) + : DeviceHandlerBase(objectId, comIF, comCookie, customFdir), + enableHkSets(enableHkSets), + tableCfg(tableConfig) { if (comCookie == nullptr) { sif::error << "GomspaceDeviceHandler::GomspaceDeviceHandler: Invalid com cookie" << std::endl; } diff --git a/mission/devices/GomspaceDeviceHandler.h b/mission/devices/GomspaceDeviceHandler.h index af9d3411..fd145175 100644 --- a/mission/devices/GomspaceDeviceHandler.h +++ b/mission/devices/GomspaceDeviceHandler.h @@ -45,7 +45,8 @@ class GomspaceDeviceHandler : public DeviceHandlerBase { * device. */ GomspaceDeviceHandler(object_id_t objectId, object_id_t comIF, CookieIF *comCookie, - TableConfig &tableConfig, FailureIsolationBase *customFdir); + TableConfig &tableConfig, FailureIsolationBase *customFdir, + bool enableHkSets); virtual ~GomspaceDeviceHandler(); /** @@ -59,6 +60,7 @@ class GomspaceDeviceHandler : public DeviceHandlerBase { static const uint8_t PARAM_SET_OK = 1; static const uint8_t PING_REPLY_SIZE = 2; + bool enableHkSets = false; uint8_t rememberRequestedSize = 0; uint8_t rememberCommandId = GOMSPACE::NONE; uint8_t cspPacket[MAX_PACKET_LEN]; diff --git a/mission/devices/P60DockHandler.cpp b/mission/devices/P60DockHandler.cpp index 8c768847..d5610303 100644 --- a/mission/devices/P60DockHandler.cpp +++ b/mission/devices/P60DockHandler.cpp @@ -5,8 +5,8 @@ #include "OBSWConfig.h" P60DockHandler::P60DockHandler(object_id_t objectId, object_id_t comIF, CookieIF *comCookie, - FailureIsolationBase *customFdir) - : GomspaceDeviceHandler(objectId, comIF, comCookie, cfg, customFdir), + FailureIsolationBase *customFdir, bool enableHkSets) + : GomspaceDeviceHandler(objectId, comIF, comCookie, cfg, customFdir, enableHkSets), coreHk(this), auxHk(this) { cfg.maxConfigTableAddress = P60Dock::MAX_CONFIGTABLE_ADDRESS; @@ -167,9 +167,9 @@ ReturnValue_t P60DockHandler::initializeLocalDataPool(localpool::DataPool &local localDataPoolMap.emplace(pool::P60DOCK_ANT6_DEPL, new PoolEntry({0})); localDataPoolMap.emplace(pool::P60DOCK_AR6_DEPL, new PoolEntry({0})); poolManager.subscribeForDiagPeriodicPacket( - subdp::DiagnosticsHkPeriodicParams(coreHk.getSid(), false, 10.0)); + subdp::DiagnosticsHkPeriodicParams(coreHk.getSid(), enableHkSets, 20.0)); poolManager.subscribeForRegularPeriodicPacket( - subdp::RegularHkPeriodicParams(auxHk.getSid(), false, 30.0)); + subdp::RegularHkPeriodicParams(auxHk.getSid(), enableHkSets, 3000.0)); return returnvalue::OK; } diff --git a/mission/devices/P60DockHandler.h b/mission/devices/P60DockHandler.h index b91907a8..c01c0231 100644 --- a/mission/devices/P60DockHandler.h +++ b/mission/devices/P60DockHandler.h @@ -22,7 +22,7 @@ class P60DockHandler : public GomspaceDeviceHandler { static constexpr Event BATT_MODE_CHANGED = event::makeEvent(SUBSYSTEM_ID, 2, severity::MEDIUM); P60DockHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie, - FailureIsolationBase* customFdir); + FailureIsolationBase* customFdir, bool enableHkSets); virtual ~P60DockHandler(); void setDebugMode(bool enable); diff --git a/mission/devices/Pdu1Handler.cpp b/mission/devices/Pdu1Handler.cpp index 25f14c76..81071f3a 100644 --- a/mission/devices/Pdu1Handler.cpp +++ b/mission/devices/Pdu1Handler.cpp @@ -5,8 +5,8 @@ #include "devices/powerSwitcherList.h" Pdu1Handler::Pdu1Handler(object_id_t objectId, object_id_t comIF, CookieIF *comCookie, - FailureIsolationBase *customFdir) - : GomspaceDeviceHandler(objectId, comIF, comCookie, cfg, customFdir), + FailureIsolationBase *customFdir, bool enableHkSets) + : GomspaceDeviceHandler(objectId, comIF, comCookie, cfg, customFdir, enableHkSets), coreHk(this), auxHk(this) { initPduConfigTable(); @@ -90,9 +90,9 @@ ReturnValue_t Pdu1Handler::initializeLocalDataPool(localpool::DataPool &localDat LocalDataPoolManager &poolManager) { initializePduPool(localDataPoolMap, poolManager, pcdu::INIT_SWITCHES_PDU1); poolManager.subscribeForDiagPeriodicPacket( - subdp::DiagnosticsHkPeriodicParams(coreHk.getSid(), false, 10.0)); + subdp::DiagnosticsHkPeriodicParams(coreHk.getSid(), enableHkSets, 20.0)); poolManager.subscribeForRegularPeriodicPacket( - subdp::RegularHkPeriodicParams(auxHk.getSid(), false, 30.0)); + subdp::RegularHkPeriodicParams(auxHk.getSid(), enableHkSets, 3000.0)); return returnvalue::OK; } diff --git a/mission/devices/Pdu1Handler.h b/mission/devices/Pdu1Handler.h index b81f647e..ecc7a43a 100644 --- a/mission/devices/Pdu1Handler.h +++ b/mission/devices/Pdu1Handler.h @@ -22,7 +22,7 @@ class Pdu1Handler : public GomspaceDeviceHandler { public: Pdu1Handler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie, - FailureIsolationBase* customFdir); + FailureIsolationBase* customFdir, bool enableHkSets); virtual ~Pdu1Handler(); virtual ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap, diff --git a/mission/devices/Pdu2Handler.cpp b/mission/devices/Pdu2Handler.cpp index 363c5f51..7dc9e3ac 100644 --- a/mission/devices/Pdu2Handler.cpp +++ b/mission/devices/Pdu2Handler.cpp @@ -5,8 +5,8 @@ #include "devices/powerSwitcherList.h" Pdu2Handler::Pdu2Handler(object_id_t objectId, object_id_t comIF, CookieIF *comCookie, - FailureIsolationBase *customFdir) - : GomspaceDeviceHandler(objectId, comIF, comCookie, cfg, customFdir), + FailureIsolationBase *customFdir, bool enableHkSets) + : GomspaceDeviceHandler(objectId, comIF, comCookie, cfg, customFdir, enableHkSets), coreHk(this), auxHk(this) { initPduConfigTable(); @@ -49,9 +49,9 @@ ReturnValue_t Pdu2Handler::initializeLocalDataPool(localpool::DataPool &localDat LocalDataPoolManager &poolManager) { initializePduPool(localDataPoolMap, poolManager, pcdu::INIT_SWITCHES_PDU2); poolManager.subscribeForDiagPeriodicPacket( - subdp::DiagnosticsHkPeriodicParams(coreHk.getSid(), false, 10.0)); + subdp::DiagnosticsHkPeriodicParams(coreHk.getSid(), enableHkSets, 10.0)); poolManager.subscribeForRegularPeriodicPacket( - subdp::RegularHkPeriodicParams(auxHk.getSid(), false, 30.0)); + subdp::RegularHkPeriodicParams(auxHk.getSid(), enableHkSets, 30.0)); return returnvalue::OK; } diff --git a/mission/devices/Pdu2Handler.h b/mission/devices/Pdu2Handler.h index acb229dc..655f2fe4 100644 --- a/mission/devices/Pdu2Handler.h +++ b/mission/devices/Pdu2Handler.h @@ -22,7 +22,7 @@ class Pdu2Handler : public GomspaceDeviceHandler { public: Pdu2Handler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie, - FailureIsolationBase* customFdir); + FailureIsolationBase* customFdir, bool enableHkSets); virtual ~Pdu2Handler(); virtual ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap, From b469455b9be3e45ad00d3e43e2afcebf6ed6fcbb Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Sun, 26 Mar 2023 20:01:32 +0200 Subject: [PATCH 2/4] bump tmtc --- tmtc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmtc b/tmtc index 3d25a30a..4b5c4fec 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 3d25a30a112f8d75c54368c462c17e1fbafc7690 +Subproject commit 4b5c4fecc722111dff3a0e7475514fa259aa7bed From 19723e88d33207196ac454457244783777ef3dc8 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Sun, 26 Mar 2023 20:05:24 +0200 Subject: [PATCH 3/4] configurable HK service queue depth --- common/config/eive/definitions.h | 1 + fsfw | 2 +- mission/genericFactory.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/common/config/eive/definitions.h b/common/config/eive/definitions.h index 74208e25..50a70911 100644 --- a/common/config/eive/definitions.h +++ b/common/config/eive/definitions.h @@ -55,6 +55,7 @@ static constexpr uint32_t CFDP_STORE_QUEUE_SIZE = 300; static constexpr uint32_t MAX_PUS_FUNNEL_QUEUE_DEPTH = 100; static constexpr uint32_t MAX_CFDP_FUNNEL_QUEUE_DEPTH = 80; +static constexpr uint32_t HK_SERVICE_QUEUE_DEPTH = 60; static constexpr uint32_t MAX_STORED_CMDS_UDP = 150; static constexpr uint32_t MAX_STORED_CMDS_TCP = 180; diff --git a/fsfw b/fsfw index b814e719..b31e1037 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit b814e7198f720cad0fb063f54644d5dbc92c165c +Subproject commit b31e1037fb3d436e6a7f213050af8f64d194a85d diff --git a/mission/genericFactory.cpp b/mission/genericFactory.cpp index 46a14daf..f93e4df6 100644 --- a/mission/genericFactory.cpp +++ b/mission/genericFactory.cpp @@ -234,7 +234,7 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun new Service2DeviceAccess(objects::PUS_SERVICE_2_DEVICE_ACCESS, config::EIVE_PUS_APID, pus::PUS_SERVICE_2, 3, 10); new Service3Housekeeping(objects::PUS_SERVICE_3_HOUSEKEEPING, config::EIVE_PUS_APID, - pus::PUS_SERVICE_3); + pus::PUS_SERVICE_3, config::HK_SERVICE_QUEUE_DEPTH); new Service5EventReporting( PsbParams(objects::PUS_SERVICE_5_EVENT_REPORTING, config::EIVE_PUS_APID, pus::PUS_SERVICE_5), 40, 120); From efa3c11c7ab7e237056eb93ecd44a3ae61bb205c Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Sun, 26 Mar 2023 20:10:03 +0200 Subject: [PATCH 4/4] bump tmtc again --- tmtc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmtc b/tmtc index 4b5c4fec..f6fcb2fb 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 4b5c4fecc722111dff3a0e7475514fa259aa7bed +Subproject commit f6fcb2fb282d79b1e250722eba46a319603b0232