Open tacaswell opened 2 years ago
also, credit to @jwlodek for pointing out exactly where in the AD databases this is defined and very useful discussion for how to handle this!
For reference, ZNAM
and ONAM
fields from the link above are explained well in https://www.slac.stanford.edu/grp/lcls/controls/systems/xray_transport/EPICS%20Manuals/RecordReference313.pdf.
It was noted by @mrakitin that some read/write pairs have different enum_str (but the same integers), notable
Acquire
andAcquire_RBV
in area detector (see https://github.com/areaDetector/ADCore/blob/956dbbbdcb49c6bf25608533107f6041a09470b3/ADApp/Db/NDArrayBase.template#L91-L110)This causes problems when using
set_and_wait
withSignal(..., string=True)
because the readback will never be equal.We should add a check in the
EpicsSignalBase
that the enum strings match. Once we notice this issue we have several options:Additionally, we probably should fallback to using the integers in
set_and_wait
. It is likely that we should have always been preferring the integer as the canonical value that we expect to be API stable rather than the strings. While the case within a given IOC seems solid to use integers, I'm still not sure that between IOCs the integers will be more stable than the strings (thinking particularly of the acquisition mode PVs).