diff --git a/rosidl_typesupport_fastrtps_c/resource/msg__type_support_c.cpp.em b/rosidl_typesupport_fastrtps_c/resource/msg__type_support_c.cpp.em index 57826bd..ec974cb 100644 --- a/rosidl_typesupport_fastrtps_c/resource/msg__type_support_c.cpp.em +++ b/rosidl_typesupport_fastrtps_c/resource/msg__type_support_c.cpp.em @@ -596,6 +596,11 @@ if isinstance(type_, AbstractNestedType): static size_t _@(message.structure.namespaced_type.name)__max_serialized_size(bool & full_bounded, bool & is_plain) { + // Start considering the type is plain. + // Internal methods will set values to false when necessary. + full_bounded = true; + is_plain = true; + return max_serialized_size_@('__'.join([package_name] + list(interface_path.parents[0].parts) + [message.structure.namespaced_type.name]))( full_bounded, is_plain, 0); } diff --git a/rosidl_typesupport_fastrtps_cpp/resource/msg__type_support.cpp.em b/rosidl_typesupport_fastrtps_cpp/resource/msg__type_support.cpp.em index accfc54..4127fec 100644 --- a/rosidl_typesupport_fastrtps_cpp/resource/msg__type_support.cpp.em +++ b/rosidl_typesupport_fastrtps_cpp/resource/msg__type_support.cpp.em @@ -464,6 +464,11 @@ static uint32_t _@(message.structure.namespaced_type.name)__get_serialized_size( static size_t _@(message.structure.namespaced_type.name)__max_serialized_size(bool & full_bounded, bool & is_plain) { + // Start considering the type is plain. + // Internal methods will set values to false when necessary. + full_bounded = true; + is_plain = true; + return max_serialized_size_@(message.structure.namespaced_type.name)(full_bounded, is_plain, 0); }