Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flesh out NDPluginBase to include nd array port and enable callback pvs #70

Merged
merged 1 commit into from
Nov 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions src/ophyd_async/epics/areadetector/writers/nd_plugin.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
from enum import Enum

from ophyd_async.core import Device
from ophyd_async.epics.signal import epics_signal_rw

from ..utils import ad_r
from ..utils import ad_r, ad_rw


class Callback(str, Enum):
Enable = "Enable"
Disable = "Disable"


class NDArrayBase(Device):
Expand All @@ -12,7 +19,10 @@ def __init__(self, prefix: str, name: str = "") -> None:


class NDPluginBase(NDArrayBase):
pass
def __init__(self, prefix: str, name: str = "") -> None:
self.nd_array_port = ad_rw(str, prefix + "NDArrayPort")
self.enable_callback = ad_rw(Callback, prefix + "EnableCallbacks")
super().__init__(prefix, name)


class NDPluginStats(NDPluginBase):
Expand Down