|
12 | 12 | // See the License for the specific language governing permissions and |
13 | 13 | // limitations under the License. |
14 | 14 |
|
| 15 | +#include <rosidl_dynamic_typesupport/identifier.h> |
15 | 16 | #include <rosidl_dynamic_typesupport/types.h> |
16 | 17 | #include <rosidl_runtime_c/message_type_support_struct.h> |
17 | 18 | #include <rosidl_runtime_c/type_description_utils.h> |
|
26 | 27 | #include "rcl/type_hash.h" |
27 | 28 | #include "rcl/types.h" |
28 | 29 | #include "rcutils/logging_macros.h" |
| 30 | +#include "rcutils/types/rcutils_ret.h" |
29 | 31 | #include "rmw/dynamic_message_type_support.h" |
30 | 32 |
|
31 | 33 | #include "rclcpp/dynamic_typesupport/dynamic_message.hpp" |
@@ -71,7 +73,7 @@ DynamicMessageTypeSupport::DynamicMessageTypeSupport( |
71 | 73 | if (!ts->data) { |
72 | 74 | throw std::runtime_error("could not init rosidl message type support impl"); |
73 | 75 | } |
74 | | - if (ts->typesupport_identifier != rmw_get_dynamic_typesupport_identifier()) { |
| 76 | + if (ts->typesupport_identifier != rosidl_get_dynamic_typesupport_identifier()) { |
75 | 77 | throw std::runtime_error("rosidl message type support is of the wrong type"); |
76 | 78 | } |
77 | 79 |
|
@@ -135,20 +137,19 @@ DynamicMessageTypeSupport::DynamicMessageTypeSupport( |
135 | 137 | throw std::runtime_error("failed to get type hash"); |
136 | 138 | } |
137 | 139 |
|
138 | | - rmw_ret_t ret = rmw_dynamic_message_type_support_handle_create( |
| 140 | + rcutils_ret_t ret = rosidl_dynamic_message_type_support_handle_create( |
139 | 141 | serialization_support->get_rosidl_serialization_support(), |
140 | | - rmw_feature_supported(RMW_MIDDLEWARE_SUPPORTS_TYPE_DISCOVERY), |
141 | 142 | type_hash.get(), // type_hash |
142 | 143 | &description, // type_description |
143 | 144 | nullptr, // type_description_sources (not implemented for dynamic types) |
144 | 145 | &ts); |
145 | | - if (ret != RMW_RET_OK || !ts) { |
| 146 | + if (ret != RCUTILS_RET_OK || !ts) { |
146 | 147 | throw std::runtime_error("could not init rosidl message type support"); |
147 | 148 | } |
148 | 149 | if (!ts->data) { |
149 | 150 | throw std::runtime_error("could not init rosidl message type support impl"); |
150 | 151 | } |
151 | | - if (ts->typesupport_identifier != rmw_get_dynamic_typesupport_identifier()) { |
| 152 | + if (ts->typesupport_identifier != rosidl_get_dynamic_typesupport_identifier()) { |
152 | 153 | throw std::runtime_error("rosidl message type support is of the wrong type"); |
153 | 154 | } |
154 | 155 |
|
@@ -328,7 +329,7 @@ DynamicMessageTypeSupport::init_rosidl_message_type_support_( |
328 | 329 | // are managed by the passed in SharedPtr wrapper classes. We just delete it. |
329 | 330 | rosidl_message_type_support_.reset( |
330 | 331 | new rosidl_message_type_support_t{ |
331 | | - rmw_get_dynamic_typesupport_identifier(), // typesupport_identifier |
| 332 | + rosidl_get_dynamic_typesupport_identifier(), // typesupport_identifier |
332 | 333 | ts_impl, // data |
333 | 334 | get_message_typesupport_handle_function, // func |
334 | 335 | // get_type_hash_func |
|
0 commit comments