Skip to content

Commit

Permalink
Adding interfaces to support @key annotation (#116)
Browse files Browse the repository at this point in the history
Signed-off-by: Mario Dominguez <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
Co-authored-by: Mario Dominguez <[email protected]>
  • Loading branch information
MiguelCompany and Mario-DL authored Apr 8, 2024
1 parent 175cd1f commit 5fdc817
Show file tree
Hide file tree
Showing 5 changed files with 995 additions and 469 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
@# Included from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em
@{

from rosidl_pycommon import convert_camel_case_to_lower_case_underscore

include_parts = [package_name] + list(interface_path.parents[0].parts) + [
'detail', convert_camel_case_to_lower_case_underscore(interface_path.stem)]
include_base = '/'.join(include_parts)

header_files = [
'stddef.h',
'rosidl_runtime_c/message_type_support_struct.h',
'rosidl_typesupport_interface/macros.h',
package_name + '/msg/rosidl_typesupport_fastrtps_c__visibility_control.h',
include_base + '__struct.h',
'fastcdr/Cdr.h',
]
}@
@[for header_file in header_files]@
Expand All @@ -26,6 +35,16 @@ extern "C"
{
#endif

ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_@(package_name)
bool cdr_serialize_@('__'.join([package_name] + list(interface_path.parents[0].parts) + [message.structure.namespaced_type.name]))(
const @('__'.join(message.structure.namespaced_type.namespaced_name())) * ros_message,
eprosima::fastcdr::Cdr & cdr);

ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_@(package_name)
bool cdr_deserialize_@('__'.join([package_name] + list(interface_path.parents[0].parts) + [message.structure.namespaced_type.name]))(
eprosima::fastcdr::Cdr &,
@('__'.join(message.structure.namespaced_type.namespaced_name())) * ros_message);

ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_@(package_name)
size_t get_serialized_size_@('__'.join([package_name] + list(interface_path.parents[0].parts) + [message.structure.namespaced_type.name]))(
const void * untyped_ros_message,
Expand All @@ -37,6 +56,22 @@ size_t max_serialized_size_@('__'.join([package_name] + list(interface_path.pare
bool & is_plain,
size_t current_alignment);

ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_@(package_name)
bool cdr_serialize_key_@('__'.join([package_name] + list(interface_path.parents[0].parts) + [message.structure.namespaced_type.name]))(
const @('__'.join(message.structure.namespaced_type.namespaced_name())) * ros_message,
eprosima::fastcdr::Cdr & cdr);

ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_@(package_name)
size_t get_serialized_size_key_@('__'.join([package_name] + list(interface_path.parents[0].parts) + [message.structure.namespaced_type.name]))(
const void * untyped_ros_message,
size_t current_alignment);

ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_@(package_name)
size_t max_serialized_size_key_@('__'.join([package_name] + list(interface_path.parents[0].parts) + [message.structure.namespaced_type.name]))(
bool & full_bounded,
bool & is_plain,
size_t current_alignment);

ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_@(package_name)
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, @(', '.join([package_name] + list(interface_path.parents[0].parts) + [message.structure.namespaced_type.name])))();
Expand Down
Loading

0 comments on commit 5fdc817

Please sign in to comment.