12 bool expected =
false;
13 if (!
ref_count.compare_exchange_strong(expected,
true))
15 throw std::logic_error(
"Only one instance of StdCoutLogger shall be created");
38 const char* category =
toStr(node.
type());
39 const char* name = node.
name().c_str();
virtual NodeType type() const =0
const std::string & name() const
void mtr_register_sigint_handler()
void mtr_init(const char *json_file)
virtual ~MinitraceLogger() override
virtual void callback(Duration timestamp, const TreeNode &node, NodeStatus prev_status, NodeStatus status) override
const char * toStr(const BT::NodeStatus &status, bool colored=false)
toStr converts NodeStatus to string. Optionally colored.
static std::atomic< bool > ref_count
MinitraceLogger(TreeNode *root_node, const char *filename_json)
virtual void flush() override
#define MTR_INSTANT(c, n)
void enableTransitionToIdle(bool enable)
std::chrono::high_resolution_clock::duration Duration