eive-obsw/dummies/helpers.cpp

87 lines
4.3 KiB
C++
Raw Normal View History

#include "helpers.h"
2022-09-15 11:54:43 +02:00
#include <dummies/AcuDummy.h>
#include <dummies/BpxDummy.h>
#include <dummies/ComCookieDummy.h>
#include <dummies/ComIFDummy.h>
#include <dummies/CoreControllerDummy.h>
2022-10-12 15:04:19 +02:00
#include <dummies/GpsDummy.h>
2022-09-15 11:54:43 +02:00
#include <dummies/GyroAdisDummy.h>
#include <dummies/GyroL3GD20Dummy.h>
#include <dummies/ImtqDummy.h>
#include <dummies/MgmLIS3MDLDummy.h>
#include <dummies/MgmRm3100Dummy.h>
2022-09-15 11:54:43 +02:00
#include <dummies/P60DockDummy.h>
#include <dummies/PduDummy.h>
#include <dummies/PlPcduDummy.h>
#include <dummies/RwDummy.h>
2022-10-20 17:25:27 +02:00
#include <dummies/SaDeploymentDummy.h>
2022-09-15 11:54:43 +02:00
#include <dummies/StarTrackerDummy.h>
#include <dummies/SusDummy.h>
2022-09-15 11:54:43 +02:00
#include <dummies/SyrlinksDummy.h>
2022-09-16 14:01:54 +02:00
#include <dummies/TemperatureSensorsDummy.h>
2022-11-21 14:01:31 +01:00
#include <mission/system/objects/CamSwitcher.h>
2022-09-15 11:58:00 +02:00
2022-09-15 11:54:43 +02:00
using namespace dummy;
2022-11-21 14:01:31 +01:00
void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitch) {
2022-09-15 11:54:43 +02:00
new ComIFDummy(objects::DUMMY_COM_IF);
ComCookieDummy* comCookieDummy = new ComCookieDummy();
new BpxDummy(objects::BPX_BATT_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
if (cfg.addCoreCtrlCfg) {
2022-09-15 11:54:43 +02:00
new CoreControllerDummy(objects::CORE_CONTROLLER);
}
2022-09-16 14:01:54 +02:00
if (cfg.addRtdComIFDummy) {
new ComIFDummy(objects::SPI_RTD_COM_IF);
}
2022-09-15 11:54:43 +02:00
new RwDummy(objects::RW1, objects::DUMMY_COM_IF, comCookieDummy);
new RwDummy(objects::RW2, objects::DUMMY_COM_IF, comCookieDummy);
new RwDummy(objects::RW3, objects::DUMMY_COM_IF, comCookieDummy);
new RwDummy(objects::RW4, objects::DUMMY_COM_IF, comCookieDummy);
2022-10-20 17:25:27 +02:00
new SaDeplDummy(objects::SOLAR_ARRAY_DEPL_HANDLER);
2022-09-15 11:54:43 +02:00
new StarTrackerDummy(objects::STAR_TRACKER, objects::DUMMY_COM_IF, comCookieDummy);
if (cfg.addSyrlinksDummies) {
2023-01-27 14:44:40 +01:00
new SyrlinksDummy(objects::SYRLINKS_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
}
2022-09-15 11:54:43 +02:00
new ImtqDummy(objects::IMTQ_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
if (cfg.addPowerDummies) {
2022-09-15 11:54:43 +02:00
new AcuDummy(objects::ACU_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new PduDummy(objects::PDU1_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new PduDummy(objects::PDU2_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new P60DockDummy(objects::P60DOCK_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
}
if (cfg.addAcsBoardDummies) {
2022-09-15 11:54:43 +02:00
new GyroAdisDummy(objects::GYRO_0_ADIS_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new GyroL3GD20Dummy(objects::GYRO_1_L3G_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new GyroAdisDummy(objects::GYRO_2_ADIS_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new GyroL3GD20Dummy(objects::GYRO_3_L3G_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new MgmLIS3MDLDummy(objects::MGM_0_LIS3_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new MgmLIS3MDLDummy(objects::MGM_2_LIS3_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new MgmRm3100Dummy(objects::MGM_1_RM3100_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new MgmRm3100Dummy(objects::MGM_3_RM3100_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
2022-10-12 15:04:19 +02:00
new GpsDummy(objects::GPS_CONTROLLER, objects::DUMMY_COM_IF, comCookieDummy);
2022-09-15 11:54:43 +02:00
}
if (cfg.addSusDummies) {
new SusDummy(objects::SUS_0_N_LOC_XFYFZM_PT_XF, objects::DUMMY_COM_IF, comCookieDummy);
new SusDummy(objects::SUS_1_N_LOC_XBYFZM_PT_XB, objects::DUMMY_COM_IF, comCookieDummy);
new SusDummy(objects::SUS_2_N_LOC_XFYBZB_PT_YB, objects::DUMMY_COM_IF, comCookieDummy);
new SusDummy(objects::SUS_3_N_LOC_XFYBZF_PT_YF, objects::DUMMY_COM_IF, comCookieDummy);
new SusDummy(objects::SUS_4_N_LOC_XMYFZF_PT_ZF, objects::DUMMY_COM_IF, comCookieDummy);
new SusDummy(objects::SUS_5_N_LOC_XFYMZB_PT_ZB, objects::DUMMY_COM_IF, comCookieDummy);
new SusDummy(objects::SUS_6_R_LOC_XFYBZM_PT_XF, objects::DUMMY_COM_IF, comCookieDummy);
new SusDummy(objects::SUS_7_R_LOC_XBYBZM_PT_XB, objects::DUMMY_COM_IF, comCookieDummy);
new SusDummy(objects::SUS_8_R_LOC_XBYBZB_PT_YB, objects::DUMMY_COM_IF, comCookieDummy);
new SusDummy(objects::SUS_9_R_LOC_XBYBZB_PT_YF, objects::DUMMY_COM_IF, comCookieDummy);
new SusDummy(objects::SUS_10_N_LOC_XMYBZF_PT_ZF, objects::DUMMY_COM_IF, comCookieDummy);
new SusDummy(objects::SUS_11_R_LOC_XBYMZB_PT_ZB, objects::DUMMY_COM_IF, comCookieDummy);
}
2022-09-16 14:01:54 +02:00
if (cfg.addTempSensorDummies) {
new TemperatureSensorsDummy();
}
2022-11-21 14:01:31 +01:00
new CamSwitcher(objects::CAM_SWITCHER, pwrSwitch, power::NO_SWITCH);
2022-09-15 11:54:43 +02:00
new PlPcduDummy(objects::PLPCDU_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
}