New comment style and unit annotations
Summary¶
For the master branch of Robotics Systems Types, we changed the preferred comment format and added a syntax for unit specifications.
Data types which are added to the master should obey these new conventions.
The 0.7 branch is not affected.
Comment Style¶
With respect to formatting of comments, we made the following changes:
- comments should be formatted like this
/** * CONTENT */
- fields should be documented individually
@author
,@todo
etc. should be used.
In summary:
/** * ONE-SENTENCE-DESCRIPTION. * * MORE-DETAILS * * @author NAME <EMAIL> */
Units¶
We added 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.
Comments