From e11d404d860c876e15e1bff63fcd026512732729 Mon Sep 17 00:00:00 2001 From: Miguel Company Date: Tue, 26 Mar 2024 13:05:46 +0100 Subject: [PATCH] Support Fast CDR v2 (#141) * camelCase to snake_case method changes. * Constructor constants changes. Signed-off-by: Miguel Company --- .../src/common/rmw_type_support.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rmw_connextdds_common/src/common/rmw_type_support.cpp b/rmw_connextdds_common/src/common/rmw_type_support.cpp index 61bb65b5..f20ae70e 100644 --- a/rmw_connextdds_common/src/common/rmw_type_support.cpp +++ b/rmw_connextdds_common/src/common/rmw_type_support.cpp @@ -297,9 +297,9 @@ rmw_ret_t RMW_Connext_MessageTypeSupport::serialize( eprosima::fastcdr::Cdr cdr_stream( cdr_buffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, - eprosima::fastcdr::Cdr::DDS_CDR); - cdr_stream.setDDSCdrPlFlag( - eprosima::fastcdr::Cdr::DDSCdrPlFlag::DDS_CDR_WITHOUT_PL); + eprosima::fastcdr::CdrVersion::XCDRv1); + cdr_stream.set_encoding_flag( + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR); RMW_CONNEXT_LOG_TRACE_A( "[type support] %s serialize: " @@ -364,7 +364,7 @@ rmw_ret_t RMW_Connext_MessageTypeSupport::serialize( return RMW_RET_ERROR; } - to_buffer->buffer_length = cdr_stream.getSerializedDataLength(); + to_buffer->buffer_length = cdr_stream.get_serialized_data_length(); RMW_CONNEXT_LOG_DEBUG_A( "[type support] %s serialized: " @@ -392,7 +392,7 @@ RMW_Connext_MessageTypeSupport::deserialize( eprosima::fastcdr::Cdr cdr_stream( cdr_buffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, - eprosima::fastcdr::Cdr::DDS_CDR); + eprosima::fastcdr::CdrVersion::XCDRv1); RMW_CONNEXT_LOG_TRACE_A( "[type support] %s deserialize: " @@ -475,7 +475,7 @@ RMW_Connext_MessageTypeSupport::deserialize( return RMW_RET_ERROR; } - size_out = cdr_stream.getSerializedDataLength(); + size_out = cdr_stream.get_serialized_data_length(); RMW_CONNEXT_LOG_DEBUG_A( "[type support] %s deserialized: "