continue satsytem for EM
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit

This commit is contained in:
Robin Müller 2023-02-13 13:53:13 +01:00
parent 59a0a74032
commit 97a001a1da
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
13 changed files with 92 additions and 65 deletions

View File

@ -239,10 +239,10 @@ ReturnValue_t ObjectFactory::createRadSensorComponent(LinuxLibgpioIF* gpioComIF,
} }
void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, SerialComIF* uartComIF, void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, SerialComIF* uartComIF,
PowerSwitchIF* pwrSwitcher) { PowerSwitchIF& pwrSwitcher) {
using namespace gpio; using namespace gpio;
GpioCookie* gpioCookieAcsBoard = new GpioCookie(); GpioCookie* gpioCookieAcsBoard = new GpioCookie();
std::vector<std::reference_wrapper<DeviceHandlerBase>> assemblyChildren; std::array<DeviceHandlerBase*, 8> assemblyChildren;
std::stringstream consumer; std::stringstream consumer;
GpiodRegularByLineName* gpio = nullptr; GpiodRegularByLineName* gpio = nullptr;
@ -352,7 +352,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, SerialCo
objects::MGM_0_LIS3_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, spi::LIS3_TRANSITION_DELAY); objects::MGM_0_LIS3_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, spi::LIS3_TRANSITION_DELAY);
fdir = new AcsBoardFdir(objects::MGM_0_LIS3_HANDLER); fdir = new AcsBoardFdir(objects::MGM_0_LIS3_HANDLER);
mgmLis3Handler0->setCustomFdir(fdir); mgmLis3Handler0->setCustomFdir(fdir);
assemblyChildren.push_back(*mgmLis3Handler0); assemblyChildren[0] = mgmLis3Handler0;
#if OBSW_TEST_ACS == 1 #if OBSW_TEST_ACS == 1
mgmLis3Handler->setStartUpImmediately(); mgmLis3Handler->setStartUpImmediately();
mgmLis3Handler->setToGoToNormalMode(true); mgmLis3Handler->setToGoToNormalMode(true);
@ -369,7 +369,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, SerialCo
spi::RM3100_TRANSITION_DELAY); spi::RM3100_TRANSITION_DELAY);
fdir = new AcsBoardFdir(objects::MGM_1_RM3100_HANDLER); fdir = new AcsBoardFdir(objects::MGM_1_RM3100_HANDLER);
mgmRm3100Handler1->setCustomFdir(fdir); mgmRm3100Handler1->setCustomFdir(fdir);
assemblyChildren.push_back(*mgmRm3100Handler1); assemblyChildren[1] = mgmRm3100Handler1;
#if OBSW_TEST_ACS == 1 #if OBSW_TEST_ACS == 1
mgmRm3100Handler->setStartUpImmediately(); mgmRm3100Handler->setStartUpImmediately();
mgmRm3100Handler->setToGoToNormalMode(true); mgmRm3100Handler->setToGoToNormalMode(true);
@ -385,7 +385,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, SerialCo
objects::MGM_2_LIS3_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, spi::LIS3_TRANSITION_DELAY); objects::MGM_2_LIS3_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, spi::LIS3_TRANSITION_DELAY);
fdir = new AcsBoardFdir(objects::MGM_2_LIS3_HANDLER); fdir = new AcsBoardFdir(objects::MGM_2_LIS3_HANDLER);
mgmLis3Handler2->setCustomFdir(fdir); mgmLis3Handler2->setCustomFdir(fdir);
assemblyChildren.push_back(*mgmLis3Handler2); assemblyChildren[2] = mgmLis3Handler2;
#if OBSW_TEST_ACS == 1 #if OBSW_TEST_ACS == 1
mgmLis3Handler->setStartUpImmediately(); mgmLis3Handler->setStartUpImmediately();
mgmLis3Handler->setToGoToNormalMode(true); mgmLis3Handler->setToGoToNormalMode(true);
@ -402,7 +402,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, SerialCo
spi::RM3100_TRANSITION_DELAY); spi::RM3100_TRANSITION_DELAY);
fdir = new AcsBoardFdir(objects::MGM_3_RM3100_HANDLER); fdir = new AcsBoardFdir(objects::MGM_3_RM3100_HANDLER);
mgmRm3100Handler3->setCustomFdir(fdir); mgmRm3100Handler3->setCustomFdir(fdir);
assemblyChildren.push_back(*mgmRm3100Handler3); assemblyChildren[3] = mgmRm3100Handler3;
#if OBSW_TEST_ACS == 1 #if OBSW_TEST_ACS == 1
mgmRm3100Handler->setStartUpImmediately(); mgmRm3100Handler->setStartUpImmediately();
mgmRm3100Handler->setToGoToNormalMode(true); mgmRm3100Handler->setToGoToNormalMode(true);
@ -421,7 +421,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, SerialCo
ADIS1650X::Type::ADIS16505); ADIS1650X::Type::ADIS16505);
fdir = new AcsBoardFdir(objects::GYRO_0_ADIS_HANDLER); fdir = new AcsBoardFdir(objects::GYRO_0_ADIS_HANDLER);
adisHandler->setCustomFdir(fdir); adisHandler->setCustomFdir(fdir);
assemblyChildren.push_back(*adisHandler); assemblyChildren[4] = adisHandler;
#if OBSW_TEST_ACS == 1 #if OBSW_TEST_ACS == 1
adisHandler->setStartUpImmediately(); adisHandler->setStartUpImmediately();
adisHandler->setToGoToNormalModeImmediately(); adisHandler->setToGoToNormalModeImmediately();
@ -437,7 +437,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, SerialCo
objects::GYRO_1_L3G_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, spi::L3G_TRANSITION_DELAY); objects::GYRO_1_L3G_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, spi::L3G_TRANSITION_DELAY);
fdir = new AcsBoardFdir(objects::GYRO_1_L3G_HANDLER); fdir = new AcsBoardFdir(objects::GYRO_1_L3G_HANDLER);
gyroL3gHandler1->setCustomFdir(fdir); gyroL3gHandler1->setCustomFdir(fdir);
assemblyChildren.push_back(*gyroL3gHandler1); assemblyChildren[5] = gyroL3gHandler1;
#if OBSW_TEST_ACS == 1 #if OBSW_TEST_ACS == 1
gyroL3gHandler->setStartUpImmediately(); gyroL3gHandler->setStartUpImmediately();
gyroL3gHandler->setToGoToNormalMode(true); gyroL3gHandler->setToGoToNormalMode(true);
@ -454,7 +454,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, SerialCo
spiCookie, ADIS1650X::Type::ADIS16505); spiCookie, ADIS1650X::Type::ADIS16505);
fdir = new AcsBoardFdir(objects::GYRO_2_ADIS_HANDLER); fdir = new AcsBoardFdir(objects::GYRO_2_ADIS_HANDLER);
adisHandler->setCustomFdir(fdir); adisHandler->setCustomFdir(fdir);
assemblyChildren.push_back(*adisHandler); assemblyChildren[6] = adisHandler;
#if OBSW_TEST_ACS == 1 #if OBSW_TEST_ACS == 1
adisHandler->setStartUpImmediately(); adisHandler->setStartUpImmediately();
adisHandler->setToGoToNormalModeImmediately(); adisHandler->setToGoToNormalModeImmediately();
@ -467,7 +467,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, SerialCo
objects::GYRO_3_L3G_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, spi::L3G_TRANSITION_DELAY); objects::GYRO_3_L3G_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, spi::L3G_TRANSITION_DELAY);
fdir = new AcsBoardFdir(objects::GYRO_3_L3G_HANDLER); fdir = new AcsBoardFdir(objects::GYRO_3_L3G_HANDLER);
gyroL3gHandler3->setCustomFdir(fdir); gyroL3gHandler3->setCustomFdir(fdir);
assemblyChildren.push_back(*gyroL3gHandler3); assemblyChildren[7] = gyroL3gHandler3;
#if OBSW_TEST_ACS == 1 #if OBSW_TEST_ACS == 1
gyroL3gHandler->setStartUpImmediately(); gyroL3gHandler->setStartUpImmediately();
gyroL3gHandler->setToGoToNormalMode(true); gyroL3gHandler->setToGoToNormalMode(true);
@ -485,22 +485,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, SerialCo
new GpsHyperionLinuxController(objects::GPS_CONTROLLER, objects::NO_OBJECT, debugGps); new GpsHyperionLinuxController(objects::GPS_CONTROLLER, objects::NO_OBJECT, debugGps);
gpsCtrl->setResetPinTriggerFunction(gps::triggerGpioResetPin, &RESET_ARGS_GNSS); gpsCtrl->setResetPinTriggerFunction(gps::triggerGpioResetPin, &RESET_ARGS_GNSS);
AcsBoardHelper acsBoardHelper = AcsBoardHelper( ObjectFactory::createAcsBoardAssy(pwrSwitcher, assemblyChildren, gpsCtrl, gpioComIF);
objects::MGM_0_LIS3_HANDLER, objects::MGM_1_RM3100_HANDLER, objects::MGM_2_LIS3_HANDLER,
objects::MGM_3_RM3100_HANDLER, objects::GYRO_0_ADIS_HANDLER, objects::GYRO_1_L3G_HANDLER,
objects::GYRO_2_ADIS_HANDLER, objects::GYRO_3_L3G_HANDLER, objects::GPS_CONTROLLER);
auto acsAss =
new AcsBoardAssembly(objects::ACS_BOARD_ASS, pwrSwitcher, acsBoardHelper, gpioComIF);
static_cast<void>(acsAss);
for (auto& assChild : assemblyChildren) {
ReturnValue_t result = assChild.get().connectModeTreeParent(*acsAss);
if (result != returnvalue::OK) {
sif::error << "Connecting assembly for ACS board component " << assChild.get().getObjectId()
<< " failed" << std::endl;
}
}
gpsCtrl->connectModeTreeParent(*acsAss);
acsAss->connectModeTreeParent(satsystem::acs::ACS_SUBSYSTEM);
#endif /* OBSW_ADD_ACS_HANDLERS == 1 */ #endif /* OBSW_ADD_ACS_HANDLERS == 1 */
} }

View File

@ -33,7 +33,7 @@ void createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF,
void createTmpComponents(); void createTmpComponents();
ReturnValue_t createRadSensorComponent(LinuxLibgpioIF* gpioComIF, Stack5VHandler& handler); ReturnValue_t createRadSensorComponent(LinuxLibgpioIF* gpioComIF, Stack5VHandler& handler);
void createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, SerialComIF* uartComIF, void createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, SerialComIF* uartComIF,
PowerSwitchIF* pwrSwitcher); PowerSwitchIF& pwrSwitcher);
void createHeaterComponents(GpioIF* gpioIF, PowerSwitchIF* pwrSwitcher, HealthTableIF* healthTable, void createHeaterComponents(GpioIF* gpioIF, PowerSwitchIF* pwrSwitcher, HealthTableIF* healthTable,
HeaterHandler*& heaterHandler); HeaterHandler*& heaterHandler);
void createImtqComponents(PowerSwitchIF* pwrSwitcher); void createImtqComponents(PowerSwitchIF* pwrSwitcher);

View File

@ -43,7 +43,7 @@ void ObjectFactory::produce(void* args) {
#endif #endif
#if OBSW_ADD_ACS_BOARD == 1 #if OBSW_ADD_ACS_BOARD == 1
createAcsBoardComponents(gpioComIF, uartComIF, pwrSwitcher); createAcsBoardComponents(gpioComIF, uartComIF, *pwrSwitcher);
#endif #endif
HeaterHandler* heaterHandler; HeaterHandler* heaterHandler;
createHeaterComponents(gpioComIF, pwrSwitcher, healthTable, heaterHandler); createHeaterComponents(gpioComIF, pwrSwitcher, healthTable, heaterHandler);

View File

@ -14,7 +14,8 @@ target_sources(
PduDummy.cpp PduDummy.cpp
P60DockDummy.cpp P60DockDummy.cpp
SaDeploymentDummy.cpp SaDeploymentDummy.cpp
GpsDummy.cpp GpsDhbDummy.cpp
GpsCtrlDummy.cpp
GyroAdisDummy.cpp GyroAdisDummy.cpp
GyroL3GD20Dummy.cpp GyroL3GD20Dummy.cpp
MgmLIS3MDLDummy.cpp MgmLIS3MDLDummy.cpp

3
dummies/GpsCtrlDummy.cpp Normal file
View File

@ -0,0 +1,3 @@
#include "GpsCtrlDummy.h"
GpsCtrlDummy::GpsCtrlDummy(object_id_t objectId): ExtendedControllerBase(objectId, 20) {}

12
dummies/GpsCtrlDummy.h Normal file
View File

@ -0,0 +1,12 @@
#ifndef DUMMIES_GPSCTRLDUMMY_H_
#define DUMMIES_GPSCTRLDUMMY_H_
#include <fsfw/controller/ExtendedControllerBase.h>
class GpsCtrlDummy: public ExtendedControllerBase {
public:
GpsCtrlDummy(object_id_t objectId);
private:
};
#endif /* DUMMIES_GPSCTRLDUMMY_H_ */

View File

@ -1,41 +1,40 @@
#include "GpsDummy.h" #include <dummies/GpsDhbDummy.h>
#include <mission/devices/devicedefinitions/GPSDefinitions.h> #include <mission/devices/devicedefinitions/GPSDefinitions.h>
GpsDummy::GpsDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie) GpsDhbDummy::GpsDhbDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
: DeviceHandlerBase(objectId, comif, comCookie) {} : DeviceHandlerBase(objectId, comif, comCookie) {}
GpsDummy::~GpsDummy() {} GpsDhbDummy::~GpsDhbDummy() {}
void GpsDummy::doStartUp() {} void GpsDhbDummy::doStartUp() {}
void GpsDummy::doShutDown() {} void GpsDhbDummy::doShutDown() {}
ReturnValue_t GpsDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; } ReturnValue_t GpsDhbDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; }
ReturnValue_t GpsDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) { ReturnValue_t GpsDhbDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
return NOTHING_TO_SEND; return NOTHING_TO_SEND;
} }
ReturnValue_t GpsDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand, ReturnValue_t GpsDhbDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
const uint8_t *commandData, size_t commandDataLen) { const uint8_t *commandData, size_t commandDataLen) {
return returnvalue::OK; return returnvalue::OK;
} }
ReturnValue_t GpsDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId, ReturnValue_t GpsDhbDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
size_t *foundLen) { size_t *foundLen) {
return returnvalue::OK; return returnvalue::OK;
} }
ReturnValue_t GpsDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) { ReturnValue_t GpsDhbDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
return returnvalue::OK; return returnvalue::OK;
} }
void GpsDummy::fillCommandAndReplyMap() {} void GpsDhbDummy::fillCommandAndReplyMap() {}
uint32_t GpsDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; } uint32_t GpsDhbDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; }
ReturnValue_t GpsDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap, ReturnValue_t GpsDhbDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) { LocalDataPoolManager &poolManager) {
localDataPoolMap.emplace(GpsHyperion::LATITUDE, new PoolEntry<double>({0.0}, 1)); localDataPoolMap.emplace(GpsHyperion::LATITUDE, new PoolEntry<double>({0.0}, 1));
localDataPoolMap.emplace(GpsHyperion::LONGITUDE, new PoolEntry<double>({0.0}, 1)); localDataPoolMap.emplace(GpsHyperion::LONGITUDE, new PoolEntry<double>({0.0}, 1));

View File

@ -1,9 +1,9 @@
#ifndef DUMMIES_GPSDUMMY_H_ #ifndef DUMMIES_GPSDHBDUMMY_H_
#define DUMMIES_GPSDUMMY_H_ #define DUMMIES_GPSDHBDUMMY_H_
#include <fsfw/devicehandlers/DeviceHandlerBase.h> #include <fsfw/devicehandlers/DeviceHandlerBase.h>
class GpsDummy : public DeviceHandlerBase { class GpsDhbDummy : public DeviceHandlerBase {
public: public:
static const DeviceCommandId_t SIMPLE_COMMAND = 1; static const DeviceCommandId_t SIMPLE_COMMAND = 1;
static const DeviceCommandId_t PERIODIC_REPLY = 2; static const DeviceCommandId_t PERIODIC_REPLY = 2;
@ -11,8 +11,8 @@ class GpsDummy : public DeviceHandlerBase {
static const uint8_t SIMPLE_COMMAND_DATA = 1; static const uint8_t SIMPLE_COMMAND_DATA = 1;
static const uint8_t PERIODIC_REPLY_DATA = 2; static const uint8_t PERIODIC_REPLY_DATA = 2;
GpsDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie); GpsDhbDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie);
virtual ~GpsDummy(); virtual ~GpsDhbDummy();
protected: protected:
void doStartUp() override; void doStartUp() override;
@ -30,4 +30,4 @@ class GpsDummy : public DeviceHandlerBase {
LocalDataPoolManager &poolManager) override; LocalDataPoolManager &poolManager) override;
}; };
#endif /* DUMMIES_GPSDUMMY_H_ */ #endif /* DUMMIES_GPSDHBDUMMY_H_ */

View File

@ -5,7 +5,7 @@
#include <dummies/ComCookieDummy.h> #include <dummies/ComCookieDummy.h>
#include <dummies/ComIFDummy.h> #include <dummies/ComIFDummy.h>
#include <dummies/CoreControllerDummy.h> #include <dummies/CoreControllerDummy.h>
#include <dummies/GpsDummy.h> #include <dummies/GpsDhbDummy.h>
#include <dummies/GyroAdisDummy.h> #include <dummies/GyroAdisDummy.h>
#include <dummies/GyroL3GD20Dummy.h> #include <dummies/GyroL3GD20Dummy.h>
#include <dummies/ImtqDummy.h> #include <dummies/ImtqDummy.h>
@ -30,7 +30,7 @@
using namespace dummy; using namespace dummy;
void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitch) { void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpioIF) {
new ComIFDummy(objects::DUMMY_COM_IF); new ComIFDummy(objects::DUMMY_COM_IF);
auto* comCookieDummy = new ComCookieDummy(); auto* comCookieDummy = new ComCookieDummy();
new BpxDummy(objects::BPX_BATT_HANDLER, objects::DUMMY_COM_IF, comCookieDummy); new BpxDummy(objects::BPX_BATT_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
@ -46,7 +46,7 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitch) {
rws[1] = new RwDummy(objects::RW2, objects::DUMMY_COM_IF, comCookieDummy); rws[1] = new RwDummy(objects::RW2, objects::DUMMY_COM_IF, comCookieDummy);
rws[2] = new RwDummy(objects::RW3, objects::DUMMY_COM_IF, comCookieDummy); rws[2] = new RwDummy(objects::RW3, objects::DUMMY_COM_IF, comCookieDummy);
rws[3] = new RwDummy(objects::RW4, objects::DUMMY_COM_IF, comCookieDummy); rws[3] = new RwDummy(objects::RW4, objects::DUMMY_COM_IF, comCookieDummy);
ObjectFactory::createRwAssy(pwrSwitch, pcdu::Switches::PDU2_CH2_RW_5V, rws, rwIds); ObjectFactory::createRwAssy(pwrSwitcher, pcdu::Switches::PDU2_CH2_RW_5V, rws, rwIds);
new SaDeplDummy(objects::SOLAR_ARRAY_DEPL_HANDLER); new SaDeplDummy(objects::SOLAR_ARRAY_DEPL_HANDLER);
new StarTrackerDummy(objects::STAR_TRACKER, objects::DUMMY_COM_IF, comCookieDummy); new StarTrackerDummy(objects::STAR_TRACKER, objects::DUMMY_COM_IF, comCookieDummy);
if (cfg.addSyrlinksDummies) { if (cfg.addSyrlinksDummies) {
@ -63,15 +63,17 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitch) {
} }
if (cfg.addAcsBoardDummies) { if (cfg.addAcsBoardDummies) {
new GyroAdisDummy(objects::GYRO_0_ADIS_HANDLER, objects::DUMMY_COM_IF, comCookieDummy); std::array<DeviceHandlerBase*, 8> assemblyDhbs;
new GyroL3GD20Dummy(objects::GYRO_1_L3G_HANDLER, objects::DUMMY_COM_IF, comCookieDummy); assemblyDhbs[0] = new MgmLIS3MDLDummy(objects::MGM_0_LIS3_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new GyroAdisDummy(objects::GYRO_2_ADIS_HANDLER, objects::DUMMY_COM_IF, comCookieDummy); assemblyDhbs[1] = new MgmLIS3MDLDummy(objects::MGM_2_LIS3_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new GyroL3GD20Dummy(objects::GYRO_3_L3G_HANDLER, objects::DUMMY_COM_IF, comCookieDummy); assemblyDhbs[2] = new MgmRm3100Dummy(objects::MGM_1_RM3100_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new MgmLIS3MDLDummy(objects::MGM_0_LIS3_HANDLER, objects::DUMMY_COM_IF, comCookieDummy); assemblyDhbs[3] = new MgmRm3100Dummy(objects::MGM_3_RM3100_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new MgmLIS3MDLDummy(objects::MGM_2_LIS3_HANDLER, objects::DUMMY_COM_IF, comCookieDummy); assemblyDhbs[4] = new GyroAdisDummy(objects::GYRO_0_ADIS_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new MgmRm3100Dummy(objects::MGM_1_RM3100_HANDLER, objects::DUMMY_COM_IF, comCookieDummy); assemblyDhbs[5] = new GyroL3GD20Dummy(objects::GYRO_1_L3G_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new MgmRm3100Dummy(objects::MGM_3_RM3100_HANDLER, objects::DUMMY_COM_IF, comCookieDummy); assemblyDhbs[6] = new GyroAdisDummy(objects::GYRO_2_ADIS_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new GpsDummy(objects::GPS_CONTROLLER, objects::DUMMY_COM_IF, comCookieDummy); assemblyDhbs[7] = new GyroL3GD20Dummy(objects::GYRO_3_L3G_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
auto* gpsCtrl = new GpsDhbDummy(objects::GPS_CONTROLLER, objects::DUMMY_COM_IF, comCookieDummy);
ObjectFactory::createAcsBoardAssy(pwrSwitcher, assemblyDhbs, gpsCtrl, gpioIF);
} }
if (cfg.addSusDummies) { if (cfg.addSusDummies) {
@ -100,7 +102,7 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitch) {
new SusDummy(objects::SUS_10_N_LOC_XMYBZF_PT_ZF, objects::DUMMY_COM_IF, comCookieDummy); new SusDummy(objects::SUS_10_N_LOC_XMYBZF_PT_ZF, objects::DUMMY_COM_IF, comCookieDummy);
suses[11] = suses[11] =
new SusDummy(objects::SUS_11_R_LOC_XBYMZB_PT_ZB, objects::DUMMY_COM_IF, comCookieDummy); new SusDummy(objects::SUS_11_R_LOC_XBYMZB_PT_ZB, objects::DUMMY_COM_IF, comCookieDummy);
ObjectFactory::createSusAssy(pwrSwitch, suses); ObjectFactory::createSusAssy(pwrSwitcher, suses);
} }
if (cfg.addTempSensorDummies) { if (cfg.addTempSensorDummies) {
@ -174,6 +176,6 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitch) {
new TemperatureSensorInserter(objects::THERMAL_TEMP_INSERTER, tempSensorDummies, new TemperatureSensorInserter(objects::THERMAL_TEMP_INSERTER, tempSensorDummies,
tempTmpSensorDummies); tempTmpSensorDummies);
} }
new CamSwitcher(objects::CAM_SWITCHER, pwrSwitch, power::NO_SWITCH); new CamSwitcher(objects::CAM_SWITCHER, pwrSwitcher, power::NO_SWITCH);
new PlPcduDummy(objects::PLPCDU_HANDLER, objects::DUMMY_COM_IF, comCookieDummy); new PlPcduDummy(objects::PLPCDU_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
} }

View File

@ -14,6 +14,6 @@ struct DummyCfg {
bool addRtdComIFDummy = true; bool addRtdComIFDummy = true;
}; };
void createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitch); void createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitch, GpioIF* gpioIF);
} // namespace dummy } // namespace dummy

2
fsfw

@ -1 +1 @@
Subproject commit dac2d210b597adfaf45bd5ae6a4c027599927601 Subproject commit f0b8457ba2d9a34a42b10314c3cdccfd46ebf168

View File

@ -4,6 +4,7 @@
#include <fsfw/cfdp/handler/CfdpHandler.h> #include <fsfw/cfdp/handler/CfdpHandler.h>
#include <fsfw/cfdp/handler/RemoteConfigTableIF.h> #include <fsfw/cfdp/handler/RemoteConfigTableIF.h>
#include <fsfw/controller/ControllerBase.h> #include <fsfw/controller/ControllerBase.h>
#include <fsfw/controller/ExtendedControllerBase.h>
#include <fsfw/events/EventManager.h> #include <fsfw/events/EventManager.h>
#include <fsfw/health/HealthTable.h> #include <fsfw/health/HealthTable.h>
#include <fsfw/internalerror/InternalErrorReporter.h> #include <fsfw/internalerror/InternalErrorReporter.h>
@ -26,6 +27,7 @@
#include <mission/controller/ThermalController.h> #include <mission/controller/ThermalController.h>
#include <mission/devices/HeaterHandler.h> #include <mission/devices/HeaterHandler.h>
#include <mission/devices/devicedefinitions/GomspaceDefinitions.h> #include <mission/devices/devicedefinitions/GomspaceDefinitions.h>
#include <mission/system/objects/AcsBoardAssembly.h>
#include <mission/system/objects/RwAssembly.h> #include <mission/system/objects/RwAssembly.h>
#include <mission/system/objects/SusAssembly.h> #include <mission/system/objects/SusAssembly.h>
#include <mission/tmtc/CfdpTmFunnel.h> #include <mission/tmtc/CfdpTmFunnel.h>
@ -259,3 +261,23 @@ void ObjectFactory::createSusAssy(PowerSwitchIF& pwrSwitcher,
} }
susAss->connectModeTreeParent(satsystem::acs::ACS_SUBSYSTEM); susAss->connectModeTreeParent(satsystem::acs::ACS_SUBSYSTEM);
} }
void ObjectFactory::createAcsBoardAssy(PowerSwitchIF& pwrSwitcher,
std::array<DeviceHandlerBase*, 8> assemblyDhbs,
ExtendedControllerBase* gpsCtrl, GpioIF* gpioComIF) {
AcsBoardHelper acsBoardHelper = AcsBoardHelper(
objects::MGM_0_LIS3_HANDLER, objects::MGM_1_RM3100_HANDLER, objects::MGM_2_LIS3_HANDLER,
objects::MGM_3_RM3100_HANDLER, objects::GYRO_0_ADIS_HANDLER, objects::GYRO_1_L3G_HANDLER,
objects::GYRO_2_ADIS_HANDLER, objects::GYRO_3_L3G_HANDLER, objects::GPS_CONTROLLER);
auto acsAss =
new AcsBoardAssembly(objects::ACS_BOARD_ASS, &pwrSwitcher, acsBoardHelper, gpioComIF);
for (auto& assChild : assemblyDhbs) {
ReturnValue_t result = assChild->connectModeTreeParent(*acsAss);
if (result != returnvalue::OK) {
sif::error << "Connecting assembly for ACS board component " << assChild->getObjectId()
<< " failed" << std::endl;
}
}
gpsCtrl->connectModeTreeParent(*acsAss);
acsAss->connectModeTreeParent(satsystem::acs::ACS_SUBSYSTEM);
}

View File

@ -11,6 +11,7 @@ class HeaterHandler;
class HealthTableIF; class HealthTableIF;
class PusTmFunnel; class PusTmFunnel;
class CfdpTmFunnel; class CfdpTmFunnel;
class ExtendedControllerBase;
namespace ObjectFactory { namespace ObjectFactory {
@ -23,6 +24,8 @@ void createThermalController(HeaterHandler& heaterHandler);
void createRwAssy(PowerSwitchIF& pwrSwitcher, power::Switch_t theSwitch, void createRwAssy(PowerSwitchIF& pwrSwitcher, power::Switch_t theSwitch,
std::array<DeviceHandlerBase*, 4> rws, std::array<object_id_t, 4> rwIds); std::array<DeviceHandlerBase*, 4> rws, std::array<object_id_t, 4> rwIds);
void createSusAssy(PowerSwitchIF& pwrSwitcher, std::array<DeviceHandlerBase*, 12> suses); void createSusAssy(PowerSwitchIF& pwrSwitcher, std::array<DeviceHandlerBase*, 12> suses);
void createAcsBoardAssy(PowerSwitchIF& pwrSwitcher, std::array<DeviceHandlerBase*, 8> assemblyDhbs,
ExtendedControllerBase* gpsCtrl, GpioIF* gpioComIF);
} // namespace ObjectFactory } // namespace ObjectFactory