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 // Copyright 2020 Christophe Bedard
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 
27 #ifndef TRACETOOLS__TRACETOOLS_H_
28 #define TRACETOOLS__TRACETOOLS_H_
29 
30 #include <stdint.h>
31 #include <string.h>
32 #include <stdbool.h>
33 #include "tracetools/config.h"
35 
36 #ifndef TRACETOOLS_DISABLED
37 
41 # define TRACEPOINT(event_name, ...) \
42  (ros_trace_ ## event_name)(__VA_ARGS__)
43 # define DECLARE_TRACEPOINT(event_name, ...) \
44  TRACETOOLS_PUBLIC void ros_trace_ ## event_name(__VA_ARGS__);
45 #else
46 # define TRACEPOINT(event_name, ...) ((void) (0))
47 # define DECLARE_TRACEPOINT(event_name, ...)
48 #endif
49 
50 #ifdef __cplusplus
51 extern "C"
52 {
53 #endif
54 
56 
60 
62 
68 DECLARE_TRACEPOINT(
69  rcl_init,
70  const void * context_handle)
71 
72 
82 DECLARE_TRACEPOINT(
84  const void * node_handle,
85  const void * rmw_handle,
86  const char * node_name,
87  const char * node_namespace)
88 
89 
101 DECLARE_TRACEPOINT(
103  const void * publisher_handle,
104  const void * node_handle,
105  const void * rmw_publisher_handle,
106  const char * topic_name,
107  const size_t queue_depth)
108 
109 
118 DECLARE_TRACEPOINT(
119  rcl_publish,
120  const void * publisher_handle,
121  const void * message)
122 
123 
132 DECLARE_TRACEPOINT(
134  const void * publisher_handle,
135  const void * message)
136 
137 
150 DECLARE_TRACEPOINT(
152  const void * subscription_handle,
153  const void * node_handle,
154  const void * rmw_subscription_handle,
155  const char * topic_name,
156  const size_t queue_depth)
157 
158 
169 DECLARE_TRACEPOINT(
171  const void * subscription_handle,
172  const void * subscription)
173 
174 
181 DECLARE_TRACEPOINT(
183  const void * subscription,
184  const void * callback)
185 
186 
197 DECLARE_TRACEPOINT(
199  const void * service_handle,
200  const void * node_handle,
201  const void * rmw_service_handle,
202  const char * service_name)
203 
204 
212 DECLARE_TRACEPOINT(
214  const void * service_handle,
215  const void * callback)
216 
217 
228 DECLARE_TRACEPOINT(
230  const void * client_handle,
231  const void * node_handle,
232  const void * rmw_client_handle,
233  const char * service_name)
234 
235 
243 DECLARE_TRACEPOINT(
245  const void * timer_handle,
246  int64_t period)
247 
248 
256 DECLARE_TRACEPOINT(
258  const void * timer_handle,
259  const void * callback)
260 
261 
268 DECLARE_TRACEPOINT(
270  const void * timer_handle,
271  const void * node_handle)
272 
273 
283 DECLARE_TRACEPOINT(
285  const void * callback,
286  const char * function_symbol)
287 
288 
297 DECLARE_TRACEPOINT(
299  const void * callback,
300  const bool is_intra_process)
301 
302 
310 DECLARE_TRACEPOINT(
311  callback_end,
312  const void * callback)
313 
314 
322 DECLARE_TRACEPOINT(
324  const void * node_handle,
325  const void * state_machine)
326 
327 
335 DECLARE_TRACEPOINT(
337  const void * state_machine,
338  const char * start_label,
339  const char * goal_label)
340 
341 #ifdef __cplusplus
342 }
343 #endif
344 
345 #endif // TRACETOOLS__TRACETOOLS_H_
rcl_subscription_init
rcl_subscription_init
Definition: tp_call.h:111
rclcpp_timer_callback_added
rclcpp_timer_callback_added
Definition: tp_call.h:216
rcl_timer_init
rcl_timer_init
Definition: tp_call.h:203
ros_trace_compile_status
bool ros_trace_compile_status()
Get tracing compilation status.
rclcpp_timer_link_node
rclcpp_timer_link_node
Definition: tp_call.h:229
rcl_lifecycle_transition
rcl_lifecycle_transition
Definition: tp_call.h:292
rcl_publish
rcl_publish
Definition: tp_call.h:85
rclcpp_subscription_init
rclcpp_subscription_init
Definition: tp_call.h:130
rclcpp_subscription_callback_added
rclcpp_subscription_callback_added
Definition: tp_call.h:143
rcl_client_init
rcl_client_init
Definition: tp_call.h:186
rclcpp_callback_register
rclcpp_callback_register
Definition: tp_call.h:242
TRACETOOLS_PUBLIC
#define TRACETOOLS_PUBLIC
Definition: visibility_control.hpp:50
callback_end
callback_end
Definition: tp_call.h:268
rcl_node_init
rcl_node_init
Definition: tp_call.h:49
rcl_service_init
rcl_service_init
Definition: tp_call.h:156
visibility_control.hpp
rcl_publisher_init
rcl_publisher_init
Definition: tp_call.h:66
rclcpp_publish
rclcpp_publish
Definition: tp_call.h:98
config.h
rcl_lifecycle_state_machine_init
rcl_lifecycle_state_machine_init
Definition: tp_call.h:279
callback_start
callback_start
Definition: tp_call.h:255
rclcpp_service_callback_added
rclcpp_service_callback_added
Definition: tp_call.h:173