Tasks #1259
Add machine-readable unit specifications to data type definitions
Status: | Resolved | Start date: | 11/26/2012 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | J. Moringen | % Done: | 100% | |
Category: | documentation | |||
Target version: | Robotics Service Bus - rsb-0.9 |
Description
We agreed on the following syntax for field-level unit specifications
/** * COMMENT-DESCRIBING-FIELD */ // @unit(UNIT-NAME) required TYPE NAME = NUMBER;
where
UNIT-NAME
is the name of a unit such as newton
or second
.
The initial //
preserves compatibility to protoc
but may be omitted eventually.
Associated revisions
Added initial unit declarations in proto/**/*.proto
fixes #1259
Most scalar, real fields, for which it makes sense, now have a unit
declaration of the form
// @unit(UNIT)
where UNIT names a unit such as "second" or "newton".
Thanks to Arne Nordmann for providing many previously missing unit
declarations.
History
#1 Updated by J. Moringen over 11 years ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Applied in changeset rst-proto|commit:095c23abdea05ffba458b7295a51413ae3657610.