Skip to content

Commit

Permalink
Added C interfaces to obtain service and action type support. (#143)
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Fabian <[email protected]>
Co-authored-by: Stefan Fabian <[email protected]>
  • Loading branch information
StefanFabian and Stefan Fabian authored May 15, 2023
1 parent da0e300 commit 9062d91
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
15 changes: 15 additions & 0 deletions rosidl_typesupport_cpp/resource/action__type_support.cpp.em
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,18 @@ get_action_type_support_handle<@('::'.join([package_name] + list(interface_path.
}

} // namespace rosidl_typesupport_cpp

#ifdef __cplusplus
extern "C"
{
#endif

ROSIDL_TYPESUPPORT_CPP_PUBLIC
const rosidl_action_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__ACTION_SYMBOL_NAME(rosidl_typesupport_cpp, @(', '.join([package_name] + list(interface_path.parents[0].parts) + [interface_path.stem])))() {
return ::rosidl_typesupport_cpp::get_action_type_support_handle<@('::'.join([package_name] + list(interface_path.parents[0].parts) + [interface_path.stem]))>();
}

#ifdef __cplusplus
}
#endif
15 changes: 15 additions & 0 deletions rosidl_typesupport_cpp/resource/srv__type_support.cpp.em
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,18 @@ get_service_type_support_handle<@('::'.join([package_name] + list(interface_path
}

} // namespace rosidl_typesupport_cpp

#ifdef __cplusplus
extern "C"
{
#endif

ROSIDL_TYPESUPPORT_CPP_PUBLIC
const rosidl_service_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_cpp, @(', '.join([package_name] + list(interface_path.parents[0].parts) + [service.namespaced_type.name])))() {
return ::rosidl_typesupport_cpp::get_service_type_support_handle<@('::'.join([package_name] + list(interface_path.parents[0].parts) + [service.namespaced_type.name]))>();
}

#ifdef __cplusplus
}
#endif

0 comments on commit 9062d91

Please sign in to comment.