From 59b1bcb779bcafbb1a89ced5297d182e6e0d0c6b Mon Sep 17 00:00:00 2001 From: Ivan Santiago Paunovic Date: Wed, 20 Nov 2019 15:37:38 +0000 Subject: [PATCH] Further changes after rebasing with master Signed-off-by: Ivan Santiago Paunovic --- rmw_fastrtps_cpp/include/rmw_fastrtps_cpp/publisher.hpp | 1 + .../include/rmw_fastrtps_cpp/subscription.hpp | 4 +++- rmw_fastrtps_cpp/src/rmw_init.cpp | 8 +++++++- rmw_fastrtps_cpp/src/rmw_node.cpp | 3 +++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/rmw_fastrtps_cpp/include/rmw_fastrtps_cpp/publisher.hpp b/rmw_fastrtps_cpp/include/rmw_fastrtps_cpp/publisher.hpp index ce56a2c7e..e59b3ccd1 100644 --- a/rmw_fastrtps_cpp/include/rmw_fastrtps_cpp/publisher.hpp +++ b/rmw_fastrtps_cpp/include/rmw_fastrtps_cpp/publisher.hpp @@ -27,6 +27,7 @@ create_publisher( const rosidl_message_type_support_t * type_supports, const char * topic_name, const rmw_qos_profile_t * qos_policies, + const rmw_publisher_options_t * publisher_options, bool keyed, bool create_publisher_listener); diff --git a/rmw_fastrtps_cpp/include/rmw_fastrtps_cpp/subscription.hpp b/rmw_fastrtps_cpp/include/rmw_fastrtps_cpp/subscription.hpp index be7f0791d..a35d03f15 100644 --- a/rmw_fastrtps_cpp/include/rmw_fastrtps_cpp/subscription.hpp +++ b/rmw_fastrtps_cpp/include/rmw_fastrtps_cpp/subscription.hpp @@ -16,6 +16,8 @@ #define RMW_FASTRTPS_CPP__SUBSCRIPTION_HPP_ #include "rmw/rmw.h" +#include "rmw/subscription_options.h" + #include "rmw_fastrtps_shared_cpp/custom_participant_info.hpp" namespace rmw_fastrtps_cpp @@ -27,7 +29,7 @@ create_subscription( const rosidl_message_type_support_t * type_supports, const char * topic_name, const rmw_qos_profile_t * qos_policies, - bool ignore_local_publications, + const rmw_subscription_options_t * subscription_options, bool keyed, bool create_subscription_listener); diff --git a/rmw_fastrtps_cpp/src/rmw_init.cpp b/rmw_fastrtps_cpp/src/rmw_init.cpp index a2cbca78a..9db66bd11 100644 --- a/rmw_fastrtps_cpp/src/rmw_init.cpp +++ b/rmw_fastrtps_cpp/src/rmw_init.cpp @@ -18,6 +18,7 @@ #include "rmw/impl/cpp/macros.hpp" #include "rmw/init.h" #include "rmw/init_options.h" +#include "rmw/publisher_options.h" #include "rmw/rmw.h" #include "rmw_dds_common/context.hpp" @@ -95,10 +96,14 @@ rmw_init(const rmw_init_options_t * options, rmw_context_t * context) rmw_dds_common::Context * common_context = nullptr; CustomParticipantInfo * participant_info = nullptr; rmw_publisher_t * publisher = nullptr; + rmw_publisher_options_t publisher_options = rmw_get_default_publisher_options(); rmw_ret_t ret = RMW_RET_OK; rmw_subscription_t * subscription = nullptr; + rmw_subscription_options_t subscription_options = rmw_get_default_subscription_options(); rmw_qos_profile_t qos = rmw_qos_profile_default; + subscription_options.ignore_local_publications = true; // This is currently not implemented in fastrtps + RCUTILS_CHECK_ARGUMENT_FOR_NULL(options, RMW_RET_INVALID_ARGUMENT); RCUTILS_CHECK_ARGUMENT_FOR_NULL(context, RMW_RET_INVALID_ARGUMENT); RMW_CHECK_TYPE_IDENTIFIERS_MATCH( @@ -149,6 +154,7 @@ rmw_init(const rmw_init_options_t * options, rmw_context_t * context) rosidl_typesupport_cpp::get_message_type_support_handle(), "_participant_info", &qos, + &publisher_options, false, // our fastrtps typesupport doesn't support keyed topics true); // don't create a publisher listener if (nullptr == publisher) { @@ -161,7 +167,7 @@ rmw_init(const rmw_init_options_t * options, rmw_context_t * context) rosidl_typesupport_cpp::get_message_type_support_handle(), "_participant_info", &qos, - true, // ignore_local_publications, currently not implemented + &subscription_options, false, // our fastrtps typesupport doesn't support keyed topics true); // don't create a subscriber listener if (nullptr == subscription) { diff --git a/rmw_fastrtps_cpp/src/rmw_node.cpp b/rmw_fastrtps_cpp/src/rmw_node.cpp index 516459910..cda891e1c 100644 --- a/rmw_fastrtps_cpp/src/rmw_node.cpp +++ b/rmw_fastrtps_cpp/src/rmw_node.cpp @@ -41,6 +41,9 @@ rmw_create_node( const rmw_security_options_t * security_options, bool localhost_only) { + (void)domain_id; + (void)security_options; + (void)localhost_only; RCUTILS_CHECK_ARGUMENT_FOR_NULL(context, NULL); RMW_CHECK_TYPE_IDENTIFIERS_MATCH( init context,