Skip to content

Add a allowed values to computed registers #1

Description

@rroohhh

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions