ophyd.v2.core.wait_for_value#
- async ophyd.v2.core.wait_for_value(signal: SignalR[T], match: T | Callable[[T], bool], timeout: float)#
Wait for a signal to have a matching value.
- Parameters:
- signal:
Call subscribe_value on this at the start, and clear_sub on it at the end
- match:
If a callable, it should return True if the value matches. If not callable then value will be checked for equality with match.
- timeout:
How long to wait for the value to match
Notes
Example usage:
wait_for_value(device.acquiring, 1, timeout=1)
Or:
wait_for_value(device.num_captured, lambda v: v > 45, timeout=1)