ophyd.device.Device¶
- class ophyd.device.Device(prefix='', *, name, kind=None, read_attrs=None, configuration_attrs=None, parent=None, **kwargs)¶
Base class for device objects
This class provides attribute access to one or more Signals, which can be a mixture of read-only and writable. All must share the same base_name.
- Parameters
- prefixstr, optional
The PV prefix for all components of the device
- namestr, keyword only
The name of the device (as will be reported via read()`
- kinda member of the
KindIntEnum (or equivalent integer), optional Default is
Kind.normal. SeeKindfor options.- read_attrssequence of attribute names
DEPRECATED: the components to include in a normal reading (i.e., in
read())- configuration_attrssequence of attribute names
DEPRECATED: the components to be read less often (i.e., in
read_configuration()) and to adjust viaconfigure()- parentinstance or None, optional
The instance of the parent device, if applicable
- Attributes
- lazy_wait_for_connectionbool
When instantiating a lazy signal upon first access, wait for it to connect before returning control to the user. See also the context manager helpers:
wait_for_lazy_connectionanddo_not_wait_for_lazy_connection.
- __init__(prefix='', *, name, kind=None, read_attrs=None, configuration_attrs=None, parent=None, **kwargs)¶
Initialize self. See help(type(self)) for accurate signature.
Methods
__init__([prefix, kind, read_attrs, …])Initialize self.
add_instantiation_callback(callback[, …])Register a callback which will receive each OphydObject instance.
check_value(value, **kwargs)Check if the value is valid for this object
clear_sub(cb[, event_type])Remove a subscription, given the original callback function
configure(d)Configure the device for something during a run
describe()Provide schema and meta-data for
read().Provide schema & meta-data for
read_configuration()destroy()Disconnect and destroy all signals on the Device
get(**kwargs)Get the value of all components in the device
The device tuple type associated with an Device class
get_instantiated_signals(*[, attr_prefix])Yields all of the instantiated signals in a device hierarchy
pause()Attempt to ‘pause’ the device.
put(dev_t, **kwargs)Put a value to all components of the device
read()Read data from the device.
Dictionary mapping names to value dicts with keys: value, timestamp
resume()Resume a device from a ‘paused’ state.
stage()Stage the device for data collection.
stop(*[, success])Stop the Device and all (instantiated) subdevices
subscribe(callback[, event_type, run])Subscribe to events this event_type generates.
summary()trigger()Trigger the device and return status object.
unstage()Unstage the device.
unsubscribe(cid)Remove a subscription
unsubscribe_all()wait_for_connection([all_signals, timeout])Wait for signals to connect
walk_components()Walk all components in the Device hierarchy
walk_signals(*[, include_lazy])Walk all signals in the Device hierarchy
walk_subdevice_classes()Walk all sub-Devices classes in the Device hierarchy
walk_subdevices(*[, include_lazy])Walk all sub-Devices in the hierarchy
Attributes
SUB_ACQ_DONEattr_namecomponent_namesconfiguration_attrsIf the device is connected.
dotted_nameReturn the dotted name
event_typesEvents that can be subscribed to via obj.subscribe
hintskindlazy_wait_for_connectionnamename of the device
parentThe parent of the ophyd object.
read_attrsreportA report on the object.
rootWalk parents to find ultimate ancestor (parent’s parent…).
signal_namestrigger_signals