1 #ifndef ABSTRACT_LOGGER_H 2 #define ABSTRACT_LOGGER_H 26 virtual void flush() = 0;
46 return show_transition_to_idle_;
51 show_transition_to_idle_ = enable;
75 this->
callback(timestamp.time_since_epoch(), node, prev, status);
84 auto visitor = [
this, subscribeCallback](
TreeNode* node) {
85 subscribers_.push_back(node->subscribeToStatusChange(std::move(subscribeCallback)));
92 #endif // ABSTRACT_LOGGER_H BT::TimePoint first_timestamp_
std::chrono::high_resolution_clock::time_point TimePoint
bool show_transition_to_idle_
std::array< uint8_t, 12 > SerializedTransition
std::vector< TreeNode::StatusChangeSubscriber > subscribers_
void seTimestampType(TimestampType type)
bool showsTransitionToIdle() const
Abstract base class for Behavior Tree Nodes.
void setEnabled(bool enabled)
StatusChangeLogger(TreeNode *root_node)
virtual void callback(BT::Duration timestamp, const TreeNode &node, NodeStatus prev_status, NodeStatus status)=0
void enableTransitionToIdle(bool enable)
std::chrono::high_resolution_clock::duration Duration
void applyRecursiveVisitor(const TreeNode *root_node, const std::function< void(const TreeNode *)> &visitor)