Function rclcpp::get_message_typesupport_handle

Function Documentation

const rosidl_message_type_support_t *rclcpp::get_message_typesupport_handle(const std::string &type, const std::string &typesupport_identifier, rcpputils::SharedLibrary &library)

Extracts the message type support handle from the library.

Note

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

Parameters:
  • type[in] The topic type, e.g. “std_msgs/msg/String”

  • 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 message type support handle