Skip to content

Commit

Permalink
DEVBPM.ENH: Add method to wait BPM finish data acquisition.
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandohds564 committed Oct 22, 2021
1 parent 937c059 commit d806b44
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions siriuspy/siriuspy/devices/bpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,16 @@ def acq_nrshots(self, val):
"""."""
self['ACQShots-SP'] = val

def wait_acq_finish(self, timeout=10):
"""Wait Acquisition to finish."""
vals = {
_csbpm.AcqStates.Idle, _csbpm.AcqStates.Error,
_csbpm.AcqStates.Aborted, _csbpm.AcqStates.Too_Many_Samples,
_csbpm.AcqStates.Too_Few_Samples, _csbpm.AcqStates.No_Memory,
_csbpm.AcqStates.Acq_Overflow}
return self._wait(
'ACQStatus-Sts', vals, timeout=timeout, comp=lambda x, y: x in y)

def cmd_acq_start(self):
"""Command Start Acquisition."""
self.acq_ctrl = _csbpm.AcqEvents.Start
Expand Down

0 comments on commit d806b44

Please sign in to comment.