Base state machine.
More...
#include <base_state_machine.h>
|
| std::type_index | get_no_transition_event_index () const |
| | Returns the index of the event that did not trigger any transition. More...
|
| |
| | BaseStateMachine (RobotSystemT &robot_system) |
| | Constructor with arguments to store robot system. More...
|
| |
| template<class FSM , class Event > |
| void | no_transition (Event const &e, FSM &, int state_index) |
| | Print event typeid if no action present for the corresponding event. More...
|
| |
template<class RobotSystemT>
class BaseStateMachine< RobotSystemT >
Base state machine.
template<class RobotSystemT>
Constructor with arguments to store robot system.
- Parameters
-
| uav_system | robot system that is stored internally and shared with events |
template<class RobotSystemT>
| std::type_index BaseStateMachine< RobotSystemT >::get_no_transition_event_index |
( |
| ) |
const |
|
inline |
Returns the index of the event that did not trigger any transition.
- Returns
- The no-transition event index
template<class RobotSystemT>
template<class FSM , class Event >
| void BaseStateMachine< RobotSystemT >::no_transition |
( |
Event const & |
e, |
|
|
FSM & |
, |
|
|
int |
state_index |
|
) |
| |
|
inline |
Print event typeid if no action present for the corresponding event.
- Template Parameters
-
| FSM | Backend to trigger events etc |
| Event | Event type that triggered no transition |
- Parameters
-
| e | event instance |
| state_index | The index of the state where the no transition event is received |
template<class RobotSystemT>
| std::type_index BaseStateMachine< RobotSystemT >::no_transition_event_index_ = typeid(NULL) |
|
protected |
type index to store the event that did not trigger any transition
template<class RobotSystemT>
robot system container used by states to get sensor data and send commands Use the operator function robot_system_container_() to retrieve robot system in Action, Guard Functors. Other classes cannot access the robot system
Decision Logic: The robot system container ensures that robot system is available to only few friend classes such as action functor, guard functors and is not available to others. This is necessary since we do not expect the logic state machine to contain the robot system. This was the only reasonable way found to share robot system across action and guard functors.
The documentation for this class was generated from the following file: