pcdshub / superscore

Configuration Management for EPICS PVs
Other
1 stars 3 forks source link

ENH: Record status and severity when reading PV values from EPICS #71

Closed shilorigins closed 1 month ago

shilorigins commented 1 month ago

Current Behavior

We aren't tracking PV statuses or severities at all.

Expected Behavior

Setpoints and Readbacks should represent the validity of their data through their .status and .severity attributes.

Suggested Solution

If aioca is already returning AugmentedValue instances, we can retrieve this information from there. Either way, statuses and severities should probably be incorporated into the return value of ControlLayer.get.

tangkong commented 1 month ago

Some digging revealed that while aioca claims it's returning an AugmentedValue, in reality the fields it populates depends on the format requested. As ye ol' EPICS dictates, we have to specifically request controls fields from EPICS if we want them.

For aioca, this involves caget('PV:NAME', format=epicscorelibs.ca.dbr.FORMAT_TIME), which gives both timestamp and status/severity.

In the end we'll have to write a standardized interface type to smooth over differences between various backends.