Struct used to store a tree. If this object goes out of scope, the tree is destroyed.
More...
|
|
| Tree (const Tree &)=delete |
| |
|
Tree & | operator= (const Tree &)=delete |
| |
|
| Tree (Tree &&other)=default |
| |
|
Tree & | operator= (Tree &&other)=default |
| |
|
void | initialize () |
| |
|
void | haltTree () |
| |
|
TreeNode * | rootNode () const |
| |
| bool | sleep (std::chrono::system_clock::duration timeout) |
| | Sleep for a certain amount of time. This sleep could be interrupted by the methods TreeNode::emitWakeUpSignal() or Tree::emitWakeUpSignal()
|
| |
|
void | emitWakeUpSignal () |
| | Wake up the tree. This will interrupt the sleep() method.
|
| |
|
std::shared_ptr< WakeUpSignal > | wakeUpSignal () const |
| | Returns the shared WakeUpSignal used by this tree. This can be used to check for preemption externally, e.g. when implementing custom sleep logic with a different clock source. Returns nullptr if the tree has not been initialized yet.
|
| |
| NodeStatus | tickExactlyOnce () |
| |
|
NodeStatus | tickOnce () |
| | by default, tickOnce() sends a single tick, BUT as long as there is at least one node of the tree invoking TreeNode::emitWakeUpSignal(), it will be ticked again.
|
| |
| NodeStatus | tickWhileRunning (std::chrono::milliseconds sleep_time=std::chrono::milliseconds(10)) |
| |
|
Blackboard::Ptr | rootBlackboard () |
| |
|
void | applyVisitor (const std::function< void(const TreeNode *)> &visitor) const |
| |
|
void | applyVisitor (const std::function< void(TreeNode *)> &visitor) |
| |
|
uint16_t | getUID () |
| |
| template<typename NodeType = BT::TreeNode> |
| std::vector< const TreeNode * > | getNodesByPath (StringView wildcard_filter) const |
| |
Struct used to store a tree. If this object goes out of scope, the tree is destroyed.