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

Method resolveInputTopic

pj_runtime/src/DataProcessorService.cpp:307–319  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

305}
306
307std::optional<std::pair<TopicId, DatasetId>> DataProcessorService::resolveInputTopic(const std::string& name) const {
308 // No name->id index on the engine; scan live topics (retired ones are excluded
309 // from listTopics, which is what we want — a stale output never resolves).
310 for (const DatasetId ds : engine_.listDatasets()) {
311 for (const TopicId tid : engine_.listTopics(ds)) {
312 const TopicStorage* storage = engine_.getTopicStorage(tid);
313 if (storage != nullptr && storage->descriptor().name == name) {
314 return std::make_pair(tid, ds);
315 }
316 }
317 }
318 return std::nullopt;
319}
320
321std::optional<DataProcessorService::ResolvedInput> DataProcessorService::resolveInputField(
322 const std::string& name) const {

Callers

nothing calls this directly

Calls 4

getTopicStorageMethod · 0.80
descriptorMethod · 0.80
listDatasetsMethod · 0.45
listTopicsMethod · 0.45

Tested by

no test coverage detected