diff --git a/rmw/Doxyfile b/rmw/Doxyfile index 050e5025..9a22c8c8 100644 --- a/rmw/Doxyfile +++ b/rmw/Doxyfile @@ -17,7 +17,9 @@ ENABLE_PREPROCESSING = YES MACRO_EXPANSION = YES EXPAND_ONLY_PREDEF = YES PREDEFINED += RMW_PUBLIC= +PREDEFINED += RMW_PUBLIC_TYPE= PREDEFINED += RMW_WARN_UNUSED= +PREDEFINED += RCUTILS_DEPRECATED_WITH_MSG(x)= # 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/rmw/include/rmw/event.h b/rmw/include/rmw/event.h index fc76bde0..c74220a7 100644 --- a/rmw/include/rmw/event.h +++ b/rmw/include/rmw/event.h @@ -30,7 +30,7 @@ extern "C" #include "rmw/visibility_control.h" /// Define publisher/subscription events -typedef enum rmw_event_type_t +typedef enum rmw_event_type_e { // subscription events RMW_EVENT_LIVELINESS_CHANGED, @@ -48,7 +48,7 @@ typedef enum rmw_event_type_t } rmw_event_type_t; /// Encapsulate the RMW event implementation, data, and type. -typedef struct RMW_PUBLIC_TYPE rmw_event_t +typedef struct RMW_PUBLIC_TYPE rmw_event_s { /// Implementation identifier, used to ensure two different implementations are not being mixed. const char * implementation_identifier; diff --git a/rmw/include/rmw/events_statuses/incompatible_qos.h b/rmw/include/rmw/events_statuses/incompatible_qos.h index 838d2d5c..018cd6a4 100644 --- a/rmw/include/rmw/events_statuses/incompatible_qos.h +++ b/rmw/include/rmw/events_statuses/incompatible_qos.h @@ -25,7 +25,7 @@ extern "C" { #endif -struct RMW_PUBLIC_TYPE rmw_qos_incompatible_event_status_t +typedef struct RMW_PUBLIC_TYPE rmw_qos_incompatible_event_status_s { /** * Total cumulative number of times the concerned subscription discovered a @@ -42,13 +42,13 @@ struct RMW_PUBLIC_TYPE rmw_qos_incompatible_event_status_t * incompatible the last time an incompatibility was detected. */ rmw_qos_policy_kind_t last_policy_kind; -}; +} rmw_qos_incompatible_event_status_t; /// Event state for a subscription's 'RMW_EVENT_REQUESTED_QOS_INCOMPATIBLE' events. -typedef struct rmw_qos_incompatible_event_status_t rmw_requested_qos_incompatible_event_status_t; +typedef rmw_qos_incompatible_event_status_t rmw_requested_qos_incompatible_event_status_t; /// Event state for a publisher's 'RMW_EVENT_OFFERED_QOS_INCOMPATIBLE' events. -typedef struct rmw_qos_incompatible_event_status_t rmw_offered_qos_incompatible_event_status_t; +typedef rmw_qos_incompatible_event_status_t rmw_offered_qos_incompatible_event_status_t; #ifdef __cplusplus } diff --git a/rmw/include/rmw/events_statuses/liveliness_changed.h b/rmw/include/rmw/events_statuses/liveliness_changed.h index 35adacfc..e7abf729 100644 --- a/rmw/include/rmw/events_statuses/liveliness_changed.h +++ b/rmw/include/rmw/events_statuses/liveliness_changed.h @@ -25,7 +25,7 @@ extern "C" #endif /// QoS Liveliness Changed information provided by a subscription. -typedef struct RMW_PUBLIC_TYPE rmw_liveliness_changed_status_t +typedef struct RMW_PUBLIC_TYPE rmw_liveliness_changed_status_s { /** * The total number of currently active Publishers which publish to the topic associated with diff --git a/rmw/include/rmw/events_statuses/liveliness_lost.h b/rmw/include/rmw/events_statuses/liveliness_lost.h index 14444b57..a91879a6 100644 --- a/rmw/include/rmw/events_statuses/liveliness_lost.h +++ b/rmw/include/rmw/events_statuses/liveliness_lost.h @@ -25,7 +25,7 @@ extern "C" #endif /// QoS Liveliness Lost information provided by a publisher. -typedef struct RMW_PUBLIC_TYPE rmw_liveliness_lost_status_t +typedef struct RMW_PUBLIC_TYPE rmw_liveliness_lost_status_s { /** * Lifetime cumulative number of times that a previously-alive Publisher became not alive due to diff --git a/rmw/include/rmw/events_statuses/message_lost.h b/rmw/include/rmw/events_statuses/message_lost.h index b402bb6a..b08fc8d5 100644 --- a/rmw/include/rmw/events_statuses/message_lost.h +++ b/rmw/include/rmw/events_statuses/message_lost.h @@ -24,7 +24,7 @@ extern "C" { #endif -typedef struct RMW_PUBLIC_TYPE rmw_message_lost_status_t +typedef struct RMW_PUBLIC_TYPE rmw_message_lost_status_s { /// Total number of messages lost. size_t total_count; diff --git a/rmw/include/rmw/events_statuses/offered_deadline_missed.h b/rmw/include/rmw/events_statuses/offered_deadline_missed.h index 53aea5e4..84acb042 100644 --- a/rmw/include/rmw/events_statuses/offered_deadline_missed.h +++ b/rmw/include/rmw/events_statuses/offered_deadline_missed.h @@ -25,7 +25,7 @@ extern "C" #endif /// QoS Deadline Missed information provided by a publisher. -typedef struct RMW_PUBLIC_TYPE rmw_offered_deadline_missed_status_t +typedef struct RMW_PUBLIC_TYPE rmw_offered_deadline_missed_status_s { /** * Lifetime cumulative number of offered deadline periods elapsed during which a Publisher failed diff --git a/rmw/include/rmw/events_statuses/requested_deadline_missed.h b/rmw/include/rmw/events_statuses/requested_deadline_missed.h index a93b55df..b39cb5a3 100644 --- a/rmw/include/rmw/events_statuses/requested_deadline_missed.h +++ b/rmw/include/rmw/events_statuses/requested_deadline_missed.h @@ -25,7 +25,7 @@ extern "C" #endif /// QoS Requested Deadline Missed information provided by a subscription. -typedef struct RMW_PUBLIC_TYPE rmw_requested_deadline_missed_status_t +typedef struct RMW_PUBLIC_TYPE rmw_requested_deadline_missed_status_s { /** * Lifetime cumulative number of missed deadlines detected for any instance read by the diff --git a/rmw/include/rmw/init.h b/rmw/include/rmw/init.h index d66100bd..e4a6c550 100644 --- a/rmw/include/rmw/init.h +++ b/rmw/include/rmw/init.h @@ -31,10 +31,10 @@ extern "C" /** * This should be defined by the rmw implementation. */ -typedef struct rmw_context_impl_t rmw_context_impl_t; +typedef struct rmw_context_impl_s rmw_context_impl_t; /// Initialization context structure which is used to store init specific information. -typedef struct RMW_PUBLIC_TYPE rmw_context_t +typedef struct RMW_PUBLIC_TYPE rmw_context_s { /// Locally (process local) unique ID that represents this init/shutdown cycle. uint64_t instance_id; diff --git a/rmw/include/rmw/init_options.h b/rmw/include/rmw/init_options.h index 1fe69ba7..b9ea5ebf 100644 --- a/rmw/include/rmw/init_options.h +++ b/rmw/include/rmw/init_options.h @@ -34,10 +34,10 @@ extern "C" /** * This should be defined by the rmw implementation. */ -typedef struct rmw_init_options_impl_t rmw_init_options_impl_t; +typedef struct rmw_init_options_impl_s rmw_init_options_impl_t; /// Options structure used during rmw_init(). -typedef struct RMW_PUBLIC_TYPE rmw_init_options_t +typedef struct RMW_PUBLIC_TYPE rmw_init_options_s { /// Locally (process local) unique ID that represents this init/shutdown cycle. /** diff --git a/rmw/include/rmw/localhost.h b/rmw/include/rmw/localhost.h index 187a6f32..6d867fde 100644 --- a/rmw/include/rmw/localhost.h +++ b/rmw/include/rmw/localhost.h @@ -23,7 +23,7 @@ extern "C" #endif /// Used to specify if the context can only communicate through localhost. -typedef enum RMW_PUBLIC_TYPE rmw_localhost_only_t +typedef enum RMW_PUBLIC_TYPE rmw_localhost_only_e { /// Uses ROS_LOCALHOST_ONLY environment variable. RMW_LOCALHOST_ONLY_DEFAULT = 0, diff --git a/rmw/include/rmw/message_sequence.h b/rmw/include/rmw/message_sequence.h index d8e2bad5..77dd0a30 100644 --- a/rmw/include/rmw/message_sequence.h +++ b/rmw/include/rmw/message_sequence.h @@ -27,7 +27,7 @@ extern "C" #endif /// Structure to hold a sequence of ROS messages. -typedef struct RMW_PUBLIC_TYPE rmw_message_sequence_t +typedef struct RMW_PUBLIC_TYPE rmw_message_sequence_s { /// Array of pointers to ROS messages. void ** data; @@ -40,7 +40,7 @@ typedef struct RMW_PUBLIC_TYPE rmw_message_sequence_t } rmw_message_sequence_t; /// Structure to hold a sequence of message infos. -typedef struct RMW_PUBLIC_TYPE rmw_message_info_sequence_t +typedef struct RMW_PUBLIC_TYPE rmw_message_info_sequence_s { /// Array of message info. rmw_message_info_t * data; diff --git a/rmw/include/rmw/names_and_types.h b/rmw/include/rmw/names_and_types.h index a8318660..08280995 100644 --- a/rmw/include/rmw/names_and_types.h +++ b/rmw/include/rmw/names_and_types.h @@ -29,7 +29,7 @@ extern "C" #include "rmw/visibility_control.h" /// Associative array of topic or service names and types. -typedef struct RMW_PUBLIC_TYPE rmw_names_and_types_t +typedef struct RMW_PUBLIC_TYPE rmw_names_and_types_s { /// Array of names rcutils_string_array_t names; diff --git a/rmw/include/rmw/network_flow_endpoint.h b/rmw/include/rmw/network_flow_endpoint.h index 87745adb..331fedb1 100644 --- a/rmw/include/rmw/network_flow_endpoint.h +++ b/rmw/include/rmw/network_flow_endpoint.h @@ -24,7 +24,7 @@ extern "C" #include "rmw/visibility_control.h" /// Transport protocol types -typedef enum rmw_transport_protocol_t +typedef enum rmw_transport_protocol_e { RMW_TRANSPORT_PROTOCOL_UNKNOWN = 0, RMW_TRANSPORT_PROTOCOL_UDP, @@ -33,7 +33,7 @@ typedef enum rmw_transport_protocol_t } rmw_transport_protocol_t; /// Internet protocol types -typedef enum rmw_internet_protocol_t +typedef enum rmw_internet_protocol_e { RMW_INTERNET_PROTOCOL_UNKNOWN = 0, RMW_INTERNET_PROTOCOL_IPV4, @@ -46,7 +46,7 @@ typedef enum rmw_internet_protocol_t #define RMW_INET_ADDRSTRLEN 48 /// Structure that describes network flow endpoint of a publisher or subscription -typedef struct RMW_PUBLIC_TYPE rmw_network_flow_endpoint_t +typedef struct RMW_PUBLIC_TYPE rmw_network_flow_endpoint_s { // Transport protocol rmw_transport_protocol_t transport_protocol; diff --git a/rmw/include/rmw/network_flow_endpoint_array.h b/rmw/include/rmw/network_flow_endpoint_array.h index 9a55f478..584b4911 100644 --- a/rmw/include/rmw/network_flow_endpoint_array.h +++ b/rmw/include/rmw/network_flow_endpoint_array.h @@ -27,7 +27,7 @@ extern "C" #include "rmw/visibility_control.h" /// Structure to hold an arrary of network_flow_endpoint_t -typedef struct RMW_PUBLIC_TYPE rmw_network_flow_endpoint_array_t +typedef struct RMW_PUBLIC_TYPE rmw_network_flow_endpoint_array_s { /// Size of the array size_t size; diff --git a/rmw/include/rmw/qos_policy_kind.h b/rmw/include/rmw/qos_policy_kind.h index c582c068..422e53e4 100644 --- a/rmw/include/rmw/qos_policy_kind.h +++ b/rmw/include/rmw/qos_policy_kind.h @@ -24,7 +24,7 @@ extern "C" #endif /// QoS Policy Kinds -typedef enum RMW_PUBLIC_TYPE rmw_qos_policy_kind_t +typedef enum RMW_PUBLIC_TYPE rmw_qos_policy_kind_e { RMW_QOS_POLICY_INVALID = 1 << 0, RMW_QOS_POLICY_DURABILITY = 1 << 1, diff --git a/rmw/include/rmw/qos_profiles.h b/rmw/include/rmw/qos_profiles.h index be5c26c8..89b30e97 100644 --- a/rmw/include/rmw/qos_profiles.h +++ b/rmw/include/rmw/qos_profiles.h @@ -113,7 +113,7 @@ static const rmw_qos_profile_t rmw_qos_profile_unknown = false }; -typedef enum RMW_PUBLIC_TYPE rmw_qos_compatibility_type_t +typedef enum RMW_PUBLIC_TYPE rmw_qos_compatibility_type_e { /// QoS policies are compatible RMW_QOS_COMPATIBILITY_OK = 0, diff --git a/rmw/include/rmw/qos_string_conversions.h b/rmw/include/rmw/qos_string_conversions.h index c77ce499..52b320e1 100644 --- a/rmw/include/rmw/qos_string_conversions.h +++ b/rmw/include/rmw/qos_string_conversions.h @@ -73,7 +73,7 @@ rmw_qos_policy_kind_to_str(rmw_qos_policy_kind_t kind); */ RMW_PUBLIC const char * -rmw_qos_durability_policy_to_str(enum rmw_qos_durability_policy_t value); +rmw_qos_durability_policy_to_str(rmw_qos_durability_policy_t value); /// Return a string representing the policy value. /** @@ -81,7 +81,7 @@ rmw_qos_durability_policy_to_str(enum rmw_qos_durability_policy_t value); */ RMW_PUBLIC const char * -rmw_qos_history_policy_to_str(enum rmw_qos_history_policy_t value); +rmw_qos_history_policy_to_str(rmw_qos_history_policy_t value); /// Return a string representing the policy value. /** @@ -89,7 +89,7 @@ rmw_qos_history_policy_to_str(enum rmw_qos_history_policy_t value); */ RMW_PUBLIC const char * -rmw_qos_liveliness_policy_to_str(enum rmw_qos_liveliness_policy_t value); +rmw_qos_liveliness_policy_to_str(rmw_qos_liveliness_policy_t value); /// Return a string representing the policy value. /** @@ -97,7 +97,7 @@ rmw_qos_liveliness_policy_to_str(enum rmw_qos_liveliness_policy_t value); */ RMW_PUBLIC const char * -rmw_qos_reliability_policy_to_str(enum rmw_qos_reliability_policy_t value); +rmw_qos_reliability_policy_to_str(rmw_qos_reliability_policy_t value); /// Return a policy kind based on the provided string. /** @@ -142,7 +142,7 @@ rmw_qos_policy_kind_from_str(const char * str); * \return `RMW_QOS_POLICY_*_UNKNOWN` if the string doesn't represent any value. */ RMW_PUBLIC -enum rmw_qos_durability_policy_t +rmw_qos_durability_policy_t rmw_qos_durability_policy_from_str(const char * str); /// Return a enum value based on the provided string. @@ -150,7 +150,7 @@ rmw_qos_durability_policy_from_str(const char * str); * See \ref rmw_qos_durability_policy_from_str() for more details. */ RMW_PUBLIC -enum rmw_qos_history_policy_t +rmw_qos_history_policy_t rmw_qos_history_policy_from_str(const char * str); /// Return a enum value based on the provided string. @@ -158,7 +158,7 @@ rmw_qos_history_policy_from_str(const char * str); * See \ref rmw_qos_durability_policy_from_str() for more details. */ RMW_PUBLIC -enum rmw_qos_liveliness_policy_t +rmw_qos_liveliness_policy_t rmw_qos_liveliness_policy_from_str(const char * str); @@ -167,7 +167,7 @@ rmw_qos_liveliness_policy_from_str(const char * str); * See \ref rmw_qos_durability_policy_from_str() for more details. */ RMW_PUBLIC -enum rmw_qos_reliability_policy_t +rmw_qos_reliability_policy_t rmw_qos_reliability_policy_from_str(const char * str); #ifdef __cplusplus diff --git a/rmw/include/rmw/rmw.h b/rmw/include/rmw/rmw.h index 407dd492..dfd2215a 100644 --- a/rmw/include/rmw/rmw.h +++ b/rmw/include/rmw/rmw.h @@ -100,6 +100,7 @@ extern "C" #include "rmw/init.h" #include "rmw/macros.h" +#include "rmw/publisher_options.h" #include "rmw/qos_profiles.h" #include "rmw/subscription_options.h" #include "rmw/message_sequence.h" @@ -194,6 +195,10 @@ RMW_WARN_UNUSED rmw_ret_t rmw_destroy_node(rmw_node_t * node); +/** + * \deprecated `rmw_node_assert_liveliness` implementation was removed. + * If manual liveliness assertion is needed, use MANUAL_BY_TOPIC. + */ RMW_PUBLIC RCUTILS_DEPRECATED_WITH_MSG( "rmw_node_assert_liveliness implementation was removed." @@ -297,12 +302,6 @@ rmw_ret_t rmw_fini_publisher_allocation( rmw_publisher_allocation_t * allocation); -/// Return a rmw_publisher_options_t initialized with default values. -RMW_PUBLIC -RMW_WARN_UNUSED -rmw_publisher_options_t -rmw_get_default_publisher_options(void); - /// Create a publisher and return a handle to that publisher. /** * This function can fail, and therefore return `NULL`, if: diff --git a/rmw/include/rmw/security_options.h b/rmw/include/rmw/security_options.h index 835e9b23..5735b47c 100644 --- a/rmw/include/rmw/security_options.h +++ b/rmw/include/rmw/security_options.h @@ -27,15 +27,15 @@ extern "C" #include "rmw/ret_types.h" #include "rmw/visibility_control.h" -typedef enum RMW_PUBLIC_TYPE rmw_security_enforcement_policy_t +typedef enum RMW_PUBLIC_TYPE rmw_security_enforcement_policy_e { RMW_SECURITY_ENFORCEMENT_PERMISSIVE, RMW_SECURITY_ENFORCEMENT_ENFORCE, } rmw_security_enforcement_policy_t; -typedef struct RMW_PUBLIC_TYPE rmw_security_options_t +typedef struct RMW_PUBLIC_TYPE rmw_security_options_s { - enum rmw_security_enforcement_policy_t enforce_security; + rmw_security_enforcement_policy_t enforce_security; char * security_root_path; } rmw_security_options_t; diff --git a/rmw/include/rmw/serialized_message.h b/rmw/include/rmw/serialized_message.h index da551cff..59f7605e 100644 --- a/rmw/include/rmw/serialized_message.h +++ b/rmw/include/rmw/serialized_message.h @@ -23,8 +23,6 @@ extern "C" #include "rcutils/types/uint8_array.h" /** - * \struct rmw_serialized_message_t - * * \brief Serialized message as a string of bytes. * * It includes (but it is not limited to) the following members: @@ -32,7 +30,6 @@ extern "C" * \e \c buffer_length the size of stored contents, as an unsigned integer * \e \c buffer_capacity the capacity of internal storage, as an unsigned integer */ - /* For now this is a simple aliasing from a serialized message to a uint8 array. * However, in future developments this serialized message can become something * more complex and is therefore aliased. diff --git a/rmw/include/rmw/time.h b/rmw/include/rmw/time.h index 14053336..f5ee3efb 100644 --- a/rmw/include/rmw/time.h +++ b/rmw/include/rmw/time.h @@ -28,7 +28,7 @@ extern "C" #include "rmw/visibility_control.h" /// A struct representing a duration or relative time in RMW - does not encode an origin. -typedef struct RMW_PUBLIC_TYPE rmw_time_t +typedef struct RMW_PUBLIC_TYPE rmw_time_s { /// Seconds component uint64_t sec; diff --git a/rmw/include/rmw/topic_endpoint_info.h b/rmw/include/rmw/topic_endpoint_info.h index dee89178..28dd695d 100644 --- a/rmw/include/rmw/topic_endpoint_info.h +++ b/rmw/include/rmw/topic_endpoint_info.h @@ -27,7 +27,7 @@ extern "C" /// A data structure that encapsulates the node name, node namespace, /// topic_type, gid, and qos_profile of publishers and subscriptions /// for a topic. -typedef struct RMW_PUBLIC_TYPE rmw_topic_endpoint_info_t +typedef struct RMW_PUBLIC_TYPE rmw_topic_endpoint_info_s { /// Name of the node const char * node_name; @@ -288,7 +288,7 @@ RMW_WARN_UNUSED rmw_ret_t rmw_topic_endpoint_info_set_gid( rmw_topic_endpoint_info_t * topic_endpoint_info, - const uint8_t gid[], + const uint8_t * gid, size_t size); /// Set the endpoint QoS profile in the given topic endpoint info data structure. diff --git a/rmw/include/rmw/topic_endpoint_info_array.h b/rmw/include/rmw/topic_endpoint_info_array.h index a8cf0986..f052f81a 100644 --- a/rmw/include/rmw/topic_endpoint_info_array.h +++ b/rmw/include/rmw/topic_endpoint_info_array.h @@ -25,7 +25,7 @@ extern "C" #include "rmw/visibility_control.h" /// Array of topic endpoint information -typedef struct RMW_PUBLIC_TYPE rmw_topic_endpoint_info_array_t +typedef struct RMW_PUBLIC_TYPE rmw_topic_endpoint_info_array_s { /// Size of the array. size_t size; diff --git a/rmw/include/rmw/types.h b/rmw/include/rmw/types.h index 6ccafbad..0ba286f7 100644 --- a/rmw/include/rmw/types.h +++ b/rmw/include/rmw/types.h @@ -41,7 +41,7 @@ extern "C" #define RMW_GID_STORAGE_SIZE 24u /// Structure which encapsulates an rmw node -typedef struct RMW_PUBLIC_TYPE rmw_node_t +typedef struct RMW_PUBLIC_TYPE rmw_node_s { /// Name of the rmw implementation const char * implementation_identifier; @@ -60,7 +60,7 @@ typedef struct RMW_PUBLIC_TYPE rmw_node_t } rmw_node_t; /// Endpoint enumeration type -typedef enum RMW_PUBLIC_TYPE rmw_endpoint_type_t +typedef enum RMW_PUBLIC_TYPE rmw_endpoint_type_e { /// Endpoint type has not yet been set RMW_ENDPOINT_INVALID = 0, @@ -73,7 +73,7 @@ typedef enum RMW_PUBLIC_TYPE rmw_endpoint_type_t } rmw_endpoint_type_t; /// Unique network flow endpoints requirement enumeration -typedef enum RMW_PUBLIC_TYPE rmw_unique_network_flow_endpoints_requirement_t +typedef enum RMW_PUBLIC_TYPE rmw_unique_network_flow_endpoints_requirement_e { /// Unique network flow endpoints not required RMW_UNIQUE_NETWORK_FLOW_ENDPOINTS_NOT_REQUIRED = 0, @@ -91,7 +91,7 @@ typedef enum RMW_PUBLIC_TYPE rmw_unique_network_flow_endpoints_requirement_t } rmw_unique_network_flow_endpoints_requirement_t; /// Options that can be used to configure the creation of a publisher in rmw. -typedef struct RMW_PUBLIC_TYPE rmw_publisher_options_t +typedef struct RMW_PUBLIC_TYPE rmw_publisher_options_s { /// Used to pass rmw implementation specific resources during publisher creation. /** @@ -116,7 +116,7 @@ typedef struct RMW_PUBLIC_TYPE rmw_publisher_options_t } rmw_publisher_options_t; /// Structure which encapsulates an rmw publisher -typedef struct RMW_PUBLIC_TYPE rmw_publisher_t +typedef struct RMW_PUBLIC_TYPE rmw_publisher_s { /// Name of the rmw implementation const char * implementation_identifier; @@ -143,7 +143,7 @@ typedef struct RMW_PUBLIC_TYPE rmw_publisher_t } rmw_publisher_t; /// Options that can be used to configure the creation of a subscription in rmw. -typedef struct RMW_PUBLIC_TYPE rmw_subscription_options_t +typedef struct RMW_PUBLIC_TYPE rmw_subscription_options_s { /// Used to pass rmw implementation specific resources during subscription creation. /** @@ -179,7 +179,7 @@ typedef struct RMW_PUBLIC_TYPE rmw_subscription_options_t rmw_unique_network_flow_endpoints_requirement_t require_unique_network_flow_endpoints; } rmw_subscription_options_t; -typedef struct RMW_PUBLIC_TYPE rmw_subscription_t +typedef struct RMW_PUBLIC_TYPE rmw_subscription_s { /// Name of the rmw implementation const char * implementation_identifier; @@ -206,7 +206,7 @@ typedef struct RMW_PUBLIC_TYPE rmw_subscription_t } rmw_subscription_t; /// A handle to an rmw service -typedef struct RMW_PUBLIC_TYPE rmw_service_t +typedef struct RMW_PUBLIC_TYPE rmw_service_s { /// The name of the rmw implementation const char * implementation_identifier; @@ -219,7 +219,7 @@ typedef struct RMW_PUBLIC_TYPE rmw_service_t } rmw_service_t; /// A handle to an rmw service client -typedef struct RMW_PUBLIC_TYPE rmw_client_t +typedef struct RMW_PUBLIC_TYPE rmw_client_s { /// The name of the rmw implementation const char * implementation_identifier; @@ -232,7 +232,7 @@ typedef struct RMW_PUBLIC_TYPE rmw_client_t } rmw_client_t; /// Handle for an rmw guard condition -typedef struct RMW_PUBLIC_TYPE rmw_guard_condition_t +typedef struct RMW_PUBLIC_TYPE rmw_guard_condition_s { /// The name of the rmw implementation const char * implementation_identifier; @@ -245,7 +245,7 @@ typedef struct RMW_PUBLIC_TYPE rmw_guard_condition_t } rmw_guard_condition_t; /// Allocation of memory for an rmw publisher -typedef struct RMW_PUBLIC_TYPE rmw_publisher_allocation_t +typedef struct RMW_PUBLIC_TYPE rmw_publisher_allocation_s { /// The name of the rmw implementation const char * implementation_identifier; @@ -255,7 +255,7 @@ typedef struct RMW_PUBLIC_TYPE rmw_publisher_allocation_t } rmw_publisher_allocation_t; /// Allocation of memory for an rmw subscription -typedef struct RMW_PUBLIC_TYPE rmw_subscription_allocation_t +typedef struct RMW_PUBLIC_TYPE rmw_subscription_allocation_s { /// The name of the rmw implementation const char * implementation_identifier; @@ -271,7 +271,7 @@ typedef struct RMW_PUBLIC_TYPE rmw_subscription_allocation_t * The number of subscriptions represented may be smaller than the allocated size of the array. * The creator of this struct is responsible for allocating and deallocating the array. */ -typedef struct RMW_PUBLIC_TYPE rmw_subscriptions_t +typedef struct RMW_PUBLIC_TYPE rmw_subscriptions_s { /// The number of subscribers represented by the array. size_t subscriber_count; @@ -286,7 +286,7 @@ typedef struct RMW_PUBLIC_TYPE rmw_subscriptions_t * The number of services represented may be smaller than the allocated size of the array. * The creator of this struct is responsible for allocating and deallocating the array. */ -typedef struct RMW_PUBLIC_TYPE rmw_services_t +typedef struct RMW_PUBLIC_TYPE rmw_services_s { /// The number of services represented by the array. size_t service_count; @@ -301,7 +301,7 @@ typedef struct RMW_PUBLIC_TYPE rmw_services_t * The number of clients represented may be smaller than the allocated size of the array. * The creator of this struct is responsible for allocating and deallocating the array. */ -typedef struct RMW_PUBLIC_TYPE rmw_clients_t +typedef struct RMW_PUBLIC_TYPE rmw_clients_s { /// The number of clients represented by the array. size_t client_count; @@ -309,7 +309,7 @@ typedef struct RMW_PUBLIC_TYPE rmw_clients_t void ** clients; } rmw_clients_t; -typedef struct RMW_PUBLIC_TYPE rmw_events_t +typedef struct RMW_PUBLIC_TYPE rmw_events_s { /// The number of events represented by the array. size_t event_count; @@ -324,7 +324,7 @@ typedef struct RMW_PUBLIC_TYPE rmw_events_t * The number of guard conditions represented may be smaller than the allocated size of the array. * The creator of this struct is responsible for allocating and deallocating the array. */ -typedef struct RMW_PUBLIC_TYPE rmw_guard_conditions_t +typedef struct RMW_PUBLIC_TYPE rmw_guard_conditions_s { /// The number of guard conditions represented by the array. size_t guard_condition_count; @@ -333,7 +333,7 @@ typedef struct RMW_PUBLIC_TYPE rmw_guard_conditions_t } rmw_guard_conditions_t; /// Container for guard conditions to be waited on -typedef struct RMW_PUBLIC_TYPE rmw_wait_set_t +typedef struct RMW_PUBLIC_TYPE rmw_wait_set_s { /// The name of the rmw implementation const char * implementation_identifier; @@ -346,7 +346,7 @@ typedef struct RMW_PUBLIC_TYPE rmw_wait_set_t } rmw_wait_set_t; /// An rmw service request identifier -typedef struct RMW_PUBLIC_TYPE rmw_request_id_t +typedef struct RMW_PUBLIC_TYPE rmw_request_id_s { /// The guid of the writer associated with this request int8_t writer_guid[16]; @@ -356,14 +356,14 @@ typedef struct RMW_PUBLIC_TYPE rmw_request_id_t } rmw_request_id_t; /// Meta-data for a service-related take. -typedef struct RMW_PUBLIC_TYPE rmw_service_info_t +typedef struct RMW_PUBLIC_TYPE rmw_service_info_s { rmw_time_point_value_t source_timestamp; rmw_time_point_value_t received_timestamp; rmw_request_id_t request_id; } rmw_service_info_t; -enum RMW_PUBLIC_TYPE rmw_qos_reliability_policy_t +typedef enum RMW_PUBLIC_TYPE rmw_qos_reliability_policy_e { /// Implementation specific default RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT, @@ -376,10 +376,10 @@ enum RMW_PUBLIC_TYPE rmw_qos_reliability_policy_t /// Reliability policy has not yet been set RMW_QOS_POLICY_RELIABILITY_UNKNOWN -}; +} rmw_qos_reliability_policy_t; /// QoS history enumerations describing how samples endure -enum RMW_PUBLIC_TYPE rmw_qos_history_policy_t +typedef enum RMW_PUBLIC_TYPE rmw_qos_history_policy_e { /// Implementation default for history policy RMW_QOS_POLICY_HISTORY_SYSTEM_DEFAULT, @@ -392,10 +392,10 @@ enum RMW_PUBLIC_TYPE rmw_qos_history_policy_t /// History policy has not yet been set RMW_QOS_POLICY_HISTORY_UNKNOWN -}; +} rmw_qos_history_policy_t; /// QoS durability enumerations describing how samples persist -enum RMW_PUBLIC_TYPE rmw_qos_durability_policy_t +typedef enum RMW_PUBLIC_TYPE rmw_qos_durability_policy_e { /// Impplementation specific default RMW_QOS_POLICY_DURABILITY_SYSTEM_DEFAULT, @@ -408,7 +408,7 @@ enum RMW_PUBLIC_TYPE rmw_qos_durability_policy_t /// Durability policy has not yet been set RMW_QOS_POLICY_DURABILITY_UNKNOWN -}; +} rmw_qos_durability_policy_t; #define RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE_DEPRECATED_MSG \ "RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE is deprecated. " \ @@ -424,7 +424,7 @@ enum RMW_PUBLIC_TYPE rmw_qos_durability_policy_t /// For a subscriber, these are its requirements for its topic's publishers. // Suppress syntax errors, as cppcheck does not seem to handle enumerator attributes. // cppcheck-suppress syntaxError -enum RMW_PUBLIC_TYPE rmw_qos_liveliness_policy_t +typedef enum RMW_PUBLIC_TYPE rmw_qos_liveliness_policy_e { /// Implementation specific default RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT = 0, @@ -447,7 +447,7 @@ enum RMW_PUBLIC_TYPE rmw_qos_liveliness_policy_t /// Liveliness policy has not yet been set RMW_QOS_POLICY_LIVELINESS_UNKNOWN = 4 -}; +} rmw_qos_liveliness_policy_t; /// QoS Deadline default. #define RMW_QOS_DEADLINE_DEFAULT RMW_DURATION_UNSPECIFIED @@ -459,38 +459,38 @@ enum RMW_PUBLIC_TYPE rmw_qos_liveliness_policy_t #define RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT RMW_DURATION_UNSPECIFIED /// ROS MiddleWare quality of service profile. -typedef struct RMW_PUBLIC_TYPE rmw_qos_profile_t +typedef struct RMW_PUBLIC_TYPE rmw_qos_profile_s { - enum rmw_qos_history_policy_t history; + enum rmw_qos_history_policy_e history; /// Size of the message queue. size_t depth; /// Reliabiilty QoS policy setting - enum rmw_qos_reliability_policy_t reliability; + enum rmw_qos_reliability_policy_e reliability; /// Durability QoS policy setting - enum rmw_qos_durability_policy_t durability; + enum rmw_qos_durability_policy_e durability; /// The period at which messages are expected to be sent/received /** * RMW_DURATION_UNSPEFICIED will use the RMW implementation's default value, * which may or may not be infinite. * RMW_DURATION_INFINITE explicitly states that messages never miss a deadline expectation. */ - struct rmw_time_t deadline; + struct rmw_time_s deadline; /// The age at which messages are considered expired and no longer valid /** * RMW_DURATION_UNSPEFICIED will use the RMW implementation's default value, * which may or may not be infinite. * RMW_DURATION_INFINITE explicitly states that messages do not expire. */ - struct rmw_time_t lifespan; + struct rmw_time_s lifespan; /// Liveliness QoS policy setting - enum rmw_qos_liveliness_policy_t liveliness; + enum rmw_qos_liveliness_policy_e liveliness; /// The time within which the RMW node or publisher must show that it is alive /** * RMW_DURATION_UNSPEFICIED will use the RMW implementation's default value, * which may or may not be infinite. * RMW_DURATION_INFINITE explicitly states that liveliness is not enforced. */ - struct rmw_time_t liveliness_lease_duration; + struct rmw_time_s liveliness_lease_duration; /// If true, any ROS specific namespacing conventions will be circumvented. /** @@ -506,7 +506,7 @@ typedef struct RMW_PUBLIC_TYPE rmw_qos_profile_t } rmw_qos_profile_t; /// ROS graph ID of the topic -typedef struct RMW_PUBLIC_TYPE rmw_gid_t +typedef struct RMW_PUBLIC_TYPE rmw_gid_s { /// Name of the rmw implementation const char * implementation_identifier; @@ -516,7 +516,7 @@ typedef struct RMW_PUBLIC_TYPE rmw_gid_t } rmw_gid_t; /// Information describing an rmw message -typedef struct RMW_PUBLIC_TYPE rmw_message_info_t +typedef struct RMW_PUBLIC_TYPE rmw_message_info_s { rmw_time_point_value_t source_timestamp; rmw_time_point_value_t received_timestamp; diff --git a/rmw/src/qos_string_conversions.c b/rmw/src/qos_string_conversions.c index 279b0977..98265786 100644 --- a/rmw/src/qos_string_conversions.c +++ b/rmw/src/qos_string_conversions.c @@ -44,7 +44,7 @@ rmw_qos_policy_kind_to_str(rmw_qos_policy_kind_t kind) } const char * -rmw_qos_durability_policy_to_str(enum rmw_qos_durability_policy_t value) +rmw_qos_durability_policy_to_str(enum rmw_qos_durability_policy_e value) { switch (value) { case RMW_QOS_POLICY_DURABILITY_SYSTEM_DEFAULT: @@ -60,7 +60,7 @@ rmw_qos_durability_policy_to_str(enum rmw_qos_durability_policy_t value) } const char * -rmw_qos_history_policy_to_str(enum rmw_qos_history_policy_t value) +rmw_qos_history_policy_to_str(enum rmw_qos_history_policy_e value) { switch (value) { case RMW_QOS_POLICY_HISTORY_SYSTEM_DEFAULT: @@ -76,7 +76,7 @@ rmw_qos_history_policy_to_str(enum rmw_qos_history_policy_t value) } const char * -rmw_qos_liveliness_policy_to_str(enum rmw_qos_liveliness_policy_t value) +rmw_qos_liveliness_policy_to_str(enum rmw_qos_liveliness_policy_e value) { switch (value) { case RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT: @@ -92,7 +92,7 @@ rmw_qos_liveliness_policy_to_str(enum rmw_qos_liveliness_policy_t value) } const char * -rmw_qos_reliability_policy_to_str(enum rmw_qos_reliability_policy_t value) +rmw_qos_reliability_policy_to_str(enum rmw_qos_reliability_policy_e value) { switch (value) { case RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT: @@ -144,7 +144,7 @@ rmw_qos_policy_kind_from_str(const char * str) return RMW_QOS_POLICY_INVALID; } -enum rmw_qos_durability_policy_t +enum rmw_qos_durability_policy_e rmw_qos_durability_policy_from_str(const char * str) { RMW_CHECK_ARGUMENT_FOR_NULL(str, RMW_QOS_POLICY_DURABILITY_UNKNOWN); @@ -160,7 +160,7 @@ rmw_qos_durability_policy_from_str(const char * str) return RMW_QOS_POLICY_DURABILITY_UNKNOWN; } -enum rmw_qos_history_policy_t +enum rmw_qos_history_policy_e rmw_qos_history_policy_from_str(const char * str) { RMW_CHECK_ARGUMENT_FOR_NULL(str, RMW_QOS_POLICY_HISTORY_UNKNOWN); @@ -176,7 +176,7 @@ rmw_qos_history_policy_from_str(const char * str) return RMW_QOS_POLICY_HISTORY_UNKNOWN; } -enum rmw_qos_liveliness_policy_t +enum rmw_qos_liveliness_policy_e rmw_qos_liveliness_policy_from_str(const char * str) { RMW_CHECK_ARGUMENT_FOR_NULL(str, RMW_QOS_POLICY_LIVELINESS_UNKNOWN); @@ -192,7 +192,7 @@ rmw_qos_liveliness_policy_from_str(const char * str) return RMW_QOS_POLICY_LIVELINESS_UNKNOWN; } -enum rmw_qos_reliability_policy_t +enum rmw_qos_reliability_policy_e rmw_qos_reliability_policy_from_str(const char * str) { RMW_CHECK_ARGUMENT_FOR_NULL(str, RMW_QOS_POLICY_RELIABILITY_UNKNOWN); diff --git a/rmw/src/topic_endpoint_info.c b/rmw/src/topic_endpoint_info.c index 5f6719ca..26861a88 100644 --- a/rmw/src/topic_endpoint_info.c +++ b/rmw/src/topic_endpoint_info.c @@ -202,7 +202,7 @@ rmw_topic_endpoint_info_set_endpoint_type( rmw_ret_t rmw_topic_endpoint_info_set_gid( rmw_topic_endpoint_info_t * topic_endpoint_info, - const uint8_t gid[], + const uint8_t * gid, size_t size) { RCUTILS_CAN_RETURN_WITH_ERROR_OF(RMW_RET_INVALID_ARGUMENT);