From 49524abeb74f49e2cc7916f55142f6429721e14d Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 25 Nov 2022 10:27:31 +0100 Subject: [PATCH] create temp sens dummies --- common/config/eive/objects.h | 1 - dummies/Max31865Dummy.cpp | 1 + dummies/Max31865Dummy.h | 1 + dummies/helpers.cpp | 25 ++++++++++++++++++++++++- 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/common/config/eive/objects.h b/common/config/eive/objects.h index a8911347..01aa1cf1 100644 --- a/common/config/eive/objects.h +++ b/common/config/eive/objects.h @@ -48,7 +48,6 @@ enum commonObjects : uint32_t { TMP1075_HANDLER_PLPCDU_0 = 0x44420006, TMP1075_HANDLER_PLPCDU_1 = 0x44420007, TMP1075_HANDLER_IF_BOARD = 0x44420008, - TMP1075_HANDLER_OBC_IF_BOARD = 0x44420009, PCDU_HANDLER = 0x442000A1, P60DOCK_HANDLER = 0x44250000, PDU1_HANDLER = 0x44250001, diff --git a/dummies/Max31865Dummy.cpp b/dummies/Max31865Dummy.cpp index 85120650..c86210e7 100644 --- a/dummies/Max31865Dummy.cpp +++ b/dummies/Max31865Dummy.cpp @@ -35,3 +35,4 @@ ReturnValue_t Max31865Dummy::initializeLocalDataPool(localpool::DataPool &localD return DeviceHandlerBase::initializeLocalDataPool(localDataPoolMap, poolManager); } LocalPoolDataSetBase *Max31865Dummy::getDataSetHandle(sid_t sid) { return &set; } +Max31865Dummy::Max31865Dummy(object_id_t objectId, CookieIF* cookie): DeviceHandlerBase(objectId, objects::DUMMY_COM_IF, cookie), set(this, EiveMax31855::EXCHANGE_SET_ID) {} diff --git a/dummies/Max31865Dummy.h b/dummies/Max31865Dummy.h index e8fce23b..70ba3c03 100644 --- a/dummies/Max31865Dummy.h +++ b/dummies/Max31865Dummy.h @@ -7,6 +7,7 @@ class Max31865Dummy : public DeviceHandlerBase { public: Max31865Dummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie); + Max31865Dummy(object_id_t objectId, CookieIF* comCookie); private: MAX31865::PrimarySet set; diff --git a/dummies/helpers.cpp b/dummies/helpers.cpp index 9d449699..50eacec5 100644 --- a/dummies/helpers.cpp +++ b/dummies/helpers.cpp @@ -18,6 +18,8 @@ #include #include #include +#include "dummies/Tmp1075Dummy.h" +#include "dummies/Max31865Dummy.h" #include #include "TemperatureSensorInserter.h" @@ -26,7 +28,7 @@ using namespace dummy; void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitch) { new ComIFDummy(objects::DUMMY_COM_IF); - ComCookieDummy* comCookieDummy = new ComCookieDummy(); + auto* comCookieDummy = new ComCookieDummy(); new BpxDummy(objects::BPX_BATT_HANDLER, objects::DUMMY_COM_IF, comCookieDummy); if (cfg.addCoreCtrlCfg) { new CoreControllerDummy(objects::CORE_CONTROLLER); @@ -67,6 +69,27 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitch) { } if (cfg.addTempSensorDummies) { + new Max31865Dummy(objects::RTD_0_IC3_PLOC_HEATSPREADER, objects::DUMMY_COM_IF, comCookieDummy); + new Max31865Dummy(objects::RTD_1_IC4_PLOC_MISSIONBOARD, objects::DUMMY_COM_IF, comCookieDummy); + new Max31865Dummy(objects::RTD_2_IC5_4K_CAMERA, objects::DUMMY_COM_IF, comCookieDummy); + new Max31865Dummy(objects::RTD_3_IC6_DAC_HEATSPREADER, objects::DUMMY_COM_IF, comCookieDummy); + new Max31865Dummy(objects::RTD_4_IC7_STARTRACKER, objects::DUMMY_COM_IF, comCookieDummy); + new Max31865Dummy(objects::RTD_5_IC8_RW1_MX_MY, objects::DUMMY_COM_IF, comCookieDummy); + new Max31865Dummy(objects::RTD_6_IC9_DRO, objects::DUMMY_COM_IF, comCookieDummy); + new Max31865Dummy(objects::RTD_7_IC10_SCEX, objects::DUMMY_COM_IF, comCookieDummy); + new Max31865Dummy(objects::RTD_8_IC11_X8, objects::DUMMY_COM_IF, comCookieDummy); + new Max31865Dummy(objects::RTD_9_IC12_HPA, objects::DUMMY_COM_IF, comCookieDummy); + new Max31865Dummy(objects::RTD_10_IC13_PL_TX, objects::DUMMY_COM_IF, comCookieDummy); + new Max31865Dummy(objects::RTD_11_IC14_MPA, objects::DUMMY_COM_IF, comCookieDummy); + new Max31865Dummy(objects::RTD_12_IC15_ACU, objects::DUMMY_COM_IF, comCookieDummy); + new Max31865Dummy(objects::RTD_13_IC16_PLPCDU_HEATSPREADER, objects::DUMMY_COM_IF, comCookieDummy); + new Max31865Dummy(objects::RTD_14_IC17_TCS_BOARD, objects::DUMMY_COM_IF, comCookieDummy); + new Max31865Dummy(objects::RTD_15_IC18_IMTQ, objects::DUMMY_COM_IF, comCookieDummy); + new Tmp1075Dummy(objects::TMP1075_HANDLER_TCS_0, objects::DUMMY_COM_IF, comCookieDummy); + new Tmp1075Dummy(objects::TMP1075_HANDLER_TCS_1, objects::DUMMY_COM_IF, comCookieDummy); + new Tmp1075Dummy(objects::TMP1075_HANDLER_PLPCDU_0, objects::DUMMY_COM_IF, comCookieDummy); + new Tmp1075Dummy(objects::TMP1075_HANDLER_PLPCDU_1, objects::DUMMY_COM_IF, comCookieDummy); + new Tmp1075Dummy(objects::TMP1075_HANDLER_IF_BOARD, objects::DUMMY_COM_IF, comCookieDummy); new TemperatureSensorInserter(objects::THERMAL_TEMP_INSERTER); } new CamSwitcher(objects::CAM_SWITCHER, pwrSwitch, power::NO_SWITCH);