ophyd_async.core.callback_on_mock_put#

ophyd_async.core.callback_on_mock_put(signal: Signal[T], callback: Callable[[T], None] | Callable[[T], Awaitable[None]])[source]#

For setting a callback when a backend is put to.

Can either be used in a context, with the callback being unset on exit, or as an ordinary function.

Parameters:
  • signal – A signal with a MockSignalBackend backend.

  • callback – The callback to call when the backend is put to during the context.