microsoft / yardl

Tooling for streaming instrument data
https://microsoft.github.io/yardl/
MIT License
30 stars 5 forks source link

Support flags enums #49

Closed johnstairs closed 1 year ago

johnstairs commented 1 year ago

We should have a special kind of enum for flags that are meant to be bitwise ORed together:

!flags
  values:
    - none
    - red
    - green
    - blue

The first value will always be 0.

As with enums, you can specify the base type and integer values:

!flags
  values:
    none: 0
    red: 1
    green: 2
    blue: 4
johnstairs commented 1 year ago

Implemented in #57