|
11 | 11 |
|
12 | 12 |
|
13 | 13 | class DaeControls(StandardReadable): |
14 | | - """Subdevice for the DAE run controls.""" |
| 14 | + """DAE run control signals.""" |
15 | 15 |
|
16 | 16 | def __init__(self, dae_prefix: str, name: str = "") -> None: |
17 | | - """Set up write-only signals for DAE controls.""" |
| 17 | + """DAE run controls, for example to begin and end runs.""" |
18 | 18 | self.begin_run: SignalX = epics_signal_x(f"{dae_prefix}BEGINRUN") |
| 19 | + """ |
| 20 | + Begin a run. |
| 21 | + """ |
19 | 22 | self.begin_run_ex: BeginRunEx = BeginRunEx(dae_prefix) |
| 23 | + """ |
| 24 | + Begin a run, with options. |
| 25 | + """ |
20 | 26 | self.end_run: SignalX = epics_signal_x(f"{dae_prefix}ENDRUN") |
| 27 | + """ |
| 28 | + End a run. |
| 29 | + """ |
21 | 30 | self.pause_run: SignalX = epics_signal_x(f"{dae_prefix}PAUSERUN") |
| 31 | + """ |
| 32 | + Pause the current run. |
| 33 | + """ |
22 | 34 | self.resume_run: SignalX = epics_signal_x(f"{dae_prefix}RESUMERUN") |
| 35 | + """ |
| 36 | + Resume the current run. |
| 37 | + """ |
23 | 38 | self.abort_run: SignalX = epics_signal_x(f"{dae_prefix}ABORTRUN") |
| 39 | + """ |
| 40 | + Abort the current run (does not save data files). |
| 41 | + """ |
24 | 42 | self.recover_run: SignalX = epics_signal_x(f"{dae_prefix}RECOVERRUN") |
| 43 | + """ |
| 44 | + Recover a previously-aborted run. |
| 45 | + """ |
25 | 46 | self.save_run: SignalX = epics_signal_x(f"{dae_prefix}SAVERUN") |
| 47 | + """ |
| 48 | + Save a data file for the current run (equivalent to update & store). |
| 49 | + """ |
26 | 50 | self.update_run: SignalX = epics_signal_x(f"{dae_prefix}UPDATERUN") |
| 51 | + """ |
| 52 | + Ensure that data in the DAE has been downloaded to the ICP. |
| 53 | + """ |
27 | 54 | self.store_run: SignalX = epics_signal_x(f"{dae_prefix}STORERUN") |
| 55 | + """ |
| 56 | + Write data currently in-memory in the ICP to a data file. |
| 57 | + """ |
28 | 58 |
|
29 | 59 | super().__init__(name=name) |
30 | 60 |
|
31 | 61 |
|
32 | 62 | class BeginRunExBits(IntFlag): |
33 | | - """Bits for BEGINRUNEX.""" |
| 63 | + """Bit-flags for :py:obj:`BeginRunEx`. |
| 64 | +
|
| 65 | + These flags control behaviour such as beginning in 'paused' mode. |
| 66 | + """ |
34 | 67 |
|
35 | 68 | NONE = 0 |
| 69 | + """ |
| 70 | + Begin a run in the standard way. |
| 71 | + """ |
| 72 | + |
36 | 73 | BEGIN_PAUSED = 1 |
| 74 | + """ |
| 75 | + Begin a run in the 'paused' state. |
| 76 | + """ |
| 77 | + |
37 | 78 | BEGIN_DELAYED = 2 |
| 79 | + """ |
| 80 | + Allow 'delayed' begin commands. |
| 81 | + """ |
38 | 82 |
|
39 | 83 |
|
40 | 84 | class BeginRunEx(StandardReadable, Movable[BeginRunExBits]): |
41 | | - """Subdevice for the BEGINRUNEX signal to begin a run.""" |
| 85 | + """Subdevice for the ``BEGINRUNEX`` signal to begin a run.""" |
42 | 86 |
|
43 | 87 | def __init__(self, dae_prefix: str, name: str = "") -> None: |
44 | | - """Set up write-only signal for BEGINRUNEX.""" |
| 88 | + """Set up write-only signal for ``BEGINRUNEX``.""" |
45 | 89 | self._raw_begin_run_ex: SignalW[int] = epics_signal_w(int, f"{dae_prefix}BEGINRUNEX") |
46 | 90 | super().__init__(name=name) |
47 | 91 |
|
48 | 92 | @AsyncStatus.wrap |
49 | 93 | async def set(self, value: BeginRunExBits) -> None: |
50 | | - """Start a run with the specified bits - See BeginRunExBits.""" |
| 94 | + """Start a run with the specified behaviour flags. |
| 95 | +
|
| 96 | + See Also: |
| 97 | + :py:obj:`BeginRunExBits` for a description of the behaviour flags. |
| 98 | +
|
| 99 | + """ |
51 | 100 | logger.info("starting run with options %s", value) |
52 | 101 | await self._raw_begin_run_ex.set(value, wait=True, timeout=None) |
53 | 102 | logger.info("start run complete") |
0 commit comments