ophyd_async.core.observe_value#
- async ophyd_async.core.observe_value(signal: SignalR[T], timeout: float | None = None, done_status: Status | None = None) AsyncGenerator[T, None] [source]#
Subscribe to the value of a signal so it can be iterated from.
- Parameters:
signal – Call subscribe_value on this at the start, and clear_sub on it at the end
timeout – If given, how long to wait for each updated value in seconds. If an update is not produced in this time then raise asyncio.TimeoutError
done_status – If this status is complete, stop observing and make the iterator return. If it raises an exception then this exception will be raised by the iterator.
Notes
Example usage:
async for value in observe_value(sig): do_something_with(value)