Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
BT::SimpleActionNode Class Reference

The SimpleActionNode provides an easy to use ActionNode. The user should simply provide a callback with this signature. More...

#include <action_node.h>

Inheritance diagram for BT::SimpleActionNode:
Inheritance graph
[legend]

List of all members.

Public Types

typedef std::function
< NodeStatus(TreeNode &)> 
TickFunctor

Public Member Functions

virtual void halt () override
 The method used to interrupt the execution of a RUNNING node.
 SimpleActionNode (const std::string &name, TickFunctor tick_functor, const NodeParameters &params=NodeParameters())
 ~SimpleActionNode () override

Protected Member Functions

virtual NodeStatus tick () override
 Method to be implemented by the user.

Protected Attributes

TickFunctor tick_functor_

Detailed Description

The SimpleActionNode provides an easy to use ActionNode. The user should simply provide a callback with this signature.

BT::NodeStatus functionName(void)

This avoids the hassle of inheriting from a ActionNode.

Using lambdas or std::bind it is easy to pass a pointer to a method. SimpleActionNode is executed synchronously and does not support halting. NodeParameters aren't supported.

Definition at line 77 of file action_node.h.


Member Typedef Documentation

Definition at line 80 of file action_node.h.


Constructor & Destructor Documentation

BT::SimpleActionNode::SimpleActionNode ( const std::string &  name,
SimpleActionNode::TickFunctor  tick_functor,
const NodeParameters params = NodeParameters() 
)

Definition at line 38 of file action_node.cpp.


Member Function Documentation

virtual void BT::SimpleActionNode::halt ( ) [inline, override, virtual]

The method used to interrupt the execution of a RUNNING node.

Implements BT::TreeNode.

Definition at line 88 of file action_node.h.

NodeStatus BT::SimpleActionNode::tick ( ) [override, protected, virtual]

Method to be implemented by the user.

Implements BT::TreeNode.

Definition at line 45 of file action_node.cpp.


Member Data Documentation

Definition at line 96 of file action_node.h.


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


behaviortree_cpp
Author(s): Michele Colledanchise, Davide Faconti
autogenerated on Sat Feb 2 2019 03:50:10