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

Method debugMessage

src/blackboard.cpp:104–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104void Blackboard::debugMessage() const
105{
106 // Lock storage_mutex_ (shared) to prevent iterator invalidation from
107 // concurrent modifications (BUG-5 fix).
108 const std::shared_lock storage_lock(storage_mutex_);
109 for(const auto& [key, entry] : storage_)
110 {
111 auto port_type = entry->info.type();
112 if(port_type == typeid(void))
113 {
114 port_type = entry->value.type();
115 }
116
117 std::cout << key << " (" << BT::demangle(port_type) << ")" << std::endl;
118 }
119
120 for(const auto& [from, to] : internal_to_external_)
121 {
122 std::cout << "[" << from << "] remapped to port of parent tree [" << to << "]";
123 // Show the type of the remapped entry from the parent. Issue #408.
124 if(auto parent = parent_bb_.lock())
125 {
126 if(auto entry = parent->getEntry(to))
127 {
128 auto port_type = entry->info.type();
129 if(port_type == typeid(void))
130 {
131 port_type = entry->value.type();
132 }
133 std::cout << " (" << BT::demangle(port_type) << ")";
134 }
135 }
136 std::cout << std::endl;
137 }
138}
139
140std::vector<StringView> Blackboard::getKeys() const
141{

Callers 6

createNodeFromXMLMethod · 0.80
TESTFunction · 0.80
TESTFunction · 0.80
TESTFunction · 0.80
TESTFunction · 0.80
mainFunction · 0.80

Calls 4

demangleFunction · 0.85
lockMethod · 0.80
getEntryMethod · 0.80
typeMethod · 0.45

Tested by 4

TESTFunction · 0.64
TESTFunction · 0.64
TESTFunction · 0.64
TESTFunction · 0.64