tempSensorDummies map
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit

This commit is contained in:
Irini Kosmidou 2023-01-21 16:51:32 +01:00
parent 4b396884c6
commit fdcd8e2800
5 changed files with 88 additions and 35 deletions

View File

@ -36,7 +36,7 @@ ReturnValue_t Max31865Dummy::initializeLocalDataPool(localpool::DataPool &localD
} }
void Max31865Dummy::setTemperature(float temperature) { void Max31865Dummy::setTemperature(float temperature) {
set.temperatureCelcius.value = temperature; set.temperatureCelcius.value = temperature;
} }
LocalPoolDataSetBase *Max31865Dummy::getDataSetHandle(sid_t sid) { return &set; } LocalPoolDataSetBase *Max31865Dummy::getDataSetHandle(sid_t sid) { return &set; }

View File

@ -10,6 +10,7 @@ class Max31865Dummy : public DeviceHandlerBase {
Max31865Dummy(object_id_t objectId, CookieIF *comCookie); Max31865Dummy(object_id_t objectId, CookieIF *comCookie);
void setTemperature(float temperature); void setTemperature(float temperature);
private: private:
MAX31865::PrimarySet set; MAX31865::PrimarySet set;

View File

@ -5,14 +5,17 @@
#include <cmath> #include <cmath>
#include <cstdlib> #include <cstdlib>
TemperatureSensorInserter::TemperatureSensorInserter(object_id_t objectId) TemperatureSensorInserter::TemperatureSensorInserter(
: SystemObject(objects::THERMAL_TEMP_INSERTER) {} object_id_t objectId, std::map<object_id_t, Max31865Dummy> tempSensorDummies_,
std::map<object_id_t, Tmp1075Dummy> tempTmpSensorDummies_)
: SystemObject(objects::THERMAL_TEMP_INSERTER),
tempSensorDummies(tempSensorDummies_),
tempTmpSensorDummies(tempTmpSensorDummies_) {}
ReturnValue_t TemperatureSensorInserter::initialize() { ReturnValue_t TemperatureSensorInserter::initialize() {
if (performTest) { if (performTest) {
if(testCase == TestCase::OVERCOOL_SYRLINKS) { if (testCase == TestCase::OVERCOOL_SYRLINKS) {
}
}
} }
return returnvalue::OK; return returnvalue::OK;
} }

View File

@ -3,9 +3,14 @@
#include <fsfw/controller/ExtendedControllerBase.h> #include <fsfw/controller/ExtendedControllerBase.h>
#include <mission/devices/devicedefinitions/Max31865Definitions.h> #include <mission/devices/devicedefinitions/Max31865Definitions.h>
#include "Max31865Dummy.h"
#include "Tmp1075Dummy.h"
class TemperatureSensorInserter : public ExecutableObjectIF, public SystemObject { class TemperatureSensorInserter : public ExecutableObjectIF, public SystemObject {
public: public:
explicit TemperatureSensorInserter(object_id_t objectId); explicit TemperatureSensorInserter(object_id_t objectId,
std::map<object_id_t, Max31865Dummy> tempSensorDummies_,
std::map<object_id_t, Tmp1075Dummy> tempTmpSensorDummies_);
ReturnValue_t initialize() override; ReturnValue_t initialize() override;
@ -13,13 +18,14 @@ class TemperatureSensorInserter : public ExecutableObjectIF, public SystemObject
ReturnValue_t performOperation(uint8_t opCode) override; ReturnValue_t performOperation(uint8_t opCode) override;
private: private:
enum TestCase { OVERCOOL_SYRLINKS = 0 };
enum TestCase {
OVERCOOL_SYRLINKS = 0
};
int iteration = 0; int iteration = 0;
bool performTest = false; bool performTest = false;
float value = 0; float value = 0;
TestCase testCase; TestCase testCase;
std::map<object_id_t, Max31865Dummy> tempSensorDummies;
std::map<object_id_t, Tmp1075Dummy> tempTmpSensorDummies;
// void noise(); // void noise();
}; };

View File

@ -82,32 +82,75 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitch) {
} }
if (cfg.addTempSensorDummies) { if (cfg.addTempSensorDummies) {
std::map<object_id_t, Max31865Dummy> tempSensorDummies; std::map<object_id_t, Max31865Dummy> tempSensorDummies;
tempSensorDummies.emplace(objects::RTD_0_IC3_PLOC_HEATSPREADER, new Max31865Dummy(objects::RTD_0_IC3_PLOC_HEATSPREADER, objects::DUMMY_COM_IF, comCookieDummy)); tempSensorDummies.emplace(objects::RTD_0_IC3_PLOC_HEATSPREADER,
new Max31865Dummy(objects::RTD_1_IC4_PLOC_MISSIONBOARD, objects::DUMMY_COM_IF, comCookieDummy); new Max31865Dummy(objects::RTD_0_IC3_PLOC_HEATSPREADER,
new Max31865Dummy(objects::RTD_2_IC5_4K_CAMERA, objects::DUMMY_COM_IF, comCookieDummy); objects::DUMMY_COM_IF, comCookieDummy));
new Max31865Dummy(objects::RTD_3_IC6_DAC_HEATSPREADER, objects::DUMMY_COM_IF, comCookieDummy); tempSensorDummies.emplace(objects::RTD_1_IC4_PLOC_MISSIONBOARD,
new Max31865Dummy(objects::RTD_4_IC7_STARTRACKER, objects::DUMMY_COM_IF, comCookieDummy); new Max31865Dummy(objects::RTD_1_IC4_PLOC_MISSIONBOARD,
new Max31865Dummy(objects::RTD_5_IC8_RW1_MX_MY, objects::DUMMY_COM_IF, comCookieDummy); objects::DUMMY_COM_IF, comCookieDummy));
new Max31865Dummy(objects::RTD_6_IC9_DRO, objects::DUMMY_COM_IF, comCookieDummy); tempSensorDummies.emplace(
new Max31865Dummy(objects::RTD_7_IC10_SCEX, objects::DUMMY_COM_IF, comCookieDummy); objects::RTD_2_IC5_4K_CAMERA,
new Max31865Dummy(objects::RTD_8_IC11_X8, objects::DUMMY_COM_IF, comCookieDummy); new Max31865Dummy(objects::RTD_2_IC5_4K_CAMERA, objects::DUMMY_COM_IF, comCookieDummy));
new Max31865Dummy(objects::RTD_9_IC12_HPA, objects::DUMMY_COM_IF, comCookieDummy); tempSensorDummies.emplace(objects::RTD_3_IC6_DAC_HEATSPREADER,
new Max31865Dummy(objects::RTD_10_IC13_PL_TX, objects::DUMMY_COM_IF, comCookieDummy); new Max31865Dummy(objects::RTD_3_IC6_DAC_HEATSPREADER,
new Max31865Dummy(objects::RTD_11_IC14_MPA, objects::DUMMY_COM_IF, comCookieDummy); objects::DUMMY_COM_IF, comCookieDummy));
new Max31865Dummy(objects::RTD_12_IC15_ACU, objects::DUMMY_COM_IF, comCookieDummy); tempSensorDummies.emplace(
new Max31865Dummy(objects::RTD_13_IC16_PLPCDU_HEATSPREADER, objects::DUMMY_COM_IF, objects::RTD_4_IC7_STARTRACKER,
comCookieDummy); new Max31865Dummy(objects::RTD_4_IC7_STARTRACKER, objects::DUMMY_COM_IF, comCookieDummy));
new Max31865Dummy(objects::RTD_14_IC17_TCS_BOARD, objects::DUMMY_COM_IF, comCookieDummy); tempSensorDummies.emplace(
new Max31865Dummy(objects::RTD_15_IC18_IMTQ, objects::DUMMY_COM_IF, comCookieDummy); objects::RTD_5_IC8_RW1_MX_MY,
new Tmp1075Dummy(objects::TMP1075_HANDLER_TCS_0, objects::DUMMY_COM_IF, comCookieDummy); new Max31865Dummy(objects::RTD_5_IC8_RW1_MX_MY, objects::DUMMY_COM_IF, comCookieDummy));
new Tmp1075Dummy(objects::TMP1075_HANDLER_TCS_1, objects::DUMMY_COM_IF, comCookieDummy); tempSensorDummies.emplace(
new Tmp1075Dummy(objects::TMP1075_HANDLER_PLPCDU_0, objects::DUMMY_COM_IF, comCookieDummy); objects::RTD_6_IC9_DRO,
new Tmp1075Dummy(objects::TMP1075_HANDLER_PLPCDU_1, objects::DUMMY_COM_IF, comCookieDummy); new Max31865Dummy(objects::RTD_6_IC9_DRO, objects::DUMMY_COM_IF, comCookieDummy));
new Tmp1075Dummy(objects::TMP1075_HANDLER_IF_BOARD, objects::DUMMY_COM_IF, comCookieDummy); tempSensorDummies.emplace(
objects::RTD_7_IC10_SCEX,
new Max31865Dummy(objects::RTD_7_IC10_SCEX, objects::DUMMY_COM_IF, comCookieDummy));
tempSensorDummies.emplace(
objects::RTD_8_IC11_X8,
new Max31865Dummy(objects::RTD_8_IC11_X8, objects::DUMMY_COM_IF, comCookieDummy));
tempSensorDummies.emplace(
objects::RTD_9_IC12_HPA,
new Max31865Dummy(objects::RTD_9_IC12_HPA, objects::DUMMY_COM_IF, comCookieDummy));
tempSensorDummies.emplace(
objects::RTD_10_IC13_PL_TX,
new Max31865Dummy(objects::RTD_10_IC13_PL_TX, objects::DUMMY_COM_IF, comCookieDummy));
tempSensorDummies.emplace(
objects::RTD_11_IC14_MPA,
new Max31865Dummy(objects::RTD_11_IC14_MPA, objects::DUMMY_COM_IF, comCookieDummy));
tempSensorDummies.emplace(
objects::RTD_12_IC15_ACU,
new Max31865Dummy(objects::RTD_12_IC15_ACU, objects::DUMMY_COM_IF, comCookieDummy));
tempSensorDummies.emplace(objects::RTD_13_IC16_PLPCDU_HEATSPREADER,
new Max31865Dummy(objects::RTD_13_IC16_PLPCDU_HEATSPREADER,
objects::DUMMY_COM_IF, comCookieDummy));
tempSensorDummies.emplace(
objects::RTD_14_IC17_TCS_BOARD,
new Max31865Dummy(objects::RTD_14_IC17_TCS_BOARD, objects::DUMMY_COM_IF, comCookieDummy));
tempSensorDummies.emplace(
objects::RTD_15_IC18_IMTQ,
new Max31865Dummy(objects::RTD_15_IC18_IMTQ, objects::DUMMY_COM_IF, comCookieDummy));
new TemperatureSensorInserter(objects::THERMAL_TEMP_INSERTER); std::map<object_id_t, Tmp1075Dummy> tempTmpSensorDummies;
tempTmpSensorDummies.emplace(
objects::TMP1075_HANDLER_TCS_0,
new Tmp1075Dummy(objects::TMP1075_HANDLER_TCS_0, objects::DUMMY_COM_IF, comCookieDummy));
tempTmpSensorDummies.emplace(
objects::TMP1075_HANDLER_TCS_1,
new Tmp1075Dummy(objects::TMP1075_HANDLER_TCS_1, objects::DUMMY_COM_IF, comCookieDummy));
tempTmpSensorDummies.emplace(
objects::TMP1075_HANDLER_PLPCDU_0,
new Tmp1075Dummy(objects::TMP1075_HANDLER_PLPCDU_0, objects::DUMMY_COM_IF, comCookieDummy));
tempTmpSensorDummies.emplace(
objects::TMP1075_HANDLER_PLPCDU_1,
new Tmp1075Dummy(objects::TMP1075_HANDLER_PLPCDU_1, objects::DUMMY_COM_IF, comCookieDummy));
tempTmpSensorDummies.emplace(
objects::TMP1075_HANDLER_IF_BOARD,
new Tmp1075Dummy(objects::TMP1075_HANDLER_IF_BOARD, objects::DUMMY_COM_IF, comCookieDummy));
new TemperatureSensorInserter(objects::THERMAL_TEMP_INSERTER, tempSensorDummies,
tempTmpSensorDummies);
} }
new CamSwitcher(objects::CAM_SWITCHER, pwrSwitch, power::NO_SWITCH); new CamSwitcher(objects::CAM_SWITCHER, pwrSwitch, power::NO_SWITCH);
new PlPcduDummy(objects::PLPCDU_HANDLER, objects::DUMMY_COM_IF, comCookieDummy); new PlPcduDummy(objects::PLPCDU_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);