.. _program_listing_file_include_rosidl_runtime_c_message_type_support_struct.h: Program Listing for File message_type_support_struct.h ====================================================== |exhale_lsh| :ref:`Return to documentation for file ` (``include/rosidl_runtime_c/message_type_support_struct.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp // Copyright 2015-2016 Open Source Robotics Foundation, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #ifndef ROSIDL_RUNTIME_C__MESSAGE_TYPE_SUPPORT_STRUCT_H_ #define ROSIDL_RUNTIME_C__MESSAGE_TYPE_SUPPORT_STRUCT_H_ #include "rosidl_runtime_c/type_description/type_description__struct.h" #include "rosidl_runtime_c/type_description/type_source__struct.h" #include "rosidl_runtime_c/type_hash.h" #include "rosidl_runtime_c/visibility_control.h" #include "rosidl_typesupport_interface/macros.h" #ifdef __cplusplus extern "C" { #endif typedef struct rosidl_message_type_support_t rosidl_message_type_support_t; typedef const rosidl_message_type_support_t * (* rosidl_message_typesupport_handle_function)( const rosidl_message_type_support_t *, const char *); typedef const rosidl_type_hash_t * (* rosidl_message_get_type_hash_function)(const rosidl_message_type_support_t *); typedef const rosidl_runtime_c__type_description__TypeDescription * (* rosidl_message_get_type_description_function)(const rosidl_message_type_support_t *); typedef const rosidl_runtime_c__type_description__TypeSource__Sequence * (* rosidl_message_get_type_description_sources_function)(const rosidl_message_type_support_t *); struct rosidl_message_type_support_t { const char * typesupport_identifier; const void * data; rosidl_message_typesupport_handle_function func; rosidl_message_get_type_hash_function get_type_hash_func; rosidl_message_get_type_description_function get_type_description_func; rosidl_message_get_type_description_sources_function get_type_description_sources_func; }; ROSIDL_GENERATOR_C_PUBLIC rosidl_message_type_support_t rosidl_get_zero_initialized_message_type_support_handle(void); ROSIDL_GENERATOR_C_PUBLIC const rosidl_message_type_support_t * get_message_typesupport_handle( const rosidl_message_type_support_t * handle, const char * identifier); // Get the message type support handle function specific to this identifier. ROSIDL_GENERATOR_C_PUBLIC const rosidl_message_type_support_t * get_message_typesupport_handle_function( const rosidl_message_type_support_t * handle, const char * identifier); /* * \param PkgName Name of the package that contains the message * \param MsgSubfolder name of the subfolder (for example: msg) * \param MsgName message name * \return a rosidl_message_type_support_t struct if founded, otherwise NULL. */ #define ROSIDL_GET_MSG_TYPE_SUPPORT(PkgName, MsgSubfolder, MsgName) \ ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( \ rosidl_typesupport_c, PkgName, MsgSubfolder, MsgName)() #ifdef __cplusplus } #endif #endif // ROSIDL_RUNTIME_C__MESSAGE_TYPE_SUPPORT_STRUCT_H_