You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/commenting.rst
+16-12Lines changed: 16 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,10 @@ During the building process of open simulation interface (using the `proto2cpp <
7
7
8
8
For any additional comment styles see `list <http://www.doxygen.nl/manual/commands.html>`_ of doxygen commands.
9
9
10
+
Reference for writing values and units: ISO 80000-1: 2009, Quantities and units – Part 1: General
11
+
Nice summary: [Rohde & Schwarz: Der korrekte Umgang mit Größen, Einheiten und Gleichungen ](https://karriere.rohde-schwarz.de/fileadmin/customer/downloads/PDF/Der_korrekte_Umgang_mit_Groessen_Einheiten_und_Gleichungen_bro_de_01.pdf
12
+
)
13
+
10
14
11
15
Commenting with block syntax
12
16
-----------------------------
@@ -28,7 +32,7 @@ When writing comments specifying messages please use the following template:
28
32
Doxygen will interpret a comment consisting just of one single line as a brief description.
29
33
However to keep the style of the documentation coherent there should not be any brief description when commenting on fields and enums. That is why adding one more empty line when commenting becomes necessary. There is no need for an extra empty line if you are commenting more than one line anyways.
30
34
31
-
.. code-block:: proto
35
+
.. code-block:: protobuf
32
36
33
37
// <If you write two or more lines of comments...>
34
38
// <... you do not need to add an empty line>
@@ -146,7 +150,7 @@ Then you describe the field by adding an explanation.
146
150
//
147
151
message EnvironmentalConditions
148
152
{
149
-
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 [Pa]).
153
+
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 Pa).
150
154
//
151
155
optional double atmospheric_pressure = 1;
152
156
}
@@ -165,9 +169,9 @@ Next you decide the unit of the field.
165
169
//
166
170
message EnvironmentalConditions
167
171
{
168
-
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 [Pa]).
172
+
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 Pa).
169
173
//
170
-
// Unit: [Pa]
174
+
// Unit: Pa
171
175
//
172
176
optional double atmospheric_pressure = 1;
173
177
}
@@ -186,9 +190,9 @@ You can optionally add a note to the field to describe the field better.
186
190
//
187
191
message EnvironmentalConditions
188
192
{
189
-
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 [Pa]).
193
+
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 Pa).
190
194
//
191
-
// Unit: [Pa]
195
+
// Unit: Pa
192
196
//
193
197
// \note 100000 Pa = 1 bar
194
198
//
@@ -209,9 +213,9 @@ If you want to provide a reference to a DIN or to web page which helps in unders
209
213
//
210
214
message EnvironmentalConditions
211
215
{
212
-
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 [Pa]).
216
+
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 Pa).
213
217
//
214
-
// Unit: [Pa]
218
+
// Unit: Pa
215
219
//
216
220
// \note 100000 Pa = 1 bar
217
221
//
@@ -235,9 +239,9 @@ Finally you can provide a set of rules which this field needs to be followed. Th
235
239
//
236
240
message EnvironmentalConditions
237
241
{
238
-
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 [Pa]).
242
+
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 Pa).
239
243
//
240
-
// Unit: [Pa]
244
+
// Unit: Pa
241
245
//
242
246
// \note 100000 Pa = 1 bar
243
247
//
@@ -302,15 +306,15 @@ Commenting with doxygen references
302
306
------------------------------------
303
307
If you need to reference to another message etc., you can achieve that by just using the exact same name of this message (upper and lower case sensitive) in your comment and put '\c' in front of the message name.
304
308
305
-
.. code-block:: proto
309
+
.. code-block:: protobuf
306
310
307
311
// A reference to \c GroundTruth message.
308
312
309
313
If you want to reference a nested message, use '::' instead of '.' as separators in comments.
310
314
311
315
If you want to reference message fields and enums add '#' to the enum/field name.
0 commit comments