eive-obsw/mission/system/TcsSubsystem.h

36 lines
1.2 KiB
C
Raw Normal View History

#ifndef MISSION_SYSTEM_TCSSUBSYSTEM_H_
#define MISSION_SYSTEM_TCSSUBSYSTEM_H_
2022-03-22 15:49:22 +01:00
#include <fsfw/container/FixedArrayList.h>
2022-03-22 17:58:05 +01:00
#include <fsfw/devicehandlers/AssemblyBase.h>
2022-03-22 15:49:22 +01:00
#include <fsfw/power/PowerSwitcher.h>
2022-03-21 10:12:17 +01:00
2022-03-22 11:57:48 +01:00
struct TcsBoardHelper {
2022-03-22 15:49:22 +01:00
TcsBoardHelper(std::array<object_id_t, 16> rtdIds) : rtdIds(rtdIds) {}
2022-03-21 10:12:17 +01:00
2022-03-22 11:57:48 +01:00
std::array<object_id_t, 16> rtdIds = {};
};
2022-03-22 17:58:05 +01:00
class TcsSubsystem : public AssemblyBase {
2022-03-22 15:49:22 +01:00
public:
TcsSubsystem(object_id_t objectId, object_id_t parentId, PowerSwitchIF *pwrSwitcher,
power::Switch_t switcher, TcsBoardHelper helper);
2022-03-22 14:30:42 +01:00
ReturnValue_t initialize() override;
2022-03-22 17:58:05 +01:00
void performChildOperation() override;
2022-03-22 15:49:22 +01:00
private:
static constexpr uint8_t NUMBER_RTDS = 16;
PowerSwitcher switcher;
TcsBoardHelper helper;
FixedArrayList<ModeListEntry, NUMBER_RTDS> modeTable;
2022-03-22 17:58:05 +01:00
ReturnValue_t commandChildren(Mode_t mode, Submode_t submode) override;
ReturnValue_t checkChildrenStateOn(Mode_t wantedMode, Submode_t wantedSubmode) override;
ReturnValue_t isModeCombinationValid(Mode_t mode, Submode_t submode) override;
2022-03-22 11:57:48 +01:00
ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode,
2022-03-22 17:58:05 +01:00
uint32_t* msToReachTheMode) override;
2022-03-21 10:12:17 +01:00
};
#endif /* MISSION_SYSTEM_TCSSUBSYSTEM_H_ */