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:
- namestr, optional
The name of the object.
- attr_namestr, optional
The attr name on it’s parent (if it has one) ex
getattr(self.parent, self.attr_name) is self- parentparent, optional
The object’s parent, if it exists in a hierarchy
- kinda member of the
KindIntEnum (or equivalent integer), optional Default is
Kind.normal. SeeKindfor options.
- Attributes:
namename 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()Attributes
attr_nameconnectedIf the device is connected.
dotted_nameReturn the dotted name
Events that can be subscribed to via
obj.subscribekindnamename of the device
parentThe parent of the ophyd object.
reportA report on the object.
rootWalk parents to find ultimate ancestor (parent's parent...).
subscriptions