From 32071a677095964f5ba81c28f55b3282414228d1 Mon Sep 17 00:00:00 2001 From: Adrian Del Grosso <10929341+ad3154@users.noreply.github.com> Date: Wed, 22 Nov 2023 17:48:58 -0700 Subject: [PATCH] [CI/Meta]: Add documentation validation checking Added an action to validate doxygen builds with no warnings. Slightly increased the warning level of doxygen to catch more issues. Resolved all doxygen warnings. Update doxyfile schema for doxygen version 1.9.5 --- .github/workflows/linting.yml | 10 + doxyfile | 496 ++++++++++-------- .../can_hardware_interface.hpp | 1 + .../can_hardware_interface_single_thread.hpp | 1 + .../can_hardware_plugin.hpp | 5 +- .../flex_can_t4_plugin.hpp | 4 +- .../mcp2515_can_interface.hpp | 1 + .../src/can_hardware_interface.cpp | 2 +- .../can_hardware_interface_single_thread.cpp | 2 +- .../include/isobus/isobus/can_NAME_filter.hpp | 1 + .../can_address_claim_state_machine.hpp | 3 + .../include/isobus/isobus/can_callbacks.hpp | 1 + .../isobus/isobus/can_control_function.hpp | 3 +- .../can_extended_transport_protocol.hpp | 9 +- .../isobus/can_hardware_abstraction.hpp | 1 + .../include/isobus/isobus/can_identifier.hpp | 1 + .../isobus/can_internal_control_function.hpp | 2 + .../isobus/isobus/can_network_manager.hpp | 14 +- .../isobus/can_partnered_control_function.hpp | 1 + .../isobus/isobus/can_transport_protocol.hpp | 4 + .../isobus_device_descriptor_object_pool.hpp | 2 + .../isobus/isobus_diagnostic_protocol.hpp | 3 +- .../isobus/isobus/isobus_functionalities.hpp | 1 + .../isobus/isobus_guidance_interface.hpp | 3 + .../isobus_language_command_interface.hpp | 1 + .../isobus_maintain_power_interface.hpp | 2 + .../isobus/isobus_speed_distance_messages.hpp | 4 + .../isobus/isobus_task_controller_client.hpp | 15 + .../isobus_task_controller_client_objects.hpp | 1 + .../isobus/isobus_virtual_terminal_client.hpp | 8 + .../isobus/nmea2000_fast_packet_protocol.hpp | 10 +- .../isobus/nmea2000_message_definitions.hpp | 8 + .../isobus/nmea2000_message_interface.hpp | 7 + isobus/src/nmea2000_fast_packet_protocol.cpp | 4 +- 34 files changed, 398 insertions(+), 233 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 800b901a..ad043b86 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -34,3 +34,13 @@ jobs: run: find . -name CMakeLists.txt | xargs cmake-format -i - name: Check cmake-format run: git diff --patch-with-stat --exit-code + doxygen: + name: verify doxygen + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Generate Doxygen Documentation + uses: mattnotmitt/doxygen-action@1.9.5 + with: + doxyfile-path: 'doxyfile' diff --git a/doxyfile b/doxyfile index ffe58e25..ad0b1115 100644 --- a/doxyfile +++ b/doxyfile @@ -1,4 +1,4 @@ -# Doxyfile 1.9.1 +# Doxyfile 1.9.5 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. @@ -12,6 +12,16 @@ # For lists, items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (\" \"). +# +# Note: +# +# Use doxygen to compare the used configuration file with the template +# configuration file: +# doxygen -x [configFile] +# Use doxygen to compare the used configuration file with the template +# configuration file without replacing the environment variables or CMake type +# replacement variables: +# doxygen -x_noenv [configFile] #--------------------------------------------------------------------------- # Project related configuration options @@ -60,16 +70,28 @@ PROJECT_LOGO = OUTPUT_DIRECTORY = docs -# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- -# directories (in 2 levels) under the output directory of each output format and -# will distribute the generated files over these directories. Enabling this +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create up to 4096 +# sub-directories (in 2 levels) under the output directory of each output format +# and will distribute the generated files over these directories. Enabling this # option can be useful when feeding doxygen a huge amount of source files, where # putting all generated files in the same directory would otherwise causes -# performance problems for the file system. +# performance problems for the file system. Adapt CREATE_SUBDIRS_LEVEL to +# control the number of sub-directories. # The default value is: NO. CREATE_SUBDIRS = NO +# Controls the number of sub-directories that will be created when +# CREATE_SUBDIRS tag is set to YES. Level 0 represents 16 directories, and every +# level increment doubles the number of directories, resulting in 4096 +# directories at level 8 which is the default and also the maximum value. The +# sub-directories are organized in 2 levels, the first level always has a fixed +# numer of 16 directories. +# Minimum value: 0, maximum value: 8, default value: 8. +# This tag requires that the tag CREATE_SUBDIRS is set to YES. + +CREATE_SUBDIRS_LEVEL = 8 + # If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII # characters to appear in the names of generated files. If set to NO, non-ASCII # characters will be escaped, for example _xE3_x81_x84 will be used for Unicode @@ -81,26 +103,18 @@ ALLOW_UNICODE_NAMES = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, -# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), -# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, -# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, -# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, -# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, -# Ukrainian and Vietnamese. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Bulgarian, +# Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, English +# (United States), Esperanto, Farsi (Persian), Finnish, French, German, Greek, +# Hindi, Hungarian, Indonesian, Italian, Japanese, Japanese-en (Japanese with +# English messages), Korean, Korean-en (Korean with English messages), Latvian, +# Lithuanian, Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, +# Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, +# Swedish, Turkish, Ukrainian and Vietnamese. # The default value is: English. OUTPUT_LANGUAGE = English -# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all generated output in the proper direction. -# Possible values are: None, LTR, RTL and Context. -# The default value is: None. - -OUTPUT_TEXT_DIRECTION = None - # If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member # descriptions after the members that are listed in the file and class # documentation (similar to Javadoc). Set to NO to disable this. @@ -248,16 +262,16 @@ TAB_SIZE = 4 # the documentation. An alias has the form: # name=value # For example adding -# "sideeffect=@par Side Effects:\n" +# "sideeffect=@par Side Effects:^^" # will allow you to put the command \sideeffect (or @sideeffect) in the # documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines (in the resulting output). You can put ^^ in the value part of an -# alias to insert a newline as if a physical newline was in the original file. -# When you need a literal { or } or , in the value part of an alias you have to -# escape them by means of a backslash (\), this can lead to conflicts with the -# commands \{ and \} for these it is advised to use the version @{ and @} or use -# a double escape (\\{ and \\}) +# "Side Effects:". Note that you cannot put \n's in the value part of an alias +# to insert newlines (in the resulting output). You can put ^^ in the value part +# of an alias to insert a newline as if a physical newline was in the original +# file. When you need a literal { or } or , in the value part of an alias you +# have to escape them by means of a backslash (\), this can lead to conflicts +# with the commands \{ and \} for these it is advised to use the version @{ and +# @} or use a double escape (\\{ and \\}) ALIASES = @@ -302,8 +316,8 @@ OPTIMIZE_OUTPUT_SLICE = NO # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, and # language is one of the parsers supported by doxygen: IDL, Java, JavaScript, -# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, VHDL, -# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: +# Csharp (C#), C, C++, Lex, D, PHP, md (Markdown), Objective-C, Python, Slice, +# VHDL, Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: # FortranFree, unknown formatted Fortran: Fortran. In the later case the parser # tries to guess whether the code is fixed or free formatted code, this is the # default for Fortran type files). For instance to make doxygen treat .inc files @@ -450,13 +464,13 @@ TYPEDEF_HIDES_STRUCT = NO LOOKUP_CACHE_SIZE = 0 -# The NUM_PROC_THREADS specifies the number threads doxygen is allowed to use +# The NUM_PROC_THREADS specifies the number of threads doxygen is allowed to use # during processing. When set to 0 doxygen will based this on the number of # cores available in the system. You can set it explicitly to a value larger # than 0 to get more control over the balance between CPU load and processing # speed. At this moment only the input processing can be done using multiple # threads. Since this is still an experimental feature the default is set to 1, -# which efficively disables parallel processing. Please report any issues you +# which effectively disables parallel processing. Please report any issues you # encounter. Generating dot graphs in parallel is controlled by the # DOT_NUM_THREADS setting. # Minimum value: 0, maximum value: 32, default value: 1. @@ -575,14 +589,15 @@ INTERNAL_DOCS = NO # filesystem is case sensitive (i.e. it supports files in the same directory # whose names only differ in casing), the option must be set to YES to properly # deal with such files in case they appear in the input. For filesystems that -# are not case sensitive the option should be be set to NO to properly deal with +# are not case sensitive the option should be set to NO to properly deal with # output files written for symbols that only differ in casing, such as for two # classes, one named CLASS and the other named Class, and to also support # references to files without having to specify the exact matching casing. On # Windows (including Cygwin) and MacOS, users should typically set this option # to NO, whereas on Linux or other Unix flavors it should typically be set to # YES. -# The default value is: system dependent. +# Possible values are: SYSTEM, NO and YES. +# The default value is: SYSTEM. CASE_SENSE_NAMES = YES @@ -600,6 +615,12 @@ HIDE_SCOPE_NAMES = NO HIDE_COMPOUND_REFERENCE= NO +# If the SHOW_HEADERFILE tag is set to YES then the documentation for a class +# will show which file needs to be included to use the class. +# The default value is: YES. + +SHOW_HEADERFILE = YES + # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. # The default value is: YES. @@ -757,7 +778,8 @@ FILE_VERSION_FILTER = # output files in an output format independent way. To create the layout file # that represents doxygen's defaults, run doxygen with the -l option. You can # optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. +# will be used as the name of the layout file. See also section "Changing the +# layout of pages" for information. # # Note that if you run doxygen from a directory containing a file called # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE @@ -803,21 +825,29 @@ WARNINGS = YES WARN_IF_UNDOCUMENTED = YES # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some parameters -# in a documented function, or documenting parameters that don't exist or using -# markup commands wrongly. +# potential errors in the documentation, such as documenting some parameters in +# a documented function twice, or documenting parameters that don't exist or +# using markup commands wrongly. # The default value is: YES. WARN_IF_DOC_ERROR = YES +# If WARN_IF_INCOMPLETE_DOC is set to YES, doxygen will warn about incomplete +# function parameter documentation. If set to NO, doxygen will accept that some +# parameters have no documentation without warning. +# The default value is: YES. + +WARN_IF_INCOMPLETE_DOC = YES + # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return -# value. If set to NO, doxygen will only warn about wrong or incomplete -# parameter documentation, but not about the absence of documentation. If -# EXTRACT_ALL is set to YES then this flag will automatically be disabled. +# value. If set to NO, doxygen will only warn about wrong parameter +# documentation, but not about the absence of documentation. If EXTRACT_ALL is +# set to YES then this flag will automatically be disabled. See also +# WARN_IF_INCOMPLETE_DOC # The default value is: NO. -WARN_NO_PARAMDOC = NO +WARN_NO_PARAMDOC = YES # If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when # a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS @@ -826,7 +856,7 @@ WARN_NO_PARAMDOC = NO # Possible values are: NO, YES and FAIL_ON_WARNINGS. # The default value is: NO. -WARN_AS_ERROR = NO +WARN_AS_ERROR = FAIL_ON_WARNINGS # The WARN_FORMAT tag determines the format of the warning messages that doxygen # can produce. The string should contain the $file, $line, and $text tags, which @@ -834,13 +864,27 @@ WARN_AS_ERROR = NO # and the warning text. Optionally the format may contain $version, which will # be replaced by the version of the file (if it could be obtained via # FILE_VERSION_FILTER) +# See also: WARN_LINE_FORMAT # The default value is: $file:$line: $text. WARN_FORMAT = "$file:$line: $text" +# In the $text part of the WARN_FORMAT command it is possible that a reference +# to a more specific place is given. To make it easier to jump to this place +# (outside of doxygen) the user can define a custom "cut" / "paste" string. +# Example: +# WARN_LINE_FORMAT = "'vi $file +$line'" +# See also: WARN_FORMAT +# The default value is: at line $line of file $file. + +WARN_LINE_FORMAT = "at line $line of file $file" + # The WARN_LOGFILE tag can be used to specify a file to which warning and error # messages should be written. If left blank the output is written to standard -# error (stderr). +# error (stderr). In case the file specified cannot be opened for writing the +# warning and error messages are written to standard error. When as file - is +# specified the warning and error messages are written to standard output +# (stdout). WARN_LOGFILE = @@ -863,10 +907,21 @@ INPUT = isobus \ # libiconv (or the iconv built into libc) for the transcoding. See the libiconv # documentation (see: # https://www.gnu.org/software/libiconv/) for the list of possible encodings. +# See also: INPUT_FILE_ENCODING # The default value is: UTF-8. INPUT_ENCODING = UTF-8 +# This tag can be used to specify the character encoding of the source files +# that doxygen parses The INPUT_FILE_ENCODING tag can be used to specify +# character encoding on a per file pattern basis. Doxygen will compare the file +# name with each pattern and apply the encoding instead of the default +# INPUT_ENCODING) if there is a match. The character encodings are a list of the +# form: pattern=encoding (like *.php=ISO-8859-1). See cfg_input_encoding +# "INPUT_ENCODING" for further information on supported encodings. + +INPUT_FILE_ENCODING = + # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and # *.h) to filter out the source-files in the directories. @@ -880,10 +935,10 @@ INPUT_ENCODING = UTF-8 # # If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, # *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, -# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, -# *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment), -# *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, *.vhdl, -# *.ucf, *.qsf and *.ice. +# *.hh, *.hxx, *.hpp, *.h++, *.l, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, +# *.inc, *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C +# comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, +# *.vhdl, *.ucf, *.qsf and *.ice. FILE_PATTERNS = @@ -916,14 +971,14 @@ EXCLUDE_SYMLINKS = NO # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories for example use the pattern */test/* -EXCLUDE_PATTERNS = */hardware_integration/*.md -EXCLUDE_PATTERNS += */hardware_integration/lib/* +EXCLUDE_PATTERNS = */hardware_integration/*.md \ + */hardware_integration/lib/* # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test +# ANamespace::AClass, ANamespace::*Test # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories use the pattern */test/* @@ -971,6 +1026,11 @@ IMAGE_PATH = # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. # +# Note that doxygen will use the data processed and written to standard output +# for further processing, therefore nothing else, like debug statements or used +# commands (so in case of a Windows batch file always use @echo OFF), should be +# written to standard output. +# # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # properly processed by doxygen. @@ -1012,6 +1072,15 @@ FILTER_SOURCE_PATTERNS = USE_MDFILE_AS_MAINPAGE = README.md +# The Fortran standard specifies that for fixed formatted Fortran code all +# characters from position 72 are to be considered as comment. A common +# extension is to allow longer lines before the automatic comment starts. The +# setting FORTRAN_COMMENT_AFTER will also make it possible that longer lines can +# be processed before the automatic comment starts. +# Minimum value: 7, maximum value: 10000, default value: 72. + +FORTRAN_COMMENT_AFTER = 72 + #--------------------------------------------------------------------------- # Configuration options related to source browsing #--------------------------------------------------------------------------- @@ -1098,44 +1167,6 @@ USE_HTAGS = NO VERBATIM_HEADERS = YES -# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the -# clang parser (see: -# http://clang.llvm.org/) for more accurate parsing at the cost of reduced -# performance. This can be particularly helpful with template rich C++ code for -# which doxygen's built-in parser lacks the necessary type information. -# Note: The availability of this option depends on whether or not doxygen was -# generated with the -Duse_libclang=ON option for CMake. -# The default value is: NO. - -CLANG_ASSISTED_PARSING = NO - -# If clang assisted parsing is enabled and the CLANG_ADD_INC_PATHS tag is set to -# YES then doxygen will add the directory of each input to the include path. -# The default value is: YES. - -CLANG_ADD_INC_PATHS = YES - -# If clang assisted parsing is enabled you can provide the compiler with command -# line options that you would normally use when invoking the compiler. Note that -# the include paths will already be set by doxygen for the files and directories -# specified with INPUT and INCLUDE_PATH. -# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. - -CLANG_OPTIONS = - -# If clang assisted parsing is enabled you can provide the clang parser with the -# path to the directory containing a file called compile_commands.json. This -# file is the compilation database (see: -# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) containing the -# options used when the source files were built. This is equivalent to -# specifying the -p option to a clang tool, such as clang-check. These options -# will then be passed to the parser. Any options specified with CLANG_OPTIONS -# will be added as well. -# Note: The availability of this option depends on whether or not doxygen was -# generated with the -Duse_libclang=ON option for CMake. - -CLANG_DATABASE_PATH = - #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- @@ -1244,9 +1275,26 @@ HTML_EXTRA_STYLESHEET = HTML_EXTRA_FILES = +# The HTML_COLORSTYLE tag can be used to specify if the generated HTML output +# should be rendered with a dark or light theme. Default setting AUTO_LIGHT +# enables light output unless the user preference is dark output. Other options +# are DARK to always use dark mode, LIGHT to always use light mode, AUTO_DARK to +# default to dark mode unless the user prefers light mode, and TOGGLE to let the +# user toggle between dark and light mode via a button. +# Possible values are: LIGHT Always generate light output., DARK Always generate +# dark output., AUTO_LIGHT Automatically set the mode according to the user +# preference, use light mode if no preference is set (the default)., AUTO_DARK +# Automatically set the mode according to the user preference, use dark mode if +# no preference is set. and TOGGLE Allow to user to switch between light and +# dark mode via a button.. +# The default value is: AUTO_LIGHT. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE = AUTO_LIGHT + # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the style sheet and background images according to -# this color. Hue is specified as an angle on a colorwheel, see +# this color. Hue is specified as an angle on a color-wheel, see # https://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 # purple, and 360 is red again. @@ -1256,7 +1304,7 @@ HTML_EXTRA_FILES = HTML_COLORSTYLE_HUE = 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use grayscales only. A +# in the HTML output. For a value of 0 the output will use gray-scales only. A # value of 255 will produce the most vivid colors. # Minimum value: 0, maximum value: 255, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. @@ -1338,6 +1386,13 @@ GENERATE_DOCSET = NO DOCSET_FEEDNAME = "Doxygen generated docs" +# This tag determines the URL of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDURL = + # This tag specifies a string that should uniquely identify the documentation # set bundle. This should be a reverse domain-name style string, e.g. # com.mycompany.MyDocSet. Doxygen will append .docset to the name. @@ -1363,8 +1418,12 @@ DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three # additional HTML index files: index.hhp, index.hhc, and index.hhk. The # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: -# https://www.microsoft.com/en-us/download/details.aspx?id=21138) on Windows. +# on Windows. In the beginning of 2021 Microsoft took the original page, with +# a.o. the download links, offline the HTML help workshop was already many years +# in maintenance mode). You can download the HTML help workshop from the web +# archives at Installation executable (see: +# http://web.archive.org/web/20160201063255/http://download.microsoft.com/downlo +# ad/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe). # # The HTML Help Workshop contains a compiler that can convert all HTML output # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML @@ -1523,16 +1582,28 @@ DISABLE_INDEX = NO # to work a browser that supports JavaScript, DHTML, CSS and frames is required # (i.e. any modern browser). Windows users are probably better off using the # HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can -# further fine-tune the look of the index. As an example, the default style -# sheet generated by doxygen has an example that shows how to put an image at -# the root of the tree instead of the PROJECT_NAME. Since the tree basically has -# the same information as the tab index, you could consider setting -# DISABLE_INDEX to YES when enabling this option. +# further fine tune the look of the index (see "Fine-tuning the output"). As an +# example, the default style sheet generated by doxygen has an example that +# shows how to put an image at the root of the tree instead of the PROJECT_NAME. +# Since the tree basically has the same information as the tab index, you could +# consider setting DISABLE_INDEX to YES when enabling this option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_TREEVIEW = NO +# When both GENERATE_TREEVIEW and DISABLE_INDEX are set to YES, then the +# FULL_SIDEBAR option determines if the side bar is limited to only the treeview +# area (value NO) or if it should extend to the full height of the window (value +# YES). Setting this to YES gives a layout similar to +# https://docs.readthedocs.io with more room for contents, but less room for the +# project logo, title, and description. If either GENERATE_TREEVIEW or +# DISABLE_INDEX is set to NO, this option has no effect. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FULL_SIDEBAR = NO + # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that # doxygen will group on one line in the generated HTML documentation. # @@ -1557,6 +1628,13 @@ TREEVIEW_WIDTH = 250 EXT_LINKS_IN_WINDOW = NO +# If the OBFUSCATE_EMAILS tag is set to YES, doxygen will obfuscate email +# addresses. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +OBFUSCATE_EMAILS = YES + # If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg # tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see # https://inkscape.org) to generate formulas as SVG images instead of PNGs for @@ -1577,17 +1655,6 @@ HTML_FORMULA_FORMAT = png FORMULA_FONTSIZE = 10 -# Use the FORMULA_TRANSPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are not -# supported properly for IE 6.0, but are supported on all modern browsers. -# -# Note that when changing this option you need to delete any form_*.png files in -# the HTML output directory before the changes have effect. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_TRANSPARENT = YES - # The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands # to create new LaTeX commands to be used in formulas as building blocks. See # the section "Including formulas" for details. @@ -1605,11 +1672,29 @@ FORMULA_MACROFILE = USE_MATHJAX = NO +# With MATHJAX_VERSION it is possible to specify the MathJax version to be used. +# Note that the different versions of MathJax have different requirements with +# regards to the different settings, so it is possible that also other MathJax +# settings have to be changed when switching between the different MathJax +# versions. +# Possible values are: MathJax_2 and MathJax_3. +# The default value is: MathJax_2. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_VERSION = MathJax_2 + # When MathJax is enabled you can set the default output format to be used for -# the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. +# the MathJax output. For more details about the output format see MathJax +# version 2 (see: +# http://docs.mathjax.org/en/v2.7-latest/output.html) and MathJax version 3 +# (see: +# http://docs.mathjax.org/en/latest/web/components/output.html). # Possible values are: HTML-CSS (which is slower, but has the best -# compatibility), NativeMML (i.e. MathML) and SVG. +# compatibility. This is the name for Mathjax version 2, for MathJax version 3 +# this will be translated into chtml), NativeMML (i.e. MathML. Only supported +# for NathJax 2. For MathJax version 3 chtml will be used instead.), chtml (This +# is the name for Mathjax version 3, for MathJax version 2 this will be +# translated into HTML-CSS) and SVG. # The default value is: HTML-CSS. # This tag requires that the tag USE_MATHJAX is set to YES. @@ -1622,15 +1707,21 @@ MATHJAX_FORMAT = HTML-CSS # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax # Content Delivery Network so you can quickly see the result without installing # MathJax. However, it is strongly recommended to install a local copy of -# MathJax from https://www.mathjax.org before deployment. -# The default value is: https://cdn.jsdelivr.net/npm/mathjax@2. +# MathJax from https://www.mathjax.org before deployment. The default value is: +# - in case of MathJax version 2: https://cdn.jsdelivr.net/npm/mathjax@2 +# - in case of MathJax version 3: https://cdn.jsdelivr.net/npm/mathjax@3 # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_RELPATH = https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/ # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax # extension names that should be enabled during MathJax rendering. For example +# for MathJax version 2 (see +# https://docs.mathjax.org/en/v2.7-latest/tex.html#tex-and-latex-extensions): # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# For example for MathJax version 3 (see +# http://docs.mathjax.org/en/latest/input/tex/extensions/index.html): +# MATHJAX_EXTENSIONS = ams # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_EXTENSIONS = @@ -1810,29 +1901,31 @@ PAPER_TYPE = a4 EXTRA_PACKAGES = -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the -# generated LaTeX document. The header should contain everything until the first -# chapter. If it is left blank doxygen will generate a standard header. See -# section "Doxygen usage" for information on how to let doxygen write the -# default header to a separate file. +# The LATEX_HEADER tag can be used to specify a user-defined LaTeX header for +# the generated LaTeX document. The header should contain everything until the +# first chapter. If it is left blank doxygen will generate a standard header. It +# is highly recommended to start with a default header using +# doxygen -w latex new_header.tex new_footer.tex new_stylesheet.sty +# and then modify the file new_header.tex. See also section "Doxygen usage" for +# information on how to generate the default header that doxygen normally uses. # -# Note: Only use a user-defined header if you know what you are doing! The -# following commands have a special meaning inside the header: $title, -# $datetime, $date, $doxygenversion, $projectname, $projectnumber, -# $projectbrief, $projectlogo. Doxygen will replace $title with the empty -# string, for the replacement values of the other commands the user is referred -# to HTML_HEADER. +# Note: Only use a user-defined header if you know what you are doing! +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. The following +# commands have a special meaning inside the header (and footer): For a +# description of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_HEADER = -# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the -# generated LaTeX document. The footer should contain everything after the last -# chapter. If it is left blank doxygen will generate a standard footer. See +# The LATEX_FOOTER tag can be used to specify a user-defined LaTeX footer for +# the generated LaTeX document. The footer should contain everything after the +# last chapter. If it is left blank doxygen will generate a standard footer. See # LATEX_HEADER for more information on how to generate a default footer and what -# special commands can be used inside the footer. -# -# Note: Only use a user-defined footer if you know what you are doing! +# special commands can be used inside the footer. See also section "Doxygen +# usage" for information on how to generate the default footer that doxygen +# normally uses. Note: Only use a user-defined footer if you know what you are +# doing! # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_FOOTER = @@ -1877,8 +1970,7 @@ USE_PDFLATEX = YES # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode # command to the generated LaTeX files. This will instruct LaTeX to keep running -# if errors occur, instead of asking the user for help. This option is also used -# when generating formulas in HTML. +# if errors occur, instead of asking the user for help. # The default value is: NO. # This tag requires that the tag GENERATE_LATEX is set to YES. @@ -1891,16 +1983,6 @@ LATEX_BATCHMODE = NO LATEX_HIDE_INDICES = NO -# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source -# code with syntax highlighting in the LaTeX output. -# -# Note that which sources are shown also depends on other settings such as -# SOURCE_BROWSER. -# The default value is: NO. -# This tag requires that the tag GENERATE_LATEX is set to YES. - -LATEX_SOURCE_CODE = NO - # The LATEX_BIB_STYLE tag can be used to specify the style to use for the # bibliography, e.g. plainnat, or ieeetr. See # https://en.wikipedia.org/wiki/BibTeX and \cite for more info. @@ -1981,16 +2063,6 @@ RTF_STYLESHEET_FILE = RTF_EXTENSIONS_FILE = -# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code -# with syntax highlighting in the RTF output. -# -# Note that which sources are shown also depends on other settings such as -# SOURCE_BROWSER. -# The default value is: NO. -# This tag requires that the tag GENERATE_RTF is set to YES. - -RTF_SOURCE_CODE = NO - #--------------------------------------------------------------------------- # Configuration options related to the man page output #--------------------------------------------------------------------------- @@ -2087,15 +2159,6 @@ GENERATE_DOCBOOK = NO DOCBOOK_OUTPUT = docbook -# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the -# program listings (including syntax highlighting and cross-referencing -# information) to the DOCBOOK output. Note that enabling this will significantly -# increase the size of the DOCBOOK output. -# The default value is: NO. -# This tag requires that the tag GENERATE_DOCBOOK is set to YES. - -DOCBOOK_PROGRAMLISTING = NO - #--------------------------------------------------------------------------- # Configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- @@ -2182,7 +2245,8 @@ SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by the -# preprocessor. +# preprocessor. Note that the INCLUDE_PATH is not recursive, so the setting of +# RECURSIVE has no effect here. # This tag requires that the tag SEARCH_INCLUDES is set to YES. INCLUDE_PATH = @@ -2274,15 +2338,6 @@ EXTERNAL_PAGES = YES # Configuration options related to the dot tool #--------------------------------------------------------------------------- -# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram -# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to -# NO turns the diagrams off. Note that this option also works with HAVE_DOT -# disabled, but it is recommended to install and use dot, since it yields more -# powerful graphs. -# The default value is: YES. - -CLASS_DIAGRAMS = YES - # You can include diagrams made with dia in doxygen documentation. Doxygen will # then run dia to produce the diagram and insert it in the documentation. The # DIA_PATH tag allows you to specify the directory where the dia binary resides. @@ -2301,7 +2356,7 @@ HIDE_UNDOC_RELATIONS = YES # http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent # Bell Labs. The other options in this section have no effect if this option is # set to NO -# The default value is: YES. +# The default value is: NO. HAVE_DOT = YES @@ -2315,35 +2370,50 @@ HAVE_DOT = YES DOT_NUM_THREADS = 0 -# When you want a differently looking font in the dot files that doxygen -# generates you can specify the font name using DOT_FONTNAME. You need to make -# sure dot is able to find the font, which can be done by putting it in a -# standard location or by setting the DOTFONTPATH environment variable or by -# setting DOT_FONTPATH to the directory containing the font. -# The default value is: Helvetica. +# DOT_COMMON_ATTR is common attributes for nodes, edges and labels of +# subgraphs. When you want a differently looking font in the dot files that +# doxygen generates you can specify fontname, fontcolor and fontsize attributes. +# For details please see Node, +# Edge and Graph Attributes specification You need to make sure dot is able +# to find the font, which can be done by putting it in a standard location or by +# setting the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the +# directory containing the font. Default graphviz fontsize is 14. +# The default value is: fontname=Helvetica,fontsize=10. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_COMMON_ATTR = "fontname=Helvetica,fontsize=10" + +# DOT_EDGE_ATTR is concatenated with DOT_COMMON_ATTR. For elegant style you can +# add 'arrowhead=open, arrowtail=open, arrowsize=0.5'. Complete documentation about +# arrows shapes. +# The default value is: labelfontname=Helvetica,labelfontsize=10. # This tag requires that the tag HAVE_DOT is set to YES. -DOT_FONTNAME = Helvetica +DOT_EDGE_ATTR = "labelfontname=Helvetica,labelfontsize=10" -# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of -# dot graphs. -# Minimum value: 4, maximum value: 24, default value: 10. +# DOT_NODE_ATTR is concatenated with DOT_COMMON_ATTR. For view without boxes +# around nodes set 'shape=plain' or 'shape=plaintext' Shapes specification +# The default value is: shape=box,height=0.2,width=0.4. # This tag requires that the tag HAVE_DOT is set to YES. -DOT_FONTSIZE = 10 +DOT_NODE_ATTR = "shape=box,height=0.2,width=0.4" -# By default doxygen will tell dot to use the default font as specified with -# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set -# the path where dot can find it using this tag. +# You can set the path where dot can find font specified with fontname in +# DOT_COMMON_ATTR and others dot attributes. # This tag requires that the tag HAVE_DOT is set to YES. DOT_FONTPATH = -# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for -# each documented class showing the direct and indirect inheritance relations. -# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO. +# If the CLASS_GRAPH tag is set to YES (or GRAPH) then doxygen will generate a +# graph for each documented class showing the direct and indirect inheritance +# relations. In case HAVE_DOT is set as well dot will be used to draw the graph, +# otherwise the built-in generator will be used. If the CLASS_GRAPH tag is set +# to TEXT the direct and indirect inheritance relations will be shown as texts / +# links. +# Possible values are: NO, YES, TEXT and GRAPH. # The default value is: YES. -# This tag requires that the tag HAVE_DOT is set to YES. CLASS_GRAPH = YES @@ -2357,7 +2427,8 @@ CLASS_GRAPH = YES COLLABORATION_GRAPH = YES # If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for -# groups, showing the direct groups dependencies. +# groups, showing the direct groups dependencies. See also the chapter Grouping +# in the manual. # The default value is: YES. # This tag requires that the tag HAVE_DOT is set to YES. @@ -2472,6 +2543,13 @@ GRAPHICAL_HIERARCHY = YES DIRECTORY_GRAPH = YES +# The DIR_GRAPH_MAX_DEPTH tag can be used to limit the maximum number of levels +# of child directories generated in directory dependency graphs by dot. +# Minimum value: 1, maximum value: 25, default value: 1. +# This tag requires that the tag DIRECTORY_GRAPH is set to YES. + +DIR_GRAPH_MAX_DEPTH = 1 + # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. For an explanation of the image formats see the section # output formats in the documentation of the dot tool (Graphviz (see: @@ -2479,9 +2557,7 @@ DIRECTORY_GRAPH = YES # Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order # to make the SVG files visible in IE 9+ (other browsers do not have this # requirement). -# Possible values are: png, png:cairo, png:cairo:cairo, png:cairo:gd, png:gd, -# png:gd:gd, jpg, jpg:cairo, jpg:cairo:gd, jpg:gd, jpg:gd:gd, gif, gif:cairo, -# gif:cairo:gd, gif:gd, gif:gd:gd, svg, png:gd, png:gd:gd, png:cairo, +# Possible values are: png, jpg, gif, svg, png:gd, png:gd:gd, png:cairo, # png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and # png:gdiplus:gdiplus. # The default value is: png. @@ -2527,10 +2603,10 @@ MSCFILE_DIRS = DIAFILE_DIRS = # When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the -# path where java can find the plantuml.jar file. If left blank, it is assumed -# PlantUML is not used or called during a preprocessing step. Doxygen will -# generate a warning when it encounters a \startuml command in this case and -# will not generate output for the diagram. +# path where java can find the plantuml.jar file or to the filename of jar file +# to be used. If left blank, it is assumed PlantUML is not used or called during +# a preprocessing step. Doxygen will generate a warning when it encounters a +# \startuml command in this case and will not generate output for the diagram. PLANTUML_JAR_PATH = @@ -2554,7 +2630,7 @@ PLANTUML_INCLUDE_PATH = # Minimum value: 0, maximum value: 10000, default value: 50. # This tag requires that the tag HAVE_DOT is set to YES. -DOT_GRAPH_MAX_NODES = 50 +DOT_GRAPH_MAX_NODES = 200 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs # generated by dot. A depth value of 3 means that only nodes reachable from the @@ -2568,18 +2644,6 @@ DOT_GRAPH_MAX_NODES = 50 MAX_DOT_GRAPH_DEPTH = 0 -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, because dot on Windows does not seem -# to support this out of the box. -# -# Warning: Depending on the platform used, enabling this option may lead to -# badly anti-aliased labels on the edges of a graph (i.e. they become hard to -# read). -# The default value is: NO. -# This tag requires that the tag HAVE_DOT is set to YES. - -DOT_TRANSPARENT = NO - # Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) support @@ -2592,6 +2656,8 @@ DOT_MULTI_TARGETS = NO # If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page # explaining the meaning of the various boxes and arrows in the dot generated # graphs. +# Note: This tag requires that UML_LOOK isn't set, i.e. the doxygen internal +# graphical representation for inheritance and collaboration diagrams is used. # The default value is: YES. # This tag requires that the tag HAVE_DOT is set to YES. @@ -2600,8 +2666,8 @@ GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate # files that are used to generate the various graphs. # -# Note: This setting is not only used for dot files but also for msc and -# plantuml temporary files. +# Note: This setting is not only used for dot files but also for msc temporary +# files. # The default value is: YES. DOT_CLEANUP = YES diff --git a/hardware_integration/include/isobus/hardware_integration/can_hardware_interface.hpp b/hardware_integration/include/isobus/hardware_integration/can_hardware_interface.hpp index 9448aea1..b1bf0da6 100644 --- a/hardware_integration/include/isobus/hardware_integration/can_hardware_interface.hpp +++ b/hardware_integration/include/isobus/hardware_integration/can_hardware_interface.hpp @@ -138,6 +138,7 @@ namespace isobus /// @brief Attempts to write a frame using the driver assigned to a frame's channel /// @param[in] frame The frame to try and write to the bus + /// @returns `true` if the frame was sent from the buffer, otherwise `false` static bool transmit_can_frame_from_buffer(const isobus::CANMessageFrame &frame); /// @brief The periodic update thread executes this function diff --git a/hardware_integration/include/isobus/hardware_integration/can_hardware_interface_single_thread.hpp b/hardware_integration/include/isobus/hardware_integration/can_hardware_interface_single_thread.hpp index 802c7b41..6ceeeda6 100644 --- a/hardware_integration/include/isobus/hardware_integration/can_hardware_interface_single_thread.hpp +++ b/hardware_integration/include/isobus/hardware_integration/can_hardware_interface_single_thread.hpp @@ -116,6 +116,7 @@ namespace isobus /// @brief Attempts to write a frame using the driver assigned to a frame's channel /// @param[in] frame The frame to try and write to the bus + /// @returns `true` if the frame was transmitted, otherwise `false` static bool transmit_can_frame_from_buffer(const isobus::CANMessageFrame &frame); static isobus::EventDispatcher frameReceivedEventDispatcher; ///< The event dispatcher for when a CAN message frame is received from hardware event diff --git a/hardware_integration/include/isobus/hardware_integration/can_hardware_plugin.hpp b/hardware_integration/include/isobus/hardware_integration/can_hardware_plugin.hpp index 7cc43362..2d97749b 100644 --- a/hardware_integration/include/isobus/hardware_integration/can_hardware_plugin.hpp +++ b/hardware_integration/include/isobus/hardware_integration/can_hardware_plugin.hpp @@ -27,10 +27,11 @@ namespace isobus /// @returns `true` if the driver is good/connected, `false` if the driver is not usable virtual bool get_is_valid() const = 0; - /// @brief Disconnects the driver from the hardware + /// @brief Disconnects the driver from the hardware. virtual void close() = 0; - /// @brief Connects the driver to the hardware + /// @brief Connects the driver to the hardware. This will be called to initialize the driver + /// and connect it to the hardware. virtual void open() = 0; /// @brief Reads one frame from the bus synchronously diff --git a/hardware_integration/include/isobus/hardware_integration/flex_can_t4_plugin.hpp b/hardware_integration/include/isobus/hardware_integration/flex_can_t4_plugin.hpp index 456b3655..76a882c3 100644 --- a/hardware_integration/include/isobus/hardware_integration/flex_can_t4_plugin.hpp +++ b/hardware_integration/include/isobus/hardware_integration/flex_can_t4_plugin.hpp @@ -56,8 +56,8 @@ namespace isobus static FlexCAN_T4 can0; static FlexCAN_T4 can1; #endif - std::uint8_t selectedChannel; - bool isOpen = false; + std::uint8_t selectedChannel; ///< The channel that this plugin is assigned to + bool isOpen = false; ///< Tracks if the connection is open/connected }; } #endif // FLEX_CAN_T4_PLUGIN_HPP diff --git a/hardware_integration/include/isobus/hardware_integration/mcp2515_can_interface.hpp b/hardware_integration/include/isobus/hardware_integration/mcp2515_can_interface.hpp index 218b3bd8..67ab90be 100644 --- a/hardware_integration/include/isobus/hardware_integration/mcp2515_can_interface.hpp +++ b/hardware_integration/include/isobus/hardware_integration/mcp2515_can_interface.hpp @@ -51,6 +51,7 @@ namespace isobus void open() override; /// @brief Resets the MCP2515 + /// @returns `true` if the reset was successful, otherwise `false` bool reset(); /// @brief Returns a frame from the hardware (synchronous), or `false` if no frame can be read. diff --git a/hardware_integration/src/can_hardware_interface.cpp b/hardware_integration/src/can_hardware_interface.cpp index e33c02b6..bf52c1f2 100644 --- a/hardware_integration/src/can_hardware_interface.cpp +++ b/hardware_integration/src/can_hardware_interface.cpp @@ -43,7 +43,7 @@ namespace isobus return CANHardwareInterface::transmit_can_frame(frame); } - bool CANHardwareInterface::set_number_of_can_channels(uint8_t value) + bool CANHardwareInterface::set_number_of_can_channels(std::uint8_t value) { std::lock_guard lock(hardwareChannelsMutex); diff --git a/hardware_integration/src/can_hardware_interface_single_thread.cpp b/hardware_integration/src/can_hardware_interface_single_thread.cpp index 2a88d41b..6f72e66c 100644 --- a/hardware_integration/src/can_hardware_interface_single_thread.cpp +++ b/hardware_integration/src/can_hardware_interface_single_thread.cpp @@ -29,7 +29,7 @@ namespace isobus return CANHardwareInterface::transmit_can_frame(frame); } - bool CANHardwareInterface::set_number_of_can_channels(uint8_t value) + bool CANHardwareInterface::set_number_of_can_channels(std::uint8_t value) { if (started) { diff --git a/isobus/include/isobus/isobus/can_NAME_filter.hpp b/isobus/include/isobus/isobus/can_NAME_filter.hpp index 9f9db452..2379ab60 100644 --- a/isobus/include/isobus/isobus/can_NAME_filter.hpp +++ b/isobus/include/isobus/isobus/can_NAME_filter.hpp @@ -39,6 +39,7 @@ namespace isobus std::uint32_t get_value() const; /// @brief Returns true if a NAME matches this filter class's components + /// @param[in] nameToCompare A NAME to compare against this filter /// @returns true if a NAME matches this filter class's components bool check_name_matches_filter(const NAME &nameToCompare) const; diff --git a/isobus/include/isobus/isobus/can_address_claim_state_machine.hpp b/isobus/include/isobus/isobus/can_address_claim_state_machine.hpp index 323a6cdb..073ebb6c 100644 --- a/isobus/include/isobus/isobus/can_address_claim_state_machine.hpp +++ b/isobus/include/isobus/isobus/can_address_claim_state_machine.hpp @@ -89,13 +89,16 @@ namespace isobus static void process_rx_message(const CANMessage &message, void *parentPointer); /// @brief Sets the current state machine state + /// @param[in] value The state to set the state machine to void set_current_state(State value); /// @brief Sends the PGN request for the address claim PGN + /// @returns true if the message was sent, otherwise false bool send_request_to_claim() const; /// @brief Sends the address claim message /// @param[in] address The address to claim + /// @returns true if the message was sent, otherwise false bool send_address_claim(std::uint8_t address); NAME m_isoname; ///< The ISO NAME to claim as diff --git a/isobus/include/isobus/isobus/can_callbacks.hpp b/isobus/include/isobus/isobus/can_callbacks.hpp index 9ec586f2..852a2c77 100644 --- a/isobus/include/isobus/isobus/can_callbacks.hpp +++ b/isobus/include/isobus/isobus/can_callbacks.hpp @@ -101,6 +101,7 @@ namespace isobus CANLibCallback get_callback() const; /// @brief Returns the parent pointer for this data object + /// @returns The parent pointer for this data object void *get_parent() const; /// @brief Returns the ICF being used as a filter for this callback diff --git a/isobus/include/isobus/isobus/can_control_function.hpp b/isobus/include/isobus/isobus/can_control_function.hpp index a5f32487..09e6a1ca 100644 --- a/isobus/include/isobus/isobus/can_control_function.hpp +++ b/isobus/include/isobus/isobus/can_control_function.hpp @@ -43,6 +43,7 @@ namespace isobus /// @param[in] NAMEValue The NAME of the control function /// @param[in] addressValue The current address of the control function /// @param[in] CANPort The CAN channel index that the control function communicates on + /// @returns A shared pointer to a ControlFunction object created with the parameters passed in static std::shared_ptr create(NAME NAMEValue, std::uint8_t addressValue, std::uint8_t CANPort); /// @brief Destroys this control function, by removing it from the network manager @@ -82,7 +83,7 @@ namespace isobus /// @param[in] type The 'Type' of control function to create ControlFunction(NAME NAMEValue, std::uint8_t addressValue, std::uint8_t CANPort, Type type = Type::External); - friend class CANNetworkManager; + friend class CANNetworkManager; ///< The network manager needs access to the control function's internals #if !defined CAN_STACK_DISABLE_THREADS && !defined ARDUINO static std::mutex controlFunctionProcessingMutex; ///< Protects the control function tables #endif diff --git a/isobus/include/isobus/isobus/can_extended_transport_protocol.hpp b/isobus/include/isobus/isobus/can_extended_transport_protocol.hpp index cb293aed..d5d4615f 100644 --- a/isobus/include/isobus/isobus/can_extended_transport_protocol.hpp +++ b/isobus/include/isobus/isobus/can_extended_transport_protocol.hpp @@ -75,10 +75,12 @@ namespace isobus enum class Direction { Transmit, ///< We are transmitting a message - Receive ///< We are receving a message + Receive ///< We are receiving a message }; - /// @brief A useful way to compare sesson objects to each other for equality + /// @brief A useful way to compare session objects to each other for equality + /// @param[in] obj The object to compare against + /// @returns true if the objects are equal, false if not bool operator==(const ExtendedTransportProtocolSession &obj); /// @brief Get the total number of bytes that will be sent or received in this session @@ -175,6 +177,7 @@ namespace isobus /// @param[in] reason The reason we're aborting the session /// @param[in] source The source control function from which we'll send the abort /// @param[in] destination The destination control function to which we'll send the abort + /// @returns true if the abort was sent OK, false if not sent bool abort_session(std::uint32_t parameterGroupNumber, ConnectionAbortReason reason, std::shared_ptr source, std::shared_ptr destination); /// @brief Gracefully closes a session to prepare for a new session @@ -186,6 +189,7 @@ namespace isobus /// @param[in] source The source control function for the session /// @param[in] destination The destination control function for the session /// @param[out] session The found session, or nullptr if no session matched the supplied parameters + /// @returns true if a matching session was found, false if not bool get_session(ExtendedTransportProtocolSession *&session, std::shared_ptr source, std::shared_ptr destination) const; /// @brief Gets an ETP session from the passed in source and destination and PGN combination @@ -193,6 +197,7 @@ namespace isobus /// @param[in] destination The destination control function for the session /// @param[in] parameterGroupNumber The PGN of the session /// @param[out] session The found session, or nullptr if no session matched the supplied parameters + /// @returns true if a matching session was found, false if not bool get_session(ExtendedTransportProtocolSession *&session, std::shared_ptr source, std::shared_ptr destination, std::uint32_t parameterGroupNumber) const; /// @brief Processes end of session callbacks diff --git a/isobus/include/isobus/isobus/can_hardware_abstraction.hpp b/isobus/include/isobus/isobus/can_hardware_abstraction.hpp index 11fc6b1c..e7306e44 100644 --- a/isobus/include/isobus/isobus/can_hardware_abstraction.hpp +++ b/isobus/include/isobus/isobus/can_hardware_abstraction.hpp @@ -18,6 +18,7 @@ namespace isobus { /// @brief The sending abstraction layer between the hardware and the stack /// @param[in] frame The frame to transmit from the hardware + /// @returns true if the frame was successfully sent, false otherwise bool send_can_message_frame_to_hardware(const CANMessageFrame &frame); /// @brief The receiving abstraction layer between the hardware and the stack diff --git a/isobus/include/isobus/isobus/can_identifier.hpp b/isobus/include/isobus/isobus/can_identifier.hpp index 76e8e06f..01e9b9ed 100644 --- a/isobus/include/isobus/isobus/can_identifier.hpp +++ b/isobus/include/isobus/isobus/can_identifier.hpp @@ -68,6 +68,7 @@ namespace isobus /// @brief Assignment operator for a CAN identifier /// @param[in] obj rhs of the operator + /// @returns The lhs of the operator, now assigned the rhs value CANIdentifier &operator=(const CANIdentifier &obj); /// @brief Returns the raw encoded ID of the CAN identifier diff --git a/isobus/include/isobus/isobus/can_internal_control_function.hpp b/isobus/include/isobus/isobus/can_internal_control_function.hpp index 80ec21fb..e969e70c 100644 --- a/isobus/include/isobus/isobus/can_internal_control_function.hpp +++ b/isobus/include/isobus/isobus/can_internal_control_function.hpp @@ -38,6 +38,7 @@ namespace isobus /// @param[in] desiredName The NAME for this control function to claim as /// @param[in] preferredAddress The preferred NAME for this control function /// @param[in] CANPort The CAN channel index for this control function to use + /// @returns A shared pointer to an InternalControlFunction object created with the parameters passed in static std::shared_ptr create(NAME desiredName, std::uint8_t preferredAddress, std::uint8_t CANPort); /// @brief Destroys this control function, by removing it from the network manager @@ -57,6 +58,7 @@ namespace isobus /// @brief Used by the network manager to tell the ICF that the address claim state machine needs to process /// a J1939 command to move address. + /// @param[in] commandedAddress The address that the ICF has been commanded to move to void process_commanded_address(std::uint8_t commandedAddress, CANLibBadge); /// @brief Updates the internal control function together with it's associated address claim state machine diff --git a/isobus/include/isobus/isobus/can_network_manager.hpp b/isobus/include/isobus/isobus/can_network_manager.hpp index 09ab54c9..6aa4f971 100644 --- a/isobus/include/isobus/isobus/can_network_manager.hpp +++ b/isobus/include/isobus/isobus/can_network_manager.hpp @@ -89,6 +89,7 @@ namespace isobus void remove_any_control_function_parameter_group_number_callback(std::uint32_t parameterGroupNumber, CANLibCallback callback, void *parent); /// @brief Returns an internal control function if the passed-in control function is an internal type + /// @param[in] controlFunction The control function to get the internal control function from /// @returns An internal control function casted from the passed in control function std::shared_ptr get_internal_control_function(std::shared_ptr controlFunction); @@ -106,6 +107,15 @@ namespace isobus /// If you don't specify a destination (or use nullptr) you message will be sent as a broadcast /// if it is valid to do so. /// You can also get a callback on success or failure of the transmit. + /// @param[in] parameterGroupNumber The PGN to use when sending the message + /// @param[in] dataBuffer A pointer to the data buffer to send from + /// @param[in] dataLength The size of the message to send + /// @param[in] sourceControlFunction The control function that is sending the message + /// @param[in] destinationControlFunction The control function that the message is destined for or nullptr if broadcast + /// @param[in] priority The CAN priority of the message being sent + /// @param[in] txCompleteCallback A callback to be called when the message is sent or fails to send + /// @param[in] parentPointer A generic context variable that helps identify what object the callback is destined for + /// @param[in] frameChunkCallback A callback which can be supplied to have the tack call you back to get chunks of the message as they are sent /// @returns `true` if the message was sent, otherwise `false` bool send_can_message(std::uint32_t parameterGroupNumber, const std::uint8_t *dataBuffer, @@ -189,7 +199,7 @@ namespace isobus friend class DiagnosticProtocol; ///< Allows the diagnostic protocol to access the protected functions on the network manager friend class ParameterGroupNumberRequestProtocol; ///< Allows the PGN request protocol to access the network manager protected functions friend class FastPacketProtocol; ///< Allows the FP protocol to access the network manager protected functions - friend class CANLibProtocol; + friend class CANLibProtocol; ///< Allows the CANLib protocol base class functions to access the network manager protected functions /// @brief Adds a PGN callback for a protocol class /// @param[in] parameterGroupNumber The PGN to register for @@ -374,7 +384,7 @@ namespace isobus std::list controlFunctionStateCallbacks; ///< List of all control function state callbacks std::vector globalParameterGroupNumberCallbacks; ///< A list of all global PGN callbacks std::vector anyControlFunctionParameterGroupNumberCallbacks; ///< A list of all global PGN callbacks - EventDispatcher> addressViolationEventDispatcher; // An event dispatcher for notifying consumers about address violations + EventDispatcher> addressViolationEventDispatcher; ///< An event dispatcher for notifying consumers about address violations #if !defined CAN_STACK_DISABLE_THREADS && !defined ARDUINO std::mutex receiveMessageMutex; ///< A mutex for receive messages thread safety std::mutex protocolPGNCallbacksMutex; ///< A mutex for PGN callback thread safety diff --git a/isobus/include/isobus/isobus/can_partnered_control_function.hpp b/isobus/include/isobus/isobus/can_partnered_control_function.hpp index e879e9cf..eb6e0568 100644 --- a/isobus/include/isobus/isobus/can_partnered_control_function.hpp +++ b/isobus/include/isobus/isobus/can_partnered_control_function.hpp @@ -41,6 +41,7 @@ namespace isobus /// @brief The factory function to construct a partnered control function /// @param[in] CANPort The CAN channel associated with this control function definition /// @param[in] NAMEFilters A list of filters that describe the identity of the CF based on NAME components + /// @returns A shared pointer to a PartneredControlFunction object created with the parameters passed in static std::shared_ptr create(std::uint8_t CANPort, const std::vector NAMEFilters); /// @brief the constructor for a PartneredControlFunction, which is called by the factory function diff --git a/isobus/include/isobus/isobus/can_transport_protocol.hpp b/isobus/include/isobus/isobus/can_transport_protocol.hpp index 7ddeefa4..967b1cbc 100644 --- a/isobus/include/isobus/isobus/can_transport_protocol.hpp +++ b/isobus/include/isobus/isobus/can_transport_protocol.hpp @@ -62,6 +62,8 @@ namespace isobus }; /// @brief A useful way to compare sesson objects to each other for equality + /// @param[in] obj The object to compare to + /// @returns true if the objects are equal, false if not bool operator==(const TransportProtocolSession &obj); /// @brief Get the total number of bytes that will be sent or received in this session @@ -216,6 +218,7 @@ namespace isobus /// @param[in] source The source control function for the session /// @param[in] destination The destination control function for the session /// @param[out] session The found session, or nullptr if no session matched the supplied parameters + /// @returns true if a matching session was found, false if not bool get_session(TransportProtocolSession *&session, std::shared_ptr source, std::shared_ptr destination); /// @brief Gets a TP session from the passed in source and destination and PGN combination @@ -223,6 +226,7 @@ namespace isobus /// @param[in] destination The destination control function for the session /// @param[in] parameterGroupNumber The PGN of the session /// @param[out] session The found session, or nullptr if no session matched the supplied parameters + /// @returns true if a matching session was found, false if not bool get_session(TransportProtocolSession *&session, std::shared_ptr source, std::shared_ptr destination, std::uint32_t parameterGroupNumber); /// @brief Updates the state machine of a Tp session diff --git a/isobus/include/isobus/isobus/isobus_device_descriptor_object_pool.hpp b/isobus/include/isobus/isobus/isobus_device_descriptor_object_pool.hpp index 2083c7d2..9bef1f82 100644 --- a/isobus/include/isobus/isobus/isobus_device_descriptor_object_pool.hpp +++ b/isobus/include/isobus/isobus/isobus_device_descriptor_object_pool.hpp @@ -136,10 +136,12 @@ namespace isobus bool generate_binary_object_pool(std::vector &resultantPool); /// @brief Gets an object from the DDOP that corresponds to a certain object ID + /// @param[in] objectID The ID of the object to get /// @returns Pointer to the object matching the provided ID, or nullptr if no match was found std::shared_ptr get_object_by_id(std::uint16_t objectID); /// @brief Gets an object from the DDOP by index based on object creation + /// @param[in] index The index of the object to get /// @returns Pointer to the object matching the index, or nullptr if no match was found std::shared_ptr get_object_by_index(std::uint16_t index); diff --git a/isobus/include/isobus/isobus/isobus_diagnostic_protocol.hpp b/isobus/include/isobus/isobus/isobus_diagnostic_protocol.hpp index 0b8453a2..1943d0c0 100644 --- a/isobus/include/isobus/isobus/isobus_diagnostic_protocol.hpp +++ b/isobus/include/isobus/isobus/isobus_diagnostic_protocol.hpp @@ -204,7 +204,7 @@ namespace isobus FailureModeIdentifier get_failure_mode_identifier() const; private: - friend class DiagnosticProtocol; + friend class DiagnosticProtocol; ///< Allows the protocol to set the occurrence count std::uint32_t suspectParameterNumber = 0xFFFFFFFF; ///< This 19-bit number is used to identify the item for which diagnostics are being reported FailureModeIdentifier failureModeIdentifier = FailureModeIdentifier::ConditionExists; ///< The FMI defines the type of failure detected in the sub-system identified by an SPN LampStatus lampState = LampStatus::None; ///< The J1939 lamp state for this DTC @@ -221,6 +221,7 @@ namespace isobus ~DiagnosticProtocol(); /// @brief The protocol's initializer function + /// @returns true if the protocol was initialized, false if it was already initialized bool initialize(); /// @brief Returns if the protocol has been initialized diff --git a/isobus/include/isobus/isobus/isobus_functionalities.hpp b/isobus/include/isobus/isobus/isobus_functionalities.hpp index 48e99543..94bba9d7 100644 --- a/isobus/include/isobus/isobus/isobus_functionalities.hpp +++ b/isobus/include/isobus/isobus/isobus_functionalities.hpp @@ -455,6 +455,7 @@ namespace isobus /// @param[out] acknowledge Tells the PGN request protocol to ACK ack the request /// @param[out] acknowledgeType Tells the PGN request protocol what kind of ACK to use /// @param[in] parentPointer A generic context variable, usually the "this" pointer of the registrant for callbacks + /// @returns true if the PGN was handled, otherwise false static bool pgn_request_handler(std::uint32_t parameterGroupNumber, std::shared_ptr requestingControlFunction, bool &acknowledge, diff --git a/isobus/include/isobus/isobus/isobus_guidance_interface.hpp b/isobus/include/isobus/isobus/isobus_guidance_interface.hpp index 6fc6a923..b98ea134 100644 --- a/isobus/include/isobus/isobus/isobus_guidance_interface.hpp +++ b/isobus/include/isobus/isobus/isobus_guidance_interface.hpp @@ -262,6 +262,7 @@ namespace isobus /// @brief Sets the exit code for the guidance system /// @details This parameter is used to indicate why the guidance system cannot currently accept /// remote commands or has most recently stopped accepting remote commands. + /// @param[in] exitCode The exit code for the guidance system to report /// @returns The exit code for the guidance system bool set_guidance_system_command_exit_reason_code(std::uint8_t exitCode); @@ -334,6 +335,7 @@ namespace isobus /// @param[in] index An index of senders of the agricultural guidance machine info message /// @note Only one device on the bus will send this normally, but we provide a generic way to get /// an arbitrary number of these commands. So generally using only index 0 will be acceptable. + /// @returns The content of the agricultural guidance machine info message std::shared_ptr get_received_guidance_machine_info(std::size_t index); /// @brief Returns the content of the agricultural guidance curvature command message @@ -341,6 +343,7 @@ namespace isobus /// @param[in] index An index of senders of the agricultural guidance curvature command message /// @note Only one device on the bus will send this normally, but we provide a generic way to get /// an arbitrary number of these commands. So generally using only index 0 will be acceptable. + /// @returns The content of the agricultural guidance curvature command message std::shared_ptr get_received_guidance_system_command(std::size_t index); /// @brief Returns an event dispatcher which you can use to get callbacks when new/updated guidance machine info messages are received. diff --git a/isobus/include/isobus/isobus/isobus_language_command_interface.hpp b/isobus/include/isobus/isobus/isobus_language_command_interface.hpp index b8010a55..4a84939c 100644 --- a/isobus/include/isobus/isobus/isobus_language_command_interface.hpp +++ b/isobus/include/isobus/isobus/isobus_language_command_interface.hpp @@ -320,6 +320,7 @@ namespace isobus /// @param[out] acknowledge Tells the stack if we want to send an ACK or NACK /// @param[out] acknowledgeType Tells the stack exactly how we want to do an ACK /// @param[in] parentPointer A generic context pointer to locate the specific instance of this class we want + /// @returns `true` if the message was handled, otherwise `false` static bool on_language_request(std::uint32_t parameterGroupNumber, std::shared_ptr requestingControlFunction, bool &acknowledge, diff --git a/isobus/include/isobus/isobus/isobus_maintain_power_interface.hpp b/isobus/include/isobus/isobus/isobus_maintain_power_interface.hpp index b65f95f2..db6ddbcb 100644 --- a/isobus/include/isobus/isobus/isobus_maintain_power_interface.hpp +++ b/isobus/include/isobus/isobus/isobus_maintain_power_interface.hpp @@ -94,6 +94,7 @@ namespace isobus }; /// @brief Constructor for a MaintainPowerData object, which stores information sent/received in a maintain power message. + /// @param[in] sendingControlFunction The control function to use if sending the message explicit MaintainPowerData(std::shared_ptr sendingControlFunction); /// @brief Sets the reported implement in-work state @@ -218,6 +219,7 @@ namespace isobus /// @brief Returns the content of a received maintain power message /// based on the index of the sender. Use this to read the received messages' content. /// @param[in] index An index of senders of the maintain power message + /// @returns A pointer to the maintain power message data, or nullptr if the index is out of range std::shared_ptr get_received_maintain_power(std::size_t index); /// @brief Returns an event dispatcher which you can use to get callbacks when new/updated maintain power messages are received. diff --git a/isobus/include/isobus/isobus/isobus_speed_distance_messages.hpp b/isobus/include/isobus/isobus/isobus_speed_distance_messages.hpp index 6c809229..61a670d4 100644 --- a/isobus/include/isobus/isobus/isobus_speed_distance_messages.hpp +++ b/isobus/include/isobus/isobus/isobus_speed_distance_messages.hpp @@ -523,6 +523,7 @@ namespace isobus /// @note Only one device on the bus will send this normally, but we provide a generic way to get /// an arbitrary number of these commands. So generally using only index 0 will be acceptable. /// @note It is also possible that this message may not be present, depending on your machine. + /// @returns The parsed content of the machine selected speed message std::shared_ptr get_received_machine_selected_speed(std::size_t index); /// @brief Returns the content of the wheel-based speed message @@ -531,6 +532,7 @@ namespace isobus /// @note Only one device on the bus will send this normally, but we provide a generic way to get /// an arbitrary number of these commands. So generally using only index 0 will be acceptable. /// @note It is also possible that this message may not be present, depending on your machine. + /// @returns The parsed content of the wheel-based speed message std::shared_ptr get_received_wheel_based_speed(std::size_t index); /// @brief Returns the content of the ground-based speed message @@ -539,6 +541,7 @@ namespace isobus /// @note Only one device on the bus will send this normally, but we provide a generic way to get /// an arbitrary number of these commands. So generally using only index 0 will be acceptable. /// @note It is also possible that this message may not be present, depending on your machine. + /// @returns The parsed content of the ground-based speed message std::shared_ptr get_received_ground_based_speed(std::size_t index); /// @brief Returns the content of the machine selected speed command message @@ -547,6 +550,7 @@ namespace isobus /// @note Only one device on the bus will send this normally, but we provide a generic way to get /// an arbitrary number of these commands. So generally using only index 0 will be acceptable. /// @note It is also possible that this message may not be present, depending on your machine. + /// @returns The parsed content of the machine selected speed command message std::shared_ptr get_received_machine_selected_speed_command(std::size_t index); /// @brief Returns an event dispatcher which you can use to get callbacks when new/updated wheel-based speed messages are received. diff --git a/isobus/include/isobus/isobus/isobus_task_controller_client.hpp b/isobus/include/isobus/isobus/isobus_task_controller_client.hpp index 78a25c5b..60802c7c 100644 --- a/isobus/include/isobus/isobus/isobus_task_controller_client.hpp +++ b/isobus/include/isobus/isobus/isobus_task_controller_client.hpp @@ -304,6 +304,8 @@ namespace isobus /// a value to the TC server. /// @details If you provide on-change triggers in your DDOP, this is how you can request the TC client /// to update the TC server on the current value of your process data variables. + /// @param[in] elementNumber The element number of the process data variable that changed + /// @param[in] DDI The DDI of the process data variable that changed void on_value_changed_trigger(std::uint16_t elementNumber, std::uint16_t DDI); /// @brief Sends a broadcast request to TCs to identify themseleves. @@ -406,6 +408,12 @@ namespace isobus static void process_rx_message(const CANMessage &message, void *parentPointer); /// @brief The callback passed to the network manager's send function to know when a Tx is completed + /// @param[in] parameterGroupNumber The parameter group number of the message that was sent + /// @param[in] dataLength The number of bytes sent + /// @param[in] sourceControlFunction The control function that sent the message + /// @param[in] destinationControlFunction The control function that received the message + /// @param[in] successful Whether the message was sent successfully + /// @param[in] parentPointer A context variable that is passed back through the callback static void process_tx_callback(std::uint32_t parameterGroupNumber, std::uint32_t dataLength, std::shared_ptr sourceControlFunction, @@ -422,6 +430,7 @@ namespace isobus /// @brief Sends a process data message with 1 mux byte and all 0xFFs as payload /// @details This just reduces code duplication by consolidating common message formats + /// @param[in] multiplexor The multiplexor to use for the message /// @returns `true` if the message was sent, otherwise `false` bool send_generic_process_data(std::uint8_t multiplexor) const; @@ -475,6 +484,9 @@ namespace isobus bool send_status() const; /// @brief Sends the value command message for a specific DDI/Element number combo + /// @param[in] elementNumber The element number for the command + /// @param[in] ddi The DDI for the command + /// @param[in] value The value to send /// @returns `true` if the message was sent, otherwise `false` bool send_value_command(std::uint16_t elementNumber, std::uint16_t ddi, std::uint32_t value) const; @@ -526,6 +538,7 @@ namespace isobus { /// @brief Allows easy comparison of callback data /// @param obj the object to compare against + /// @returns true if the ddi and element numbers of the provided objects match, otherwise false bool operator==(const ProcessDataCallbackInfo &obj) const; std::uint32_t processDataValue; ///< The value of the value set command std::uint32_t lastValue; ///< Used for measurement commands to store timestamp or previous values @@ -540,6 +553,7 @@ namespace isobus { /// @brief Allows easy comparison of callback data /// @param obj the object to compare against + /// @returns true if the callback and parent pointer match, otherwise false bool operator==(const RequestValueCommandCallbackInfo &obj) const; RequestValueCommandCallback callback = nullptr; ///< The callback itself void *parent; ///< The parent pointer, generic context value @@ -550,6 +564,7 @@ namespace isobus { /// @brief Allows easy comparison of callback data /// @param obj the object to compare against + /// @returns true if the callback and parent pointer match, otherwise false bool operator==(const ValueCommandCallbackInfo &obj) const; ValueCommandCallback callback; ///< The callback itself void *parent; ///< The parent pointer, generic context value diff --git a/isobus/include/isobus/isobus/isobus_task_controller_client_objects.hpp b/isobus/include/isobus/isobus/isobus_task_controller_client_objects.hpp index f80c1e07..79c2a945 100644 --- a/isobus/include/isobus/isobus/isobus_task_controller_client_objects.hpp +++ b/isobus/include/isobus/isobus/isobus_task_controller_client_objects.hpp @@ -280,6 +280,7 @@ namespace isobus std::size_t get_number_child_objects() const; /// @brief Returns a child object ID by index + /// @param[in] index The index of the child object ID to return /// @returns Child object ID by index, or NULL_OBJECT_ID if the index is out of range std::uint16_t get_child_object_id(std::size_t index); diff --git a/isobus/include/isobus/isobus/isobus_virtual_terminal_client.hpp b/isobus/include/isobus/isobus/isobus_virtual_terminal_client.hpp index 43b02f34..2c1360f7 100644 --- a/isobus/include/isobus/isobus/isobus_virtual_terminal_client.hpp +++ b/isobus/include/isobus/isobus/isobus_virtual_terminal_client.hpp @@ -285,6 +285,7 @@ namespace isobus /// @brief Allows easy comparison of two `AssignedAuxiliaryFunction` objects /// @param[in] other the object to compare against + /// @returns true if the objects are equal, false otherwise bool operator==(const AssignedAuxiliaryFunction &other) const; std::uint16_t functionObjectID; ///< The object ID of the function present in our object pool @@ -1491,6 +1492,12 @@ namespace isobus static void process_rx_message(const CANMessage &message, void *parentPointer); /// @brief The callback passed to the network manager's send function to know when a Tx is completed + /// @param[in] parameterGroupNumber The parameter group number of the message that was sent + /// @param[in] dataLength The length of the data that was sent + /// @param[in] sourceControlFunction The control function that sent the message + /// @param[in] destinationControlFunction The control function that received the message or nullptr for a broadcast + /// @param[in] successful true if the message was sent successfully + /// @param[in] parentPointer A context variable to find the relevant VT client class static void process_callback(std::uint32_t parameterGroupNumber, std::uint32_t dataLength, std::shared_ptr sourceControlFunction, @@ -1522,6 +1529,7 @@ namespace isobus bool scale_object_pools(); /// @brief Returns if the specified object type can be scaled + /// @param[in] type The object type to check /// @returns true if the object is inherently scalable static bool get_is_object_scalable(VirtualTerminalObjectType type); diff --git a/isobus/include/isobus/isobus/nmea2000_fast_packet_protocol.hpp b/isobus/include/isobus/isobus/nmea2000_fast_packet_protocol.hpp index eafaad7a..a51f1fd4 100644 --- a/isobus/include/isobus/isobus/nmea2000_fast_packet_protocol.hpp +++ b/isobus/include/isobus/isobus/nmea2000_fast_packet_protocol.hpp @@ -95,10 +95,12 @@ namespace isobus enum class Direction { Transmit, ///< We are transmitting a message - Receive ///< We are receving a message + Receive ///< We are receiving a message }; - /// @brief A useful way to compare sesson objects to each other for equality + /// @brief A useful way to compare session objects to each other for equality + /// @param[in] obj The object to compare against + /// @returns true if the objects are equal, false otherwise bool operator==(const FastPacketProtocolSession &obj); /// @brief Get the total number of bytes that will be sent or received in this session @@ -144,7 +146,7 @@ namespace isobus /// @brief Ends a session and cleans up the memory associated with its metadata /// @param[in] session The session to close /// @param[in] successful `true` if the session was closed successfully, otherwise `false` - void close_session(FastPacketProtocolSession *session, bool successfull); + void close_session(FastPacketProtocolSession *session, bool successful); /// @brief Gets the sequence number to use for a new session based on the history /// @param[in] session The new session we're starting @@ -155,7 +157,7 @@ namespace isobus /// @param[in,out] returnedSession The returned session /// @param[in] parameterGroupNumber The PGN /// @param[in] source The session source control function - /// @param[in] destination The sesssion destination control function + /// @param[in] destination The session destination control function /// @returns `true` if a session was found that matches, otherwise `false` bool get_session(FastPacketProtocolSession *&returnedSession, std::uint32_t parameterGroupNumber, std::shared_ptr source, std::shared_ptr destination); diff --git a/isobus/include/isobus/isobus/nmea2000_message_definitions.hpp b/isobus/include/isobus/isobus/nmea2000_message_definitions.hpp index fa491fb1..79f330e8 100644 --- a/isobus/include/isobus/isobus/nmea2000_message_definitions.hpp +++ b/isobus/include/isobus/isobus/nmea2000_message_definitions.hpp @@ -238,9 +238,11 @@ namespace isobus bool set_latitude(std::int32_t latitudeToSet); /// @attention This is MUCH less accurate than the position in PGN 1F805 (129029). Use that instead if present. + /// @returns The current vessel/vehicle longitude in 1*10E-7 degrees std::int32_t get_raw_longitude() const; /// @attention This is MUCH less accurate than the position in PGN 1F805 (129029). Use that instead if present. + /// @returns The current vessel/vehicle longitude in 1*10E-7 degrees double get_longitude() const; /// @brief Sets the current longitude in units of 1*10E-7 degrees @@ -309,6 +311,7 @@ namespace isobus float get_course_over_ground() const; /// @brief Sets the course over ground in units of 0.0001 radians + /// @param[in] course The course to set, in 0.0001 radians /// @returns True if the value that was set differed from the stored value, otherwise false bool set_course_over_ground(std::uint16_t course); @@ -339,6 +342,7 @@ namespace isobus CourseOverGroundReference get_course_over_ground_reference() const; /// @brief Sets the reference to which the course over ground is relative + /// @param[in] reference The reference to set (as enumerated in CourseOverGroundReference) /// @returns True if the value that was set differed from the stored value, otherwise false bool set_course_over_ground_reference(CourseOverGroundReference reference); @@ -573,6 +577,7 @@ namespace isobus /// @brief Sets the time in milliseconds when the message was last sent or received /// @param[in] timestamp The timestamp (in milliseconds) to set for when this message was sent or received + /// @returns True if the value that was set differed from the stored value, otherwise false bool set_timestamp(std::uint32_t timestamp); /// @brief Returns the sequence ID. This is used to associate data within other PGNs with this message. @@ -684,6 +689,7 @@ namespace isobus /// @param[in] ID The station ID to set /// @param[in] type The type of reference station /// @param[in] ageOfCorrections Age of the DGNSS corrections in units of 0.01 seconds + /// @returns True if the value that was set differed from the stored value, otherwise false bool set_reference_station(std::size_t index, std::uint16_t ID, TypeOfSystem type, std::uint16_t ageOfCorrections); /// @brief Returns the date associated with the current position. @@ -789,6 +795,7 @@ namespace isobus std::string get_reference_datum() const; /// @brief Sets the 4 character ascii datum code that identifies the reference datum + /// @param[in] datum The datum code to set, must be 4 characters /// @returns True if the value that was set differed from the stored value bool set_reference_datum(const std::string &datum); @@ -837,6 +844,7 @@ namespace isobus /// @brief Sets the time in milliseconds when the message was last sent or received /// @param[in] timestamp The timestamp (in milliseconds) to set for when this message was sent or received + /// @returns True if the value that was set differed from the stored value, otherwise false bool set_timestamp(std::uint32_t timestamp); /// @brief Serializes the current state of this object into a buffer to be sent on the CAN bus diff --git a/isobus/include/isobus/isobus/nmea2000_message_interface.hpp b/isobus/include/isobus/isobus/nmea2000_message_interface.hpp index b6d9b39b..b776d3bb 100644 --- a/isobus/include/isobus/isobus/nmea2000_message_interface.hpp +++ b/isobus/include/isobus/isobus/nmea2000_message_interface.hpp @@ -119,6 +119,7 @@ namespace isobus /// @note Only one device on the bus will send this normally, but we provide a generic way to get /// an arbitrary number of these. So generally using only index 0 will be acceptable. /// @note It is also possible that this message may not be present, depending on your machine. + /// @returns The content of the COG & SOG message std::shared_ptr get_received_course_speed_over_ground_message(std::size_t index) const; /// @brief Returns the content of the Datum message @@ -127,6 +128,7 @@ namespace isobus /// @note Only one device on the bus will send this normally, but we provide a generic way to get /// an arbitrary number of these. So generally using only index 0 will be acceptable. /// @note It is also possible that this message may not be present, depending on your machine. + /// @returns The content of the Datum message std::shared_ptr get_received_datum_message(std::size_t index) const; /// @brief Returns the content of the GNSS position data message @@ -135,6 +137,7 @@ namespace isobus /// @note Only one device on the bus will send this normally, but we provide a generic way to get /// an arbitrary number of these. So generally using only index 0 will be acceptable. /// @note It is also possible that this message may not be present, depending on your machine. + /// @returns The content of the GNSS position data message std::shared_ptr get_received_gnss_position_data_message(std::size_t index) const; /// @brief Returns the content of the position delta high precision rapid update message @@ -143,6 +146,7 @@ namespace isobus /// @note Only one device on the bus will send this normally, but we provide a generic way to get /// an arbitrary number of these. So generally using only index 0 will be acceptable. /// @note It is also possible that this message may not be present, depending on your machine. + /// @returns The content of the position delta high precision rapid update message std::shared_ptr get_received_position_delta_high_precision_rapid_update_message(std::size_t index) const; /// @brief Returns the content of the position rapid update message @@ -151,6 +155,7 @@ namespace isobus /// @note Only one device on the bus will send this normally, but we provide a generic way to get /// an arbitrary number of these. So generally using only index 0 will be acceptable. /// @note It is also possible that this message may not be present, depending on your machine. + /// @returns The content of the position rapid update message std::shared_ptr get_received_position_rapid_update_message(std::size_t index) const; /// @brief Returns the content of the rate of turn message @@ -159,6 +164,7 @@ namespace isobus /// @note Only one device on the bus will send this normally, but we provide a generic way to get /// an arbitrary number of these. So generally using only index 0 will be acceptable. /// @note It is also possible that this message may not be present, depending on your machine. + /// @returns The content of the rate of turn message std::shared_ptr get_received_rate_of_turn_message(std::size_t index) const; /// @brief Returns the content of the vessel heading message @@ -167,6 +173,7 @@ namespace isobus /// @note Only one device on the bus will send this normally, but we provide a generic way to get /// an arbitrary number of these. So generally using only index 0 will be acceptable. /// @note It is also possible that this message may not be present, depending on your machine. + /// @returns The content of the vessel heading message std::shared_ptr get_received_vessel_heading_message(std::size_t index) const; /// @brief Returns an event dispatcher which you can use to get callbacks when new/updated COG & SOG messages are received. diff --git a/isobus/src/nmea2000_fast_packet_protocol.cpp b/isobus/src/nmea2000_fast_packet_protocol.cpp index 46034a5a..438bbf0f 100644 --- a/isobus/src/nmea2000_fast_packet_protocol.cpp +++ b/isobus/src/nmea2000_fast_packet_protocol.cpp @@ -189,11 +189,11 @@ namespace isobus } } - void FastPacketProtocol::close_session(FastPacketProtocolSession *session, bool successfull) + void FastPacketProtocol::close_session(FastPacketProtocolSession *session, bool successful) { if (nullptr != session) { - process_session_complete_callback(session, successfull); + process_session_complete_callback(session, successful); for (auto currentSession = activeSessions.begin(); currentSession != activeSessions.end(); currentSession++) { if (session == *currentSession)