eive-obsw/mission/power/defs.h

62 lines
1.9 KiB
C
Raw Normal View History

2023-03-26 16:13:54 +02:00
#ifndef MISSION_POWER_DEFS_H_
#define MISSION_POWER_DEFS_H_
2023-03-16 18:47:51 +01:00
#include <fsfw/events/Event.h>
#include <fsfw/modes/ModeMessage.h>
2023-03-24 21:20:27 +01:00
#include <fsfw/power/definitions.h>
2023-03-16 18:47:51 +01:00
2022-09-16 12:28:39 +02:00
#include "eive/eventSubsystemIds.h"
2023-03-16 18:47:51 +01:00
namespace power {
/* Switches are uint8_t datatype and go from 0 to 255 */
enum Switches : power::Switch_t {
PDU1_CH0_TCS_BOARD_3V3,
PDU1_CH1_SYRLINKS_12V,
PDU1_CH2_STAR_TRACKER_5V,
PDU1_CH3_MGT_5V,
PDU1_CH4_SUS_NOMINAL_3V3,
PDU1_CH5_SOLAR_CELL_EXP_5V,
PDU1_CH6_PLOC_12V,
PDU1_CH7_ACS_A_SIDE_3V3,
PDU1_CH8_UNOCCUPIED,
PDU2_CH0_Q7S,
PDU2_CH1_PL_PCDU_BATT_0_14V8,
PDU2_CH2_RW_5V,
PDU2_CH3_TCS_BOARD_HEATER_IN_8V,
PDU2_CH4_SUS_REDUNDANT_3V3,
PDU2_CH5_DEPLOYMENT_MECHANISM_8V,
PDU2_CH6_PL_PCDU_BATT_1_14V8,
PDU2_CH7_ACS_BOARD_SIDE_B_3V3,
PDU2_CH8_PAYLOAD_CAMERA,
P60_DOCK_5V_STACK,
2023-04-03 16:25:32 +02:00
P60_DOCK_3V3_STACK,
2023-03-16 18:47:51 +01:00
NUMBER_OF_SWITCHES
};
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
//! 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);
2022-03-22 15:49:22 +01: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-22 15:49:22 +01:00
2023-03-16 18:47:51 +01:00
} // namespace power
2022-03-22 15:49:22 +01:00
namespace duallane {
enum Submodes : Submode_t { A_SIDE = 0, B_SIDE = 1, DUAL_MODE = 2 };
2023-03-26 16:13:54 +02:00
}
#endif /* MISSION_POWER_DEFS_H_ */