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?
- only strings, as this is purely informational and has no influence on the control daemon itself
- 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.
Add a list of allowed values to computed registers. This list is purely informational and has no influence on the actual
get/setscript's computed registers.For example consider the analog gain of the
cmv12000. It has a analog multiplier, that can multiply by1, 2, 3and4and a optional analog divider, which divides by3.So the list of possible gains is:
1/3, 2/3, 3/3, 4/3, 1, 2, 3, 4In this case we prioritize
1over3/3as 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)
ymllist to the computed registers where the allowed values are listed.Open questions:
what type of allowed values do we want to allow?
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 aenum.