|
BehaviorTree
Core Library to create and execute Behavior Trees
|
The TreeObserver is used to collect statistics about which nodes are executed and their returned status. More...
#include <bt_observer.h>


Classes | |
| struct | NodeStatistics |
Public Member Functions | |
| TreeObserver (const BT::Tree &tree) | |
| TreeObserver (const TreeObserver &)=delete | |
| TreeObserver & | operator= (const TreeObserver &)=delete |
| TreeObserver (TreeObserver &&)=delete | |
| TreeObserver & | operator= (TreeObserver &&)=delete |
| virtual void | flush () override |
| void | resetStatistics () |
| const NodeStatistics & | getStatistics (const std::string &path) const |
| const NodeStatistics & | getStatistics (uint16_t uid) const |
| const std::unordered_map< uint16_t, NodeStatistics > & | statistics () const |
| const std::unordered_map< std::string, uint16_t > & | pathToUID () const |
| const std::map< uint16_t, std::string > & | uidToPath () const |
Public Member Functions inherited from BT::StatusChangeLogger | |
| StatusChangeLogger (TreeNode *root_node) | |
| Construct and immediately subscribe to status changes. | |
| StatusChangeLogger (const StatusChangeLogger &other)=delete | |
| StatusChangeLogger & | operator= (const StatusChangeLogger &other)=delete |
| StatusChangeLogger (StatusChangeLogger &&other)=delete | |
| StatusChangeLogger & | operator= (StatusChangeLogger &&other)=delete |
| virtual void | callback (BT::Duration timestamp, const TreeNode &node, NodeStatus prev_status, NodeStatus status)=0 |
| virtual void | flush ()=0 |
| void | setEnabled (bool enabled) |
| void | setTimestampType (TimestampType type) |
| bool | enabled () const |
| bool | showsTransitionToIdle () const |
| void | enableTransitionToIdle (bool enable) |
Additional Inherited Members | |
Protected Member Functions inherited from BT::StatusChangeLogger | |
| StatusChangeLogger ()=default | |
| Default constructor for deferred subscription. Call subscribeToTreeChanges() when ready. | |
| void | subscribeToTreeChanges (TreeNode *root_node) |
| Subscribe to status changes. Call at end of constructor for deferred subscription. | |
The TreeObserver is used to collect statistics about which nodes are executed and their returned status.
It is particularly useful to create unit tests, since if allow to determine if a certain transition happened as expected, in a non intrusive way.
|
inlineoverridevirtual |
Implements BT::StatusChangeLogger.