rosidl_runtime_c  master
Generate the rosidl interfaces in C.
service_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__SERVICE_TYPE_SUPPORT_STRUCT_H_
16 #define ROSIDL_RUNTIME_C__SERVICE_TYPE_SUPPORT_STRUCT_H_
17 
19 
20 #include "rosidl_typesupport_interface/macros.h"
21 
22 #ifdef __cplusplus
23 extern "C"
24 {
25 #endif
26 
28 
29 typedef const rosidl_service_type_support_t * (* rosidl_service_typesupport_handle_function)(
30  const rosidl_service_type_support_t *, const char *);
31 
34 {
36  const char * typesupport_identifier;
38  const void * data;
41 };
42 
44 
54  const rosidl_service_type_support_t * handle, const char * identifier);
55 
57 
68  const rosidl_service_type_support_t * handle, const char * identifier);
69 
71 /*
72  * \param PkgName Name of the package that contains the service
73  * \param SrvSubfolder name of the subfolder (for example: srv)
74  * \param SrvName service name
75  * \return a rosidl_service_type_support_t struct if founded, otherwise NULL.
76  */
77 #define ROSIDL_GET_SRV_TYPE_SUPPORT(PkgName, SrvSubfolder, SrvName) \
78  ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( \
79  rosidl_typesupport_c, PkgName, SrvSubfolder, SrvName)()
80 
81 #ifdef __cplusplus
82 }
83 #endif
84 
85 #endif // ROSIDL_RUNTIME_C__SERVICE_TYPE_SUPPORT_STRUCT_H_
rosidl_service_typesupport_handle_function
const typedef rosidl_service_type_support_t *(* rosidl_service_typesupport_handle_function)(const rosidl_service_type_support_t *, const char *)
Definition: service_type_support_struct.h:29
rosidl_service_type_support_t
Contains rosidl service type support data.
Definition: service_type_support_struct.h:33
get_service_typesupport_handle_function
const rosidl_service_type_support_t * get_service_typesupport_handle_function(const rosidl_service_type_support_t *handle, const char *identifier)
Get the service type support handle function specific to this identifier.
rosidl_service_type_support_t::data
const void * data
Pointer to the service type support library.
Definition: service_type_support_struct.h:38
get_service_typesupport_handle
const rosidl_service_type_support_t * get_service_typesupport_handle(const rosidl_service_type_support_t *handle, const char *identifier)
Get the service type support handle specific to this identifier.
rosidl_service_type_support_t::func
rosidl_service_typesupport_handle_function func
Pointer to the service type support handler function.
Definition: service_type_support_struct.h:40
visibility_control.h
rosidl_service_type_support_t::typesupport_identifier
const char * typesupport_identifier
String identifier for the type_support.
Definition: service_type_support_struct.h:36
ROSIDL_GENERATOR_C_PUBLIC
#define ROSIDL_GENERATOR_C_PUBLIC
Definition: visibility_control.h:48