Skip to content

Commit

Permalink
feat: change publish trace point definition (#2)
Browse files Browse the repository at this point in the history
* change publish tp def

Signed-off-by: yamasaki <114902604+ymski@users.noreply.github.com>

* added publisher_handle

Signed-off-by: yamasaki <114902604+ymski@users.noreply.github.com>

---------

Signed-off-by: yamasaki <114902604+ymski@users.noreply.github.com>
  • Loading branch information
ymski authored Aug 9, 2023
1 parent a9c2be8 commit 19ad4ea
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions rclcpp/include/rclcpp/publisher.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,7 @@ class Publisher : public PublisherBase
TRACEPOINT(
rclcpp_publish,
static_cast<const void *>(publisher_handle_.get()),
static_cast<const void *>(&msg),
static_cast<const uint64_t>(TimeStampRosMessage::value(msg).second));
static_cast<const void *>(&msg));
auto status = rcl_publish(publisher_handle_.get(), &msg, nullptr);

if (RCL_RET_PUBLISHER_INVALID == status) {
Expand Down Expand Up @@ -524,8 +523,7 @@ class Publisher : public PublisherBase
TRACEPOINT(
rclcpp_intra_publish,
static_cast<const void *>(publisher_handle_.get()),
msg.get(),
static_cast<const uint64_t>(TimeStampPubMessage::value(*msg).second));
msg.get());

ipm->template do_intra_process_publish<PublishedType, ROSMessageType, AllocatorT>(
intra_process_publisher_id_,
Expand All @@ -548,8 +546,7 @@ class Publisher : public PublisherBase
TRACEPOINT(
rclcpp_intra_publish,
static_cast<const void *>(publisher_handle_.get()),
msg.get(),
static_cast<const uint64_t>(TimeStampRosMessage::value(*msg).second));
msg.get());

ipm->template do_intra_process_publish<ROSMessageType, ROSMessageType, AllocatorT>(
intra_process_publisher_id_,
Expand All @@ -572,8 +569,7 @@ class Publisher : public PublisherBase
TRACEPOINT(
rclcpp_intra_publish,
static_cast<const void *>(publisher_handle_.get()),
msg.get(),
static_cast<const uint64_t>(TimeStampRosMessage::value(*msg).second));
msg.get());

return ipm->template do_intra_process_publish_and_return_shared<ROSMessageType, ROSMessageType,
AllocatorT>(
Expand Down

0 comments on commit 19ad4ea

Please sign in to comment.