Skip to content

Commit

Permalink
[RosPublisher] Revise the nns_ros_publisher's parameters
Browse files Browse the repository at this point in the history
This patch revises the nns_rclcpp_publisher's parameters to get the
instance of nns_ros_publisher as the first argument.

Signed-off-by: Wook Song <[email protected]>
  • Loading branch information
wooksong committed Oct 28, 2020
1 parent cb42c7a commit 1308c5b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion gst/tensor_ros_sink/tensor_ros_sink.c
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,8 @@ gst_tensor_ros_sink_finalize (GObject *object)

g_mutex_clear (&self->mutex);
g_free (self->location);
nns_ros_publisher_close_bag (self->rosbag_to_save);
nns_ros_publisher_close_bag (self->nns_ros_bind_instance,
self->rosbag_to_save);
nns_ros_publisher_finalize (self->nns_ros_bind_instance);

self->location = NULL;
Expand Down
2 changes: 1 addition & 1 deletion include/nns_ros_publisher.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ gboolean nns_ros_publisher_set_pub_topic (void *instance,
const GstTensorsConfig *conf);
const gchar *nns_ros_publisher_get_pub_topic_name (void *instance);
void *nns_ros_publisher_open_writable_bag (void *instance, const char *name);
void nns_ros_publisher_close_bag (void *bag);
void nns_ros_publisher_close_bag (void *instance, void *bag);
#ifdef __cplusplus
}
#endif /* __cplusplus */
Expand Down
3 changes: 2 additions & 1 deletion ros/node/nns_roscpp_publisher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ void *nns_ros_publisher_open_writable_bag (void *instance, const char *name)
return (void *) bag;
}

void nns_ros_publisher_close_bag(void *bag)
void nns_ros_publisher_close_bag(void * instance __attribute__((unused)),
void *bag)
{
rosbag::Bag *rosbag = (rosbag::Bag *) bag;

Expand Down
2 changes: 1 addition & 1 deletion ros2/node/nns_rclcpp_publisher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ nns_ros_publisher_open_writable_bag (void * instance __attribute__((unused)), co
}

void
nns_ros_publisher_close_bag (void *bag __attribute__((unused)))
nns_ros_publisher_close_bag (void * instance __attribute__((unused)), void *bag __attribute__((unused)))
{
;
}

0 comments on commit 1308c5b

Please sign in to comment.