ASCO Aerial Autonomy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
ActionFunctor< EventT, RobotSystemT, LogicStateMachineT > Struct Template Referenceabstract

Action Functor for a given event, robot system, state machine. More...

#include <base_functors.h>

Public Member Functions

virtual void run (EventT const &event, RobotSystemT &robot_system)=0
 Override this run function for different sub classes. This function performs the logic checking for each state. More...
 
template<class FSM , class SourceState , class TargetState >
void operator() (EventT const &event, FSM &logic_state_machine, SourceState &, TargetState &)
 operator () Internally calls run function More...
 
virtual ~ActionFunctor ()
 Virtual destructor to obtain polymorphism. More...
 

Detailed Description

template<class EventT, class RobotSystemT, class LogicStateMachineT>
struct ActionFunctor< EventT, RobotSystemT, LogicStateMachineT >

Action Functor for a given event, robot system, state machine.

This class provides run function for state transitions Derived states have to implement the specific run function behavior using this base class.

Template Parameters
EventTEvent triggering this action
RobotSystemTThe robot system used in the action
LogicStateMachineTThe logic state machine used to trigger events

Constructor & Destructor Documentation

template<class EventT, class RobotSystemT, class LogicStateMachineT>
virtual ActionFunctor< EventT, RobotSystemT, LogicStateMachineT >::~ActionFunctor ( )
inlinevirtual

Virtual destructor to obtain polymorphism.

Member Function Documentation

template<class EventT, class RobotSystemT, class LogicStateMachineT>
template<class FSM , class SourceState , class TargetState >
void ActionFunctor< EventT, RobotSystemT, LogicStateMachineT >::operator() ( EventT const &  event,
FSM &  logic_state_machine,
SourceState &  ,
TargetState &   
)
inline

operator () Internally calls run function

Parameters
logic_state_machineBackend of logic State Machine. can send events using this.
eventEvent triggering the action
template<class EventT, class RobotSystemT, class LogicStateMachineT>
virtual void ActionFunctor< EventT, RobotSystemT, LogicStateMachineT >::run ( EventT const &  event,
RobotSystemT &  robot_system 
)
pure virtual

Override this run function for different sub classes. This function performs the logic checking for each state.

Parameters
robot_systemProvides sensor data and allows for controlling hardware
eventEvent triggering the action

Implemented in PositionControlTransitionActionFunctor_< LogicStateMachineT >.


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