2023-03-26 16:13:54 +02:00
|
|
|
#ifndef MISSION_POWER_DEFS_H_
|
|
|
|
#define MISSION_POWER_DEFS_H_
|
2022-03-16 20:13:21 +01:00
|
|
|
|
|
|
|
#include <fsfw/events/Event.h>
|
2023-03-26 16:13:54 +02:00
|
|
|
#include <fsfw/modes/ModeMessage.h>
|
2022-03-16 20:13:21 +01:00
|
|
|
|
2022-09-16 12:28:39 +02:00
|
|
|
#include "eive/eventSubsystemIds.h"
|
|
|
|
|
2022-03-16 20:13:21 +01:00
|
|
|
namespace power {
|
|
|
|
|
|
|
|
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PCDU_HANDLER;
|
|
|
|
//! [EXPORT] : [COMMENT] Indicates that a FSFW object requested setting a switch
|
|
|
|
//! P1: 1 if on was requested, 0 for off | P2: Switch Index
|
|
|
|
static constexpr Event SWITCH_CMD_SENT = event::makeEvent(SUBSYSTEM_ID, 0, severity::INFO);
|
2022-05-10 18:34:39 +02:00
|
|
|
//! [EXPORT] : [COMMENT] Indicated that a switch state has changed
|
2022-03-16 20:13:21 +01:00
|
|
|
//! P1: New switch state, 1 for on, 0 for off | P2: Switch Index
|
|
|
|
static constexpr Event SWITCH_HAS_CHANGED = event::makeEvent(SUBSYSTEM_ID, 1, severity::INFO);
|
|
|
|
static constexpr Event SWITCHING_Q7S_DENIED = event::makeEvent(SUBSYSTEM_ID, 2, severity::MEDIUM);
|
|
|
|
|
2022-04-28 15:25:03 +02:00
|
|
|
static constexpr Event FDIR_REACTION_IGNORED = event::makeEvent(SUBSYSTEM_ID, 3, severity::MEDIUM);
|
|
|
|
|
2023-03-26 16:13:54 +02:00
|
|
|
enum class States { IDLE, SWITCHING_POWER, CHECKING_POWER, MODE_COMMANDING };
|
|
|
|
enum class OpCodes { NONE, TO_OFF_DONE, TO_NOT_OFF_DONE, TIMEOUT_OCCURED };
|
|
|
|
|
2022-03-16 20:13:21 +01:00
|
|
|
} // namespace power
|
|
|
|
|
2023-03-26 16:13:54 +02:00
|
|
|
namespace duallane {
|
|
|
|
|
|
|
|
enum Submodes : Submode_t { A_SIDE = 0, B_SIDE = 1, DUAL_MODE = 2 };
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* MISSION_POWER_DEFS_H_ */
|