Skip to content

Commit

Permalink
Merge pull request #15 from ros2/disambiguate-linking
Browse files Browse the repository at this point in the history
Use type support handle functions from the rmw implementation
  • Loading branch information
esteve committed Mar 20, 2015
2 parents 3dae09f + 9f6ffc4 commit cadc8e7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rclcpp/include/rclcpp/node_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#include <string>

#include <rmw/rmw.h>
#include <rmw/get_type_support_handle.h>

#include <rosidl_generator_cpp/MessageTypeSupport.h>
#include <rosidl_generator_cpp/ServiceTypeSupport.h>

Expand Down Expand Up @@ -63,7 +65,7 @@ template<typename MessageT>
publisher::Publisher::SharedPtr
Node::create_publisher(std::string topic_name, size_t queue_size)
{
using rosidl_generator_cpp::get_type_support_handle;
using rmw::get_type_support_handle;
auto type_support_handle = get_type_support_handle<MessageT>();
rmw_publisher_t * publisher_handle = rmw_create_publisher(
node_handle_, type_support_handle, topic_name.c_str(), queue_size);
Expand Down Expand Up @@ -94,7 +96,7 @@ Node::create_subscription(
std::function<void(const std::shared_ptr<MessageT> &)> callback,
rclcpp::callback_group::CallbackGroup::SharedPtr group)
{
using rosidl_generator_cpp::get_type_support_handle;
using rmw::get_type_support_handle;
auto type_support_handle = get_type_support_handle<MessageT>();
rmw_subscription_t * subscriber_handle = rmw_create_subscription(
node_handle_, type_support_handle, topic_name.c_str(), queue_size);
Expand Down

0 comments on commit cadc8e7

Please sign in to comment.