ros2_tracing/tracetools/include/tracetools/tracetools.h

120 lines
2.1 KiB
C
Raw Normal View History

2019-05-16 12:54:01 +02:00
#ifndef __TRACETOOLS_TRACETOOLS_H_
#define __TRACETOOLS_TRACETOOLS_H_
#include <stdint.h>
#include <string.h>
#include <stdbool.h>
#define TRACEPOINT(event_name, ...) \
2019-05-17 16:21:36 +02:00
(ros_trace_##event_name)(__VA_ARGS__)
2019-05-16 12:54:01 +02:00
#ifdef __cplusplus
extern "C"
{
#endif
/**
* Report whether tracing is compiled in
*/
bool ros_trace_compile_status();
/**
* tp: rcl_init
*/
void TRACEPOINT(
2019-05-17 16:21:36 +02:00
rcl_init,
const void * context);
2019-05-16 12:54:01 +02:00
2019-05-16 13:36:59 +02:00
/**
* tp: rcl_node_init
*/
2019-05-17 14:57:36 +02:00
void TRACEPOINT(
2019-05-17 16:21:36 +02:00
rcl_node_init,
2019-05-20 13:58:06 +02:00
const void * node_handle,
const void * rmw_handle,
2019-05-17 16:21:36 +02:00
const char * node_name,
2019-05-20 13:58:06 +02:00
const char * node_namespace);
2019-05-16 13:36:59 +02:00
/**
* tp: rcl_publisher_init
*/
2019-05-17 14:57:36 +02:00
void TRACEPOINT(
2019-05-17 16:21:36 +02:00
rcl_publisher_init,
2019-05-20 13:58:06 +02:00
const void * node_handle,
const void * rmw_handle,
const void * publisher_handle,
const char * topic_name,
const size_t depth);
2019-05-16 13:36:59 +02:00
/**
* tp: rcl_subscription_init
*/
2019-05-17 14:57:36 +02:00
void TRACEPOINT(
2019-05-17 16:21:36 +02:00
rcl_subscription_init,
2019-05-20 13:58:06 +02:00
const void * node_handle,
const void * rmw_handle,
2019-05-17 16:21:36 +02:00
const void * subscription_handle,
const char * topic_name,
const size_t depth);
2019-05-16 13:36:59 +02:00
/**
* tp: rclcpp_subscription_callback_added
*/
void TRACEPOINT(
2019-05-17 16:21:36 +02:00
rclcpp_subscription_callback_added,
const void * subscription_handle,
const void * callback);
2019-05-17 09:05:34 +02:00
/**
* tp: rclcpp_subscription_callback_start
2019-05-17 09:05:34 +02:00
*/
2019-05-17 14:57:36 +02:00
void TRACEPOINT(
2019-05-17 16:21:36 +02:00
rclcpp_subscription_callback_start,
const void * callback,
const bool is_intra_process);
2019-05-17 09:05:34 +02:00
/**
* tp: rclcpp_subscription_callback_end
2019-05-17 09:05:34 +02:00
*/
2019-05-17 14:57:36 +02:00
void TRACEPOINT(
2019-05-17 16:21:36 +02:00
rclcpp_subscription_callback_end,
const void * callback);
2019-05-17 09:05:34 +02:00
/**
* tp: rcl_service_init
*/
void TRACEPOINT(
rcl_service_init,
2019-05-20 13:58:06 +02:00
const void * node_handle,
const void * rmw_handle,
const void * service_handle,
const char * service_name);
/**
* tp: rclcpp_service_callback_added
*/
void TRACEPOINT(
rclcpp_service_callback_added,
2019-05-20 13:58:06 +02:00
const void * service_handle,
const void * callback);
/**
* tp: rclcpp_service_callback_start
*/
2019-05-17 14:57:36 +02:00
void TRACEPOINT(
2019-05-17 16:21:36 +02:00
rclcpp_service_callback_start,
const void * callback);
/**
* tp: rclcpp_service_callback_end
*/
2019-05-17 14:57:36 +02:00
void TRACEPOINT(
2019-05-17 16:21:36 +02:00
rclcpp_service_callback_end,
const void * callback);
2019-05-16 12:54:01 +02:00
#ifdef __cplusplus
}
#endif
#endif /* __TRACETOOLS_TRACETOOLS_H_ */