|
1 | | -from nslsii.ad33 import CamV33Mixin |
| 1 | +from ophyd import Component as Cpt |
| 2 | +from ophyd import EpicsSignal, EpicsSignalRO |
2 | 3 | from ophyd.areadetector.cam import AreaDetectorCam |
3 | 4 | from ophyd.areadetector.filestore_mixins import FileStoreHDF5, FileStoreIterativeWrite |
4 | 5 | from ophyd.areadetector.plugins import HDF5Plugin |
5 | 6 |
|
6 | 7 |
|
7 | | -class SynchronisedAdDriverBase(AreaDetectorCam, CamV33Mixin): |
| 8 | +class SynchronisedAdDriverBase(AreaDetectorCam): |
8 | 9 | """ |
9 | 10 | Base Ophyd device to control an AreaDetector driver and |
10 | 11 | syncrhonise it on other AreaDetector plugins, even non-blocking ones. |
11 | 12 | """ |
12 | 13 |
|
| 14 | + adcore_version = Cpt(EpicsSignalRO, "ADCoreVersion_RBV", string=True, kind="config") |
| 15 | + driver_version = Cpt(EpicsSignalRO, "DriverVersion_RBV", string=True, kind="config") |
| 16 | + wait_for_plugins = Cpt(EpicsSignal, "WaitForPlugins", string=True, kind="config") |
| 17 | + |
13 | 18 | def stage(self, *args, **kwargs): |
14 | 19 | # Makes the detector allow non-blocking AD plugins but makes Ophyd use |
15 | 20 | # the AcquireBusy PV to determine when an acquisition is complete |
16 | 21 | self.ensure_nonblocking() |
17 | 22 | return super().stage(*args, **kwargs) |
18 | 23 |
|
| 24 | + def ensure_nonblocking(self): |
| 25 | + self.stage_sigs["wait_for_plugins"] = "Yes" |
| 26 | + for c in self.parent.component_names: |
| 27 | + cpt = getattr(self.parent, c) |
| 28 | + if cpt is self: |
| 29 | + continue |
| 30 | + if hasattr(cpt, "ensure_nonblocking"): |
| 31 | + cpt.ensure_nonblocking() |
| 32 | + |
19 | 33 |
|
20 | 34 | class Hdf5Writer(HDF5Plugin, FileStoreHDF5, FileStoreIterativeWrite): |
21 | 35 | """ """ |
|
0 commit comments