From ca1e8f3dc1fffca3802732fea7131dd68b3ea302 Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Fri, 1 Apr 2022 09:20:35 +0200 Subject: [PATCH] syrlinks fault flag --- bsp_q7s/boardconfig/busConf.h | 1 + mission/devices/SyrlinksFaultFlagMonitoring.cpp | 16 ++++++++++++++++ mission/devices/SyrlinksFaultFlagMonitoring.h | 17 +++++++++++++++++ mission/devices/SyrlinksHkHandler.cpp | 9 +++++++-- mission/devices/SyrlinksHkHandler.h | 7 ++++++- 5 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 mission/devices/SyrlinksFaultFlagMonitoring.cpp create mode 100644 mission/devices/SyrlinksFaultFlagMonitoring.h diff --git a/bsp_q7s/boardconfig/busConf.h b/bsp_q7s/boardconfig/busConf.h index 5c52693c..bc6efd7a 100644 --- a/bsp_q7s/boardconfig/busConf.h +++ b/bsp_q7s/boardconfig/busConf.h @@ -84,6 +84,7 @@ static constexpr char RS485_EN_TX_DATA[] = "tx_data_enable_ltc2872"; static constexpr char RS485_EN_RX_CLOCK[] = "rx_clock_enable_ltc2872"; static constexpr char RS485_EN_RX_DATA[] = "rx_data_enable_ltc2872"; static constexpr char PDEC_RESET[] = "pdec_reset"; +static constexpr char SYRLINKS_FAULT[] = "syrlinks_fault"; static constexpr char PL_PCDU_ENABLE_VBAT0[] = "enable_plpcdu_vbat0"; static constexpr char PL_PCDU_ENABLE_VBAT1[] = "enable_plpcdu_vbat1"; diff --git a/mission/devices/SyrlinksFaultFlagMonitoring.cpp b/mission/devices/SyrlinksFaultFlagMonitoring.cpp new file mode 100644 index 00000000..f999a47c --- /dev/null +++ b/mission/devices/SyrlinksFaultFlagMonitoring.cpp @@ -0,0 +1,16 @@ +/* + * SyrlinksFaultFlagMonitoring.cpp + * + * Created on: 01.04.2022 + * Author: jakob + */ + +#include "SyrlinksFaultFlagMonitoring.h" + +SyrlinksFaultFlagMonitoring::SyrlinksFaultFlagMonitoring() { + // TODO Auto-generated constructor stub +} + +SyrlinksFaultFlagMonitoring::~SyrlinksFaultFlagMonitoring() { + // TODO Auto-generated destructor stub +} diff --git a/mission/devices/SyrlinksFaultFlagMonitoring.h b/mission/devices/SyrlinksFaultFlagMonitoring.h new file mode 100644 index 00000000..09869c44 --- /dev/null +++ b/mission/devices/SyrlinksFaultFlagMonitoring.h @@ -0,0 +1,17 @@ +/* + * SyrlinksFaultFlagMonitoring.h + * + * Created on: 01.04.2022 + * Author: jakob + */ + +#ifndef MISSION_DEVICES_SYRLINKSFAULTFLAGMONITORING_H_ +#define MISSION_DEVICES_SYRLINKSFAULTFLAGMONITORING_H_ + +class SyrlinksFaultFlagMonitoring : public ExecutableObjectIF { + public: + SyrlinksFaultFlagMonitoring(); + virtual ~SyrlinksFaultFlagMonitoring(); +}; + +#endif /* MISSION_DEVICES_SYRLINKSFAULTFLAGMONITORING_H_ */ diff --git a/mission/devices/SyrlinksHkHandler.cpp b/mission/devices/SyrlinksHkHandler.cpp index 4ee7ec5c..e8680a74 100644 --- a/mission/devices/SyrlinksHkHandler.cpp +++ b/mission/devices/SyrlinksHkHandler.cpp @@ -5,12 +5,13 @@ #include "OBSWConfig.h" SyrlinksHkHandler::SyrlinksHkHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie, - power::Switch_t powerSwitch) + power::Switch_t powerSwitch, Gpio fault) : DeviceHandlerBase(objectId, comIF, comCookie), rxDataset(this), txDataset(this), temperatureSet(this), - powerSwitch(powerSwitch) { + powerSwitch(powerSwitch), + fault(fault){ if (comCookie == NULL) { sif::warning << "SyrlinksHkHandler: Invalid com cookie" << std::endl; } @@ -442,6 +443,10 @@ LocalPoolDataSetBase* SyrlinksHkHandler::getDataSetHandle(sid_t sid) { } } +void SyrlinksHkHandler::performOperationHook() { + +} + std::string SyrlinksHkHandler::convertUint16ToHexString(uint16_t intValue) { std::stringstream stream; stream << std::setfill('0') << std::setw(4) << std::hex << std::uppercase << intValue; diff --git a/mission/devices/SyrlinksHkHandler.h b/mission/devices/SyrlinksHkHandler.h index b330f151..9b8ac2c9 100644 --- a/mission/devices/SyrlinksHkHandler.h +++ b/mission/devices/SyrlinksHkHandler.h @@ -4,6 +4,8 @@ #include "devices/powerSwitcherList.h" #include "fsfw/devicehandlers/DeviceHandlerBase.h" #include "mission/devices/devicedefinitions/SyrlinksDefinitions.h" +#include "fsfw_hal/linux/gpio/Gpio.h" +#include "fsfw/timemanager/Countdown.h" #include /** @@ -17,7 +19,7 @@ class SyrlinksHkHandler : public DeviceHandlerBase { public: SyrlinksHkHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie, - power::Switch_t powerSwitch); + power::Switch_t powerSwitch, Gpio fault); virtual ~SyrlinksHkHandler(); /** @@ -42,6 +44,7 @@ class SyrlinksHkHandler : public DeviceHandlerBase { ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap, LocalDataPoolManager& poolManager) override; LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override; + void performOperationHook(); private: static const uint8_t INTERFACE_ID = CLASS_ID::SYRLINKS_HANDLER; @@ -88,6 +91,8 @@ class SyrlinksHkHandler : public DeviceHandlerBase { const power::Switch_t powerSwitch = power::NO_SWITCH; + Gpio fault; + uint8_t agcValueHighByte = 0; uint16_t rawTempPowerAmplifier = 0; uint16_t rawTempBasebandBoard = 0;