SAE Teensy ECU
IIT SAE Microcontroller programming
Loading...
Searching...
No Matches
State Namespace Reference

A state machine implementation, refer to State.h for more info. More...

Classes

struct  State_t
 The parent state structure to extend from to create more states. More...
 

Enumerations

enum  NotifyValue : int {
  E_NOERR , E_CONTINUE , E_ERROR , E_FATAL = 0xFA7A1 ,
  E_RESTART = 2357427
}
 Common codes that can be used by states. More...
 

Functions

void begin (State_t &entry)
 Begin the state machine with a pointer to a state.
 

Detailed Description

A state machine implementation, refer to State.h for more info.

This library implements a state machine for the Teensy Microcontoller. It was specifically made for the Teensy 3.6.

Enumeration Type Documentation

◆ NotifyValue

enum State::NotifyValue : int

Common codes that can be used by states.

Note
WIP
Enumerator
E_NOERR 

No error has occurred.

E_CONTINUE 

An error has occurred but we can continue normally.

E_ERROR 

An error has occurred, attempt to skip the state.

E_FATAL 

Special code that makes the state machine completely stop.

E_RESTART 

Special code that makes the state machine start from the first state again.

Definition at line 44 of file State.h.

Function Documentation

◆ begin()

void State::begin ( State_t entry)

Begin the state machine with a pointer to a state.

Parameters
entryPointer of the first state to start on