pcdsdevices.signal._OptionalEpicsSignal

class pcdsdevices.signal._OptionalEpicsSignal(read_pv, write_pv=None, *, name, parent=None, kind=None, **kwargs)

An EPICS Signal which may or may not exist.

The init parameters mirror those of EpicsSignal.

Notes

This should be considered for internal use only, and not for user-facing device components. If you use this in your new device, there is a good chance we will reject your PR.

Methods

describe(*args, **kwargs)

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 (OrderedDict) – The keys must be strings and the values must be dict-like with the event_model.event_descriptor.data_key schema.

get(*args, **kwargs)

The readback value

read(*args, **kwargs)

Put the status of the signal into a simple dictionary format for data acquisition

Returns:

dict

read_configuration(*args, **kwargs)

Dictionary mapping names to value dicts with keys: value, timestamp

set(*args, **kwargs)

Set the value of the Signal and return a Status object.

Returns:

st (Status) – This status object will be finished upon return in the case of basic soft Signals

should_use_epics_signal() bool

Tell _OptionalEpicsSignal whether or not to use the EpicsSignal.

By default, the EpicsSignal will be used if the PV has connected.

Note

  • Subclasses should override this with their own functionality.

  • This value should not change during the lifetime of the _OptionalEpicsSignal.

trigger()

Call that is used by bluesky prior to read()

Attributes

SUB_META = 'meta'
connected
enum_strs
high_limit

The high, inclusive control limit for the Signal

hints

Field hints for plotting

kind

The EPICS signal’s kind.

limits
low_limit

The low, inclusive control limit for the Signal

metadata

A copy of the metadata dictionary associated with the signal

metadata_keys

Metadata keys that will be passed along on value subscriptions

precision
read_access
subscriptions: ClassVar[FrozenSet[str]] = frozenset({'meta', 'value'})
timestamp

Timestamp of the readback value

tolerance

The absolute tolerance associated with the value.

value

The signal’s value

write_access