From c8cf7876e84ed188d7d6ed4c9ae7d7c071ad6dbd Mon Sep 17 00:00:00 2001 From: Michel Hidalgo Date: Tue, 21 Sep 2021 16:18:54 -0300 Subject: [PATCH] Fix up documentation build for rcl_lifecycle when using rosdoc2 * Handle RCL_WARN_UNUSED * Avoid duplicate type names Signed-off-by: Michel Hidalgo --- rcl_lifecycle/Doxyfile | 1 + rcl_lifecycle/include/rcl_lifecycle/data_types.h | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/rcl_lifecycle/Doxyfile b/rcl_lifecycle/Doxyfile index 7576d71da..e4661a16a 100644 --- a/rcl_lifecycle/Doxyfile +++ b/rcl_lifecycle/Doxyfile @@ -16,6 +16,7 @@ ENABLE_PREPROCESSING = YES MACRO_EXPANSION = YES EXPAND_ONLY_PREDEF = YES PREDEFINED += RCL_LIFECYCLE_PUBLIC= +PREDEFINED += RCL_WARN_UNUSED= # Tag files that do not exist will produce a warning and cross-project linking will not work. TAGFILES += "../../../../doxygen_tag_files/cppreference-doxygen-web.tag.xml=http://en.cppreference.com/w/" diff --git a/rcl_lifecycle/include/rcl_lifecycle/data_types.h b/rcl_lifecycle/include/rcl_lifecycle/data_types.h index 033203385..7cff80853 100644 --- a/rcl_lifecycle/include/rcl_lifecycle/data_types.h +++ b/rcl_lifecycle/include/rcl_lifecycle/data_types.h @@ -24,10 +24,10 @@ extern "C" { #endif -typedef struct rcl_lifecycle_transition_t rcl_lifecycle_transition_t; +typedef struct rcl_lifecycle_transition_s rcl_lifecycle_transition_t; /// It contains the state of the lifecycle state machine -typedef struct rcl_lifecycle_state_t +typedef struct rcl_lifecycle_state_s { /// String with state name: Unconfigured, Inactive, Active or Finalized const char * label; @@ -41,7 +41,7 @@ typedef struct rcl_lifecycle_state_t } rcl_lifecycle_state_t; /// It contains the transitions of the lifecycle state machine -typedef struct rcl_lifecycle_transition_t +typedef struct rcl_lifecycle_transition_s { /// String with transition name: configuring, cleaningup, activating, deactivating, /// errorprocessing or shuttingdown. @@ -55,7 +55,7 @@ typedef struct rcl_lifecycle_transition_t } rcl_lifecycle_transition_t; /// It contains the transition map states and transitions -typedef struct rcl_lifecycle_transition_map_t +typedef struct rcl_lifecycle_transition_map_s { /// States used to generate the transition map rcl_lifecycle_state_t * states; @@ -68,7 +68,7 @@ typedef struct rcl_lifecycle_transition_map_t } rcl_lifecycle_transition_map_t; /// It contains the communication interfac with the ROS world -typedef struct rcl_lifecycle_com_interface_t +typedef struct rcl_lifecycle_com_interface_s { /// Handle to the node used to create the publisher and the services rcl_node_t * node_handle; @@ -87,7 +87,7 @@ typedef struct rcl_lifecycle_com_interface_t } rcl_lifecycle_com_interface_t; /// It contains various options to configure the rcl_lifecycle_state_machine_t instance -typedef struct rcl_lifecycle_state_machine_options_t +typedef struct rcl_lifecycle_state_machine_options_s { /// Flag indicating whether the state machine shall be initialized with default states bool initialize_default_states; @@ -98,7 +98,7 @@ typedef struct rcl_lifecycle_state_machine_options_t } rcl_lifecycle_state_machine_options_t; /// It contains the state machine data -typedef struct rcl_lifecycle_state_machine_t +typedef struct rcl_lifecycle_state_machine_s { /// Current state of the state machine const rcl_lifecycle_state_t * current_state;