2020-12-29 13:59:31 +01:00
|
|
|
#ifndef BSP_Q7S_OBJECTFACTORY_H_
|
|
|
|
#define BSP_Q7S_OBJECTFACTORY_H_
|
|
|
|
|
2022-08-24 17:27:47 +02:00
|
|
|
#include <fsfw/returnvalues/returnvalue.h>
|
2023-02-26 14:55:33 +01:00
|
|
|
#include <fsfw_hal/linux/spi/SpiComIF.h>
|
2023-05-11 15:05:44 +02:00
|
|
|
#include <mission/acs/gyroAdisHelpers.h>
|
2023-03-24 19:49:08 +01:00
|
|
|
#include <mission/com/CcsdsIpCoreHandler.h>
|
2023-03-31 01:14:59 +02:00
|
|
|
#include <mission/com/PersistentLogTmStoreTask.h>
|
2023-03-26 16:42:00 +02:00
|
|
|
#include <mission/genericFactory.h>
|
2022-12-21 14:11:31 +01:00
|
|
|
#include <mission/system/objects/Stack5VHandler.h>
|
2023-03-26 16:42:00 +02:00
|
|
|
#include <mission/tcs/HeaterHandler.h>
|
2022-11-02 10:26:45 +01:00
|
|
|
#include <mission/tmtc/CfdpTmFunnel.h>
|
|
|
|
#include <mission/tmtc/PusTmFunnel.h>
|
2022-04-28 18:38:38 +02:00
|
|
|
|
2023-03-13 09:49:35 +01:00
|
|
|
#include <atomic>
|
2023-03-21 17:37:39 +01:00
|
|
|
#include <string>
|
2022-04-28 18:38:38 +02:00
|
|
|
|
2021-07-19 12:44:43 +02:00
|
|
|
class LinuxLibgpioIF;
|
2022-11-10 18:07:59 +01:00
|
|
|
class SerialComIF;
|
2021-08-17 19:50:48 +02:00
|
|
|
class SpiComIF;
|
2022-02-02 17:36:40 +01:00
|
|
|
class I2cComIF;
|
2022-03-04 16:03:57 +01:00
|
|
|
class PowerSwitchIF;
|
2022-05-02 17:37:00 +02:00
|
|
|
class HealthTableIF;
|
2022-04-01 14:13:37 +02:00
|
|
|
class AcsBoardAssembly;
|
2022-05-02 22:45:27 +02:00
|
|
|
class GpioIF;
|
2021-07-19 12:44:43 +02:00
|
|
|
|
2023-03-31 16:51:30 +02:00
|
|
|
extern std::atomic_bool PTME_LOCKED;
|
2023-03-13 09:49:35 +01:00
|
|
|
|
2020-12-29 13:59:31 +01:00
|
|
|
namespace ObjectFactory {
|
2021-07-19 12:44:43 +02:00
|
|
|
|
2023-03-09 19:42:20 +01:00
|
|
|
struct CcsdsComponentArgs {
|
2023-03-09 19:52:13 +01:00
|
|
|
CcsdsComponentArgs(LinuxLibgpioIF& gpioIF, StorageManagerIF& ipcStore, StorageManagerIF& tmStore,
|
2023-03-10 02:05:51 +01:00
|
|
|
PersistentTmStores& stores, PusTmFunnel& pusFunnel, CfdpTmFunnel& cfdpFunnel,
|
|
|
|
CcsdsIpCoreHandler** ipCoreHandler)
|
2023-03-09 19:42:20 +01:00
|
|
|
: gpioComIF(gpioIF),
|
|
|
|
ipcStore(ipcStore),
|
|
|
|
tmStore(tmStore),
|
|
|
|
stores(stores),
|
2023-03-10 02:05:51 +01:00
|
|
|
pusFunnel(pusFunnel),
|
|
|
|
cfdpFunnel(cfdpFunnel),
|
2023-03-09 19:42:20 +01:00
|
|
|
ipCoreHandler(ipCoreHandler) {}
|
|
|
|
LinuxLibgpioIF& gpioComIF;
|
|
|
|
StorageManagerIF& ipcStore;
|
|
|
|
StorageManagerIF& tmStore;
|
|
|
|
PersistentTmStores& stores;
|
2023-03-10 02:05:51 +01:00
|
|
|
PusTmFunnel& pusFunnel;
|
|
|
|
CfdpTmFunnel& cfdpFunnel;
|
2023-03-09 19:42:20 +01:00
|
|
|
CcsdsIpCoreHandler** ipCoreHandler;
|
2023-09-11 20:16:54 +02:00
|
|
|
MessageQueueId_t normalLiveTmDest = MessageQueueIF::NO_QUEUE;
|
|
|
|
MessageQueueId_t cfdpLiveTmDest = MessageQueueIF::NO_QUEUE;
|
2023-03-09 19:42:20 +01:00
|
|
|
};
|
|
|
|
|
2021-02-14 14:59:43 +01:00
|
|
|
void setStatics();
|
2021-06-08 16:45:25 +02:00
|
|
|
void produce(void* args);
|
2021-07-19 12:44:43 +02:00
|
|
|
|
2022-11-10 18:07:59 +01:00
|
|
|
void createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, SerialComIF** uartComIF,
|
2023-02-16 16:08:17 +01:00
|
|
|
SpiComIF** spiMainComIF, I2cComIF** i2cComIF);
|
2023-03-26 15:28:00 +02:00
|
|
|
void createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF** pwrSwitcher,
|
|
|
|
bool enableHkSets);
|
2022-03-25 15:56:44 +01:00
|
|
|
void createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF,
|
2022-12-22 11:10:55 +01:00
|
|
|
PowerSwitchIF* pwrSwitcher, Stack5VHandler& stackHandler);
|
2023-07-10 11:03:17 +02:00
|
|
|
void createTmpComponents(std::vector<std::pair<object_id_t, address_t>> tmpDevsToAdd);
|
2023-05-11 15:05:44 +02:00
|
|
|
void createRadSensorChipSelect(LinuxLibgpioIF* gpioIF);
|
2022-12-21 14:11:31 +01:00
|
|
|
ReturnValue_t createRadSensorComponent(LinuxLibgpioIF* gpioComIF, Stack5VHandler& handler);
|
2023-03-14 10:54:44 +01:00
|
|
|
void createAcsBoardGpios(GpioCookie& cookie);
|
2023-02-26 14:55:33 +01:00
|
|
|
void createAcsBoardComponents(SpiComIF& spiComIF, LinuxLibgpioIF* gpioComIF, SerialComIF* uartComIF,
|
2023-05-11 15:05:44 +02:00
|
|
|
PowerSwitchIF& pwrSwitcher, bool enableHkSets,
|
|
|
|
adis1650x::Type adisType);
|
2022-11-25 11:01:06 +01:00
|
|
|
void createHeaterComponents(GpioIF* gpioIF, PowerSwitchIF* pwrSwitcher, HealthTableIF* healthTable,
|
|
|
|
HeaterHandler*& heaterHandler);
|
2023-07-03 17:13:11 +02:00
|
|
|
void createImtqComponents(PowerSwitchIF* pwrSwitcher, bool enableHkSets, const char* i2cDev);
|
|
|
|
void createBpxBatteryComponent(bool enableHkSets, const char* i2cDev);
|
2022-05-11 01:48:26 +02:00
|
|
|
void createStrComponents(PowerSwitchIF* pwrSwitcher);
|
2022-10-12 13:56:25 +02:00
|
|
|
void createSolarArrayDeploymentComponents(PowerSwitchIF& pwrSwitcher, GpioIF& gpioIF);
|
2022-04-14 11:17:07 +02:00
|
|
|
void createSyrlinksComponents(PowerSwitchIF* pwrSwitcher);
|
2022-11-10 13:09:31 +01:00
|
|
|
void createPayloadComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF& pwrSwitcher);
|
2022-05-11 00:54:29 +02:00
|
|
|
void createReactionWheelComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF* pwrSwitcher);
|
2023-09-12 14:29:42 +02:00
|
|
|
ReturnValue_t createCcsdsIpComponentsAddTmRouting(CcsdsComponentArgs& args);
|
2023-03-09 19:42:20 +01:00
|
|
|
ReturnValue_t createCcsdsComponents(CcsdsComponentArgs& args);
|
2023-07-03 16:55:45 +02:00
|
|
|
ReturnValue_t readFirmwareVersion();
|
2022-05-11 01:48:26 +02:00
|
|
|
void createMiscComponents();
|
|
|
|
|
2021-09-13 18:07:07 +02:00
|
|
|
void createTestComponents(LinuxLibgpioIF* gpioComIF);
|
2023-06-15 08:39:06 +02:00
|
|
|
void createPlI2cResetGpio(LinuxLibgpioIF* gpioComIF);
|
2021-07-19 12:44:43 +02:00
|
|
|
|
2022-04-01 14:13:37 +02:00
|
|
|
void testAcsBrdAss(AcsBoardAssembly* assAss);
|
|
|
|
|
2022-01-18 11:41:19 +01:00
|
|
|
}; // namespace ObjectFactory
|
2020-12-29 13:59:31 +01:00
|
|
|
|
|
|
|
#endif /* BSP_Q7S_OBJECTFACTORY_H_ */
|