Plugins¶
Functions:
|
Make a basic plugin that inherits from the Hardware class, clean it up on exit |
|
A subclass of |
the |
- hardware_plugin(default_dirs) Tuple[pathlib.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 thePLUGINDIR
can be accessed withautopilot.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 prefAUTOPLUGIN
isTrue
and theplugins
argument is True