Public Member Functions | Private Member Functions | Private Attributes
BT::AsyncActionNode Class Reference

The AsyncActionNode uses a different thread where the action will be executed. More...

#include <action_node.h>

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

List of all members.

Public Member Functions

 AsyncActionNode (const std::string &name, const NodeConfiguration &config)
virtual NodeStatus executeTick () override final
 The method that should be used to invoke tick() and setStatus();.
void stopAndJoinThread ()
virtual ~AsyncActionNode () override

Private Member Functions

void asyncThreadLoop ()
void notifyStart ()
void waitStart ()

Private Attributes

std::exception_ptr exptr_
std::atomic< bool > keep_thread_alive_
bool start_action_
std::mutex start_mutex_
std::condition_variable start_signal_
std::thread thread_

Detailed Description

The AsyncActionNode uses a different thread where the action will be executed.

The user must implement the methods tick() and halt().

Definition at line 105 of file action_node.h.


Constructor & Destructor Documentation

BT::AsyncActionNode::AsyncActionNode ( const std::string &  name,
const NodeConfiguration config 
)

Definition at line 54 of file action_node.cpp.

BT::AsyncActionNode::~AsyncActionNode ( ) [override, virtual]

Definition at line 62 of file action_node.cpp.


Member Function Documentation

Definition at line 87 of file action_node.cpp.

The method that should be used to invoke tick() and setStatus();.

Reimplemented from BT::TreeNode.

Definition at line 112 of file action_node.cpp.

Definition at line 80 of file action_node.cpp.

Definition at line 129 of file action_node.cpp.

void BT::AsyncActionNode::waitStart ( ) [private]

Definition at line 70 of file action_node.cpp.


Member Data Documentation

std::exception_ptr BT::AsyncActionNode::exptr_ [private]

Definition at line 134 of file action_node.h.

std::atomic<bool> BT::AsyncActionNode::keep_thread_alive_ [private]

Definition at line 126 of file action_node.h.

Definition at line 128 of file action_node.h.

std::mutex BT::AsyncActionNode::start_mutex_ [private]

Definition at line 130 of file action_node.h.

std::condition_variable BT::AsyncActionNode::start_signal_ [private]

Definition at line 132 of file action_node.h.

std::thread BT::AsyncActionNode::thread_ [private]

Definition at line 136 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 Jun 8 2019 20:17:15