Skip to content

Commit

Permalink
Added C interfaces to obtain service and action type support. (#149)
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Fabian <[email protected]>
  • Loading branch information
StefanFabian authored Aug 20, 2024
1 parent aa522c4 commit a702c17
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 @@ -63,3 +63,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 @@ -153,3 +153,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 a702c17

Please sign in to comment.