5 #ifndef __RD_STATE_HPP__
6 #define __RD_STATE_HPP__
28 virtual bool setup() = 0;
34 virtual bool loop() = 0;
55 static State *getEndState();
65 #endif //-- __RD_STATE_HPP__
virtual bool cleanup()=0
Function excuted when this state is going to be stopped (due to an error or a transition)
The main, catch-all namespace for Robot Devastation.
Definition: groups.dox:4
std::string state_id
Name of the current state.
Definition: State.hpp:59
virtual bool loop()=0
Function executed periodically when the state is active.
const std::string & getStateId() const
Returns the string that identifies the state.
Definition: State.cpp:17
Base class for each of the states of a FiniteStateMachine.
Definition: State.hpp:18
virtual bool setup()=0
Function executed just before the loop function, when the state is enabled.
virtual int evaluateConditions()=0
This function is called after each call to loop() in order to know the transition to make.