Function rclcpp::get_service_typesupport_handle

Function Documentation

const rosidl_service_type_support_t *rclcpp::get_service_typesupport_handle(const std::string &type, const std::string &typesupport_identifier, rcpputils::SharedLibrary &library)

Extract the service type support handle from the library.

The library needs to match the topic type. The shared library must stay loaded for the lifetime of the result.

Parameters:
  • type[in] The service type, e.g. “std_srvs/srv/Empty”

  • typesupport_identifier[in] Type support identifier, typically “rosidl_typesupport_cpp”

  • library[in] The shared type support library

Throws:

std::runtime_error – if the symbol of type not found in the library.

Returns:

A service type support handle