Class StateMachine
java.lang.Object
org.firstinspires.ftc.teamcode.subsystems.fsm.StateMachine
Represents a finite state machine.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A runtime exception representing an error that occurred during state machine construction, not runtime.static class
A runtime exception representing an insane state machine configuration encountered at runtime.static class
A runtime exception representing an unknown state. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdd a state to the state machine.Generate a Graphviz DOT diagram of the currently fixed state machine.void
loop()
Called on every frame of the robot, it ticks and manages the state machine.
-
Constructor Details
-
StateMachine
public StateMachine()
-
-
Method Details
-
addState
Add a state to the state machine.- Parameters:
state
- The state to add.- Returns:
- The state machine.
-
loop
public void loop()Called on every frame of the robot, it ticks and manages the state machine. -
generateDot
Generate a Graphviz DOT diagram of the currently fixed state machine.
-