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

Method parserKeepaliveForObjectTopic

pj_runtime/src/SessionManager.cpp:607–613  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

605}
606
607std::shared_ptr<void> SessionManager::parserKeepaliveForObjectTopic(ObjectTopicId id) const {
608 // shared_ptr<MessageParserHandle> -> shared_ptr<void>: holding it keeps the
609 // handle (and thus the parser instance + plugin DSO) alive for the consumer.
610 std::shared_lock lock(object_parsers_mutex_);
611 const auto* slot = findValidParserSlotLocked(id);
612 return slot != nullptr ? slot->handle : nullptr;
613}
614
615MessageParserPluginBase* SessionManager::parserForObjectTopic(ObjectTopicId id) const {
616 // Returns a RAW pointer with no keepalive: only safe for synchronous GUI-thread

Callers 5

TESTFunction · 0.80
TESTFunction · 0.80
TESTFunction · 0.80
TESTFunction · 0.80
TESTFunction · 0.80

Calls

no outgoing calls

Tested by 5

TESTFunction · 0.64
TESTFunction · 0.64
TESTFunction · 0.64
TESTFunction · 0.64
TESTFunction · 0.64