From 94b5a1d7d0899aa84a1026e21488bee95e67bbd8 Mon Sep 17 00:00:00 2001 From: Dirk Thomas Date: Fri, 10 Apr 2020 21:58:19 -0700 Subject: [PATCH] rename rosidl_generator_c namespace to rosidl_runtime_c (#616) Signed-off-by: Dirk Thomas --- rcl/include/rcl/client.h | 6 +++--- rcl/include/rcl/graph.h | 2 +- rcl/include/rcl/publisher.h | 6 +++--- rcl/include/rcl/service.h | 6 +++--- rcl/include/rcl/subscription.h | 6 +++--- rcl/src/rcl/logging_rosout.c | 10 +++++----- rcl/test/rcl/test_events.cpp | 8 ++++---- rcl/test/rcl/test_info_by_topic.cpp | 2 +- rcl/test/rcl/test_publisher.cpp | 6 +++--- rcl/test/rcl/test_subscription.cpp | 4 ++-- rcl/test/test_namespace.cpp | 2 +- rcl_action/include/rcl_action/action_client.h | 4 ++-- rcl_action/include/rcl_action/action_server.h | 6 +++--- rcl_action/include/rcl_action/types.h | 2 +- .../test/rcl_action/test_action_communication.cpp | 10 +++++----- rcl_action/test/rcl_action/test_action_interaction.cpp | 10 +++++----- rcl_lifecycle/src/com_interface.c | 8 ++++---- 17 files changed, 49 insertions(+), 49 deletions(-) diff --git a/rcl/include/rcl/client.h b/rcl/include/rcl/client.h index eb3b46a3f..0162e1081 100644 --- a/rcl/include/rcl/client.h +++ b/rcl/include/rcl/client.h @@ -20,7 +20,7 @@ extern "C" { #endif -#include "rosidl_generator_c/service_type_support_struct.h" +#include "rosidl_runtime_c/service_type_support_struct.h" #include "rcl/macros.h" #include "rcl/node.h" @@ -75,7 +75,7 @@ rcl_get_zero_initialized_client(void); * For C, a macro can be used (for example `example_interfaces/AddTwoInts`): * * ```c - * #include + * #include * #include * * const rosidl_service_type_support_t * ts = @@ -109,7 +109,7 @@ rcl_get_zero_initialized_client(void); * * ```c * #include - * #include + * #include * #include * * rcl_node_t node = rcl_get_zero_initialized_node(); diff --git a/rcl/include/rcl/graph.h b/rcl/include/rcl/graph.h index 6614d9fb7..ea95a89f2 100644 --- a/rcl/include/rcl/graph.h +++ b/rcl/include/rcl/graph.h @@ -26,7 +26,7 @@ extern "C" #include "rcutils/types.h" -#include "rosidl_generator_c/service_type_support_struct.h" +#include "rosidl_runtime_c/service_type_support_struct.h" #include "rcl/macros.h" #include "rcl/client.h" diff --git a/rcl/include/rcl/publisher.h b/rcl/include/rcl/publisher.h index 37ff42d92..76616dd7a 100644 --- a/rcl/include/rcl/publisher.h +++ b/rcl/include/rcl/publisher.h @@ -20,7 +20,7 @@ extern "C" { #endif -#include "rosidl_generator_c/message_type_support_struct.h" +#include "rosidl_runtime_c/message_type_support_struct.h" #include "rcl/macros.h" #include "rcl/node.h" @@ -74,7 +74,7 @@ rcl_get_zero_initialized_publisher(void); * For C, a macro can be used (for example `std_msgs/String`): * * ```c - * #include + * #include * #include * const rosidl_message_type_support_t * string_ts = * ROSIDL_GET_MSG_TYPE_SUPPORT(std_msgs, msg, String); @@ -105,7 +105,7 @@ rcl_get_zero_initialized_publisher(void); * * ```c * #include - * #include + * #include * #include * * rcl_node_t node = rcl_get_zero_initialized_node(); diff --git a/rcl/include/rcl/service.h b/rcl/include/rcl/service.h index 179bcbb89..72ac1d830 100644 --- a/rcl/include/rcl/service.h +++ b/rcl/include/rcl/service.h @@ -20,7 +20,7 @@ extern "C" { #endif -#include "rosidl_generator_c/service_type_support_struct.h" +#include "rosidl_runtime_c/service_type_support_struct.h" #include "rcl/macros.h" #include "rcl/node.h" @@ -73,7 +73,7 @@ rcl_get_zero_initialized_service(void); * For C, a macro can be used (for example `example_interfaces/AddTwoInts`): * * ```c - * #include + * #include * #include * const rosidl_service_type_support_t * ts = * ROSIDL_GET_SRV_TYPE_SUPPORT(example_interfaces, srv, AddTwoInts); @@ -105,7 +105,7 @@ rcl_get_zero_initialized_service(void); * * ```c * #include - * #include + * #include * #include * * rcl_node_t node = rcl_get_zero_initialized_node(); diff --git a/rcl/include/rcl/subscription.h b/rcl/include/rcl/subscription.h index d94d1433b..88d4f04a1 100644 --- a/rcl/include/rcl/subscription.h +++ b/rcl/include/rcl/subscription.h @@ -20,7 +20,7 @@ extern "C" { #endif -#include "rosidl_generator_c/message_type_support_struct.h" +#include "rosidl_runtime_c/message_type_support_struct.h" #include "rcl/macros.h" #include "rcl/node.h" @@ -73,7 +73,7 @@ rcl_get_zero_initialized_subscription(void); * For C a macro can be used (for example `std_msgs/String`): * * ```c - * #include + * #include * #include * const rosidl_message_type_support_t * string_ts = * ROSIDL_GET_MSG_TYPE_SUPPORT(std_msgs, msg, String); @@ -106,7 +106,7 @@ rcl_get_zero_initialized_subscription(void); * * ```c * #include - * #include + * #include * #include * * rcl_node_t node = rcl_get_zero_initialized_node(); diff --git a/rcl/src/rcl/logging_rosout.c b/rcl/src/rcl/logging_rosout.c index b078f126d..3585cff4b 100644 --- a/rcl/src/rcl/logging_rosout.c +++ b/rcl/src/rcl/logging_rosout.c @@ -26,7 +26,7 @@ #include "rcutils/macros.h" #include "rcutils/types/hash_map.h" #include "rcutils/types/rcutils_ret.h" -#include "rosidl_generator_c/string_functions.h" +#include "rosidl_runtime_c/string_functions.h" #ifdef __cplusplus extern "C" @@ -265,10 +265,10 @@ void rcl_logging_rosout_output_handler( log_message->stamp.nanosec = (timestamp % RCL_S_TO_NS(1)); log_message->level = severity; log_message->line = (int32_t) location->line_number; - rosidl_generator_c__String__assign(&log_message->name, name); - rosidl_generator_c__String__assign(&log_message->msg, msg_array.buffer); - rosidl_generator_c__String__assign(&log_message->file, location->file_name); - rosidl_generator_c__String__assign(&log_message->function, location->function_name); + rosidl_runtime_c__String__assign(&log_message->name, name); + rosidl_runtime_c__String__assign(&log_message->msg, msg_array.buffer); + rosidl_runtime_c__String__assign(&log_message->file, location->file_name); + rosidl_runtime_c__String__assign(&log_message->function, location->function_name); status = rcl_publish(&entry.publisher, log_message, NULL); if (RCL_RET_OK != status) { RCUTILS_SAFE_FWRITE_TO_STDERR("Failed to publish log message to rosout: "); diff --git a/rcl/test/rcl/test_events.cpp b/rcl/test/rcl/test_events.cpp index 5f68a1c43..98d3779bc 100644 --- a/rcl/test/rcl/test_events.cpp +++ b/rcl/test/rcl/test_events.cpp @@ -27,7 +27,7 @@ #include "rmw/incompatible_qos_events_statuses.h" #include "test_msgs/msg/strings.h" -#include "rosidl_generator_c/string_functions.h" +#include "rosidl_runtime_c/string_functions.h" #include "osrf_testing_tools_cpp/scope_exit.hpp" @@ -395,7 +395,7 @@ TEST_F(TestEventFixture, test_pubsub_no_deadline_missed) { test_msgs__msg__Strings msg; test_msgs__msg__Strings__init(&msg); - ASSERT_TRUE(rosidl_generator_c__String__assign(&msg.string_value, test_string)); + ASSERT_TRUE(rosidl_runtime_c__String__assign(&msg.string_value, test_string)); ret = rcl_publish(&publisher, &msg, nullptr); test_msgs__msg__Strings__fini(&msg); EXPECT_EQ(ret, RCL_RET_OK) << rcl_get_error_string().str; @@ -462,7 +462,7 @@ TEST_F(TestEventFixture, test_pubsub_deadline_missed) { test_msgs__msg__Strings msg; test_msgs__msg__Strings__init(&msg); - ASSERT_TRUE(rosidl_generator_c__String__assign(&msg.string_value, test_string)); + ASSERT_TRUE(rosidl_runtime_c__String__assign(&msg.string_value, test_string)); ret = rcl_publish(&publisher, &msg, nullptr); test_msgs__msg__Strings__fini(&msg); EXPECT_EQ(ret, RCL_RET_OK) << rcl_get_error_string().str; @@ -537,7 +537,7 @@ TEST_F(TestEventFixture, test_pubsub_liveliness_kill_pub) { test_msgs__msg__Strings msg; test_msgs__msg__Strings__init(&msg); - ASSERT_TRUE(rosidl_generator_c__String__assign(&msg.string_value, test_string)); + ASSERT_TRUE(rosidl_runtime_c__String__assign(&msg.string_value, test_string)); ret = rcl_publish(&publisher, &msg, nullptr); test_msgs__msg__Strings__fini(&msg); EXPECT_EQ(ret, RCL_RET_OK) << rcl_get_error_string().str; diff --git a/rcl/test/rcl/test_info_by_topic.cpp b/rcl/test/rcl/test_info_by_topic.cpp index fa1680a86..007693304 100644 --- a/rcl/test/rcl/test_info_by_topic.cpp +++ b/rcl/test/rcl/test_info_by_topic.cpp @@ -29,7 +29,7 @@ #include "rmw/error_handling.h" #include "test_msgs/msg/strings.h" -#include "rosidl_generator_c/string_functions.h" +#include "rosidl_runtime_c/string_functions.h" #include "osrf_testing_tools_cpp/scope_exit.hpp" diff --git a/rcl/test/rcl/test_publisher.cpp b/rcl/test/rcl/test_publisher.cpp index ed65ae2aa..73a755170 100644 --- a/rcl/test/rcl/test_publisher.cpp +++ b/rcl/test/rcl/test_publisher.cpp @@ -19,7 +19,7 @@ #include "rcl/rcl.h" #include "test_msgs/msg/basic_types.h" #include "test_msgs/msg/strings.h" -#include "rosidl_generator_c/string_functions.h" +#include "rosidl_runtime_c/string_functions.h" #include "./failing_allocator_functions.hpp" #include "osrf_testing_tools_cpp/scope_exit.hpp" @@ -118,7 +118,7 @@ TEST_F(CLASSNAME(TestPublisherFixture, RMW_IMPLEMENTATION), test_publisher_nomin }); test_msgs__msg__Strings msg; test_msgs__msg__Strings__init(&msg); - ASSERT_TRUE(rosidl_generator_c__String__assign(&msg.string_value, "testing")); + ASSERT_TRUE(rosidl_runtime_c__String__assign(&msg.string_value, "testing")); ret = rcl_publish(&publisher, &msg, nullptr); test_msgs__msg__Strings__fini(&msg); ASSERT_EQ(RCL_RET_OK, ret) << rcl_get_error_string().str; @@ -171,7 +171,7 @@ TEST_F(CLASSNAME(TestPublisherFixture, RMW_IMPLEMENTATION), test_publishers_diff test_msgs__msg__Strings msg_string; test_msgs__msg__Strings__init(&msg_string); - ASSERT_TRUE(rosidl_generator_c__String__assign(&msg_string.string_value, "testing")); + ASSERT_TRUE(rosidl_runtime_c__String__assign(&msg_string.string_value, "testing")); ret = rcl_publish(&publisher_in_namespace, &msg_string, nullptr); ASSERT_EQ(RCL_RET_OK, ret) << rcl_get_error_string().str; } diff --git a/rcl/test/rcl/test_subscription.cpp b/rcl/test/rcl/test_subscription.cpp index 94050b382..1d830b862 100644 --- a/rcl/test/rcl/test_subscription.cpp +++ b/rcl/test/rcl/test_subscription.cpp @@ -23,7 +23,7 @@ #include "rcl/rcl.h" #include "test_msgs/msg/basic_types.h" #include "test_msgs/msg/strings.h" -#include "rosidl_generator_c/string_functions.h" +#include "rosidl_runtime_c/string_functions.h" #include "osrf_testing_tools_cpp/scope_exit.hpp" #include "rcl/error_handling.h" @@ -236,7 +236,7 @@ TEST_F(CLASSNAME(TestSubscriptionFixture, RMW_IMPLEMENTATION), test_subscription { test_msgs__msg__Strings msg; test_msgs__msg__Strings__init(&msg); - ASSERT_TRUE(rosidl_generator_c__String__assign(&msg.string_value, test_string)); + ASSERT_TRUE(rosidl_runtime_c__String__assign(&msg.string_value, test_string)); ret = rcl_publish(&publisher, &msg, nullptr); test_msgs__msg__Strings__fini(&msg); ASSERT_EQ(RCL_RET_OK, ret) << rcl_get_error_string().str; diff --git a/rcl/test/test_namespace.cpp b/rcl/test/test_namespace.cpp index d5b9a313d..ba0927742 100644 --- a/rcl/test/test_namespace.cpp +++ b/rcl/test/test_namespace.cpp @@ -22,7 +22,7 @@ #include "rcl/rcl.h" #include "rcl/graph.h" -#include "rosidl_generator_c/string_functions.h" +#include "rosidl_runtime_c/string_functions.h" #include "test_msgs/srv/basic_types.h" #include "osrf_testing_tools_cpp/scope_exit.hpp" diff --git a/rcl_action/include/rcl_action/action_client.h b/rcl_action/include/rcl_action/action_client.h index f5f46f9b6..0885368bd 100644 --- a/rcl_action/include/rcl_action/action_client.h +++ b/rcl_action/include/rcl_action/action_client.h @@ -94,7 +94,7 @@ rcl_action_get_zero_initialized_client(void); * For C, a macro can be used (for example `example_interfaces/Fibonacci`): * * ```c - * #include + * #include * #include * const rosidl_action_type_support_t * ts = * ROSIDL_GET_ACTION_TYPE_SUPPORT(example_interfaces, Fibonacci); @@ -127,7 +127,7 @@ rcl_action_get_zero_initialized_client(void); * ```c * #include * #include - * #include + * #include * #include * * rcl_node_t node = rcl_get_zero_initialized_node(); diff --git a/rcl_action/include/rcl_action/action_server.h b/rcl_action/include/rcl_action/action_server.h index f3359afa1..4f43667c0 100644 --- a/rcl_action/include/rcl_action/action_server.h +++ b/rcl_action/include/rcl_action/action_server.h @@ -27,7 +27,7 @@ extern "C" #include "rcl/node.h" #include "rcl/time.h" -#include "rosidl_generator_c/action_type_support_struct.h" +#include "rosidl_runtime_c/action_type_support_struct.h" /// Internal rcl_action implementation struct. struct rcl_action_server_impl_t; @@ -91,7 +91,7 @@ rcl_action_get_zero_initialized_server(void); * For C, a macro can be used (for example `example_interfaces/Fibonacci`): * * ```c - * #include + * #include * #include * const rosidl_action_type_support_t * ts = * ROSIDL_GET_ACTION_TYPE_SUPPORT(example_interfaces, Fibonacci); @@ -124,7 +124,7 @@ rcl_action_get_zero_initialized_server(void); * ```c * #include * #include - * #include + * #include * #include * * rcl_node_t node = rcl_get_zero_initialized_node(); diff --git a/rcl_action/include/rcl_action/types.h b/rcl_action/include/rcl_action/types.h index dee4c23ed..47785fea2 100644 --- a/rcl_action/include/rcl_action/types.h +++ b/rcl_action/include/rcl_action/types.h @@ -31,7 +31,7 @@ extern "C" #include "rcl/macros.h" #include "rcl/types.h" -#include "rosidl_generator_c/action_type_support_struct.h" +#include "rosidl_runtime_c/action_type_support_struct.h" // rcl action specific ret codes in 2XXX /// Action name does not pass validation return code. diff --git a/rcl_action/test/rcl_action/test_action_communication.cpp b/rcl_action/test/rcl_action/test_action_communication.cpp index a7aabedf0..d91d69185 100644 --- a/rcl_action/test/rcl_action/test_action_communication.cpp +++ b/rcl_action/test/rcl_action/test_action_communication.cpp @@ -22,7 +22,7 @@ #include "rcl/error_handling.h" #include "rcl/rcl.h" -#include "rosidl_generator_c/primitives_sequence_functions.h" +#include "rosidl_runtime_c/primitives_sequence_functions.h" #include "test_msgs/action/fibonacci.h" @@ -448,7 +448,7 @@ TEST_F(CLASSNAME(TestActionCommunication, RMW_IMPLEMENTATION), test_valid_result // Initialize result response ASSERT_TRUE( - rosidl_generator_c__int32__Sequence__init( + rosidl_runtime_c__int32__Sequence__init( &outgoing_result_response.result.sequence, 4)); outgoing_result_response.result.sequence.data[0] = 0; outgoing_result_response.result.sequence.data[1] = 1; @@ -593,7 +593,7 @@ TEST_F(CLASSNAME(TestActionCommunication, RMW_IMPLEMENTATION), test_valid_feedba // Initialize feedback ASSERT_TRUE( - rosidl_generator_c__int32__Sequence__init( + rosidl_runtime_c__int32__Sequence__init( &outgoing_feedback.feedback.sequence, 3)); outgoing_feedback.feedback.sequence.data[0] = 0; outgoing_feedback.feedback.sequence.data[1] = 1; @@ -952,7 +952,7 @@ TEST_F(CLASSNAME(TestActionCommunication, RMW_IMPLEMENTATION), test_invalid_resu // Initialize result response ASSERT_TRUE( - rosidl_generator_c__int32__Sequence__init( + rosidl_runtime_c__int32__Sequence__init( &outgoing_result_response.result.sequence, 4)); outgoing_result_response.result.sequence.data[0] = 0; outgoing_result_response.result.sequence.data[1] = 1; @@ -1015,7 +1015,7 @@ TEST_F(CLASSNAME(TestActionCommunication, RMW_IMPLEMENTATION), test_invalid_feed // Initialize feedback ASSERT_TRUE( - rosidl_generator_c__int32__Sequence__init( + rosidl_runtime_c__int32__Sequence__init( &outgoing_feedback.feedback.sequence, 3)); outgoing_feedback.feedback.sequence.data[0] = 0; outgoing_feedback.feedback.sequence.data[1] = 1; diff --git a/rcl_action/test/rcl_action/test_action_interaction.cpp b/rcl_action/test/rcl_action/test_action_interaction.cpp index 446a82a1f..d16367a82 100644 --- a/rcl_action/test/rcl_action/test_action_interaction.cpp +++ b/rcl_action/test/rcl_action/test_action_interaction.cpp @@ -22,7 +22,7 @@ #include "rcl/error_handling.h" #include "rcl/rcl.h" -#include "rosidl_generator_c/primitives_sequence_functions.h" +#include "rosidl_runtime_c/primitives_sequence_functions.h" #include "test_msgs/action/fibonacci.h" @@ -307,7 +307,7 @@ TEST_F(CLASSNAME(TestActionClientServerInteraction, RMW_IMPLEMENTATION), test_in // Initialize feedback ASSERT_TRUE( - rosidl_generator_c__int32__Sequence__init( + rosidl_runtime_c__int32__Sequence__init( &this->outgoing_feedback.feedback.sequence, 3)); this->outgoing_feedback.feedback.sequence.data[0] = 0; this->outgoing_feedback.feedback.sequence.data[1] = 1; @@ -398,7 +398,7 @@ TEST_F(CLASSNAME(TestActionClientServerInteraction, RMW_IMPLEMENTATION), test_in // Initialize result response ASSERT_TRUE( - rosidl_generator_c__int32__Sequence__init( + rosidl_runtime_c__int32__Sequence__init( &this->outgoing_result_response.result.sequence, 4)); this->outgoing_result_response.result.sequence.data[0] = 0; this->outgoing_result_response.result.sequence.data[1] = 1; @@ -575,7 +575,7 @@ TEST_F( // Initialize feedback ASSERT_TRUE( - rosidl_generator_c__int32__Sequence__init( + rosidl_runtime_c__int32__Sequence__init( &this->outgoing_feedback.feedback.sequence, 3)); this->outgoing_feedback.feedback.sequence.data[0] = 0; this->outgoing_feedback.feedback.sequence.data[1] = 1; @@ -666,7 +666,7 @@ TEST_F( // Initialize result response ASSERT_TRUE( - rosidl_generator_c__int32__Sequence__init( + rosidl_runtime_c__int32__Sequence__init( &this->outgoing_result_response.result.sequence, 4)); this->outgoing_result_response.result.sequence.data[0] = 0; this->outgoing_result_response.result.sequence.data[1] = 1; diff --git a/rcl_lifecycle/src/com_interface.c b/rcl_lifecycle/src/com_interface.c index fc49f8d64..d9c3d0fe0 100644 --- a/rcl_lifecycle/src/com_interface.c +++ b/rcl_lifecycle/src/com_interface.c @@ -31,8 +31,8 @@ extern "C" #include "rmw/validate_full_topic_name.h" -#include "rosidl_generator_c/message_type_support_struct.h" -#include "rosidl_generator_c/string_functions.h" +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_runtime_c/string_functions.h" #include "rcl_lifecycle/data_types.h" @@ -251,9 +251,9 @@ rcl_lifecycle_com_interface_publish_notification( const rcl_lifecycle_state_t * start, const rcl_lifecycle_state_t * goal) { msg.start_state.id = start->id; - rosidl_generator_c__String__assign(&msg.start_state.label, start->label); + rosidl_runtime_c__String__assign(&msg.start_state.label, start->label); msg.goal_state.id = goal->id; - rosidl_generator_c__String__assign(&msg.goal_state.label, goal->label); + rosidl_runtime_c__String__assign(&msg.goal_state.label, goal->label); return rcl_publish(&com_interface->pub_transition_event, &msg, NULL); }