Doxygen

From robotics

Doxygen is the tool that was used to create HTML and PDF documentation for RBELib. It is installed on all of the lab computers already and if you want to set it up on your computer you can look here. If you need help setting it up you can ask a staff member for some help.

The following few sections give a brief overview of how you can use Doxygen in your own code similar to RBELib. You can also look at the source code to see how it is structured for more information.

Config File

In Eclipse when using Eclox, you can create a configuration file by right clicking on your project and going to

New > Other > Other > Doxyfile

Give it a name and then press Finish to create the file in your project. Open the file now in Eclipse and you are presented with the basic configuration page to set options you want to use. Fill in a name and a version number then click Add under Input directories that you want scanned for your files and use the Browse Directory button to select something. If needed, select the Scan recursively box to include all sub-folders.

HTML & PDFs

Under the Output Formats section on the right, choose HTML to make webpages and choose the mode you want it to be in, and if you want a PDF choose LaTex in whatever mode you want it to be.

Under the Diagrams to Generate section if you want to see call graphs, choose the option for using the dot tool provided you have installed graphviz as per the installation guide.

Finally, you should set optimization for C and set the Output Directory to be wherever you want the generated files to go (html and latex folders).

Advanced Options

To get to the advanced options, choose the tab that is below the horizontal scroll bar or edit the doxy file in a text editor. These settings are up to you to discover either by looking at the settings used in RBELib or by searching the web.

Basic Example

The following is the basic format for explaining a function that doxy can parse.

/** 
 * @brief Sets the Kp, Ki, and Kd values for 1 link.
 * @details to set the values, use the following style
 * @code pidConst.Kp = 1.3; @endcode
 * @param link The link you want to set the values for (H or L).
 * @param Kp Proportional value.
 * @param Ki Integral value.
 * @param Kd Derivative value.
 * @return void
 *
 * @todo Create a function to the the PID constants for a given link/
 */
void setConst(char link, float Kp, float Ki, float Kd);


@brief - A short description of the function.

@details - A longer explanation of the function that can contain code examples.

@code / @endcode - Start and end of a code block

@param - Immediately followed by the name of a parameter and then a description for it.

@return - What the function returns if applicable. Optional if the function return type is void.

@f[ / @f] - LaTeX code can be used between the two symbols provided it is enabled and installed.