ark::gui::PluginCommsManager
Defined in header “ark/gui/plugin_comms_manager.hh”.
This structure holds the communication (pub/sub) for a particular plugin, allowing plugins to dynamically subscribe (or publish) to new channels during normal operation.
Methods
-
PluginCommsManager(std::string plugin_name, std::string comms_namespace)
Initializes the plugin communication manager against the specified parent plugin. -
pipeline::PublisherPtr< Type > add_publisher(const std::string & channel_name)
Registers a new publisher of the given type. Returns a reference to that publisher, so you can write messages out to the rest of the stack. -
void add_subscriber(gui::SubscriberConfiguration< Type > config)
Registers a new subscriber of the given type. Returns a reference to it. These subscribers will be connected when the GUI is done initializing. -
void add_subscriber(pipeline::SubscriberConfiguration< Type > config)
Registers a new subscriber of the given type. Returns a reference to it. These subscribers will be connected when the GUI is done initializing.This is deprecated in favor of gui::SubscriberConfiguration, but left for backwards-compatibility (and for the transform network code).
-
size_t remove_subscribers(const std::string & channel_name)
Removes all subscribers with the given channel name for this plugin. If the channel name is not prefixed, it will be prefixed with the namespace.Returns a count of all the subscribers removed.
-
std::vector< PluginSubscriberBridgeBasePtr > bridges()
Returns all of the subscriber bridges registered in this interface. -
std::vector< pipeline::PublisherBasePtr > publishers()
Returns all of the publishers registered in this interface. -
std::vector< pipeline::SubscriberBasePtr > subscribers()
Returns all of the subscribers registered in this interface. -
void enable_subscriber(const std::string & channel_name)
Enables communications on the given channel. All plugins that are subscribed to this channel will gain communications to it. -
void disable_subscriber(const std::string & channel_name)
Disables communications on the given channel. All plugins that are subscribed to this channel will lose communications with it. -
std::vector< PluginBridgeEvent > bridge_events()
Clears and returns the bridge events that have occurred since the last call to poll(). Only intended to be invoked from the plugin thread, not from consumers. TODO(dtascione): Need to hide this API. -
std::vector< PluginPublisherEvent > publisher_events()
Clears and returns the publisher events that have occurred since the last call to poll(). Only intended to be invoked from the plugin thread, not from consumers.