2022-05-11 01:48:26 +02:00
|
|
|
#include "OBSWConfig.h"
|
|
|
|
#include "bsp_q7s/core/CoreController.h"
|
|
|
|
#include "bsp_q7s/core/ObjectFactory.h"
|
|
|
|
#include "busConf.h"
|
|
|
|
#include "devConf.h"
|
2022-09-16 12:28:39 +02:00
|
|
|
#include "eive/objects.h"
|
2022-05-11 01:48:26 +02:00
|
|
|
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
|
|
|
|
#include "linux/ObjectFactory.h"
|
|
|
|
#include "linux/callbacks/gpioCallbacks.h"
|
|
|
|
#include "mission/core/GenericFactory.h"
|
2022-05-12 14:02:15 +02:00
|
|
|
#include "mission/system/tree/acsModeTree.h"
|
2022-05-11 01:48:26 +02:00
|
|
|
|
|
|
|
void ObjectFactory::produce(void* args) {
|
|
|
|
ObjectFactory::setStatics();
|
2022-05-12 19:12:12 +02:00
|
|
|
HealthTableIF* healthTable = nullptr;
|
|
|
|
ObjectFactory::produceGenericObjects(&healthTable);
|
2022-05-11 01:48:26 +02:00
|
|
|
|
|
|
|
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
|
2022-09-29 19:40:00 +02:00
|
|
|
createAcsBoardComponents(gpioComIF, uartComIF, pwrSwitcher);
|
2022-05-11 01:48:26 +02:00
|
|
|
#endif
|
2022-05-12 19:12:12 +02:00
|
|
|
createHeaterComponents(gpioComIF, pwrSwitcher, healthTable);
|
2022-05-11 01:48:26 +02:00
|
|
|
createSolarArrayDeploymentComponents();
|
|
|
|
createPlPcduComponents(gpioComIF, spiMainComIF, pwrSwitcher);
|
|
|
|
#if OBSW_ADD_SYRLINKS == 1
|
|
|
|
createSyrlinksComponents(pwrSwitcher);
|
|
|
|
#endif /* OBSW_ADD_SYRLINKS == 1 */
|
2022-05-12 12:21:47 +02:00
|
|
|
createRtdComponents(q7s::SPI_DEFAULT_DEV, gpioComIF, pwrSwitcher, spiMainComIF);
|
2022-05-11 01:48:26 +02:00
|
|
|
createPayloadComponents(gpioComIF);
|
|
|
|
|
|
|
|
#if OBSW_ADD_MGT == 1
|
2022-09-30 12:09:03 +02:00
|
|
|
createImtqComponents(pwrSwitcher);
|
2022-05-11 01:48:26 +02:00
|
|
|
#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();
|
2022-05-30 14:32:50 +02:00
|
|
|
createThermalController();
|
2022-09-30 14:30:30 +02:00
|
|
|
createAcsController(true);
|
2022-09-29 16:47:47 +02:00
|
|
|
satsystem::initAcsSubsystem(objects::NO_OBJECT);
|
2022-05-11 01:48:26 +02:00
|
|
|
}
|