Class TraceNode

Inheritance Relationships

Base Types

Class Documentation

class TraceNode : public rclcpp::Node, public TraceNodeInterface

Implementation class for recording operation node.

Public Functions

TraceNode(std::string node_name_base, rclcpp::NodeOptions options, std::shared_ptr<LttngSession> lttng_session, std::shared_ptr<DataContainerInterface> data_container, rclcpp::Logger::Level level = rclcpp::Logger::Level::Info, bool use_log = false, bool execute_timer_on_run = true)

Construct an instance.

Parameters:
  • node_name_base – Base node name. The node name is [node_name_base]_[pid].

  • lttng_session – Instance of lttng session

  • data_container – Instance of data container.

  • level – Log level.

  • use_log – Flag to toggle log use.

  • execute_timer_on_run – If True, timer_callback is executed after start_callback.

~TraceNode() override
virtual bool is_recording_allowed() const override

Check whther current status allows recording.

Returns:

True if recording is allowed, false otherwise.

virtual bool is_recording_allowed_init() const override

Check whther current status allows recording. For initialization trace points.

Returns:

True if recording is allowed, false otherwise.

virtual bool is_timer_running() const override

Check if recording timer is running.

Returns:

True if timer is running, false otherwise.

void timer_callback()

Timer callback for recording.

void start_callback(caret_msgs::msg::Start::UniquePtr msg)

Subscription callback for start message.

Parameters:

msg – start message.

void end_callback(caret_msgs::msg::End::UniquePtr msg)

Subscription callback for end message.

Parameters:

msg – end message

virtual DataContainerInterface &get_data_container() override

Get data container instance.

Returns:

data container.

virtual const TRACE_STATUS &get_status() const override

Get status.

Returns:

Current recording status.