zmq_hub_plugin Package¶
zmq_hub_plugin
Package¶
Copyright 2015 Christian Fobel
This file is part of zmq_hub_plugin.
zmq_hub_plugin is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
dmf_control_board is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with zmq_hub_plugin. If not, see <http://www.gnu.org/licenses/>.
-
class
microdrop.core_plugins.zmq_hub_plugin.
MicroDropHub
(query_uri, name='hub')[source]¶ Bases:
zmq_plugin.hub.Hub
Attributes
logger
logging.Logger – Class-specific logger. Methods
on_command_recv
(msg_frames)on_execute__ping
(request)Send “pong” response to requesting plugin. on_execute__register
(request)Add name of client to registry and respond with registry contents. on_query_recv
(msg_frames)Process multi-part message from query socket. query_send
(message)Send message to query socket. reset
()Reset the plugin state. reset_command_socket
()Create and configure command socket (existing socket is destroyed if it exists). reset_publish_socket
()Create and configure publish socket (existing socket is destroyed if it exists). reset_query_socket
()Create and configure query socket (existing socket is destroyed if it exists).
-
class
microdrop.core_plugins.zmq_hub_plugin.
ZmqHubPlugin
[source]¶ Bases:
pyutilib.component.core.core.SingletonPlugin
,microdrop.plugin_helpers.AppDataController
This class is automatically registered with the PluginManager.
Methods
AppFields
alias of Form
activate
()Add this service to the global environment, and environments that manage the service’s interfaces. alias
(name[, doc, subclass])This function is used to declare aliases that can be used by a factory for constructing plugin instances. deactivate
()Remove this service from the global environment, and environments that manage the service’s interfaces. disable
()Disable this plugin. enable
()Enable this plugin. enabled
()Can be overriden to control whether a plugin is enabled. get_app_fields
()get_app_form_class
()get_app_value
(key)get_app_values
()get_default_app_options
()get_plugin_app_values
(plugin_name)implements
(interface[, namespace, inherit, ...])Can be used in the class definition of Plugin subclasses to declare the extension points that are implemented by this interface class. on_plugin_disable
()Handler called once the plugin instance is disabled. on_plugin_enable
()Handler called once the plugin instance is enabled. set_app_values
(values_dict)-
AppFields
¶ alias of
Form
-
on_plugin_enable
()[source]¶ Handler called once the plugin instance is enabled.
Note: if you inherit your plugin from AppDataController and don’t implement this handler, by default, it will automatically load all app options from the config file. If you decide to overide the default handler, you should call:
AppDataController.on_plugin_enable(self)to retain this functionality.
-
plugin_name
= 'wheelerlab.zmq_hub_plugin'¶
-