ophyd.status.SubscriptionStatus#

class ophyd.status.SubscriptionStatus(device, callback, event_type=None, timeout=None, settle_time=None, run=True)#

Status updated via ophyd events

Parameters:
deviceobj
callbackcallable

Callback that takes event information and returns a boolean. Signature should be f(*, old_value, value, **kwargs). The arguments old_value and value will be passed in by keyword, so their order does not matter.

event_typestr, optional

Name of event type to check whether the device has finished succesfully

timeoutfloat, optional

Maximum timeout to wait to mark the request as a failure

settle_timefloat, optional

Time to wait after completion until running callbacks

run: bool, optional

Run the callback now

__init__(device, callback, event_type=None, timeout=None, settle_time=None, run=True)#

Methods

__init__(device, callback[, event_type, ...])

add_callback(callback)

Register a callback to be called once when the Status finishes.

check_value(*args, **kwargs)

Update the status object

exception([timeout])

Return the exception raised by the action.

set_exception(exc)

Mark as finished but failed with the given Exception.

set_finished()

Mark as finished successfully.

wait([timeout])

Block until the action completes.

watch(func)

Subscribe to notifications about partial progress.

Attributes

callbacks

Callbacks to be run when the status is marked as finished

done

Boolean indicating whether associated operation has completed.

finished_cb

settle_time

A delay between when set_finished() is when the Status is done.

success

Boolean indicating whether associated operation has completed.

timeout

The timeout for this action.