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

Add a allowed values to computed registers #1

Open
rroohhh opened this issue Dec 15, 2019 · 0 comments
Open

Add a allowed values to computed registers #1

rroohhh opened this issue Dec 15, 2019 · 0 comments

Comments

@rroohhh
Copy link
Member

rroohhh commented Dec 15, 2019

Add a list of allowed values to computed registers. This list is purely informational and has no influence on the actual get / set script's computed registers.

For example consider the analog gain of the cmv12000. It has a analog multiplier, that can multiply by 1, 2, 3 and 4 and a optional analog divider, which divides by 3.

So the list of possible gains is: 1/3, 2/3, 3/3, 4/3, 1, 2, 3, 4

In this case we prioritize 1 over 3/3 as it should give the same gain while having less noise.

The list of allowed values should capture these allowed gains. It should be enough to add a (optional) yml list to the computed registers where the allowed values are listed.

Open questions:

  • what type of allowed values do we want to allow?

    1. only strings, as this is purely informational and has no influence on the control daemon itself
    2. the type specified as the argument type for the computed register.

    ii. is a bit cleaner, but also more complicated to implement (because one needs to store different types in the same Vec<T>, this should probably be done using a enum.

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