projects/common/leep/ca.py
def wait_for_acq(self, toggle_tag=False, tag=False, timeout=5.0, instance=[]):
        """Wait for next waveform acquisition to complete.
        If tag=True, then wait for the next acquisition which includes the
        side-effects of all preceding register writes
        """

        if tag or toggle_tag:
            self.pv_write('dsp_tag', 'increment', 1, instance=instance)

        T = self.pv_read('dsp_tag', 'readback')
        _log.debug('Acquire T=%d toggle=%s tag=%s', T, toggle_tag, tag)

        if self._S is None:
            # since we need to return the whole thing anyway,
            # monitor the slow data _waveform_.
            pv = self.pv_name('slow_data', 'rawinput', instance=instance)
            _log.debug('Monitoring %s', pv)
            self._S = camonitor(pv, self._E.Signal, format=FORMAT_TIME)
            # wait for, and consume, initial update
            self._E.Wait(timeout=timeout)

        while True:
            slow = self._E.Wait(timeout=timeout)
            now = datetime.datetime.utcnow()

            tag_old = slow[34]
            tag_new = slow[33]
            dT = (tag_old - T) & 0xff
            tag_match = dT == 0 and tag_new == tag_old

            if not tag:
                break

            if tag_match:
                break  # all done, waveform reflects latest parameter changes

            if dT != 0xff:
                raise RuntimeError(
                    'acquisition collides with another client: %d %d %d' % (tag_old, tag_new, T))

            _log.debug('Acquire retry')

        return tag_match, slow, now
Wait for next waveform acquisition to complete.
        If tag=True, then wait for the next acquisition which includes the
        side-effects of all preceding register writes
        
Wait for next waveform acquisition to complete.
If tag=True, then wait for the next acquisition which includes the
side-effects of all preceding register writes
Wait for next waveform acquisition to complete . If tag = True then wait for the next acquisition which includes the side - effects of all preceding register writes
def wait_for_acq(self, toggle_tag=False, tag=False, timeout=5.0, instance=[]):
        if tag or toggle_tag:
            self.pv_write('dsp_tag', 'increment', 1, instance=instance)
        T = self.pv_read('dsp_tag', 'readback')
        _log.debug('Acquire T=%d toggle=%s tag=%s', T, toggle_tag, tag)
        if self._S is None:
            pv = self.pv_name('slow_data', 'rawinput', instance=instance)
            _log.debug('Monitoring %s', pv)
            self._S = camonitor(pv, self._E.Signal, format=FORMAT_TIME)
            self._E.Wait(timeout=timeout)
        while True:
            slow = self._E.Wait(timeout=timeout)
            now = datetime.datetime.utcnow()
            tag_old = slow[34]
            tag_new = slow[33]
            dT = (tag_old - T) & 0xff
            tag_match = dT == 0 and tag_new == tag_old
            if not tag:
                break
            if tag_match:
                break  
            if dT != 0xff:
                raise RuntimeError(
                    'acquisition collides with another client: %d %d %d' % (tag_old, tag_new, T))
            _log.debug('Acquire retry')
        return tag_match, slow, now
def wait_for_acq ( self , toggle_tag = False , tag = False , timeout = 5.0 , instance = [ ] ) : if tag or toggle_tag : self . pv_write ( 'dsp_tag' , 'increment' , 1 , instance = instance ) T = self . pv_read ( 'dsp_tag' , 'readback' ) _log . debug ( 'Acquire T=%d toggle=%s tag=%s' , T , toggle_tag , tag ) if self . _S is None : pv = self . pv_name ( 'slow_data' , 'rawinput' , instance = instance ) _log . debug ( 'Monitoring %s' , pv ) self . _S = camonitor ( pv , self . _E . Signal , format = FORMAT_TIME ) self . _E . Wait ( timeout = timeout ) while True : slow = self . _E . Wait ( timeout = timeout ) now = datetime . datetime . utcnow ( ) tag_old = slow [ 34 ] tag_new = slow [ 33 ] dT = ( tag_old - T ) & 0xff tag_match = dT == 0 and tag_new == tag_old if not tag : break if tag_match : break if dT != 0xff : raise RuntimeError ( 'acquisition collides with another client: %d %d %d' % ( tag_old , tag_new , T ) ) _log . debug ( 'Acquire retry' ) return tag_match , slow , now
Wait for next waveform acquisition to complete.
Wait for next waveform acquisition to complete .
"""Wait for next waveform acquisition to complete.
        If tag=True, then wait for the next acquisition which includes the
        side-effects of all preceding register writes
        """ # since we need to return the whole thing anyway, # monitor the slow data _waveform_. # wait for, and consume, initial update # all done, waveform reflects latest parameter changes
self
toggle_tag
tag
timeout
instance