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

Internal action that returns whether it processed an event. More...

#include <base_functors.h>

Public Member Functions

virtual bool run (RobotSystemT &robot_system, LogicStateMachineT &logic_state_machine)=0
 Override this run function for different sub classes. This function performs the logic checking for each state and processes events on the state machine. It returns false if an action is processed/ true otherwise. More...
 
template<class EventT , class FSM , class SourceState , class TargetState >
bool operator() (EventT const &, FSM &logic_state_machine, SourceState &, TargetState &)
 operator () Internally calls run function More...
 
virtual ~InternalActionFunctor ()
 virtual destructor to get polymorphism More...
 

Detailed Description

template<class RobotSystemT, class LogicStateMachineT>
struct InternalActionFunctor< RobotSystemT, LogicStateMachineT >

Internal action that returns whether it processed an event.

This action functor performs logic checks and processes events on the logic state machine. It also returns if it processed events or not. This is used with ShortingActionSequence to chain internal actions and stop executing actions once an action processes events with logic state machine

Returns true if no event processed. false if some event processed

Template Parameters
RobotSystemTThe robot system used in the guard
LogicStateMachineTThe logic state machine used to retrieve robot system

Constructor & Destructor Documentation

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

virtual destructor to get polymorphism

Member Function Documentation

template<class RobotSystemT, class LogicStateMachineT>
template<class EventT , class FSM , class SourceState , class TargetState >
bool InternalActionFunctor< RobotSystemT, LogicStateMachineT >::operator() ( EventT const &  ,
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.
template<class RobotSystemT, class LogicStateMachineT>
virtual bool InternalActionFunctor< RobotSystemT, LogicStateMachineT >::run ( RobotSystemT &  robot_system,
LogicStateMachineT &  logic_state_machine 
)
pure virtual

Override this run function for different sub classes. This function performs the logic checking for each state and processes events on the state machine. It returns false if an action is processed/ true otherwise.

Parameters
robot_systemProvides sensor data and allows for controlling hardware
logic_state_machineBackend of logic State Machine. can send events using this.

Implemented in ArmFoldInternalActionFunctor_< LogicStateMachineT >, ArmStatusInternalActionFunctor_< LogicStateMachineT >, TakeoffInternalActionFunctor_< LogicStateMachineT >, LandedInternalActionFunctor_< LogicStateMachineT >, ManualControlInternalActionFunctor_< LogicStateMachineT >, ControllerStatusInternalActionFunctor_< LogicStateMachineT, ControllerConnector, check_completed >, LandInternalActionFunctor_< LogicStateMachineT >, and HoveringInternalActionFunctor_< LogicStateMachineT, AbortEventT >.


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