Class TracingController
Defined in File tracing_controller.hpp
Class Documentation
-
class TracingController
Classes that implement trace filtering functions such as CARET_SELECT_NODES.
Reads the environment variables CARET_SELECT_NODES, CARET_IGNORE_NODES, CARET_SELECT_TOPICS, CARET_IGNORE_TOPICS, and CARET_IGNORE_NODES. Tracepoints related to the specified node name or topic name are filtered so that they are not recorded by LTTng. If both SELECT and IGNORE are specified, SELECT takes priority.
Remark
Tracepoints for which node names cannot be obtained, such as tracepoints without a DDS layer, are currently not filtered.
Public Functions
-
explicit TracingController(bool use_log = true)
Construct an instance.
-
void add_node(const void *node_handle, std::string node_name)
Register node name for rcl_node_init tracepoint hook.
- Parameters:
node_handle – Address of the node handle.
node_name – Node name.
-
void add_subscription_handle(const void *node_handle, const void *subscription_handle, std::string topic_name)
Register topic name and binding information for rcl_subscription_init hook.
- Parameters:
node_handle – Address of the node handle.
subscription_handle – Address of the subscription handle.
topic_name – Topic name.
-
void add_rmw_subscription_handle(const void *node_handle, const void *rmw_subscription_handle, std::string topic_name)
Register topic name and binding information for rcl_subscription_init hook.
- Parameters:
node_handle – Address of the node handle.
rmw_subscription_handle – Address of the rmw_subscription handle.
topic_name – Topic name.
-
void add_subscription(const void *subscription, const void *subscription_handle)
Register binding information for rclcpp_subscription_init tracepoint hook.
- Parameters:
subscription – Address of subscription instance.
subscription_handle – Address of the subscription handle.
-
void add_subscription_callback(const void *callback, const void *subscription)
Register binding information for rclcpp_subscription_callback_added tracepoint hook.
- Parameters:
callback – Address of callback instance.
subscription – Address of subscription instance.
-
void add_timer_handle(const void *timer_handle, const void *node_handle)
Register binding information for rclcpp_timer_link_node tracepoint hook.
- Parameters:
timer_handle – Address of the timer handle.
node_handle – Address of the node handle.
-
void add_publisher_handle(const void *node_handle, const void *publisher_handle, std::string topic_name)
Register topic name and binding information for rcl_publisher_init tracepoint.
- Parameters:
node_handle – Address of the node handle.
publisher_handle – Address of the publisher handle.
topic_name – Topic name.
-
void add_timer_callback(const void *timer_callback, const void *timer_handle)
Register binding information for rclcpp_timer_callback_added tracepoint hook.
- Parameters:
callback – Address of timer callback instance.
timer_handle – Address of the timer handle.
-
void add_buffer(const void *buffer, const void *ipb)
Register binding information for rclcpp_buffer_to_ipb tracepoint.
- Parameters:
buffer – Address of the buffer.
ipb – Address of the IntraProcessBuffer.
-
void add_ipb(const void *ipb, const void *subscription)
Register binding information for rclcpp_ipb_to_subscription tracepoint.
- Parameters:
ipb – Address of the IntraProcessBuffer.
subscription – Address of the subscription instance.
-
void add_state_machine(const void *state_machine, const void *node_handle)
Register binding information for rcl_lifecycle_state_machine_init tracepoint.
- Parameters:
state_machine – Address of the lifecycle state machine.
node_handle – Address of the node handle.
-
void add_service_handle(const void *service_handle, const void *node_handle)
Register binding information for rclcpp_service_callback_added tracepoint.
- Parameters:
service_handle – Address of the service handle.
node_handle – Address of the node handle.
-
void add_client_handle(const void *client_handle, const void *node_handle)
Register binding information for rcl_client_init tracepoint.
- Parameters:
client_handle – Address of the client handle.
node_handle – Address of the node handle.
-
void add_allowed_messages(const void *message, bool is_allowed)
Register message tracing enable/disable.
- Parameters:
message – Address of the intra original message.
is_allowed – True is enabled, false otherwise.
-
bool is_allowed_callback(const void *callback)
Check if trace point is a enabled callback.
- Parameters:
callback – Address of callback instance.
- Returns:
True if the callback is enabled, false otherwise.
-
bool is_allowed_node(const void *node_handle)
Check if trace point is a enabled node.
- Parameters:
node_handle – Address of the node handle.
- Returns:
True if the node is enabled, false otherwise.
-
bool is_allowed_publisher_handle(const void *publisher_handle)
Check if trace point is a enabled publisher.
- Parameters:
publisher_handle – Address of the publisher handle.
- Returns:
True if the publisher is enabled, false otherwise.
-
bool is_allowed_subscription_handle(const void *subscription_handle)
Check if trace point is a enabled subscription.
- Parameters:
subscription_handle – Address of the subscription handle.
- Returns:
True if the subscription is enabled, false otherwise.
-
bool is_allowed_rmw_subscription_handle(const void *rmw_subscription_handle)
Check if trace point is a enabled rmw subscription.
- Parameters:
rmw_subscription_handle – Address of the rmw_subscription handle.
- Returns:
True if the rmw_subscription is enabled, false otherwise.
-
bool is_allowed_buffer(const void *buffer)
Check if trace point is a enabled intra-process buffer.
- Parameters:
buffer – Address of the intra-process buffer.
- Returns:
True if the buffer is enabled, false otherwise.
-
bool is_allowed_process()
Check if current process is allowed to output trace events.
- Returns:
True if the process is enabled, false otherwise.
-
bool is_allowed_timer_handle(const void *timer_handle)
Check if trace point is a enabled timer handle.
- Parameters:
timer_handle – Address of the timer handle.
- Returns:
True if the timer_handle is enabled, false otherwise.
-
bool is_allowed_state_machine(const void *state_machine)
Check if trace point is a enabled state machine.
- Parameters:
state_machine – Address of the lifecycle state machine.
- Returns:
True if the state_machine is enabled, false otherwise.
-
bool is_allowed_ipb(const void *ipb)
Check if trace point is a enabled ipb.
- Parameters:
buffer – Address of the intra-process buffer.
- Returns:
True if the ipb is enabled, false otherwise.
-
bool is_allowed_service_handle(const void *service_handle)
Check if trace point is a enabled service handle.
- Parameters:
service_handle – Address of the service handle.
- Returns:
True if the service_handle is enabled, false otherwise.
-
bool is_allowed_client_handle(const void *client_handle)
Check if trace point is a enabled client handle.
- Parameters:
client_handle – Address of the client handle.
- Returns:
True if the client_handle is enabled, false otherwise.
-
bool is_allowed_message(const void *message)
Check if trace point is a enabled message.
- Parameters:
message – Address of the message.
- Returns:
True if the message is enabled, false otherwise.
-
explicit TracingController(bool use_log = true)