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

Method parserForObjectTopic

pj_runtime/src/SessionManager.cpp:615–622  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

613}
614
615MessageParserPluginBase* SessionManager::parserForObjectTopic(ObjectTopicId id) const {
616 // Returns a RAW pointer with no keepalive: only safe for synchronous GUI-thread
617 // use that does not outlive the call. Cross-thread / cached consumers must take
618 // parserBindingForObjectTopic and hold its keepalive instead.
619 std::shared_lock lock(object_parsers_mutex_);
620 const auto* slot = findValidParserSlotLocked(id);
621 return slot != nullptr ? static_cast<MessageParserPluginBase*>(slot->handle->context()) : nullptr;
622}
623
624std::shared_ptr<std::mutex> SessionManager::parserMutexForObjectTopic(ObjectTopicId id) const {
625 std::shared_lock lock(object_parsers_mutex_);

Callers 2

createMediaSourceMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected