Go to the documentation of this file. 1 #ifndef ABSTRACT_LOGGER_H
2 #define ABSTRACT_LOGGER_H
30 virtual void flush() = 0;
81 this->
callback(timestamp.time_since_epoch(), node,
prev, status);
90 auto visitor = [
this, subscribeCallback](
TreeNode* node) {
91 subscribers_.push_back(node->subscribeToStatusChange(std::move(subscribeCallback)));
98 #endif // ABSTRACT_LOGGER_H
bool showsTransitionToIdle() const
std::vector< TreeNode::StatusChangeSubscriber > subscribers_
virtual ~StatusChangeLogger()=default
void enableTransitionToIdle(bool enable)
Abstract base class for Behavior Tree Nodes.
std::chrono::high_resolution_clock::time_point TimePoint
std::chrono::high_resolution_clock::duration Duration
BT::TimePoint first_timestamp_
virtual void callback(BT::Duration timestamp, const TreeNode &node, NodeStatus prev_status, NodeStatus status)=0
static pthread_mutex_t mutex
StatusChangeLogger & operator=(const StatusChangeLogger &other)=delete
std::mutex callback_mutex_
void applyRecursiveVisitor(const TreeNode *root_node, const std::function< void(const TreeNode *)> &visitor)
StatusChangeLogger(TreeNode *root_node)
void setTimestampType(TimestampType type)
bool show_transition_to_idle_
void setEnabled(bool enabled)