Formula Student Electronics & Software
The code for the embedded software
Loading...
Searching...
No Matches
ASState Class Reference

The ASState class manages and transitions between different states of the vehicle system. More...

#include <stateLogic.hpp>

Collaboration diagram for ASState:
Collaboration graph

Public Member Functions

 ASState (SystemData *system_data, Communicator *communicator, OutputCoordinator *output_coordinator)
 Constructor for the ASState class.
 
void calculate_state ()
 Calculates the state of the vehicle.
 
void timer_started ()
 

Public Attributes

CheckupManager _checkup_manager_
 CheckupManager object for handling various checkup operations.
 
State state_ {State::AS_OFF}
 Current state of the vehicle system, initialized to OFF.
 

Detailed Description

The ASState class manages and transitions between different states of the vehicle system.

The ASState class uses the CheckupManager to perform system checks and determine the appropriate state transitions based on the vehicle's status and operational conditions. It interacts with hardware components via the OutputCoordinator and Communicator interfaces to update the system state and handle transitions.

Definition at line 18 of file stateLogic.hpp.

Constructor & Destructor Documentation

◆ ASState()

ASState::ASState ( SystemData system_data,
Communicator communicator,
OutputCoordinator output_coordinator 
)
inlineexplicit

Constructor for the ASState class.

Parameters
system_dataPointer to the SystemData object containing system status and sensor information.
communicatorPointer to the Communicator object.
output_coordinatorPointer to the OutputCoordinator object.

Definition at line 41 of file stateLogic.hpp.

Member Function Documentation

◆ calculate_state()

void ASState::calculate_state ( )
inline

Calculates the state of the vehicle.

Definition at line 56 of file stateLogic.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ timer_started()

void ASState::timer_started ( )
inline

Definition at line 53 of file stateLogic.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ _checkup_manager_

CheckupManager ASState::_checkup_manager_

CheckupManager object for handling various checkup operations.

Definition at line 31 of file stateLogic.hpp.

◆ state_

State ASState::state_ {State::AS_OFF}

Current state of the vehicle system, initialized to OFF.

Definition at line 32 of file stateLogic.hpp.


The documentation for this class was generated from the following file: