Formula Student Electronics & Software
The code for the embedded software
|
The CheckupManager class handles various checkup operations. More...
#include <checkupManager.hpp>
Public Types | |
enum class | CheckupState { WAIT_FOR_ASMS , START_TOGGLING_WATCHDOG , WAIT_FOR_WATCHDOG , STOP_TOGGLING_WATCHDOG , CHECK_WATCHDOG , CLOSE_SDC , WAIT_FOR_AATS , WAIT_FOR_TS , TOGGLE_VALVE , CHECK_PRESSURE , CHECK_TIMESTAMPS , CHECKUP_COMPLETE } |
The CheckupState enum represents the different states of the initial checkup process. The checkup process is a sequence of checks that the vehicle must pass before it can transition to ready state. More... | |
enum class | CheckupError { WAITING_FOR_RESPONSE , ERROR , SUCCESS } |
Public Member Functions | |
CheckupManager (SystemData *system_data) | |
Constructor for the CheckupManager class. | |
void | reset_checkup_state () |
Resets the checkup state to the initial state. | |
bool | should_stay_manual_driving () const |
Performs a manual driving checkup. | |
bool | should_stay_off (DigitalSender *digital_sender) |
Performs an off checkup. | |
CheckupError | initial_checkup_sequence (DigitalSender *digital_sender) |
Performs an initial checkup. | |
bool | should_go_ready_from_off () const |
Performs a last re-check for off to ready transition. | |
bool | should_stay_ready () const |
Performs a ready to drive checkup. | |
bool | should_enter_emergency (State current_state) const |
Performs an emergency checkup. | |
bool | should_stay_driving () const |
bool | should_stay_mission_finished () const |
Performs a mission finished checkup. | |
bool | emergency_sequence_complete () const |
Checks if the emergency sequence is complete and the vehicle can transition to AS_OFF. | |
bool | res_triggered () const |
Checks if the RES has been triggered. | |
Public Attributes | |
Metro | _ebs_sound_timestamp_ {EBS_BUZZER_TIMEOUT} |
Timer for the EBS buzzer sound check. | |
CheckupState | checkup_state_ |
Current state of the checkup process. | |
The CheckupManager class handles various checkup operations.
Definition at line 15 of file checkupManager.hpp.
|
strong |
This is for easier debugging in case initial checkup fails
Enumerator | |
---|---|
WAITING_FOR_RESPONSE | |
ERROR | |
SUCCESS |
Definition at line 49 of file checkupManager.hpp.
|
strong |
The CheckupState enum represents the different states of the initial checkup process. The checkup process is a sequence of checks that the vehicle must pass before it can transition to ready state.
Definition at line 31 of file checkupManager.hpp.
|
inlineexplicit |
Constructor for the CheckupManager class.
system_data | Pointer to the system data object. |
Definition at line 58 of file checkupManager.hpp.
|
inline |
Checks if the emergency sequence is complete and the vehicle can transition to AS_OFF.
Definition at line 269 of file checkupManager.hpp.
|
inline |
Performs an initial checkup.
Definition at line 141 of file checkupManager.hpp.
|
inline |
Checks if the RES has been triggered.
This function checks whether the RES has been triggered or not.
Definition at line 276 of file checkupManager.hpp.
|
inline |
Resets the checkup state to the initial state.
Definition at line 117 of file checkupManager.hpp.
|
inline |
Performs an emergency checkup.
Definition at line 225 of file checkupManager.hpp.
|
inline |
Performs a last re-check for off to ready transition.
Definition at line 208 of file checkupManager.hpp.
|
inline |
|
inline |
Performs a manual driving checkup.
Definition at line 122 of file checkupManager.hpp.
|
inline |
Performs a mission finished checkup.
Definition at line 262 of file checkupManager.hpp.
|
inline |
Performs an off checkup.
Definition at line 132 of file checkupManager.hpp.
|
inline |
Performs a ready to drive checkup.
Definition at line 217 of file checkupManager.hpp.
Metro CheckupManager::_ebs_sound_timestamp_ {EBS_BUZZER_TIMEOUT} |
Timer for the EBS buzzer sound check.
Definition at line 23 of file checkupManager.hpp.
CheckupState CheckupManager::checkup_state_ |
Current state of the checkup process.
Definition at line 51 of file checkupManager.hpp.