diff --git a/rosidl_typesupport_introspection_c/resource/srv__type_support.c.em b/rosidl_typesupport_introspection_c/resource/srv__type_support.c.em index 1977a86e9..ee71830f2 100644 --- a/rosidl_typesupport_introspection_c/resource/srv__type_support.c.em +++ b/rosidl_typesupport_introspection_c/resource/srv__type_support.c.em @@ -61,7 +61,7 @@ function_prefix = '__'.join(include_parts) + '__rosidl_typesupport_introspection static rosidl_typesupport_introspection_c__ServiceMembers @(function_prefix)__@(service.namespaced_type.name)_service_members = { "@('__'.join([package_name] + list(interface_path.parents[0].parts)))", // service namespace "@(service.namespaced_type.name)", // service name - // these two fields are initialized below on the first access + // the following fields are initialized below on first access NULL, // request message // @(function_prefix)__@(service.request_message.structure.namespaced_type.name)_message_type_support_handle, NULL, // response message @@ -94,7 +94,7 @@ static rosidl_service_type_support_t @(function_prefix)__@(service.namespaced_ty &@(idl_structure_type_to_c_typename(service.namespaced_type))__@(GET_SOURCES_FUNC), }; -// Forward declaration of request/response type support functions +// Forward declaration of message type support functions for service members const rosidl_message_type_support_t * ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, @(', '.join([package_name] + list(interface_path.parents[0].parts))), @(service.namespaced_type.name + SERVICE_REQUEST_MESSAGE_SUFFIX))(); diff --git a/rosidl_typesupport_introspection_cpp/resource/srv__type_support.cpp.em b/rosidl_typesupport_introspection_cpp/resource/srv__type_support.cpp.em index 227d1915e..0706124c7 100644 --- a/rosidl_typesupport_introspection_cpp/resource/srv__type_support.cpp.em +++ b/rosidl_typesupport_introspection_cpp/resource/srv__type_support.cpp.em @@ -68,7 +68,7 @@ namespace rosidl_typesupport_introspection_cpp static ::rosidl_typesupport_introspection_cpp::ServiceMembers @(service.namespaced_type.name)_service_members = { "@('::'.join([package_name] + list(interface_path.parents[0].parts)))", // service namespace "@(service.namespaced_type.name)", // service name - // these two fields are initialized below on the first access + // the following fields are initialized below on first access // see get_service_type_support_handle<@('::'.join([package_name] + list(interface_path.parents[0].parts) + [service.namespaced_type.name]))>() nullptr, // request message nullptr, // response message @@ -111,7 +111,7 @@ get_service_type_support_handle<@('::'.join([package_name] + list(interface_path auto service_members = const_cast<::rosidl_typesupport_introspection_cpp::ServiceMembers *>( static_cast( service_type_support->data)); - // make sure that both the request_members_ and the response_members_ are initialized + // make sure all of the service_members are initialized // if they are not, initialize them if ( service_members->request_members_ == nullptr || @@ -134,7 +134,6 @@ get_service_type_support_handle<@('::'.join([package_name] + list(interface_path ::@('::'.join([package_name] + list(interface_path.parents[0].parts)))::@(service.response_message.structure.namespaced_type.name) >()->data ); - // initialize the event_members_ with the static function from the external library service_members->event_members_ = static_cast< const ::rosidl_typesupport_introspection_cpp::MessageMembers *