ophyd_async.core.observe_value#

async ophyd_async.core.observe_value(signal: SignalR[T], timeout=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

  • done_status – If this status is complete, stop observing and make the iterator return.

Notes

Example usage:

async for value in observe_value(sig):
    do_something_with(value)