Paparazzi UAS
v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
|
The following sections provide guidelines for Paparazzi developers who wish to write Doxygen comments in the code or this manual.
Several different types of Doxygen comments can be used; often, one style will be the most appropriate for a specific context. The following guidelines provide developers with heuristics for selecting an appropriate form and writing consistent documentation comments.
///
to for one-line documentation of instances./** * First sentence is brief description. Remaining text becomes * the full description block, where "empty" lines start new paragraphs. * * One can make text appear in @a italics, @b bold, @c monospace, or * in blocks such as the one in which this example appears in the Style * Guide. See the Doxygen Manual for the full list of commands. * * @param foo For a function, describe the parameters (e.g. @a foo). * @returns The value(s) returned, or possible error conditions. */
/**
.'*'
in-line with its start:'*'
with the /**
line. /**< description
form can be used on the same line for a detailed description.///< brief
form can be used for brief descriptions.int field; /**< detailed field description */ int field2; ///< a brief description
@file
after the license header: /** * @file foo/bar/file.c * Brief description of file. * * More detailed description of file. */
The following guidelines apply to all Doxygen comment blocks:
'@cmd'
form for all doxygen commands (do not use '\cmd'
).@brief
since JAVADOC_AUTOBRIEF
is enabled.function_name()
can be used to reference functions (e.g. ahrs_propagate()).struct_name::member_name
should be used to reference structure fields in the documentation (e.g. Ahrs::body_rate
).@subpage
command somewhere the page(s) under which they should be linked:@ref
in other contexts to create links to pages and sections.file names
and code symbols
, so they appear visually distinct from surrounding text.In addition to the guidelines in the preceding sections, the following additional style guidelines should be considered when writing documentation as part of standalone text files:
'*'
convention that must be used in the source code.@page
block.@file
block at the end of each Doxygen
.dox file to document its contents:doc/manual/style.dox
, which contains a reference back to itself./** @page pagename Page Title Documentation for the page. */ /** @file This file contains the @ref pagename page. */
For an example, the Doxygen source for this Style Guide can be found in doc/manual/style.dox
, alongside other parts of The Manual.