diff --git a/rcl/Doxyfile b/rcl/Doxyfile index 60f139b5a..486ffbfff 100644 --- a/rcl/Doxyfile +++ b/rcl/Doxyfile @@ -15,13 +15,10 @@ GENERATE_LATEX = NO ENABLE_PREPROCESSING = YES MACRO_EXPANSION = YES EXPAND_ONLY_PREDEF = YES +PREDEFINED += RCL_ALIGNAS(x)= PREDEFINED += RCL_PUBLIC= PREDEFINED += RCL_WARN_UNUSED= -# Uncomment to generate internal documentation. -ENABLED_SECTIONS = INTERNAL -INPUT += ./src/rcl/arguments.c - # 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/" # Consider changing "latest" to the version you want to reference (e.g. beta1 or 1.0.0) diff --git a/rcl/include/rcl/arguments.h b/rcl/include/rcl/arguments.h index 2dbfa993b..44c99f6a9 100644 --- a/rcl/include/rcl/arguments.h +++ b/rcl/include/rcl/arguments.h @@ -29,13 +29,13 @@ extern "C" { #endif -struct rcl_arguments_impl_t; +typedef struct rcl_arguments_impl_s rcl_arguments_impl_t; /// Hold output of parsing command line arguments. -typedef struct rcl_arguments_t +typedef struct rcl_arguments_s { /// Private implementation pointer. - struct rcl_arguments_impl_t * impl; + rcl_arguments_impl_t * impl; } rcl_arguments_t; /// The command-line flag that delineates the start of ROS arguments. @@ -151,7 +151,7 @@ RCL_WARN_UNUSED rcl_ret_t rcl_parse_arguments( int argc, - const char * const argv[], + const char * const * argv, rcl_allocator_t allocator, rcl_arguments_t * args_output); @@ -369,11 +369,11 @@ RCL_PUBLIC RCL_WARN_UNUSED rcl_ret_t rcl_remove_ros_arguments( - char const * const argv[], + const char * const * argv, const rcl_arguments_t * args, rcl_allocator_t allocator, int * nonros_argc, - const char ** nonros_argv[]); + const char *** nonros_argv); /// Return log levels parsed from the command line. /** diff --git a/rcl/include/rcl/client.h b/rcl/include/rcl/client.h index e4285a031..39715f181 100644 --- a/rcl/include/rcl/client.h +++ b/rcl/include/rcl/client.h @@ -29,17 +29,17 @@ extern "C" #include "rcl/visibility_control.h" /// Internal rcl client implementation struct. -struct rcl_client_impl_t; +typedef struct rcl_client_impl_s rcl_client_impl_t; /// Structure which encapsulates a ROS Client. -typedef struct rcl_client_t +typedef struct rcl_client_s { /// Pointer to the client implementation - struct rcl_client_impl_t * impl; + rcl_client_impl_t * impl; } rcl_client_t; /// Options available for a rcl_client_t. -typedef struct rcl_client_options_t +typedef struct rcl_client_options_s { /// Middleware quality of service settings for the client. rmw_qos_profile_t qos; diff --git a/rcl/include/rcl/context.h b/rcl/include/rcl/context.h index b5604ddcc..68500da81 100644 --- a/rcl/include/rcl/context.h +++ b/rcl/include/rcl/context.h @@ -43,7 +43,7 @@ extern "C" /// A unique ID per context instance. typedef uint64_t rcl_context_instance_id_t; -struct rcl_context_impl_t; +typedef struct rcl_context_impl_s rcl_context_impl_t; /// Encapsulates the non-global state of an init/shutdown cycle. /** @@ -110,14 +110,14 @@ struct rcl_context_impl_t; * it directly (e.g. nodes and guard conditions) or indirectly (e.g. * subscriptions and topics). */ -typedef struct rcl_context_t +typedef struct rcl_context_s { /// Global arguments for all nodes which share this context. /** Typically generated by the parsing of argc/argv in rcl_init(). */ rcl_arguments_t global_arguments; /// Implementation specific pointer. - struct rcl_context_impl_t * impl; + rcl_context_impl_t * impl; // The assumption that this is big enough for an atomic_uint_least64_t is // ensured with a static_assert in the context.c file. diff --git a/rcl/include/rcl/event.h b/rcl/include/rcl/event.h index ecf9a212e..abf4e6386 100644 --- a/rcl/include/rcl/event.h +++ b/rcl/include/rcl/event.h @@ -32,7 +32,7 @@ extern "C" #include "rcl/visibility_control.h" /// Enumeration of all of the publisher events that may fire. -typedef enum rcl_publisher_event_type_t +typedef enum rcl_publisher_event_type_e { RCL_PUBLISHER_OFFERED_DEADLINE_MISSED, RCL_PUBLISHER_LIVELINESS_LOST, @@ -40,7 +40,7 @@ typedef enum rcl_publisher_event_type_t } rcl_publisher_event_type_t; /// Enumeration of all of the subscription events that may fire. -typedef enum rcl_subscription_event_type_t +typedef enum rcl_subscription_event_type_e { RCL_SUBSCRIPTION_REQUESTED_DEADLINE_MISSED, RCL_SUBSCRIPTION_LIVELINESS_CHANGED, @@ -49,13 +49,13 @@ typedef enum rcl_subscription_event_type_t } rcl_subscription_event_type_t; /// Internal rcl implementation struct. -struct rcl_event_impl_t; +typedef struct rcl_event_impl_s rcl_event_impl_t; /// Structure which encapsulates a ROS QoS event handle. -typedef struct rcl_event_t +typedef struct rcl_event_s { /// Pointer to the event implementation - struct rcl_event_impl_t * impl; + rcl_event_impl_t * impl; } rcl_event_t; /// Return a rcl_event_t struct with members set to `NULL`. diff --git a/rcl/include/rcl/guard_condition.h b/rcl/include/rcl/guard_condition.h index a6727d3a2..368a9a6b4 100644 --- a/rcl/include/rcl/guard_condition.h +++ b/rcl/include/rcl/guard_condition.h @@ -29,20 +29,20 @@ extern "C" #include "rcl/visibility_control.h" /// Internal rcl guard condition implementation struct. -struct rcl_guard_condition_impl_t; +typedef struct rcl_guard_condition_impl_s rcl_guard_condition_impl_t; /// Handle for a rcl guard condition. -typedef struct rcl_guard_condition_t +typedef struct rcl_guard_condition_s { /// Context associated with this guard condition. rcl_context_t * context; /// Pointer to the guard condition implementation - struct rcl_guard_condition_impl_t * impl; + rcl_guard_condition_impl_t * impl; } rcl_guard_condition_t; /// Options available for a rcl guard condition. -typedef struct rcl_guard_condition_options_t +typedef struct rcl_guard_condition_options_s { /// Custom allocator for the guard condition, used for internal allocations. rcl_allocator_t allocator; diff --git a/rcl/include/rcl/init_options.h b/rcl/include/rcl/init_options.h index a72bf1333..f80dd7759 100644 --- a/rcl/include/rcl/init_options.h +++ b/rcl/include/rcl/init_options.h @@ -29,13 +29,13 @@ extern "C" #include "rcl/types.h" #include "rcl/visibility_control.h" -struct rcl_init_options_impl_t; +typedef struct rcl_init_options_impl_s rcl_init_options_impl_t; /// Encapsulation of init options and implementation defined init options. -typedef struct rcl_init_options_t +typedef struct rcl_init_options_s { /// Implementation specific pointer. - struct rcl_init_options_impl_t * impl; + rcl_init_options_impl_t * impl; } rcl_init_options_t; /// Return a zero initialized rcl_init_options_t struct. diff --git a/rcl/include/rcl/lexer.h b/rcl/include/rcl/lexer.h index 7d652def5..7cf3dac10 100644 --- a/rcl/include/rcl/lexer.h +++ b/rcl/include/rcl/lexer.h @@ -30,7 +30,7 @@ extern "C" #endif /// Type of lexeme found by lexical analysis. -typedef enum rcl_lexeme_t +typedef enum rcl_lexeme_e { /// Indicates no valid lexeme was found (end of input not reached) RCL_LEXEME_NONE = 0, diff --git a/rcl/include/rcl/lexer_lookahead.h b/rcl/include/rcl/lexer_lookahead.h index 79fe9b958..2bf523ca7 100644 --- a/rcl/include/rcl/lexer_lookahead.h +++ b/rcl/include/rcl/lexer_lookahead.h @@ -31,13 +31,13 @@ extern "C" #endif // Forward declaration -struct rcl_lexer_lookahead2_impl_t; +typedef struct rcl_lexer_lookahead2_impl_s rcl_lexer_lookahead2_impl_t; /// Track lexical analysis and allow looking ahead 2 lexemes. -typedef struct rcl_lexer_lookahead2_t +typedef struct rcl_lexer_lookahead2_s { /// Pointer to the lexer look ahead2 implementation - struct rcl_lexer_lookahead2_impl_t * impl; + rcl_lexer_lookahead2_impl_t * impl; } rcl_lexer_lookahead2_t; /// Get a zero initialized rcl_lexer_lookahead2_t instance. diff --git a/rcl/include/rcl/log_level.h b/rcl/include/rcl/log_level.h index a907ad8ba..64942ec8a 100644 --- a/rcl/include/rcl/log_level.h +++ b/rcl/include/rcl/log_level.h @@ -31,7 +31,7 @@ extern "C" typedef enum RCUTILS_LOG_SEVERITY rcl_log_severity_t; /// A logger item to specify a name and a log level. -typedef struct rcl_logger_setting_t +typedef struct rcl_logger_setting_s { /// Name for the logger. const char * name; @@ -40,12 +40,12 @@ typedef struct rcl_logger_setting_t } rcl_logger_setting_t; /// Hold default logger level and other logger setting. -typedef struct rcl_log_levels_t +typedef struct rcl_log_levels_s { /// Minimum default logger level severity. rcl_log_severity_t default_logger_level; /// Array of logger setting. - struct rcl_logger_setting_t * logger_settings; + rcl_logger_setting_t * logger_settings; /// Number of logger settings. size_t num_logger_settings; /// Capacity of logger settings. diff --git a/rcl/include/rcl/node.h b/rcl/include/rcl/node.h index c21378aa0..fafaa04df 100644 --- a/rcl/include/rcl/node.h +++ b/rcl/include/rcl/node.h @@ -27,22 +27,22 @@ extern "C" #include "rcl/allocator.h" #include "rcl/arguments.h" #include "rcl/context.h" +#include "rcl/guard_condition.h" #include "rcl/macros.h" #include "rcl/node_options.h" #include "rcl/types.h" #include "rcl/visibility_control.h" -struct rcl_guard_condition_t; -struct rcl_node_impl_t; +typedef struct rcl_node_impl_s rcl_node_impl_t; /// Structure which encapsulates a ROS Node. -typedef struct rcl_node_t +typedef struct rcl_node_s { /// Context associated with this node. rcl_context_t * context; /// Private implementation pointer. - struct rcl_node_impl_t * impl; + rcl_node_impl_t * impl; } rcl_node_t; /// Return a rcl_node_t struct with members initialized to `NULL`. @@ -462,7 +462,7 @@ rcl_node_get_rcl_instance_id(const rcl_node_t * node); */ RCL_PUBLIC RCL_WARN_UNUSED -const struct rcl_guard_condition_t * +const rcl_guard_condition_t * rcl_node_get_graph_guard_condition(const rcl_node_t * node); /// Return the logger name of the node. diff --git a/rcl/include/rcl/node_options.h b/rcl/include/rcl/node_options.h index 0da2b0641..551d79437 100644 --- a/rcl/include/rcl/node_options.h +++ b/rcl/include/rcl/node_options.h @@ -31,7 +31,7 @@ extern "C" #define RCL_NODE_OPTIONS_DEFAULT_DOMAIN_ID RCL_DEFAULT_DOMAIN_ID /// Structure which encapsulates the options for creating a rcl_node_t. -typedef struct rcl_node_options_t +typedef struct rcl_node_options_s { // bool anonymous_name; diff --git a/rcl/include/rcl/publisher.h b/rcl/include/rcl/publisher.h index 8a8a2ca9f..c39f5cfc5 100644 --- a/rcl/include/rcl/publisher.h +++ b/rcl/include/rcl/publisher.h @@ -30,17 +30,17 @@ extern "C" #include "rcl/time.h" /// Internal rcl publisher implementation struct. -struct rcl_publisher_impl_t; +typedef struct rcl_publisher_impl_s rcl_publisher_impl_t; /// Structure which encapsulates a ROS Publisher. -typedef struct rcl_publisher_t +typedef struct rcl_publisher_s { /// Pointer to the publisher implementation - struct rcl_publisher_impl_t * impl; + rcl_publisher_impl_t * impl; } rcl_publisher_t; /// Options available for a rcl publisher. -typedef struct rcl_publisher_options_t +typedef struct rcl_publisher_options_s { /// Middleware quality of service settings for the publisher. rmw_qos_profile_t qos; diff --git a/rcl/include/rcl/remap.h b/rcl/include/rcl/remap.h index fcf0baa53..5acf5e48e 100644 --- a/rcl/include/rcl/remap.h +++ b/rcl/include/rcl/remap.h @@ -28,13 +28,13 @@ extern "C" { #endif -struct rcl_remap_impl_t; +typedef struct rcl_remap_impl_s rcl_remap_impl_t; /// Hold remapping rules. -typedef struct rcl_remap_t +typedef struct rcl_remap_s { /// Private implementation pointer. - struct rcl_remap_impl_t * impl; + rcl_remap_impl_t * impl; } rcl_remap_t; /// Return a rcl_remap_t struct with members initialized to `NULL`. diff --git a/rcl/include/rcl/service.h b/rcl/include/rcl/service.h index 87e182ad5..82c33c110 100644 --- a/rcl/include/rcl/service.h +++ b/rcl/include/rcl/service.h @@ -29,17 +29,17 @@ extern "C" #include "rcl/visibility_control.h" /// Internal rcl implementation struct. -struct rcl_service_impl_t; +typedef struct rcl_service_impl_s rcl_service_impl_t; /// Structure which encapsulates a ROS Service. -typedef struct rcl_service_t +typedef struct rcl_service_s { /// Pointer to the service implementation - struct rcl_service_impl_t * impl; + rcl_service_impl_t * impl; } rcl_service_t; /// Options available for a rcl service. -typedef struct rcl_service_options_t +typedef struct rcl_service_options_s { /// Middleware quality of service settings for the service. rmw_qos_profile_t qos; diff --git a/rcl/include/rcl/subscription.h b/rcl/include/rcl/subscription.h index d73e2c4c9..09d6e6bc4 100644 --- a/rcl/include/rcl/subscription.h +++ b/rcl/include/rcl/subscription.h @@ -31,17 +31,17 @@ extern "C" #include "rmw/message_sequence.h" /// Internal rcl implementation struct. -struct rcl_subscription_impl_t; +typedef struct rcl_subscription_impl_s rcl_subscription_impl_t; /// Structure which encapsulates a ROS Subscription. -typedef struct rcl_subscription_t +typedef struct rcl_subscription_s { /// Pointer to the subscription implementation - struct rcl_subscription_impl_t * impl; + rcl_subscription_impl_t * impl; } rcl_subscription_t; /// Options available for a rcl subscription. -typedef struct rcl_subscription_options_t +typedef struct rcl_subscription_options_s { /// Middleware quality of service settings for the subscription. rmw_qos_profile_t qos; diff --git a/rcl/include/rcl/time.h b/rcl/include/rcl/time.h index 94089b418..fb4445a78 100644 --- a/rcl/include/rcl/time.h +++ b/rcl/include/rcl/time.h @@ -58,7 +58,7 @@ typedef rcutils_duration_value_t rcl_duration_value_t; * * RCL_STEADY_TIME reports a value from a monotonically increasing clock. */ -typedef enum rcl_clock_type_t +typedef enum rcl_clock_type_e { /// Clock uninitialized RCL_CLOCK_UNINITIALIZED = 0, @@ -71,14 +71,14 @@ typedef enum rcl_clock_type_t } rcl_clock_type_t; /// A duration of time, measured in nanoseconds and its source. -typedef struct rcl_duration_t +typedef struct rcl_duration_s { /// Duration in nanoseconds and its source. rcl_duration_value_t nanoseconds; } rcl_duration_t; /// Enumeration to describe the type of time jump. -typedef enum rcl_clock_change_t +typedef enum rcl_clock_change_e { /// The source before and after the jump is ROS_TIME. RCL_ROS_TIME_NO_CHANGE = 1, @@ -91,7 +91,7 @@ typedef enum rcl_clock_change_t } rcl_clock_change_t; /// Struct to describe a jump in time. -typedef struct rcl_time_jump_t +typedef struct rcl_time_jump_s { /// Indicate whether or not the source of time changed. rcl_clock_change_t clock_change; @@ -105,12 +105,12 @@ typedef struct rcl_time_jump_t /// once after. This is true the first call and false the second. /// \param[in] user_data A pointer given at callback registration which is passed to the callback. typedef void (* rcl_jump_callback_t)( - const struct rcl_time_jump_t * time_jump, + const rcl_time_jump_t * time_jump, bool before_jump, void * user_data); /// Describe the prerequisites for calling a time jump callback. -typedef struct rcl_jump_threshold_t +typedef struct rcl_jump_threshold_s { /// True to call callback when the clock type changes. bool on_clock_change; @@ -123,7 +123,7 @@ typedef struct rcl_jump_threshold_t } rcl_jump_threshold_t; /// Struct to describe an added callback. -typedef struct rcl_jump_callback_info_t +typedef struct rcl_jump_callback_info_s { /// Callback to fucntion. rcl_jump_callback_t callback; @@ -134,10 +134,10 @@ typedef struct rcl_jump_callback_info_t } rcl_jump_callback_info_t; /// Encapsulation of a time source. -typedef struct rcl_clock_t +typedef struct rcl_clock_s { /// Clock type - enum rcl_clock_type_t type; + rcl_clock_type_t type; /// An array of added jump callbacks. rcl_jump_callback_info_t * jump_callbacks; /// Number of callbacks in jump_callbacks. @@ -152,7 +152,7 @@ typedef struct rcl_clock_t } rcl_clock_t; /// A single point in time, measured in nanoseconds, the reference point is based on the source. -typedef struct rcl_time_point_t +typedef struct rcl_time_point_s { /// Nanoseconds of the point in time rcl_time_point_value_t nanoseconds; @@ -218,7 +218,7 @@ RCL_PUBLIC RCL_WARN_UNUSED rcl_ret_t rcl_clock_init( - enum rcl_clock_type_t clock_type, rcl_clock_t * clock, + rcl_clock_type_t clock_type, rcl_clock_t * clock, rcl_allocator_t * allocator); /// Finalize a clock. diff --git a/rcl/include/rcl/timer.h b/rcl/include/rcl/timer.h index b1a213433..1bf9212d7 100644 --- a/rcl/include/rcl/timer.h +++ b/rcl/include/rcl/timer.h @@ -32,14 +32,13 @@ extern "C" #include "rcl/types.h" #include "rmw/rmw.h" -struct rcl_clock_t; -struct rcl_timer_impl_t; +typedef struct rcl_timer_impl_s rcl_timer_impl_t; /// Structure which encapsulates a ROS Timer. -typedef struct rcl_timer_t +typedef struct rcl_timer_s { /// Private implementation pointer. - struct rcl_timer_impl_t * impl; + rcl_timer_impl_t * impl; } rcl_timer_t; /// User callback signature for timers. diff --git a/rcl/include/rcl/wait.h b/rcl/include/rcl/wait.h index 229c48f8e..60e21a291 100644 --- a/rcl/include/rcl/wait.h +++ b/rcl/include/rcl/wait.h @@ -35,10 +35,10 @@ extern "C" #include "rcl/types.h" #include "rcl/visibility_control.h" -struct rcl_wait_set_impl_t; +typedef struct rcl_wait_set_impl_s rcl_wait_set_impl_t; /// Container for subscription's, guard condition's, etc to be waited on. -typedef struct rcl_wait_set_t +typedef struct rcl_wait_set_s { /// Storage for subscription pointers. const rcl_subscription_t ** subscriptions; @@ -65,7 +65,7 @@ typedef struct rcl_wait_set_t /// Number of events size_t size_of_events; /// Implementation specific storage. - struct rcl_wait_set_impl_t * impl; + rcl_wait_set_impl_t * impl; } rcl_wait_set_t; /// Return a rcl_wait_set_t struct with members set to `NULL`. diff --git a/rcl/src/rcl/arguments.c b/rcl/src/rcl/arguments.c index 58a74f1e5..22306cc53 100644 --- a/rcl/src/rcl/arguments.c +++ b/rcl/src/rcl/arguments.c @@ -247,7 +247,7 @@ _rcl_allocate_initialized_arguments_impl(rcl_arguments_t * args, rcl_allocator_t rcl_ret_t rcl_parse_arguments( int argc, - const char * const argv[], + const char * const * argv, rcl_allocator_t allocator, rcl_arguments_t * args_output) { @@ -759,11 +759,11 @@ rcl_get_zero_initialized_arguments(void) rcl_ret_t rcl_remove_ros_arguments( - char const * const argv[], + const char * const * argv, const rcl_arguments_t * args, rcl_allocator_t allocator, int * nonros_argc, - const char ** nonros_argv[]) + const char *** nonros_argv) { RCL_CHECK_ARGUMENT_FOR_NULL(args, RCL_RET_INVALID_ARGUMENT); RCL_CHECK_ALLOCATOR_WITH_MSG(&allocator, "invalid allocator", return RCL_RET_INVALID_ARGUMENT); diff --git a/rcl/src/rcl/arguments_impl.h b/rcl/src/rcl/arguments_impl.h index 18b8cd781..d3aedbb42 100644 --- a/rcl/src/rcl/arguments_impl.h +++ b/rcl/src/rcl/arguments_impl.h @@ -26,7 +26,7 @@ extern "C" #endif /// \internal -typedef struct rcl_arguments_impl_t +struct rcl_arguments_impl_s { /// Array of indices to unknown ROS specific arguments. int * unparsed_ros_args; @@ -67,7 +67,7 @@ typedef struct rcl_arguments_impl_t /// Allocator used to allocate objects in this struct rcl_allocator_t allocator; -} rcl_arguments_impl_t; +}; #ifdef __cplusplus } diff --git a/rcl/src/rcl/client.c b/rcl/src/rcl/client.c index 53dc77ca1..433ed3f04 100644 --- a/rcl/src/rcl/client.c +++ b/rcl/src/rcl/client.c @@ -33,12 +33,12 @@ extern "C" #include "./common.h" -typedef struct rcl_client_impl_t +struct rcl_client_impl_s { rcl_client_options_t options; rmw_client_t * rmw_handle; atomic_int_least64_t sequence_number; -} rcl_client_impl_t; +}; rcl_client_t rcl_get_zero_initialized_client() diff --git a/rcl/src/rcl/context_impl.h b/rcl/src/rcl/context_impl.h index 08403c08f..10c9e82cc 100644 --- a/rcl/src/rcl/context_impl.h +++ b/rcl/src/rcl/context_impl.h @@ -26,7 +26,7 @@ extern "C" #endif /// \internal -typedef struct rcl_context_impl_t +struct rcl_context_impl_s { /// Allocator used during init and shutdown. rcl_allocator_t allocator; @@ -38,7 +38,7 @@ typedef struct rcl_context_impl_t char ** argv; /// rmw context. rmw_context_t rmw_context; -} rcl_context_impl_t; +}; RCL_LOCAL rcl_ret_t diff --git a/rcl/src/rcl/event_impl.h b/rcl/src/rcl/event_impl.h index 1c6b8422b..09456ddcd 100644 --- a/rcl/src/rcl/event_impl.h +++ b/rcl/src/rcl/event_impl.h @@ -19,10 +19,10 @@ #include "rcl/event.h" -typedef struct rcl_event_impl_t +struct rcl_event_impl_s { rmw_event_t rmw_handle; rcl_allocator_t allocator; -} rcl_event_impl_t; +}; #endif // RCL__EVENT_IMPL_H_ diff --git a/rcl/src/rcl/guard_condition.c b/rcl/src/rcl/guard_condition.c index d7e17afda..62974347d 100644 --- a/rcl/src/rcl/guard_condition.c +++ b/rcl/src/rcl/guard_condition.c @@ -26,12 +26,12 @@ extern "C" #include "./context_impl.h" -typedef struct rcl_guard_condition_impl_t +struct rcl_guard_condition_impl_s { rmw_guard_condition_t * rmw_handle; bool allocated_rmw_guard_condition; rcl_guard_condition_options_t options; -} rcl_guard_condition_impl_t; +}; rcl_guard_condition_t rcl_get_zero_initialized_guard_condition() diff --git a/rcl/src/rcl/init_options_impl.h b/rcl/src/rcl/init_options_impl.h index b1d4401e2..f477f8cb1 100644 --- a/rcl/src/rcl/init_options_impl.h +++ b/rcl/src/rcl/init_options_impl.h @@ -25,11 +25,11 @@ extern "C" #endif /// \internal -typedef struct rcl_init_options_impl_t +struct rcl_init_options_impl_s { rcl_allocator_t allocator; rmw_init_options_t rmw_init_options; -} rcl_init_options_impl_t; +}; #ifdef __cplusplus } diff --git a/rcl/src/rcl/lexer.c b/rcl/src/rcl/lexer.c index 6307d52ac..b537548eb 100644 --- a/rcl/src/rcl/lexer.c +++ b/rcl/src/rcl/lexer.c @@ -140,7 +140,7 @@ digraph remapping_lexer { /// Represents a transition from one state to another /// \internal -typedef struct rcl_lexer_transition_t +typedef struct rcl_lexer_transition_s { /// Index of a state to transition to const unsigned char to_state; @@ -152,7 +152,7 @@ typedef struct rcl_lexer_transition_t /// Represents a non-terminal state /// \internal -typedef struct rcl_lexer_state_t +typedef struct rcl_lexer_state_s { /// Transition to this state if no other transition matches const unsigned char else_state; diff --git a/rcl/src/rcl/lexer_lookahead.c b/rcl/src/rcl/lexer_lookahead.c index a5b258957..c0fb0af59 100644 --- a/rcl/src/rcl/lexer_lookahead.c +++ b/rcl/src/rcl/lexer_lookahead.c @@ -15,7 +15,7 @@ #include "rcl/error_handling.h" #include "rcl/lexer_lookahead.h" -struct rcl_lexer_lookahead2_impl_t +struct rcl_lexer_lookahead2_impl_s { // Text that is being analyzed for lexemes const char * text; @@ -59,7 +59,7 @@ rcl_lexer_lookahead2_init( return RCL_RET_INVALID_ARGUMENT; } - buffer->impl = allocator.allocate(sizeof(struct rcl_lexer_lookahead2_impl_t), allocator.state); + buffer->impl = allocator.allocate(sizeof(rcl_lexer_lookahead2_impl_t), allocator.state); RCL_CHECK_FOR_NULL_WITH_MSG( buffer->impl, "Failed to allocate lookahead impl", return RCL_RET_BAD_ALLOC); diff --git a/rcl/src/rcl/node.c b/rcl/src/rcl/node.c index 98761ce0c..a0aa51d4f 100644 --- a/rcl/src/rcl/node.c +++ b/rcl/src/rcl/node.c @@ -52,14 +52,14 @@ extern "C" #include "./context_impl.h" -typedef struct rcl_node_impl_t +struct rcl_node_impl_s { rcl_node_options_t options; rmw_node_t * rmw_node_handle; rcl_guard_condition_t * graph_guard_condition; const char * logger_name; const char * fq_name; -} rcl_node_impl_t; +}; /// Return the logger name associated with a node given the validated node name and namespace. @@ -496,7 +496,7 @@ rcl_node_get_rcl_instance_id(const rcl_node_t * node) return rcl_context_get_instance_id(node->context); } -const struct rcl_guard_condition_t * +const rcl_guard_condition_t * rcl_node_get_graph_guard_condition(const rcl_node_t * node) { if (!rcl_node_is_valid_except_context(node)) { diff --git a/rcl/src/rcl/publisher_impl.h b/rcl/src/rcl/publisher_impl.h index 485a7c5ec..cd5ff2324 100644 --- a/rcl/src/rcl/publisher_impl.h +++ b/rcl/src/rcl/publisher_impl.h @@ -19,12 +19,12 @@ #include "rcl/publisher.h" -typedef struct rcl_publisher_impl_t +struct rcl_publisher_impl_s { rcl_publisher_options_t options; rmw_qos_profile_t actual_qos; rcl_context_t * context; rmw_publisher_t * rmw_handle; -} rcl_publisher_impl_t; +}; #endif // RCL__PUBLISHER_IMPL_H_ diff --git a/rcl/src/rcl/remap_impl.h b/rcl/src/rcl/remap_impl.h index 770672592..3948847d6 100644 --- a/rcl/src/rcl/remap_impl.h +++ b/rcl/src/rcl/remap_impl.h @@ -36,7 +36,7 @@ typedef enum rcl_remap_type_t RCL_NAMESPACE_REMAP = 1u << 3 } rcl_remap_type_t; -typedef struct rcl_remap_impl_t +struct rcl_remap_impl_s { /// Bitmask indicating what type of rule this is. rcl_remap_type_t type; @@ -49,7 +49,7 @@ typedef struct rcl_remap_impl_t /// Allocator used to allocate objects in this struct rcl_allocator_t allocator; -} rcl_remap_impl_t; +}; RCL_LOCAL rcl_ret_t diff --git a/rcl/src/rcl/service.c b/rcl/src/rcl/service.c index 251ab66b1..f97110659 100644 --- a/rcl/src/rcl/service.c +++ b/rcl/src/rcl/service.c @@ -30,11 +30,11 @@ extern "C" #include "rmw/rmw.h" #include "tracetools/tracetools.h" -typedef struct rcl_service_impl_t +struct rcl_service_impl_s { rcl_service_options_t options; rmw_service_t * rmw_handle; -} rcl_service_impl_t; +}; rcl_service_t rcl_get_zero_initialized_service() diff --git a/rcl/src/rcl/subscription_impl.h b/rcl/src/rcl/subscription_impl.h index 00756f271..0fe962ab4 100644 --- a/rcl/src/rcl/subscription_impl.h +++ b/rcl/src/rcl/subscription_impl.h @@ -19,11 +19,11 @@ #include "rcl/subscription.h" -typedef struct rcl_subscription_impl_t +struct rcl_subscription_impl_s { rcl_subscription_options_t options; rmw_qos_profile_t actual_qos; rmw_subscription_t * rmw_handle; -} rcl_subscription_impl_t; +}; #endif // RCL__SUBSCRIPTION_IMPL_H_ diff --git a/rcl/src/rcl/time.c b/rcl/src/rcl/time.c index 22426f085..12dc87924 100644 --- a/rcl/src/rcl/time.c +++ b/rcl/src/rcl/time.c @@ -25,7 +25,7 @@ #include "rcutils/time.h" // Internal storage for RCL_ROS_TIME implementation -typedef struct rcl_ros_clock_storage_t +typedef struct rcl_ros_clock_storage_s { atomic_uint_least64_t current_time; bool active; @@ -86,7 +86,7 @@ rcl_clock_valid(rcl_clock_t * clock) rcl_ret_t rcl_clock_init( - enum rcl_clock_type_t clock_type, rcl_clock_t * clock, + rcl_clock_type_t clock_type, rcl_clock_t * clock, rcl_allocator_t * allocator) { RCL_CHECK_ALLOCATOR_WITH_MSG(allocator, "invalid allocator", return RCL_RET_INVALID_ARGUMENT); diff --git a/rcl/src/rcl/timer.c b/rcl/src/rcl/timer.c index 52423ea41..b672e5156 100644 --- a/rcl/src/rcl/timer.c +++ b/rcl/src/rcl/timer.c @@ -27,7 +27,7 @@ extern "C" #include "rcutils/time.h" #include "tracetools/tracetools.h" -typedef struct rcl_timer_impl_t +struct rcl_timer_impl_s { // The clock providing time. rcl_clock_t * clock; @@ -50,7 +50,7 @@ typedef struct rcl_timer_impl_t atomic_bool canceled; // The user supplied allocator. rcl_allocator_t allocator; -} rcl_timer_impl_t; +}; rcl_timer_t rcl_get_zero_initialized_timer() @@ -60,7 +60,7 @@ rcl_get_zero_initialized_timer() } void _rcl_timer_time_jump( - const struct rcl_time_jump_t * time_jump, + const rcl_time_jump_t * time_jump, bool before_jump, void * user_data) { diff --git a/rcl/src/rcl/wait.c b/rcl/src/rcl/wait.c index 6c973685b..8d97c141d 100644 --- a/rcl/src/rcl/wait.c +++ b/rcl/src/rcl/wait.c @@ -33,7 +33,7 @@ extern "C" #include "./context_impl.h" -typedef struct rcl_wait_set_impl_t +struct rcl_wait_set_impl_s { // number of subscriptions that have been added to the wait set size_t subscription_index; @@ -58,7 +58,7 @@ typedef struct rcl_wait_set_impl_t rcl_context_t * context; // allocator used in the wait set rcl_allocator_t allocator; -} rcl_wait_set_impl_t; +}; rcl_wait_set_t rcl_get_zero_initialized_wait_set() diff --git a/rcl/test/rcl/test_lexer_lookahead.cpp b/rcl/test/rcl/test_lexer_lookahead.cpp index 0fe8ff05e..d6dd1816c 100644 --- a/rcl/test/rcl/test_lexer_lookahead.cpp +++ b/rcl/test/rcl/test_lexer_lookahead.cpp @@ -70,7 +70,7 @@ TEST_F(CLASSNAME(TestLexerLookaheadFixture, RMW_IMPLEMENTATION), test_init_not_z { rcl_lexer_lookahead2_t buffer; int not_zero = 1; - buffer.impl = reinterpret_cast(¬_zero); + buffer.impl = reinterpret_cast(¬_zero); rcl_ret_t ret = rcl_lexer_lookahead2_init(&buffer, "foobar", rcl_get_default_allocator()); EXPECT_EQ(RCL_RET_INVALID_ARGUMENT, ret); rcl_reset_error(); diff --git a/rcl/test/rcl/test_time.cpp b/rcl/test/rcl/test_time.cpp index ab944c193..3bba9428a 100644 --- a/rcl/test/rcl/test_time.cpp +++ b/rcl/test/rcl/test_time.cpp @@ -391,7 +391,7 @@ static bool pre_callback_called = false; static bool post_callback_called = false; void clock_callback( - const struct rcl_time_jump_t * time_jump, + const rcl_time_jump_t * time_jump, bool before_jump, void * user_data) {