device_info_plugin Package

device_info_plugin Package

Copyright 2015 Christian Fobel

This file is part of device_info_plugin.

device_info_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 device_info_plugin. If not, see <http://www.gnu.org/licenses/>.

class microdrop.core_plugins.device_info_plugin.DeviceInfoPlugin[source]

Bases: pyutilib.component.core.core.SingletonPlugin

This class is automatically registered with the PluginManager.

Methods

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.
cleanup()
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_schedule_requests(function_name) Returns a list of scheduling requests (i.e., ScheduleRequest instances) for the function specified by function_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_app_exit() Handler called just before the MicroDrop application exits.
on_dmf_device_swapped(old_device, new_device)
on_plugin_disable() Handler called once the plugin instance is disabled.
on_plugin_enable() Handler called once the plugin instance is enabled.
cleanup()[source]
get_schedule_requests(function_name)[source]

Returns a list of scheduling requests (i.e., ScheduleRequest instances) for the function specified by function_name.

on_app_exit()[source]

Handler called just before the MicroDrop application exits.

on_dmf_device_swapped(old_device, new_device)[source]
on_plugin_disable()[source]

Handler called once the plugin instance is disabled.

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.device_info_plugin'
class microdrop.core_plugins.device_info_plugin.DeviceInfoZmqPlugin(name, query_uri, subscribe_options=None)[source]

Bases: zmq_plugin.plugin.Plugin

Attributes

logger Return logger configured with a name in the following form – <module_name>.<class_name>.<method_name>->”<self.name>”

Methods

close() Close all sockets.
execute(target_name, command[, timeout_s, ...]) Send request to execute the specified command to the identified target and return decoded result object.
execute_async(target_name, command[, ...]) Send request to execute the specified command to the identified target.
on_command_recv(frames) Process multi-part message from command socket.
on_execute__dumps(request)
on_execute__get_device(request)
on_execute__get_electrode_channels(request)
on_execute__get_svg_frame(request)
on_execute__ping(request)
on_execute__set_electrode_channels(request) Set channels for electrode electrode_id to channels.
on_subscribe_recv(msg_frames) Process multi-part message from subscribe socket.
query(request, **kwargs) Send request message to hub, receive response, and return decoded reply message.
register() Register as a plugin with the central hub.
reset() Reset the plugin state.
reset_command_socket() Create and configure command_socket socket (existing socket is destroyed if it exists).
reset_query_socket() Create and configure query_socket socket (existing socket is destroyed if it exists).
reset_subscribe_socket() Create and configure subscribe_socket socket (existing socket is destroyed if it exists).
send_command(request) Send command message request through hub.
on_execute__dumps(request)[source]
on_execute__get_device(request)[source]
on_execute__get_electrode_channels(request)[source]
on_execute__get_svg_frame(request)[source]
on_execute__set_electrode_channels(request)[source]

Set channels for electrode electrode_id to channels.

This includes updating self.df_electrode_channels.

Note

Existing channels assigned to electrode are overwritten.

Parameters:
  • electrode_id (str) – Electrode identifier.
  • channels (list) – List of channel identifiers assigned to the electrode.

on_plugin_install Module

release Module

rename Module