ASCO Aerial Autonomy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
SampleLogicStateMachine_< RobotSystemT > Class Template Reference

Example Logic state machine that stores triggered event. More...

#include <sample_logic_state_machine.h>

Inheritance diagram for SampleLogicStateMachine_< RobotSystemT >:
Inheritance graph
[legend]
Collaboration diagram for SampleLogicStateMachine_< RobotSystemT >:
Collaboration graph
[legend]

Public Member Functions

 SampleLogicStateMachine_ (RobotSystemT &robot_system)
 Constructor that takes robot system. More...
 
template<class Event >
void process_event (const Event &event)
 Generic process event that stores the event type. More...
 
void process_event (const PositionYaw &event)
 process pose event message More...
 
std::type_index getProcessEventTypeId ()
 retrieve the event type_index of last processed event More...
 
PositionYaw getPoseEvent ()
 retrieve poseyaw event message More...
 
- Public Member Functions inherited from BaseStateMachine< RobotSystemT >
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...
 

Additional Inherited Members

- Public Attributes inherited from BaseStateMachine< RobotSystemT >
RobotSystemContainer
< RobotSystemT > 
robot_system_container_
 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 More...
 
- Protected Attributes inherited from BaseStateMachine< RobotSystemT >
std::type_index no_transition_event_index_ = typeid(NULL)
 type index to store the event that did not trigger any transition More...
 

Detailed Description

template<class RobotSystemT>
class SampleLogicStateMachine_< RobotSystemT >

Example Logic state machine that stores triggered event.

Template Parameters
RobotSystemTThe robot system that is used by states to perform actions

Constructor & Destructor Documentation

template<class RobotSystemT >
SampleLogicStateMachine_< RobotSystemT >::SampleLogicStateMachine_ ( RobotSystemT &  robot_system)
inline

Constructor that takes robot system.

Parameters
robot_systemprovides actions to select controllers, get/set Goals.

Member Function Documentation

template<class RobotSystemT >
PositionYaw SampleLogicStateMachine_< RobotSystemT >::getPoseEvent ( )
inline

retrieve poseyaw event message

Returns
poseyaw event message
template<class RobotSystemT >
std::type_index SampleLogicStateMachine_< RobotSystemT >::getProcessEventTypeId ( )
inline

retrieve the event type_index of last processed event

Returns
type_index of the last processed event
template<class RobotSystemT >
template<class Event >
void SampleLogicStateMachine_< RobotSystemT >::process_event ( const Event &  event)
inline

Generic process event that stores the event type.

Template Parameters
EventEvent type
Parameters
eventEvent instance sent in to process
template<class RobotSystemT >
void SampleLogicStateMachine_< RobotSystemT >::process_event ( const PositionYaw event)
inline

process pose event message

Parameters
eventmessage that is stored

The documentation for this class was generated from the following file: