Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use type support handle functions from the rmw implementation #15

Merged
merged 2 commits into from
Mar 20, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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