action_test_node.h
Go to the documentation of this file.
1 #ifndef ACTIONTEST_H
2 #define ACTIONTEST_H
3 
5 
6 namespace BT
7 {
9 {
10  public:
11  SyncActionTest(const std::string& name);
12 
13  BT::NodeStatus tick() override;
14 
15  void setBoolean(bool boolean_value);
16 
17  int tickCount() const
18  {
19  return tick_count_;
20  }
21 
22  void resetTicks()
23  {
24  tick_count_ = 0;
25  }
26 
27  private:
30 };
31 
33 {
34  public:
35  AsyncActionTest(const std::string& name);
36 
37  ~AsyncActionTest();
38 
39  // The method that is going to be executed by the thread
40  BT::NodeStatus tick() override;
41 
42  void setTime(int time);
43 
44  // The method used to interrupt the execution of the node
45  virtual void halt() override;
46 
47  void setBoolean(bool boolean_value);
48 
49  int tickCount() const
50  {
51  return tick_count_;
52  }
53 
54  void resetTicks()
55  {
56  tick_count_ = 0;
57  }
58 
59  private:
60  int time_;
63  std::atomic_bool stop_loop_;
64 };
65 }
66 
67 #endif
SyncActionTest(const std::string &name)
const std::string & name() const
Definition: tree_node.cpp:92
The AsyncActionNode a different thread where the action will be executed.
Definition: action_node.h:110
void setBoolean(bool boolean_value)
The SyncActionNode is an helper derived class that explicitly forbids the status RUNNING and doesn't ...
Definition: action_node.h:50
virtual void halt() overridefinal
The method used to interrupt the execution of a RUNNING node.
Definition: action_node.h:59
BT::NodeStatus tick() override
Method to be implemented by the user.
std::atomic_bool stop_loop_
int tickCount() const
NodeStatus
Definition: basic_types.h:28
int tickCount() const


behaviortree_cpp
Author(s): Michele Colledanchise, Davide Faconti
autogenerated on Sat Feb 2 2019 04:01:53