eive-obsw/bsp_q7s/fmObjectFactory.cpp
Robin Mueller 68039d5d4a
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
clean up config code
2022-09-16 12:28:39 +02:00

68 lines
2.2 KiB
C++

#include "OBSWConfig.h"
#include "bsp_q7s/core/CoreController.h"
#include "bsp_q7s/core/ObjectFactory.h"
#include "busConf.h"
#include "devConf.h"
#include "eive/objects.h"
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
#include "linux/ObjectFactory.h"
#include "linux/callbacks/gpioCallbacks.h"
#include "mission/core/GenericFactory.h"
void ObjectFactory::produce(void* args) {
ObjectFactory::setStatics();
HealthTableIF* healthTable = nullptr;
ObjectFactory::produceGenericObjects(&healthTable);
LinuxLibgpioIF* gpioComIF = nullptr;
UartComIF* uartComIF = nullptr;
SpiComIF* spiMainComIF = nullptr;
I2cComIF* i2cComIF = nullptr;
PowerSwitchIF* pwrSwitcher = nullptr;
SpiComIF* spiRwComIF = nullptr;
createCommunicationInterfaces(&gpioComIF, &uartComIF, &spiMainComIF, &i2cComIF, &spiRwComIF);
createTmpComponents();
new CoreController(objects::CORE_CONTROLLER);
gpioCallbacks::disableAllDecoder(gpioComIF);
createPcduComponents(gpioComIF, &pwrSwitcher);
createRadSensorComponent(gpioComIF);
createSunSensorComponents(gpioComIF, spiMainComIF, pwrSwitcher, q7s::SPI_DEFAULT_DEV);
#if OBSW_ADD_ACS_BOARD == 1
createAcsBoardComponents(gpioComIF, uartComIF, pwrSwitcher);
#endif
createHeaterComponents(gpioComIF, pwrSwitcher, healthTable);
createSolarArrayDeploymentComponents();
createPlPcduComponents(gpioComIF, spiMainComIF, pwrSwitcher);
#if OBSW_ADD_SYRLINKS == 1
createSyrlinksComponents(pwrSwitcher);
#endif /* OBSW_ADD_SYRLINKS == 1 */
createRtdComponents(q7s::SPI_DEFAULT_DEV, gpioComIF, pwrSwitcher, spiMainComIF);
createPayloadComponents(gpioComIF);
#if OBSW_ADD_MGT == 1
createImtqComponents(pwrSwitcher);
#endif
createReactionWheelComponents(gpioComIF, pwrSwitcher);
#if OBSW_ADD_BPX_BATTERY_HANDLER == 1
createBpxBatteryComponent();
#endif
#if OBSW_ADD_STAR_TRACKER == 1
createStrComponents(pwrSwitcher);
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
#if OBSW_USE_CCSDS_IP_CORE == 1
createCcsdsComponents(gpioComIF);
#endif /* OBSW_USE_CCSDS_IP_CORE == 1 */
/* Test Task */
#if OBSW_ADD_TEST_CODE == 1
createTestComponents(gpioComIF);
#endif /* OBSW_ADD_TEST_CODE == 1 */
createMiscComponents();
createThermalController();
createAcsController();
}