csaxs_bec.devices.omny.galil.ogalil_ophyd.OMNYGalilReadbackSignal#
- class OMNYGalilReadbackSignal(signal_name, **kwargs)[source]#
Bases:
GalilSignalROMethods
Register a callback which will receive each OphydObject instance.
Check if the value is valid for this object
Remove a subscription, given the original callback function
Provide schema and meta-data for
read()Provide schema & meta-data for
BlueskyInterface.read_configuration()Disconnect the Signal from the underlying control layer; destroy it
Get the current value of the signal.
Put method to send values to the socket.
Put the status of the signal into a simple dictionary format for data acquisition
Dictionary mapping names to value dicts with keys: value, timestamp
Set the value of the Signal and return a Status object.
Subscribe to events this event_type generates.
Call that is used by bluesky prior to read()
Remove a subscription
unsubscribe_allWait for the underlying signals to initialize or connect
Attributes
SUB_METASUB_SETPOINTSUB_VALUEattr_nameIs the signal connected to its associated hardware, and ready to use?
Return the dotted name
Events that can be subscribed to via
obj.subscribeThe high, inclusive control limit for the Signal
Field hints for plotting
ignore_glitchkindThe control limits (low, high), such that low <= value <= high
The low, inclusive control limit for the Signal
A copy of the metadata dictionary associated with the signal
Metadata keys that will be passed along on value subscriptions
name of the device
The parent of the ophyd object.
previous_rotation_angleCan the signal be read?
A report on the object.
Walk parents to find ultimate ancestor (parent's parent...).
source_namesubscriptionsTimestamp of the readback value
The absolute tolerance associated with the value.
The signal's value
Can the signal be written to?
- classmethod add_instantiation_callback(callback, fail_if_late=False)#
Register a callback which will receive each OphydObject instance.
- Parameters:
callback (callable) – Expected signature:
f(ophydobj_instance)fail_if_late (boolean) – If True, verify that OphydObj has not yet been instantiated and raise
RuntimeErrorif it has, as a way of verify that no instances will be “missed” by this registry. False by default.
- check_value(value, **kwargs)#
Check if the value is valid for this object
This function does no normalization, but may raise if the value is invalid.
- Raises:
ValueError –
- clear_sub(cb, event_type=None)#
Remove a subscription, given the original callback function
See also
subscribe(),unsubscribe()- Parameters:
cb (callable) – The callback
event_type (str, optional) – The event to unsubscribe from (if None, removes it from all event types)
- property connected#
Is the signal connected to its associated hardware, and ready to use?
- describe()#
Provide schema and meta-data for
read()This keys in the OrderedDict this method returns must match the keys in the OrderedDict return by
read().This provides schema related information, (ex shape, dtype), the source (ex PV name), and if available, units, limits, precision etc.
- Returns:
data_keys – The keys must be strings and the values must be dict-like with the
event_model.event_descriptor.data_keyschema.- Return type:
OrderedDict
- describe_configuration()#
Provide schema & meta-data for
BlueskyInterface.read_configuration()This keys in the OrderedDict this method returns must match the keys in the OrderedDict return by
read().This provides schema related information, (ex shape, dtype), the source (ex PV name), and if available, units, limits, precision etc.
- Returns:
data_keys – The keys must be strings and the values must be dict-like with the
event_model.event_descriptor.data_keyschema.- Return type:
OrderedDict
- destroy()#
Disconnect the Signal from the underlying control layer; destroy it
Clears all subscriptions on this Signal. Once destroyed, the signal may no longer be used.
- property dotted_name: str#
Return the dotted name
- property event_types#
Events that can be subscribed to via
obj.subscribe
- get(**kwargs)#
Get the current value of the signal. Children should never override this method, but should implement the socket read logic in ‘socket_get’ to ensure proper callback handling and caching of values.
- property high_limit#
The high, inclusive control limit for the Signal
- property hints#
Field hints for plotting
- property limits#
The control limits (low, high), such that low <= value <= high
- property low_limit#
The low, inclusive control limit for the Signal
- property metadata#
A copy of the metadata dictionary associated with the signal
- property metadata_keys#
Metadata keys that will be passed along on value subscriptions
- property name#
name of the device
- property parent#
The parent of the ophyd object.
If at the top of its hierarchy, parent will be None
- put(value, connection_timeout=1, **kwargs)#
Put method to send values to the socket. Children should never override this method, but should implement instead the socket write logic in ‘socket_set’ to ensure proper callback handling.
- Parameters:
value (any) – The value to set
connection_timeout (float, optional) – If not already connected, allow up to connection_timeout seconds for the connection to complete.
- read()[source]#
Put the status of the signal into a simple dictionary format for data acquisition
- Return type:
dict
- property read_access#
Can the signal be read?
- read_configuration()#
Dictionary mapping names to value dicts with keys: value, timestamp
- property report#
A report on the object.
- property root#
Walk parents to find ultimate ancestor (parent’s parent…).
- set(value, *, timeout=None, settle_time=None, **kwargs)#
Set the value of the Signal and return a Status object.
- Returns:
st – This status object will be finished upon return in the case of basic soft Signals
- Return type:
Status
- subscribe(callback, event_type=None, run=True)#
Subscribe to events this event_type generates.
The callback will be called as
cb(*args, **kwargs)with the values passed to _run_subs with the following additional keys:sub_type : the string value of the event_type obj : the host object, added if ‘obj’ not already in kwargs
if the key ‘timestamp’ is in kwargs _and_ is None, then it will be replaced with the current time before running the callback.
The
*args,**kwargspassed to _run_subs will be cached as shallow copies, be aware of passing in mutable data.Warning
If the callback raises any exceptions when run they will be silently ignored.
- Parameters:
callback (callable) –
A callable function (that takes kwargs) to be run when the event is generated. The expected signature is
def cb(*args, obj: OphydObject, sub_type: str, **kwargs) -> None:
The exact args/kwargs passed are whatever are passed to
_run_subsevent_type (str, optional) –
The name of the event to subscribe to (if None, defaults to the default sub for the instance - obj._default_sub)
This maps to the
sub_typekwargs in _run_subsrun (bool, optional) – Run the callback now
See also
clear_sub,_run_subs- Returns:
cid – id of callback, can be passed to unsubscribe to remove the callback
- Return type:
int
- property timestamp#
Timestamp of the readback value
- property tolerance#
The absolute tolerance associated with the value.
- trigger()#
Call that is used by bluesky prior to read()
- unsubscribe(cid)#
Remove a subscription
See also
subscribe(),clear_sub()- Parameters:
cid (int) – token return by
subscribe()
- property value#
The signal’s value
- wait_for_connection(timeout=0.0)#
Wait for the underlying signals to initialize or connect
- property write_access#
Can the signal be written to?