MCPcopy Create free account
hub / github.com/BehaviorTree/BehaviorTree.CPP / callback

Method callback

src/loggers/bt_minitrace_logger.cpp:46–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44} // namespace
45
46void MinitraceLogger::callback(Duration /*timestamp*/, const TreeNode& node,
47 NodeStatus prev_status, NodeStatus status)
48{
49 const bool statusCompleted = isStatusCompleted(status);
50
51 const char* category = toConstStr(node.type());
52 const char* name = node.name().c_str();
53
54 if(prev_status == NodeStatus::IDLE && statusCompleted)
55 {
56 MTR_INSTANT(category, name);
57 }
58 else if(status == NodeStatus::RUNNING)
59 {
60 MTR_BEGIN(category, name);
61 }
62 else if(prev_status == NodeStatus::RUNNING && statusCompleted)
63 {
64 MTR_END(category, name);
65 }
66 mtr_flush();
67}
68
69void MinitraceLogger::flush()
70{

Callers

nothing calls this directly

Calls 5

isStatusCompletedFunction · 0.85
toConstStrFunction · 0.85
mtr_flushFunction · 0.85
typeMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected