Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling of allowed_values for enums #342

Open
jsouter opened this issue May 28, 2024 · 0 comments
Open

Handling of allowed_values for enums #342

jsouter opened this issue May 28, 2024 · 0 comments

Comments

@jsouter
Copy link
Contributor

jsouter commented May 28, 2024

Putting this here as this is where the most necessary dev changes for interfacing with FastCS is being done, though could arguable be an issue for odin-control/ADOdin.

ADOdin IOCs can use MBBO records with a dropdown to select an enumerated value, and these can be given meaningful labels on EPICS, (e.g. for the detector trigger mode, or bit depth). The actual value sent between the AD driver and the Odin adapters is the integer value of the enum. In practice this means that if we provide the allowed_values metadata field it would have to look like ["0", "1", "2", "3"] for a record with 4 options, which provides no meaning for the values.

Since we want FastCS to generate records/screens directly from a ParameterTree with metadata, it could be helpful if allowed_values could either be reworked to provide a mapping between integer and string values, or if another metadata field could be provided with this mapping. Of course these parameters might be reworked to be strings with specific allowed values, but that would break compatibility with the ADOdin records.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant