diff options
| author | Christian Kolset <christian.kolset@gmail.com> | 2026-05-07 13:02:34 -0600 |
|---|---|---|
| committer | Christian Kolset <christian.kolset@gmail.com> | 2026-06-03 09:50:17 -0600 |
| commit | deb3ad65d25d4c3167a3cbeca2ac19b5c45b0627 (patch) | |
| tree | 131eebcabfab2d0a19e52aec21a21ad0a24775fa /core/signal_processor.py | |
| parent | 2b9943ba0d28449a590acfa8a41555b174b6ba84 (diff) | |
Added plugin/add-on system
Plugins live in plugins/<name>/ with a manifest.json and a LabPlugin
subclass. Enabled/disabled in Settings > Plugins tab; state persists in
plugins/enabled.json and in .labdaq profiles (loading a profile
enables/disables plugins to match). Plugins can contribute toolbar
buttons, BaseDevice instances (auto-wired into acquisition pipeline),
custom signal filter classes, a settings widget, and profile state via
get_save_state/apply_save_state. Load errors now report the exact
failing stage (file not found, class missing, on_load crash).
Includes example plugin skeleton and docs/plugin-development.md.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'core/signal_processor.py')
| -rw-r--r-- | core/signal_processor.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/signal_processor.py b/core/signal_processor.py index 417d142..723de66 100644 --- a/core/signal_processor.py +++ b/core/signal_processor.py @@ -185,6 +185,16 @@ def filter_from_dict(d: dict) -> FilterBase: return cls(**params) +def register_filter_class(name: str, cls) -> None: + """Register a plugin-provided filter class by type name.""" + FILTER_CLASSES[name] = cls + + +def unregister_filter_class(name: str) -> None: + """Remove a previously registered plugin filter class.""" + FILTER_CLASSES.pop(name, None) + + # ══════════════════════════════════════════════════════════════════════════════ # Derived channel definitions # ══════════════════════════════════════════════════════════════════════════════ |
