MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / toolboxEnsureTopic

Function toolboxEnsureTopic

pj_datastore/src/plugin_data_host.cpp:1412–1423  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1410}
1411
1412bool toolboxEnsureTopic(
1413 void* ctx, DataSourceHandle source, PJ_string_view_t topic_name, TopicHandle* out_topic,
1414 PJ_error_t* out_error) noexcept {
1415 return guardHostCallback(out_error, [&] {
1416 auto* impl = static_cast<DatastoreToolboxHostState*>(ctx);
1417 if (!impl->core.write.ensureTopic(source, toStringView(topic_name), out_topic)) {
1418 propagateError(out_error, impl->core.write.lastError());
1419 return false;
1420 }
1421 return true;
1422 });
1423}
1424
1425bool toolboxEnsureField(
1426 void* ctx, TopicHandle topic, PJ_string_view_t field_name, PJ_primitive_type_t type, FieldHandle* out_field,

Callers

nothing calls this directly

Calls 5

guardHostCallbackFunction · 0.85
propagateErrorFunction · 0.85
ensureTopicMethod · 0.80
lastErrorMethod · 0.80
toStringViewFunction · 0.70

Tested by

no test coverage detected