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

Function parserEnsureField

pj_datastore/src/plugin_data_host.cpp:1342–1354  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1340}
1341
1342bool parserEnsureField(
1343 void* ctx, PJ_string_view_t field_name, PJ_primitive_type_t type, FieldHandle* out_field,
1344 PJ_error_t* out_error) noexcept {
1345 return guardHostCallback(out_error, [&] {
1346 auto* impl = static_cast<DatastoreParserWriteHostState*>(ctx);
1347 auto core = impl->core.load(std::memory_order_acquire);
1348 if (!core->ensureField(impl->topic, toStringView(field_name), type, out_field)) {
1349 propagateError(out_error, core->lastError());
1350 return false;
1351 }
1352 return true;
1353 });
1354}
1355
1356bool parserAppendRecord(
1357 void* ctx, 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