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, DigitalSender *digital_sender)
 Constructor for the ASState class.
 
void calculate_state ()
 Calculates the state of the vehicle.
 

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 DigitalSender and Communicator interfaces to update the system state and handle transitions.

Definition at line 15 of file stateLogic.hpp.

Constructor & Destructor Documentation

◆ ASState()

ASState::ASState ( SystemData system_data,
Communicator communicator,
DigitalSender digital_sender 
)
inlineexplicit

Constructor for the ASState class.

Parameters
system_dataPointer to the SystemData object containing system status and sensor information.
communicatorPointer to the Communicator object.
digital_senderPointer to the DigitalSender object.

Definition at line 34 of file stateLogic.hpp.

Member Function Documentation

◆ calculate_state()

void ASState::calculate_state ( )
inline

Calculates the state of the vehicle.

Definition at line 46 of file stateLogic.hpp.

Here is the call graph for this function:
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 24 of file stateLogic.hpp.

◆ state_

State ASState::state_ {State::AS_OFF}

Current state of the vehicle system, initialized to OFF.

Definition at line 25 of file stateLogic.hpp.


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