|
@@ -0,0 +1,77 @@
|
|
1
|
+Writing sensor documentation {#documentation}
|
|
2
|
+=====================
|
|
3
|
+
|
|
4
|
+It is highly encouraged to provide at least some basic documentation for the
|
|
5
|
+sensors that you want to add to UPM:
|
|
6
|
+
|
|
7
|
+- Try to have no warnings in doxygen, this is generally fairly easy.
|
|
8
|
+- Have the specific sensor manufacturer/model & version that you used, if you
|
|
9
|
+ support multiple versions please list.
|
|
10
|
+- Simple comments do not need full stops
|
|
11
|
+- Stick to <80 chars per line even in comments
|
|
12
|
+- No text is allowed on the same line as the start or end of a comment /** */
|
|
13
|
+
|
|
14
|
+New libraries must have the "@brief", "@defgroup" and "@ingroup" tags in one
|
|
15
|
+block. This usually follows the namespace and it is common to have one sensor
|
|
16
|
+per library.
|
|
17
|
+
|
|
18
|
+Here's how this looks:
|
|
19
|
+
|
|
20
|
+```
|
|
21
|
+@verbatim
|
|
22
|
+/**
|
|
23
|
+ * @brief Short description for entire library
|
|
24
|
+ * @defgroup <name> <libupm-name>
|
|
25
|
+ * @ingroup <manufacturer> <connection type> <sensor category> (<addl group>)
|
|
26
|
+ */
|
|
27
|
+@endverbatim
|
|
28
|
+```
|
|
29
|
+
|
|
30
|
+If you have multiple classes or sensors per library, only use the "@ingroup"
|
|
31
|
+tags that are common for all of them.
|
|
32
|
+
|
|
33
|
+All classes should then have a "@brief", "@ingroup" and "@snippet". For single
|
|
34
|
+sensor libraries this block can follow immediately after the one above like in
|
|
35
|
+this example:
|
|
36
|
+
|
|
37
|
+```
|
|
38
|
+@verbatim
|
|
39
|
+/**
|
|
40
|
+ * @brief Short class/sensor description
|
|
41
|
+ *
|
|
42
|
+ * Then add a longer
|
|
43
|
+ * description here.
|
|
44
|
+ *
|
|
45
|
+ * @ingroup <name> (<addl group>)
|
|
46
|
+ * @image html <name.jpeg>
|
|
47
|
+ * @snippet <name.cxx> Interesting
|
|
48
|
+ */
|
|
49
|
+@endverbatim
|
|
50
|
+```
|
|
51
|
+
|
|
52
|
+Libraries with multiple sensors can add specific "@ingroup" tags here, but make
|
|
53
|
+sure that the first one is the "<name>" specified in the library "@defgroup"
|
|
54
|
+tag. An example of such a library for reference is our libupm-i2clcd.
|
|
55
|
+
|
|
56
|
+Optionally, a small representative image can be placed in the "docs/images"
|
|
57
|
+subfolder. **Please do not use existing, copyrighted images with your sensors!**
|
|
58
|
+
|
|
59
|
+The example should have an 'Interesting' section which will be highlighted as
|
|
60
|
+a code sample in doxygen. Everything in between such tags will show up in the
|
|
61
|
+class documentation when "@snippet" is added at the end of a class docstring.
|
|
62
|
+Tags use this format:
|
|
63
|
+
|
|
64
|
+```
|
|
65
|
+@verbatim
|
|
66
|
+ //! [Interesting]
|
|
67
|
+
|
|
68
|
+ ...example code here...
|
|
69
|
+
|
|
70
|
+ //! [Interesting]
|
|
71
|
+@endverbatim
|
|
72
|
+```
|
|
73
|
+
|
|
74
|
+Existing groups that can be used for the manufacturer, connection and category
|
|
75
|
+tags are found in the src/upm.h file.
|
|
76
|
+
|
|
77
|
+For more examples take a look at the existing headers in our github repository.
|