Action Functor for a given event, robot system, state machine.
More...
#include <base_functors.h>
|
| 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...
|
| |
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
-
| EventT | Event triggering this action |
| RobotSystemT | The robot system used in the guard check |
template<class EventT, class RobotSystemT, class LogicStateMachineT>
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_system | Provides sensor data and allows for controlling hardware |
| event | Event 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_machine | Backend of logic State Machine. can send events using this. |
| event | Event triggering the action |
- Returns
- the result of checking guard for the state
The documentation for this struct was generated from the following file: