diff --git a/rmw_connext_cpp/CMakeLists.txt b/rmw_connext_cpp/CMakeLists.txt index 19a8cbab..20fb6391 100644 --- a/rmw_connext_cpp/CMakeLists.txt +++ b/rmw_connext_cpp/CMakeLists.txt @@ -173,6 +173,7 @@ add_library( src/rmw_node_names.cpp src/rmw_publish.cpp src/rmw_publisher.cpp + src/rmw_qos.cpp src/rmw_request.cpp src/rmw_response.cpp src/rmw_serialize.cpp diff --git a/rmw_connext_cpp/src/rmw_qos.cpp b/rmw_connext_cpp/src/rmw_qos.cpp new file mode 100644 index 00000000..4556ec15 --- /dev/null +++ b/rmw_connext_cpp/src/rmw_qos.cpp @@ -0,0 +1,30 @@ +// Copyright 2021 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "rmw_connext_shared_cpp/rmw_qos.hpp" + +extern "C" +{ +rmw_ret_t +rmw_qos_profile_check_compatible( + const rmw_qos_profile_t publisher_profile, + const rmw_qos_profile_t subscription_profile, + rmw_qos_compatibility_type_t * compatibility, + char * reason, + size_t reason_size) +{ + return qos_profile_check_compatible( + publisher_profile, subscription_profile, compatibility, reason, reason_size); +} +} // extern "C" diff --git a/rmw_connext_shared_cpp/CMakeLists.txt b/rmw_connext_shared_cpp/CMakeLists.txt index 226087c5..555c1e4f 100644 --- a/rmw_connext_shared_cpp/CMakeLists.txt +++ b/rmw_connext_shared_cpp/CMakeLists.txt @@ -25,6 +25,7 @@ endif() find_package(rcpputils REQUIRED) find_package(rcutils REQUIRED) find_package(rmw REQUIRED) +find_package(rmw_dds_common REQUIRED) include_directories(include) @@ -50,6 +51,7 @@ add_library( src/qos.cpp src/names_and_types_helpers.cpp src/node_info_and_types.cpp + src/rmw_qos.cpp src/security_logging.cpp src/service_names_and_types.cpp src/topic_names_and_types.cpp @@ -63,6 +65,7 @@ ament_target_dependencies(rmw_connext_shared_cpp "rcpputils" "rcutils" "rmw" + "rmw_dds_common" "Connext") ament_export_libraries(rmw_connext_shared_cpp) diff --git a/rmw_connext_shared_cpp/include/rmw_connext_shared_cpp/rmw_qos.hpp b/rmw_connext_shared_cpp/include/rmw_connext_shared_cpp/rmw_qos.hpp new file mode 100644 index 00000000..dcc34dec --- /dev/null +++ b/rmw_connext_shared_cpp/include/rmw_connext_shared_cpp/rmw_qos.hpp @@ -0,0 +1,31 @@ +// Copyright 2021 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW_CONNEXT_SHARED_CPP__RMW_QOS_HPP_ +#define RMW_CONNEXT_SHARED_CPP__RMW_QOS_HPP_ + +#include "rmw/qos_profiles.h" + +#include "rmw_connext_shared_cpp/visibility_control.h" + +RMW_CONNEXT_SHARED_CPP_PUBLIC +rmw_ret_t +qos_profile_check_compatible( + const rmw_qos_profile_t publisher_profile, + const rmw_qos_profile_t subscription_profile, + rmw_qos_compatibility_type_t * compatibility, + char * reason, + size_t reason_size); + +#endif // RMW_CONNEXT_SHARED_CPP__RMW_QOS_HPP_ diff --git a/rmw_connext_shared_cpp/package.xml b/rmw_connext_shared_cpp/package.xml index 9c1e6fce..20891919 100644 --- a/rmw_connext_shared_cpp/package.xml +++ b/rmw_connext_shared_cpp/package.xml @@ -24,6 +24,8 @@ connext_cmake_module rti-connext-dds-5.3.1 + rmw_dds_common + ament_lint_auto ament_lint_common diff --git a/rmw_connext_shared_cpp/src/rmw_qos.cpp b/rmw_connext_shared_cpp/src/rmw_qos.cpp new file mode 100644 index 00000000..aab0fbef --- /dev/null +++ b/rmw_connext_shared_cpp/src/rmw_qos.cpp @@ -0,0 +1,29 @@ +// Copyright 2021 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "rmw_dds_common/qos.hpp" + +#include "rmw_connext_shared_cpp/rmw_qos.hpp" + +rmw_ret_t +qos_profile_check_compatible( + const rmw_qos_profile_t publisher_profile, + const rmw_qos_profile_t subscription_profile, + rmw_qos_compatibility_type_t * compatibility, + char * reason, + size_t reason_size) +{ + return rmw_dds_common::qos_profile_check_compatible( + publisher_profile, subscription_profile, compatibility, reason, reason_size); +}