meggert
a0025030f1
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
70 lines
2.4 KiB
C++
70 lines
2.4 KiB
C++
#ifndef MISSION_POWER_DEFS_H_
|
|
#define MISSION_POWER_DEFS_H_
|
|
|
|
#include <fsfw/events/Event.h>
|
|
#include <fsfw/modes/ModeMessage.h>
|
|
#include <fsfw/power/definitions.h>
|
|
|
|
#include "eive/eventSubsystemIds.h"
|
|
|
|
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,
|
|
P60_DOCK_3V3_STACK,
|
|
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);
|
|
//! [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);
|
|
|
|
static constexpr Event FDIR_REACTION_IGNORED = event::makeEvent(SUBSYSTEM_ID, 3, severity::MEDIUM);
|
|
|
|
//! [EXPORT] : [COMMENT] The dataset read for the inputs of the Power Controller has failed.
|
|
static constexpr Event DATASET_READ_FAILED = event::makeEvent(SUBSYSTEM_ID, 4, severity::INFO);
|
|
//! [EXPORT] : [COMMENT] The battery voltage read is out of the bounds in which it is supposed to
|
|
//! be.
|
|
//! P1: 1 too high, 0 too low
|
|
static constexpr Event VOLTAGE_OUT_OF_BOUNDS = event::makeEvent(SUBSYSTEM_ID, 5, severity::HIGH);
|
|
|
|
enum class States { IDLE, SWITCHING_POWER, CHECKING_POWER, MODE_COMMANDING };
|
|
enum class OpCodes { NONE, TO_OFF_DONE, TO_NOT_OFF_DONE, TIMEOUT_OCCURED };
|
|
|
|
enum RecoveryCustomStates { IDLE, POWER_SWITCHING_OFF, POWER_SWITCHING_ON, DONE };
|
|
} // namespace power
|
|
|
|
namespace duallane {
|
|
|
|
enum Submodes : Submode_t { A_SIDE = 0, B_SIDE = 1, DUAL_MODE = 2 };
|
|
|
|
}
|
|
|
|
#endif /* MISSION_POWER_DEFS_H_ */
|