rosidl_runtime_c  master
Generate the rosidl interfaces in C.
message_type_support_struct.h
Go to the documentation of this file.
1 // Copyright 2015-2016 Open Source Robotics Foundation, Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef ROSIDL_RUNTIME_C__MESSAGE_TYPE_SUPPORT_STRUCT_H_
16 #define ROSIDL_RUNTIME_C__MESSAGE_TYPE_SUPPORT_STRUCT_H_
17 
19 #include "rosidl_typesupport_interface/macros.h"
20 
21 #ifdef __cplusplus
22 extern "C"
23 {
24 #endif
25 
27 
28 typedef const rosidl_message_type_support_t * (* rosidl_message_typesupport_handle_function)(
29  const rosidl_message_type_support_t *, const char *);
30 
33 {
35  const char * typesupport_identifier;
37  const void * data;
40 };
41 
43 
53  const rosidl_message_type_support_t * handle, const char * identifier);
54 
55 // Get the message type support handle function specific to this identifier.
67  const rosidl_message_type_support_t * handle, const char * identifier);
68 
70 /*
71  * \param PkgName Name of the package that contains the message
72  * \param MsgSubfolder name of the subfolder (for example: msg)
73  * \param MsgName message name
74  * \return a rosidl_message_type_support_t struct if founded, otherwise NULL.
75  */
76 #define ROSIDL_GET_MSG_TYPE_SUPPORT(PkgName, MsgSubfolder, MsgName) \
77  ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( \
78  rosidl_typesupport_c, PkgName, MsgSubfolder, MsgName)()
79 
80 #ifdef __cplusplus
81 }
82 #endif
83 
84 #endif // ROSIDL_RUNTIME_C__MESSAGE_TYPE_SUPPORT_STRUCT_H_
get_message_typesupport_handle_function
const rosidl_message_type_support_t * get_message_typesupport_handle_function(const rosidl_message_type_support_t *handle, const char *identifier)
get_message_typesupport_handle
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 specific to this identifier.
rosidl_message_type_support_t::typesupport_identifier
const char * typesupport_identifier
String identifier for the type_support.
Definition: message_type_support_struct.h:35
visibility_control.h
ROSIDL_GENERATOR_C_PUBLIC
#define ROSIDL_GENERATOR_C_PUBLIC
Definition: visibility_control.h:48
rosidl_message_typesupport_handle_function
const typedef rosidl_message_type_support_t *(* rosidl_message_typesupport_handle_function)(const rosidl_message_type_support_t *, const char *)
Definition: message_type_support_struct.h:28
rosidl_message_type_support_t
Contains rosidl message type support data.
Definition: message_type_support_struct.h:32
rosidl_message_type_support_t::func
rosidl_message_typesupport_handle_function func
Pointer to the message type support handler function.
Definition: message_type_support_struct.h:39
rosidl_message_type_support_t::data
const void * data
Pointer to the message type support library.
Definition: message_type_support_struct.h:37