ophyd.ophydobj.OphydObject

class ophyd.ophydobj.OphydObject(*, name=None, attr_name='', parent=None, labels=None, kind=None)

The base class for all objects in Ophyd

Handles:

  • Subscription/callback mechanism
Parameters:
name : str, optional

The name of the object.

attr_name : str, optional

The attr name on it’s parent (if it has one) ex getattr(self.parent, self.attr_name) is self

parent : parent, optional

The object’s parent, if it exists in a hierarchy

kind : a member of the Kind IntEnum

(or equivalent integer), optional Default is Kind.normal. See Kind for options.

Attributes:
name

name of the device

__init__(*, name=None, attr_name='', parent=None, labels=None, kind=None)

Methods

__init__(*[, name, attr_name, parent, …])
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
destroy() Disconnect the object from the underlying control layer
subscribe(callback[, event_type, run]) Subscribe to events this event_type generates.
unsubscribe(cid) Remove a subscription
unsubscribe_all()