> I was wondering if the MAX_ENUM_STATES for channel access could be increased from 16 to 32 for the next release of EPICS base.
> The line in question:
https://github.com/epics-base/epics-base/blob/d9d35a4eab601fd7e6113415574d9e255bcb6967/modules/ca/src/client/db_access.h#L32
After changing the MAX_ENUM_STATES, you’ll have to re-compile pretty much everything. All IOCs, but also all other CA servers and clients. If you’re currently using “conda install” or “pip
install” to get a channel access client or server library for python, you’ll have to build that yourself with the changed enum states. If you’re using clients written in Java, C#, … you’ll have to update those sources as well.
Interestingly the CA protocol does include a “number_of_strings_used” counter in the CRTL_ENUM info, which at first glance looks like the protocol would already transparently handle enums
with 16, 32 or whatever number of options, but that is only the number of actually used entries. The following list of labels must always contain exactly 16 entries, see
https://docs.epics-controls.org/en/latest/internal/ca_protocol.html#_gr_enum_and_ctrl_enum_meta_data
struct metaGR_ENUM {
epicsInt16 status;
epicsInt16 severity;
epicsInt16 number_of_string_used;
char strings[16][26];
};
So changes again would require a complete update of everything at your site that uses Channel Access.