tracetools  master
Tracing tools and instrumentation for ROS 2
tracetools.h
Go to the documentation of this file.
1 // Copyright 2019 Robert Bosch GmbH
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 
26 #ifndef TRACETOOLS__TRACETOOLS_H_
27 #define TRACETOOLS__TRACETOOLS_H_
28 
29 #include <stdint.h>
30 #include <string.h>
31 #include <stdbool.h>
32 #include "tracetools/config.h"
34 
35 #ifndef TRACETOOLS_DISABLED
36 
40 # define TRACEPOINT(event_name, ...) \
41  (ros_trace_ ## event_name)(__VA_ARGS__)
42 # define DECLARE_TRACEPOINT(event_name, ...) \
43  TRACETOOLS_PUBLIC void ros_trace_ ## event_name(__VA_ARGS__);
44 #else
45 # define TRACEPOINT(event_name, ...) ((void) (0))
46 # define DECLARE_TRACEPOINT(event_name, ...)
47 #endif
48 
49 #ifdef __cplusplus
50 extern "C"
51 {
52 #endif
53 
55 
59 
61 
67 DECLARE_TRACEPOINT(
68  rcl_init,
69  const void * context_handle)
70 
71 
81 DECLARE_TRACEPOINT(
83  const void * node_handle,
84  const void * rmw_handle,
85  const char * node_name,
86  const char * node_namespace)
87 
88 
100 DECLARE_TRACEPOINT(
102  const void * publisher_handle,
103  const void * node_handle,
104  const void * rmw_publisher_handle,
105  const char * topic_name,
106  const size_t queue_depth)
107 
108 
121 DECLARE_TRACEPOINT(
123  const void * subscription_handle,
124  const void * node_handle,
125  const void * rmw_subscription_handle,
126  const char * topic_name,
127  const size_t queue_depth)
128 
129 
140 DECLARE_TRACEPOINT(
142  const void * subscription_handle,
143  const void * subscription)
144 
145 
152 DECLARE_TRACEPOINT(
154  const void * subscription,
155  const void * callback)
156 
157 
168 DECLARE_TRACEPOINT(
170  const void * service_handle,
171  const void * node_handle,
172  const void * rmw_service_handle,
173  const char * service_name)
174 
175 
183 DECLARE_TRACEPOINT(
185  const void * service_handle,
186  const void * callback)
187 
188 
199 DECLARE_TRACEPOINT(
201  const void * client_handle,
202  const void * node_handle,
203  const void * rmw_client_handle,
204  const char * service_name)
205 
206 
214 DECLARE_TRACEPOINT(
216  const void * timer_handle,
217  int64_t period)
218 
219 
227 DECLARE_TRACEPOINT(
229  const void * timer_handle,
230  const void * callback)
231 
232 
242 DECLARE_TRACEPOINT(
244  const void * callback,
245  const char * function_symbol)
246 
247 
256 DECLARE_TRACEPOINT(
258  const void * callback,
259  const bool is_intra_process)
260 
261 
269 DECLARE_TRACEPOINT(
270  callback_end,
271  const void * callback)
272 
273 #ifdef __cplusplus
274 }
275 #endif
276 
277 #endif // TRACETOOLS__TRACETOOLS_H_
rcl_subscription_init
rcl_subscription_init
Definition: tp_call.h:84
rclcpp_timer_callback_added
rclcpp_timer_callback_added
Definition: tp_call.h:189
rcl_timer_init
rcl_timer_init
Definition: tp_call.h:176
ros_trace_compile_status
bool ros_trace_compile_status()
Get tracing compilation status.
rclcpp_subscription_init
rclcpp_subscription_init
Definition: tp_call.h:103
rclcpp_subscription_callback_added
rclcpp_subscription_callback_added
Definition: tp_call.h:116
rcl_client_init
rcl_client_init
Definition: tp_call.h:159
rclcpp_callback_register
rclcpp_callback_register
Definition: tp_call.h:202
TRACETOOLS_PUBLIC
#define TRACETOOLS_PUBLIC
Definition: visibility_control.hpp:50
callback_end
callback_end
Definition: tp_call.h:228
rcl_node_init
rcl_node_init
Definition: tp_call.h:48
rcl_service_init
rcl_service_init
Definition: tp_call.h:129
visibility_control.hpp
rcl_publisher_init
rcl_publisher_init
Definition: tp_call.h:65
config.h
callback_start
callback_start
Definition: tp_call.h:215
rclcpp_service_callback_added
rclcpp_service_callback_added
Definition: tp_call.h:146