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

Suggestion for new control .unit to specify the physical unit of a field #11

Open
mstahl-iis opened this issue Nov 13, 2024 · 2 comments
Labels
next-round Examine this issue with the next stack of registrations

Comments

@mstahl-iis
Copy link

This is the proposal for a new control .unit to specify the physical unit of a data field.

@cabo
Copy link
Contributor

cabo commented Nov 13, 2024

I would expect the SenML registry of units (defined by RFC 8428 and RFC 8798) to be a good basis for anything like this, so I think we already are half way there.
However, I believe that adding an "annotation" feature like this goes beyond the current architecture of CDDL.
So I'd like to pick up discussion about how to use these "annotations" and what their general structure is, with more than .unit as an example to ponder.
On the way to that, a few worked examples how a (non-trivial) CDDL spec might make use of .unit and what tool support you expect would be very useful input!

@mstahl-iis
Copy link
Author

SenML surely is a sensible choice.

Tools could make use of e.g. Boost.Units or Pint, though it seems both are not widely used.

The main point is probably to have a consistent rendering in documents that describe the specification.

@cabo cabo added the next-round Examine this issue with the next stack of registrations label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next-round Examine this issue with the next stack of registrations
Projects
None yet
Development

No branches or pull requests

2 participants