epics-extensions / ca-gateway

Channel Access PV Gateway
http://www.aps.anl.gov/epics/extensions/gateway/
Other
18 stars 17 forks source link

String representation of ENUMs with more than 16 states #19

Open anjohnson opened 5 years ago

anjohnson commented 5 years ago

Tom Fors pointed out:

Running a caget command through the gateway returns the ENUM value rather than the string while a direct connection returns the string:

phoebus $ caget B:SD:CurrentRefWF.DTYP
B:SD:CurrentRefWF.DTYP         19

helios $ caget B:SD:CurrentRefWF.DTYP
B:SD:CurrentRefWF.DTYP         Xycom 566 Waveform

He didn't realize the significance of the enum value 19, which I have explained.

However it might be feasible for the Gateway to fetch the string representation of an ENUM when its integer value is ≥16 (it could even cache the representations of such higher values, although cache invalidation might be a problem) and hence return the correct string when asked. I don't know if gdd can handle more than 16 enums strings though, and I'm not sure that implementing this would be worth the effort, but I'm just filing this as a future possibility.