Class StateMachine
java.lang.Object
org.firstinspires.ftc.teamcode.subsystems.fsm.StateMachine
Represents a finite state machine.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA runtime exception representing an error that occurred during state machine construction, not runtime.static classA runtime exception representing an insane state machine configuration encountered at runtime.static classA runtime exception representing an unknown state. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd a state to the state machine.Generate a Graphviz DOT diagram of the currently fixed state machine.voidloop()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.
-