diff --git a/src/agnocastlib/include/agnocast_subscription.hpp b/src/agnocastlib/include/agnocast_subscription.hpp index 58bdb09f..99948f70 100644 --- a/src/agnocastlib/include/agnocast_subscription.hpp +++ b/src/agnocastlib/include/agnocast_subscription.hpp @@ -79,7 +79,8 @@ class Subscription : public SubscriptionBase auto node_base = node->get_node_base_interface(); rclcpp::CallbackGroup::SharedPtr callback_group = get_valid_callback_group(node_base, options); uint32_t local_topic_id = agnocast::register_callback( - callback, topic_name_, static_cast(qos.depth()), mq, callback_group); + callback, topic_name_, static_cast(qos.depth()), mq, + callback_group); // cppcheck-suppress unreadVariable #ifdef TRACETOOLS_LTTNG_ENABLED uint64_t pid_ltid = (static_cast(subscriber_pid_) << 32) | local_topic_id; diff --git a/src/agnocastlib/src/agnocast_executor.cpp b/src/agnocastlib/src/agnocast_executor.cpp index 76d34acb..3653cc09 100644 --- a/src/agnocastlib/src/agnocast_executor.cpp +++ b/src/agnocastlib/src/agnocast_executor.cpp @@ -130,7 +130,6 @@ bool AgnocastExecutor::get_next_agnocast_executables( exit(EXIT_FAILURE); } - uint64_t pid_ltid = (static_cast(my_pid_) << 32) | topic_local_id; for (int32_t i = static_cast(receive_args.ret_len) - 1; i >= 0; i--) { // older messages first const auto callable = agnocast::create_callable( @@ -138,6 +137,7 @@ bool AgnocastExecutor::get_next_agnocast_executables( receive_args.ret_publisher_pids[i], receive_args.ret_timestamps[i], topic_local_id); #ifdef TRACETOOLS_LTTNG_ENABLED + uint64_t pid_ltid = (static_cast(my_pid_) << 32) | topic_local_id; TRACEPOINT( agnocast_create_callable, static_cast(callable.get()), reinterpret_cast(receive_args.ret_last_msg_addrs[i]), receive_args.ret_timestamps[i],