Interface State
public interface State
A state, belonging to an abstract state machine.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic @interface
Describes some metadata about a state.static enum
How to use the state; initial, transitional, or terminating. -
Method Summary
Modifier and TypeMethodDescriptionEdge<?>[]
getEdges()
The edges of the current state.default void
init()
Runs ONCE during state machine initialization.default void
loop()
Code that is called once per frame if the state is active.default void
start()
Runs ONCE when the state is very first reached.
-
Method Details
-
getEdges
Edge<?>[] getEdges()The edges of the current state. -
init
default void init()Runs ONCE during state machine initialization.Sets up the robot physically, digitally, and mentally for the trials ahead.
-
start
default void start()Runs ONCE when the state is very first reached. Very little initialization should be done here, if any. -
loop
default void loop()Code that is called once per frame if the state is active. Process input, send output to motors, etc. Do it all here!
-