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

Function sourceEnsureField

pj_datastore/src/plugin_data_host.cpp:1281–1293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1279}
1280
1281bool sourceEnsureField(
1282 void* ctx, TopicHandle topic, PJ_string_view_t field_name, PJ_primitive_type_t type, FieldHandle* out_field,
1283 PJ_error_t* out_error) noexcept {
1284 return guardHostCallback(out_error, [&] {
1285 auto* impl = static_cast<DatastoreSourceWriteHostState*>(ctx);
1286 auto core = impl->core.load(std::memory_order_acquire);
1287 if (!core->ensureField(topic, toStringView(field_name), type, out_field)) {
1288 propagateError(out_error, core->lastError());
1289 return false;
1290 }
1291 return true;
1292 });
1293}
1294
1295bool sourceAppendRecord(
1296 void* ctx, TopicHandle topic, int64_t timestamp, const PJ_named_field_value_t* fields, uint64_t field_count,

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected