"""! Sets the temperature unit The temperature unit ("F", "C", or "K"),ĭefaults to "F" if a valid unit is not provided. Return min(max(mapped, out_max), out_min)į" temperature sensor has a value of " ![]() Return max(min(mapped, out_max), out_min) Mapped = (number - in_min) * (out_max - out_min) / (in_max - in_min) + out_min """! Maps a number from one range to number The input number to in_min The minimum value of an input in_max The maximum value of an input out_min The minimum value of an output out_max The maximum value of an output The mapped number. # The mode of operation 0 = normal, 1 = debug.ĭef map_range(number, in_min, in_max, out_min, out_max): # - Access to Sensor and TempSensor classes. # description_doxygen_example Description # Example Python program with Doxygen style comments. # - Add special project notes here that you want to communicate to the user. # generating source code documentation with Doxygen. # An example Python program demonstrating how to use Doxygen style comments for """! Example Python program with Doxygen style comments.""" Create and save a Python program named doxygen_example.py within this src directory with the code shown below. This is where we will place our source code. Create a src directory under the project directory and go into that directory as well. constants, variables, functions, classes, modules, etc.) that are common in Python programs.Ĭreate a project directory named MyDoxygenExample and go into that directory. It contains various types of elements (e.g. They merely provide an example of how to comment your source code so that it can be properly parsed by the Doxygen utility. This program, along with the associated module, are not meant to actually do anything useful. We will create a main program, named doxygen_example.py, and a module, named sensors.py, that will be used by the program. In order to generate source code based documentation using Doxygen, we first need to have source code for it to use. Test that it is installed correctly by executing the following command within a terminal or command window that will simply print its version number. Once the program is installed, either make sure that it can be found within your executable path or prepend the full directory path upon execution. This installed the doxygen executable into the /usr/local/bin directory on my Mac. Since I am using a Mac and do not plan to use the GUI front end, I chose an alternative approach and installed Doxygen from the command line via the Homebrew package manager using the following command. The program binaries for the latest release are about half way down the page. Please see the Doxygen downloads page for general installation instructions for your computer platform. If you need assistance with your particular setup, post a question in the comments section below and I, or someone else, can try to help you. If you are using a Linux or Windows computer, the vast majority of this tutorial should still apply, however, some minor changes may be necessary. I will be focusing on HTML in this tutorial. which makes it appealing to a wide audience. Doxygen can generate documentation in a variety of formats, e.g. It can also include additional information based on special annotations used within the comments. The generated documentation will include summary descriptions for almost all of the elements and members defined in your program. ![]() It parses programs written in various programming languages that are annotated with certain commenting styles.
0 Comments
Leave a Reply. |