Plugins

Functions:

hardware_plugin(default_dirs)

Make a basic plugin that inherits from the Hardware class, clean it up on exit

test_hardware_plugin(hardware_plugin)

A subclass of autopilot.hardware.Hardware in the PLUGINDIR can be accessed with autopilot.get().

test_autoplugin()

the autopilot.utils.registry.get() function should automatically load plugins if the pref AUTOPLUGIN is True and the plugins argument is True

hardware_plugin(default_dirs) Tuple[Path, str][source]

Make a basic plugin that inherits from the Hardware class, clean it up on exit

Returns

path to created plugin file

Return type

Path

test_hardware_plugin(hardware_plugin)[source]

A subclass of autopilot.hardware.Hardware in the PLUGINDIR can be accessed with autopilot.get().

For example, for the following class declared in some .py file in the plugin dir:

from autopilot.hardware import Hardware

class Test_Hardware_Plugin(Hardware):
    def __init__(self, *args, **kwargs):
        super(Test_Hardware_Plugin, self).__init__(*args, **kwargs)

    def release(self):
        pass

one would be able to access it throughout autopilot with:

autopilot.get('hardware', 'Test_Hardware_Plugin')
# or
autopilot.get_hardware('Test_Hardware_Plugin')
test_autoplugin()[source]

the autopilot.utils.registry.get() function should automatically load plugins if the pref AUTOPLUGIN is True and the plugins argument is True