Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Fast CDR v2 #114

Merged
merged 5 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ endif()

find_package(ament_cmake_ros REQUIRED)
find_package(fastrtps_cmake_module QUIET)
find_package(fastcdr REQUIRED CONFIG)
find_package(fastcdr 2 REQUIRED CONFIG)
find_package(rosidl_typesupport_interface REQUIRED)
find_package(rosidl_typesupport_fastrtps_cpp REQUIRED)
find_package(rosidl_runtime_c REQUIRED)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ if isinstance(type_, AbstractNestedType):
}
}
@[ elif isinstance(member.type.value_type, BasicType)]@
cdr.serializeArray(array_ptr, size);
cdr.serialize_array(array_ptr, size);
@[ else]@
for (size_t i = 0; i < size; ++i) {
if (!callbacks->cdr_serialize(
Expand Down Expand Up @@ -379,7 +379,7 @@ else:
array_ptr[i] = static_cast<char16_t>(tmp);
}
@[ elif isinstance(member.type.value_type, BasicType)]@
cdr.deserializeArray(array_ptr, size);
cdr.deserialize_array(array_ptr, size);
@[ else]@
for (size_t i = 0; i < size; ++i) {
if (!callbacks->cdr_deserialize(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# rosidl_typesupport_fastrtps_c/rosidl_typesupport_fastrtps_c-extras.cmake.in

find_package(fastrtps_cmake_module QUIET)
find_package(fastcdr REQUIRED CONFIG)
find_package(fastcdr 2 REQUIRED CONFIG)

if(NOT fastcdr_FOUND)
message(STATUS
Expand Down
2 changes: 1 addition & 1 deletion rosidl_typesupport_fastrtps_cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ endif()
find_package(ament_cmake_ros REQUIRED)

find_package(fastrtps_cmake_module QUIET)
find_package(fastcdr REQUIRED CONFIG)
find_package(fastcdr 2 REQUIRED CONFIG)
if(FASTRTPS_STATIC_DISABLE)
ament_package()
message(STATUS "fastrtps static rmw implementation explicitly disabled - skipping '${PROJECT_NAME}'")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ endif()

find_package(ament_cmake_ros REQUIRED)
find_package(fastrtps_cmake_module QUIET)
find_package(fastcdr REQUIRED CONFIG)
find_package(fastcdr 2 REQUIRED CONFIG)
find_package(rmw REQUIRED)
find_package(rosidl_runtime_c REQUIRED)
find_package(rosidl_runtime_cpp REQUIRED)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ cdr_serialize(
cdr << static_cast<uint32_t>(size);
@[ if isinstance(member.type.value_type, BasicType) and member.type.value_type.typename not in ('boolean', 'wchar')]@
if (size > 0) {
cdr.serializeArray(&(ros_message.@(member.name)[0]), size);
cdr.serialize_array(&(ros_message.@(member.name)[0]), size);
}
@[ else]@
for (size_t i = 0; i < size; i++) {
Expand Down Expand Up @@ -210,7 +210,7 @@ cdr_deserialize(
ros_message.@(member.name).resize(size);
@[ if isinstance(member.type.value_type, BasicType) and member.type.value_type.typename not in ('boolean', 'wchar')]@
if (size > 0) {
cdr.deserializeArray(&(ros_message.@(member.name)[0]), size);
cdr.deserialize_array(&(ros_message.@(member.name)[0]), size);
}
@[ else]@
for (size_t i = 0; i < size; i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# rosidl_typesupport_fastrtps_cpp-extras.cmake.in

find_package(fastrtps_cmake_module QUIET)
find_package(fastcdr REQUIRED CONFIG)
find_package(fastcdr 2 REQUIRED CONFIG)

if(NOT fastcdr_FOUND)
message(STATUS
Expand Down