diff --git a/rmw_fastrtps_cpp/CMakeLists.txt b/rmw_fastrtps_cpp/CMakeLists.txt index 2488bff8b..f3349e1a9 100644 --- a/rmw_fastrtps_cpp/CMakeLists.txt +++ b/rmw_fastrtps_cpp/CMakeLists.txt @@ -66,6 +66,7 @@ add_library(rmw_fastrtps_cpp src/rmw_publisher.cpp src/rmw_request.cpp src/rmw_response.cpp + src/rmw_serialize.cpp src/rmw_service.cpp src/rmw_service_names_and_types.cpp src/rmw_service_server_is_available.cpp diff --git a/rmw_fastrtps_cpp/include/rmw_fastrtps_cpp/TypeSupport.hpp b/rmw_fastrtps_cpp/include/rmw_fastrtps_cpp/TypeSupport.hpp index 42fdc1eb1..4de2ceeb5 100644 --- a/rmw_fastrtps_cpp/include/rmw_fastrtps_cpp/TypeSupport.hpp +++ b/rmw_fastrtps_cpp/include/rmw_fastrtps_cpp/TypeSupport.hpp @@ -113,7 +113,7 @@ class TypeSupport : public eprosima::fastrtps::TopicDataType public: bool serializeROSmessage(const void * ros_message, eprosima::fastcdr::Cdr & ser); - bool deserializeROSmessage(eprosima::fastcdr::FastBuffer * data, void * ros_message); + bool deserializeROSmessage(eprosima::fastcdr::Cdr & deser, void * ros_message); bool serialize(void * data, eprosima::fastrtps::rtps::SerializedPayload_t * payload); diff --git a/rmw_fastrtps_cpp/include/rmw_fastrtps_cpp/TypeSupport_impl.hpp b/rmw_fastrtps_cpp/include/rmw_fastrtps_cpp/TypeSupport_impl.hpp index b0b01a234..3d2b17cf9 100644 --- a/rmw_fastrtps_cpp/include/rmw_fastrtps_cpp/TypeSupport_impl.hpp +++ b/rmw_fastrtps_cpp/include/rmw_fastrtps_cpp/TypeSupport_impl.hpp @@ -734,14 +734,10 @@ bool TypeSupport::serializeROSmessage( template bool TypeSupport::deserializeROSmessage( - eprosima::fastcdr::FastBuffer * buffer, void * ros_message) + eprosima::fastcdr::Cdr & deser, void * ros_message) { - assert(buffer); assert(ros_message); - eprosima::fastcdr::Cdr deser(*buffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, - eprosima::fastcdr::Cdr::DDS_CDR); - // Deserialize encapsulation. deser.read_encapsulation(); @@ -790,7 +786,9 @@ bool TypeSupport::deserialize( assert(payload); auto buffer = static_cast(data); - buffer->resize(payload->length); + if (!buffer->reserve(payload->length)) { + return false; + } memcpy(buffer->getBuffer(), payload->data, payload->length); return true; } diff --git a/rmw_fastrtps_cpp/src/rmw_publish.cpp b/rmw_fastrtps_cpp/src/rmw_publish.cpp index b65d3485b..57aefef42 100644 --- a/rmw_fastrtps_cpp/src/rmw_publish.cpp +++ b/rmw_fastrtps_cpp/src/rmw_publish.cpp @@ -21,16 +21,20 @@ #include "rmw_fastrtps_cpp/custom_publisher_info.hpp" #include "rmw_fastrtps_cpp/identifier.hpp" -#include "ros_message_serialization.hpp" +#include "rmw_fastrtps_cpp/macros.hpp" + +#include "./ros_message_serialization.hpp" extern "C" { rmw_ret_t rmw_publish(const rmw_publisher_t * publisher, const void * ros_message) { - assert(publisher); - assert(ros_message); - rmw_ret_t returnedValue = RMW_RET_ERROR; + auto error_allocator = rcutils_get_default_allocator(); + RCUTILS_CHECK_FOR_NULL_WITH_MSG( + publisher, "publisher pointer is null", return RMW_RET_ERROR, error_allocator); + RCUTILS_CHECK_FOR_NULL_WITH_MSG( + ros_message, "ros_message pointer is null", return RMW_RET_ERROR, error_allocator); if (publisher->implementation_identifier != eprosima_fastrtps_identifier) { RMW_SET_ERROR_MSG("publisher handle not from this implementation"); @@ -38,24 +42,61 @@ rmw_publish(const rmw_publisher_t * publisher, const void * ros_message) } auto info = static_cast(publisher->data); - assert(info); + RCUTILS_CHECK_FOR_NULL_WITH_MSG( + info, "publisher info pointer is null", return RMW_RET_ERROR, error_allocator); eprosima::fastcdr::FastBuffer buffer; eprosima::fastcdr::Cdr ser(buffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, eprosima::fastcdr::Cdr::DDS_CDR); - if (_serialize_ros_message(ros_message, ser, info->type_support_, + if (!_serialize_ros_message(ros_message, ser, info->type_support_, info->typesupport_identifier_)) { - if (info->publisher_->write(&ser)) { - returnedValue = RMW_RET_OK; - } else { - RMW_SET_ERROR_MSG("cannot publish data"); - } - } else { RMW_SET_ERROR_MSG("cannot serialize data"); + return RMW_RET_ERROR; + } + if (!info->publisher_->write(&ser)) { + RMW_SET_ERROR_MSG("cannot publish data"); + return RMW_RET_ERROR; + } + + return RMW_RET_OK; +} + +rmw_ret_t +rmw_publish_serialized_message( + const rmw_publisher_t * publisher, const rmw_serialized_message_t * serialized_message) +{ + auto error_allocator = rcutils_get_default_allocator(); + RCUTILS_CHECK_FOR_NULL_WITH_MSG( + publisher, "publisher pointer is null", return RMW_RET_ERROR, error_allocator); + RCUTILS_CHECK_FOR_NULL_WITH_MSG( + serialized_message, "serialized_message pointer is null", + return RMW_RET_ERROR, error_allocator); + + if (publisher->implementation_identifier != eprosima_fastrtps_identifier) { + RMW_SET_ERROR_MSG("publisher handle not from this implementation"); + return RMW_RET_ERROR; + } + + auto info = static_cast(publisher->data); + RCUTILS_CHECK_FOR_NULL_WITH_MSG( + info, "publisher info pointer is null", return RMW_RET_ERROR, error_allocator); + + eprosima::fastcdr::FastBuffer buffer( + serialized_message->buffer, serialized_message->buffer_length); + eprosima::fastcdr::Cdr ser( + buffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, eprosima::fastcdr::Cdr::DDS_CDR); + if (!ser.jump(serialized_message->buffer_length)) { + RMW_SET_ERROR_MSG("cannot correctly set serialized buffer"); + return RMW_RET_ERROR; + } + + if (!info->publisher_->write(&ser)) { + RMW_SET_ERROR_MSG("cannot publish data"); + return RMW_RET_ERROR; } - return returnedValue; + return RMW_RET_OK; } } // extern "C" diff --git a/rmw_fastrtps_cpp/src/rmw_request.cpp b/rmw_fastrtps_cpp/src/rmw_request.cpp index 8a2ef2ea3..13022d165 100644 --- a/rmw_fastrtps_cpp/src/rmw_request.cpp +++ b/rmw_fastrtps_cpp/src/rmw_request.cpp @@ -96,9 +96,11 @@ rmw_take_request( assert(info); CustomServiceRequest request = info->listener_->getRequest(); + eprosima::fastcdr::Cdr deser(*request.buffer_, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, + eprosima::fastcdr::Cdr::DDS_CDR); if (request.buffer_ != nullptr) { - _deserialize_ros_message(request.buffer_, ros_request, info->request_type_support_, + _deserialize_ros_message(deser, ros_request, info->request_type_support_, info->typesupport_identifier_); // Get header diff --git a/rmw_fastrtps_cpp/src/rmw_response.cpp b/rmw_fastrtps_cpp/src/rmw_response.cpp index 4a618713b..8e09522b7 100644 --- a/rmw_fastrtps_cpp/src/rmw_response.cpp +++ b/rmw_fastrtps_cpp/src/rmw_response.cpp @@ -53,8 +53,12 @@ rmw_take_response( CustomClientResponse response; if (info->listener_->getResponse(response)) { - _deserialize_ros_message(response.buffer_.get(), ros_response, info->response_type_support_, - info->typesupport_identifier_); + eprosima::fastcdr::Cdr deser( + *response.buffer_, + eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, + eprosima::fastcdr::Cdr::DDS_CDR); + _deserialize_ros_message( + deser, ros_response, info->response_type_support_, info->typesupport_identifier_); request_header->sequence_number = ((int64_t)response.sample_identity_.sequence_number().high) << 32 | response.sample_identity_.sequence_number().low; diff --git a/rmw_fastrtps_cpp/src/rmw_serialize.cpp b/rmw_fastrtps_cpp/src/rmw_serialize.cpp new file mode 100644 index 000000000..71b69fa72 --- /dev/null +++ b/rmw_fastrtps_cpp/src/rmw_serialize.cpp @@ -0,0 +1,90 @@ +// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "fastcdr/FastBuffer.h" + +#include "rmw/error_handling.h" +#include "rmw/serialized_message.h" +#include "rmw/rmw.h" + +#include "./type_support_common.hpp" +#include "./ros_message_serialization.hpp" + +extern "C" +{ +rmw_ret_t +rmw_serialize( + const void * ros_message, + const rosidl_message_type_support_t * type_support, + rmw_serialized_message_t * serialized_message) +{ + const rosidl_message_type_support_t * ts = get_message_typesupport_handle( + type_support, rosidl_typesupport_introspection_c__identifier); + if (!ts) { + ts = get_message_typesupport_handle( + type_support, rosidl_typesupport_introspection_cpp::typesupport_identifier); + if (!ts) { + RMW_SET_ERROR_MSG("type support not from this implementation"); + return RMW_RET_ERROR; + } + } + + auto tss = _create_message_type_support(ts->data, ts->typesupport_identifier); + eprosima::fastcdr::FastBuffer buffer; + eprosima::fastcdr::Cdr ser( + buffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, eprosima::fastcdr::Cdr::DDS_CDR); + + auto ret = _serialize_ros_message(ros_message, ser, tss, ts->typesupport_identifier); + auto data_length = static_cast(ser.getSerializedDataLength()); + if (serialized_message->buffer_capacity < data_length) { + if (rmw_serialized_message_resize(serialized_message, data_length) != RMW_RET_OK) { + RMW_SET_ERROR_MSG("unable to dynamically resize serialized message"); + return RMW_RET_ERROR; + } + } + memcpy(serialized_message->buffer, ser.getBufferPointer(), data_length); + serialized_message->buffer_length = data_length; + serialized_message->buffer_capacity = data_length; + _delete_typesupport(tss, ts->typesupport_identifier); + return ret == true ? RMW_RET_OK : RMW_RET_ERROR; +} + +rmw_ret_t +rmw_deserialize( + const rmw_serialized_message_t * serialized_message, + const rosidl_message_type_support_t * type_support, + void * ros_message) +{ + const rosidl_message_type_support_t * ts = get_message_typesupport_handle( + type_support, rosidl_typesupport_introspection_c__identifier); + if (!ts) { + ts = get_message_typesupport_handle( + type_support, rosidl_typesupport_introspection_cpp::typesupport_identifier); + if (!ts) { + RMW_SET_ERROR_MSG("type support not from this implementation"); + return RMW_RET_ERROR; + } + } + + auto tss = _create_message_type_support(ts->data, ts->typesupport_identifier); + eprosima::fastcdr::FastBuffer buffer( + serialized_message->buffer, serialized_message->buffer_length); + eprosima::fastcdr::Cdr deser(buffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, + eprosima::fastcdr::Cdr::DDS_CDR); + + auto ret = _deserialize_ros_message(deser, ros_message, tss, ts->typesupport_identifier); + _delete_typesupport(tss, ts->typesupport_identifier); + return ret == true ? RMW_RET_OK : RMW_RET_ERROR; +} +} // extern "C" diff --git a/rmw_fastrtps_cpp/src/rmw_subscription.cpp b/rmw_fastrtps_cpp/src/rmw_subscription.cpp index 554ede4b7..087ff2897 100644 --- a/rmw_fastrtps_cpp/src/rmw_subscription.cpp +++ b/rmw_fastrtps_cpp/src/rmw_subscription.cpp @@ -22,11 +22,12 @@ #include "fastrtps/participant/Participant.h" #include "fastrtps/subscriber/Subscriber.h" +#include "rmw_fastrtps_cpp/custom_participant_info.hpp" +#include "rmw_fastrtps_cpp/custom_subscriber_info.hpp" #include "rmw_fastrtps_cpp/identifier.hpp" + #include "namespace_prefix.hpp" #include "qos.hpp" -#include "rmw_fastrtps_cpp/custom_participant_info.hpp" -#include "rmw_fastrtps_cpp/custom_subscriber_info.hpp" #include "type_support_common.hpp" using Domain = eprosima::fastrtps::Domain; diff --git a/rmw_fastrtps_cpp/src/rmw_take.cpp b/rmw_fastrtps_cpp/src/rmw_take.cpp index abe401813..782cb050f 100644 --- a/rmw_fastrtps_cpp/src/rmw_take.cpp +++ b/rmw_fastrtps_cpp/src/rmw_take.cpp @@ -14,26 +14,43 @@ #include "rmw/allocators.h" #include "rmw/error_handling.h" +#include "rmw/serialized_message.h" #include "rmw/rmw.h" #include "fastrtps/subscriber/Subscriber.h" #include "fastrtps/subscriber/SampleInfo.h" #include "fastrtps/attributes/SubscriberAttributes.h" +#include "fastcdr/Cdr.h" #include "fastcdr/FastBuffer.h" + #include "rmw_fastrtps_cpp/custom_subscriber_info.hpp" #include "rmw_fastrtps_cpp/identifier.hpp" -#include "ros_message_serialization.hpp" +#include "rmw_fastrtps_cpp/macros.hpp" + +#include "./ros_message_serialization.hpp" extern "C" { -rmw_ret_t -rmw_take(const rmw_subscription_t * subscription, void * ros_message, bool * taken) +void +_assign_message_info( + rmw_message_info_t * message_info, + const eprosima::fastrtps::SampleInfo_t * sinfo) { - assert(subscription); - assert(ros_message); - assert(taken); + rmw_gid_t * sender_gid = &message_info->publisher_gid; + sender_gid->implementation_identifier = eprosima_fastrtps_identifier; + memset(sender_gid->data, 0, RMW_GID_STORAGE_SIZE); + memcpy(sender_gid->data, &sinfo->sample_identity.writer_guid(), + sizeof(eprosima::fastrtps::rtps::GUID_t)); +} +rmw_ret_t +_take( + const rmw_subscription_t * subscription, + void * ros_message, + bool * taken, + rmw_message_info_t * message_info) +{ *taken = false; if (subscription->implementation_identifier != eprosima_fastrtps_identifier) { @@ -42,7 +59,9 @@ rmw_take(const rmw_subscription_t * subscription, void * ros_message, bool * tak } CustomSubscriberInfo * info = static_cast(subscription->data); - assert(info); + auto error_msg_allocator = rcutils_get_default_allocator(); + RCUTILS_CHECK_FOR_NULL_WITH_MSG( + info, "custom subscriber info is null", return RMW_RET_ERROR, error_msg_allocator); eprosima::fastcdr::FastBuffer buffer; eprosima::fastrtps::SampleInfo_t sinfo; @@ -51,8 +70,13 @@ rmw_take(const rmw_subscription_t * subscription, void * ros_message, bool * tak info->listener_->data_taken(); if (eprosima::fastrtps::rtps::ALIVE == sinfo.sampleKind) { - _deserialize_ros_message(&buffer, ros_message, info->type_support_, + eprosima::fastcdr::Cdr deser( + buffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, eprosima::fastcdr::Cdr::DDS_CDR); + _deserialize_ros_message(deser, ros_message, info->type_support_, info->typesupport_identifier_); + if (message_info) { + _assign_message_info(message_info, &sinfo); + } *taken = true; } } @@ -60,6 +84,20 @@ rmw_take(const rmw_subscription_t * subscription, void * ros_message, bool * tak return RMW_RET_OK; } +rmw_ret_t +rmw_take(const rmw_subscription_t * subscription, void * ros_message, bool * taken) +{ + auto error_msg_allocator = rcutils_get_default_allocator(); + RCUTILS_CHECK_FOR_NULL_WITH_MSG( + subscription, "subscription pointer is null", return RMW_RET_ERROR, error_msg_allocator); + RCUTILS_CHECK_FOR_NULL_WITH_MSG( + ros_message, "ros_message pointer is null", return RMW_RET_ERROR, error_msg_allocator); + RCUTILS_CHECK_FOR_NULL_WITH_MSG( + taken, "boolean flag for taken is null", return RMW_RET_ERROR, error_msg_allocator); + + return _take(subscription, ros_message, taken, nullptr); +} + rmw_ret_t rmw_take_with_info( const rmw_subscription_t * subscription, @@ -67,15 +105,26 @@ rmw_take_with_info( bool * taken, rmw_message_info_t * message_info) { - assert(subscription); - assert(ros_message); - assert(taken); - - if (!message_info) { - RMW_SET_ERROR_MSG("message info is null"); - return RMW_RET_ERROR; - } + auto error_msg_allocator = rcutils_get_default_allocator(); + RCUTILS_CHECK_FOR_NULL_WITH_MSG( + subscription, "subscription pointer is null", return RMW_RET_ERROR, error_msg_allocator); + RCUTILS_CHECK_FOR_NULL_WITH_MSG( + ros_message, "ros_message pointer is null", return RMW_RET_ERROR, error_msg_allocator); + RCUTILS_CHECK_FOR_NULL_WITH_MSG( + taken, "boolean flag for taken is null", return RMW_RET_ERROR, error_msg_allocator); + RCUTILS_CHECK_FOR_NULL_WITH_MSG( + message_info, "message info pointer is null", return RMW_RET_ERROR, error_msg_allocator); + + return _take(subscription, ros_message, taken, message_info); +} +rmw_ret_t +_take_serialized_message( + const rmw_subscription_t * subscription, + rmw_serialized_message_t * serialized_message, + bool * taken, + rmw_message_info_t * message_info) +{ *taken = false; if (subscription->implementation_identifier != eprosima_fastrtps_identifier) { @@ -84,7 +133,9 @@ rmw_take_with_info( } CustomSubscriberInfo * info = static_cast(subscription->data); - assert(info); + auto error_msg_allocator = rcutils_get_default_allocator(); + RCUTILS_CHECK_FOR_NULL_WITH_MSG( + info, "custom subscriber info is null", return RMW_RET_ERROR, error_msg_allocator); eprosima::fastcdr::FastBuffer buffer; eprosima::fastrtps::SampleInfo_t sinfo; @@ -93,17 +144,60 @@ rmw_take_with_info( info->listener_->data_taken(); if (eprosima::fastrtps::rtps::ALIVE == sinfo.sampleKind) { - _deserialize_ros_message(&buffer, ros_message, info->type_support_, - info->typesupport_identifier_); - rmw_gid_t * sender_gid = &message_info->publisher_gid; - sender_gid->implementation_identifier = eprosima_fastrtps_identifier; - memset(sender_gid->data, 0, RMW_GID_STORAGE_SIZE); - memcpy(sender_gid->data, &sinfo.sample_identity.writer_guid(), - sizeof(eprosima::fastrtps::rtps::GUID_t)); + auto buffer_size = static_cast(buffer.getBufferSize()); + if (serialized_message->buffer_capacity < buffer_size) { + auto ret = rmw_serialized_message_resize(serialized_message, buffer_size); + if (ret != RMW_RET_OK) { + return ret; // Error message already set + } + } + serialized_message->buffer_length = buffer_size; + memcpy(serialized_message->buffer, buffer.getBuffer(), serialized_message->buffer_length); + + if (message_info) { + _assign_message_info(message_info, &sinfo); + } *taken = true; } } return RMW_RET_OK; } + +rmw_ret_t +rmw_take_serialized_message( + const rmw_subscription_t * subscription, + rmw_serialized_message_t * serialized_message, + bool * taken) +{ + auto error_msg_allocator = rcutils_get_default_allocator(); + RCUTILS_CHECK_FOR_NULL_WITH_MSG( + subscription, "subscription pointer is null", return RMW_RET_ERROR, error_msg_allocator); + RCUTILS_CHECK_FOR_NULL_WITH_MSG( + serialized_message, "ros_message pointer is null", return RMW_RET_ERROR, error_msg_allocator); + RCUTILS_CHECK_FOR_NULL_WITH_MSG( + taken, "boolean flag for taken is null", return RMW_RET_ERROR, error_msg_allocator); + + return _take_serialized_message(subscription, serialized_message, taken, nullptr); +} + +rmw_ret_t +rmw_take_serialized_message_with_info( + const rmw_subscription_t * subscription, + rmw_serialized_message_t * serialized_message, + bool * taken, + rmw_message_info_t * message_info) +{ + auto error_msg_allocator = rcutils_get_default_allocator(); + RCUTILS_CHECK_FOR_NULL_WITH_MSG( + subscription, "subscription pointer is null", return RMW_RET_ERROR, error_msg_allocator); + RCUTILS_CHECK_FOR_NULL_WITH_MSG( + serialized_message, "ros_message pointer is null", return RMW_RET_ERROR, error_msg_allocator); + RCUTILS_CHECK_FOR_NULL_WITH_MSG( + taken, "boolean flag for taken is null", return RMW_RET_ERROR, error_msg_allocator); + RCUTILS_CHECK_FOR_NULL_WITH_MSG( + message_info, "message info pointer is null", return RMW_RET_ERROR, error_msg_allocator); + + return _take_serialized_message(subscription, serialized_message, taken, message_info); +} } // extern "C" diff --git a/rmw_fastrtps_cpp/src/ros_message_serialization.cpp b/rmw_fastrtps_cpp/src/ros_message_serialization.cpp index 25c2603e4..15de3ce7b 100644 --- a/rmw_fastrtps_cpp/src/ros_message_serialization.cpp +++ b/rmw_fastrtps_cpp/src/ros_message_serialization.cpp @@ -15,11 +15,13 @@ #include "fastcdr/Cdr.h" #include "fastcdr/FastBuffer.h" -#include "type_support_common.hpp" +#include "./type_support_common.hpp" bool _serialize_ros_message( - const void * ros_message, eprosima::fastcdr::Cdr & ser, void * untyped_typesupport, + const void * ros_message, + eprosima::fastcdr::Cdr & ser, + void * untyped_typesupport, const char * typesupport_identifier) { if (using_introspection_c_typesupport(typesupport_identifier)) { @@ -35,15 +37,17 @@ _serialize_ros_message( bool _deserialize_ros_message( - eprosima::fastcdr::FastBuffer * buffer, void * ros_message, void * untyped_typesupport, + eprosima::fastcdr::Cdr & deser, + void * ros_message, + void * untyped_typesupport, const char * typesupport_identifier) { if (using_introspection_c_typesupport(typesupport_identifier)) { auto typed_typesupport = static_cast(untyped_typesupport); - return typed_typesupport->deserializeROSmessage(buffer, ros_message); + return typed_typesupport->deserializeROSmessage(deser, ros_message); } else if (using_introspection_cpp_typesupport(typesupport_identifier)) { auto typed_typesupport = static_cast(untyped_typesupport); - return typed_typesupport->deserializeROSmessage(buffer, ros_message); + return typed_typesupport->deserializeROSmessage(deser, ros_message); } RMW_SET_ERROR_MSG("Unknown typesupport identifier"); return false; diff --git a/rmw_fastrtps_cpp/src/ros_message_serialization.hpp b/rmw_fastrtps_cpp/src/ros_message_serialization.hpp index 68bd9dc88..b5c43b813 100644 --- a/rmw_fastrtps_cpp/src/ros_message_serialization.hpp +++ b/rmw_fastrtps_cpp/src/ros_message_serialization.hpp @@ -33,7 +33,7 @@ _serialize_ros_message( bool _deserialize_ros_message( - eprosima::fastcdr::FastBuffer * buffer, + eprosima::fastcdr::Cdr & deser, void * ros_message, void * untyped_typesupport, const char * typesupport_identifier);