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

Function toolboxEnsureField

pj_datastore/src/plugin_data_host.cpp:1425–1436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1423}
1424
1425bool toolboxEnsureField(
1426 void* ctx, TopicHandle topic, PJ_string_view_t field_name, PJ_primitive_type_t type, FieldHandle* out_field,
1427 PJ_error_t* out_error) noexcept {
1428 return guardHostCallback(out_error, [&] {
1429 auto* impl = static_cast<DatastoreToolboxHostState*>(ctx);
1430 if (!impl->core.write.ensureField(topic, toStringView(field_name), type, out_field)) {
1431 propagateError(out_error, impl->core.write.lastError());
1432 return false;
1433 }
1434 return true;
1435 });
1436}
1437
1438bool toolboxAppendRecord(
1439 void* ctx, TopicHandle topic, int64_t timestamp, const PJ_named_field_value_t* fields, uint64_t field_count,

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected