44from ophyd_async .core import DatasetDescriber , SignalR , SignalRW , StrictEnum
55from ophyd_async .epics .core import EpicsDevice , PvSuffix
66
7- from ._utils import ADBaseDataType , FileWriteMode , ImageMode , convert_ad_dtype_to_np
7+ from ._utils import ADBaseDataType , ADFileWriteMode , ADImageMode , convert_ad_dtype_to_np
88
99
1010class ADCallbacks (StrictEnum ):
@@ -13,6 +13,12 @@ class ADCallbacks(StrictEnum):
1313
1414
1515class NDArrayBaseIO (EpicsDevice ):
16+ """Class responsible for passing detector data from drivers to pluglins.
17+
18+ This mirrors the interface provided by ADCore/db/NDArrayBase.template.
19+ See HTML docs at https://areadetector.github.io/areaDetector/ADCore/NDArray.html
20+ """
21+
1622 unique_id : A [SignalR [int ], PvSuffix ("UniqueId_RBV" )]
1723 nd_attributes_file : A [SignalRW [str ], PvSuffix ("NDAttributesFile" )]
1824 acquire : A [SignalRW [bool ], PvSuffix .rbv ("Acquire" )]
@@ -40,6 +46,12 @@ async def shape(self) -> tuple[int, int]:
4046
4147
4248class NDPluginBaseIO (NDArrayBaseIO ):
49+ """Base class from which plugins are derived.
50+
51+ This mirrors the interface provided by ADCore/db/NDPluginBase.template.
52+ See HTML docs at https://areadetector.github.io/areaDetector/ADCore/NDPluginDriver.html
53+ """
54+
4355 nd_array_port : A [SignalRW [str ], PvSuffix .rbv ("NDArrayPort" )]
4456 enable_callbacks : A [SignalRW [ADCallbacks ], PvSuffix .rbv ("EnableCallbacks" )]
4557 nd_array_address : A [SignalRW [int ], PvSuffix .rbv ("NDArrayAddress" )]
@@ -49,7 +61,11 @@ class NDPluginBaseIO(NDArrayBaseIO):
4961
5062
5163class NDPluginStatsIO (NDPluginBaseIO ):
52- """Plugin for computing statistics from an image or ROI within an image."""
64+ """Plugin for computing statistics from an image or ROI within an image.
65+
66+ This mirrors the interface provided by ADCore/db/NDStats.template.
67+ See HTML docs at https://areadetector.github.io/areaDetector/ADCore/NDPluginStats.html
68+ """
5369
5470 # Basic statistics
5571 compute_statistics : A [SignalRW [bool ], PvSuffix .rbv ("ComputeStatistics" )]
@@ -91,10 +107,16 @@ class ADState(StrictEnum):
91107
92108
93109class ADBaseIO (NDArrayBaseIO ):
110+ """Base class from which areaDetector drivers are derived.
111+
112+ This mirrors the interface provided by ADCore/db/ADBase.template.
113+ See HTML docs at https://areadetector.github.io/areaDetector/ADCore/ADDriver.html
114+ """
115+
94116 acquire_time : A [SignalRW [float ], PvSuffix .rbv ("AcquireTime" )]
95117 acquire_period : A [SignalRW [float ], PvSuffix .rbv ("AcquirePeriod" )]
96118 num_images : A [SignalRW [int ], PvSuffix .rbv ("NumImages" )]
97- image_mode : A [SignalRW [ImageMode ], PvSuffix .rbv ("ImageMode" )]
119+ image_mode : A [SignalRW [ADImageMode ], PvSuffix .rbv ("ImageMode" )]
98120 detector_state : A [SignalR [ADState ], PvSuffix ("DetectorState_RBV" )]
99121
100122
@@ -110,14 +132,20 @@ class ADCompression(StrictEnum):
110132
111133
112134class NDFileIO (NDPluginBaseIO ):
135+ """Base class from which file plugins are derived.
136+
137+ This mirrors the interface provided by ADCore/db/NDFile.template.
138+ See HTML docs at https://areadetector.github.io/areaDetector/ADCore/NDPluginFile.html
139+ """
140+
113141 file_path : A [SignalRW [str ], PvSuffix .rbv ("FilePath" )]
114142 file_name : A [SignalRW [str ], PvSuffix .rbv ("FileName" )]
115143 file_path_exists : A [SignalR [bool ], PvSuffix ("FilePathExists_RBV" )]
116144 file_template : A [SignalRW [str ], PvSuffix .rbv ("FileTemplate" )]
117145 full_file_name : A [SignalR [str ], PvSuffix ("FullFileName_RBV" )]
118146 file_number : A [SignalRW [int ], PvSuffix ("FileNumber" )]
119147 auto_increment : A [SignalRW [bool ], PvSuffix ("AutoIncrement" )]
120- file_write_mode : A [SignalRW [FileWriteMode ], PvSuffix .rbv ("FileWriteMode" )]
148+ file_write_mode : A [SignalRW [ADFileWriteMode ], PvSuffix .rbv ("FileWriteMode" )]
121149 num_capture : A [SignalRW [int ], PvSuffix .rbv ("NumCapture" )]
122150 num_captured : A [SignalR [int ], PvSuffix ("NumCaptured_RBV" )]
123151 capture : A [SignalRW [bool ], PvSuffix .rbv ("Capture" )]
@@ -127,6 +155,12 @@ class NDFileIO(NDPluginBaseIO):
127155
128156
129157class NDFileHDFIO (NDFileIO ):
158+ """Plugin for storing data in HDF5 file format.
159+
160+ This mirrors the interface provided by ADCore/db/NDFileHDF5.template.
161+ See HTML docs at https://areadetector.github.io/areaDetector/ADCore/NDFileHDF5.html
162+ """
163+
130164 position_mode : A [SignalRW [bool ], PvSuffix .rbv ("PositionMode" )]
131165 compression : A [SignalRW [ADCompression ], PvSuffix .rbv ("Compression" )]
132166 num_extra_dims : A [SignalRW [int ], PvSuffix .rbv ("NumExtraDims" )]
0 commit comments