ASCO Aerial Autonomy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
GuardFunctor< 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 bool guard (EventT const &event, RobotSystemT &robot_system)=0
 Override this guard function for different sub classes. This function decides whether to call the run function for each state. More...
 
template<class FSM , class SourceState , class TargetState >
bool operator() (EventT const &event, FSM &logic_state_machine, SourceState &, TargetState &)
 operator () Internally calls guard function More...
 
virtual ~GuardFunctor ()
 Destructor. More...
 

Detailed Description

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

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

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

Template Parameters
EventTEvent triggering this action
RobotSystemTThe robot system used in the guard check

Constructor & Destructor Documentation

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

Destructor.

Member Function Documentation

template<class EventT, class RobotSystemT, class LogicStateMachineT>
virtual bool GuardFunctor< EventT, RobotSystemT, LogicStateMachineT >::guard ( EventT const &  event,
RobotSystemT &  robot_system 
)
pure virtual

Override this guard function for different sub classes. This function decides whether to call the run function for each state.

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

Implemented in PositionControlTransitionGuardFunctor_< LogicStateMachineT >.

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

operator () Internally calls guard function

Parameters
logic_state_machineBackend of logic State Machine. can send events using this.
eventEvent triggering the action
Returns
the result of checking guard for the state

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