eive-obsw/mission/system/TcsSubsystem.h
Robin Mueller ce8253b940
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
TCS subsystem continued
2022-03-22 15:49:22 +01:00

38 lines
1.1 KiB
C++

#ifndef MISSION_SYSTEM_TCSSUBSYSTEM_H_
#define MISSION_SYSTEM_TCSSUBSYSTEM_H_
#include <fsfw/container/FixedArrayList.h>
#include <fsfw/power/PowerSwitcher.h>
#include <fsfw/subsystem/SubsystemBase.h>
struct TcsBoardHelper {
TcsBoardHelper(std::array<object_id_t, 16> rtdIds) : rtdIds(rtdIds) {}
std::array<object_id_t, 16> rtdIds = {};
};
class TcsSubsystem : public SubsystemBase {
public:
TcsSubsystem(object_id_t objectId, object_id_t parentId, PowerSwitchIF *pwrSwitcher,
power::Switch_t switcher, TcsBoardHelper helper);
ReturnValue_t initialize() override;
private:
static constexpr uint8_t NUMBER_RTDS = 16;
PowerSwitcher switcher;
TcsBoardHelper helper;
FixedArrayList<ModeListEntry, NUMBER_RTDS> modeTable;
ReturnValue_t handleCommandMessage(CommandMessage *message) override;
void performChildOperation() override;
ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode,
uint32_t *msToReachTheMode) override;
void startTransition(Mode_t mode, Submode_t submode) override;
};
#endif /* MISSION_SYSTEM_TCSSUBSYSTEM_H_ */