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

Method createDataSource

pj_datastore/src/plugin_data_host.cpp:352–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

350 }
351
352 [[nodiscard]] bool createDataSource(std::string_view name, DataSourceHandle* out_source) {
353 auto engine_locks = lockWriteEngines(engine, secondary_engine);
354 auto id_or = engine.createDataset(DatasetDescriptor{.source_name = std::string(name), .time_domain_id = 0});
355 if (!id_or.has_value()) {
356 setError(id_or.error());
357 return false;
358 }
359 *out_source = DataSourceHandle{.id = *id_or};
360 last_error.clear();
361 return true;
362 }
363
364 // Idempotent re-mirror of a topic onto the secondary engine. Called on
365 // every successful ensureTopic path (including cache hits) so a previously

Callers 8

TEST_FFunction · 0.80
TESTFunction · 0.80
toolboxCreateDataSourceFunction · 0.80
TESTFunction · 0.80
TESTFunction · 0.80
TESTFunction · 0.80
TESTFunction · 0.80

Calls 3

lockWriteEnginesFunction · 0.85
createDatasetMethod · 0.80
clearMethod · 0.45

Tested by 7

TEST_FFunction · 0.64
TESTFunction · 0.64
TESTFunction · 0.64
TESTFunction · 0.64
TESTFunction · 0.64
TESTFunction · 0.64