From 64267eaf65885a256adeb09a443cc2669cecfcdb Mon Sep 17 00:00:00 2001 From: Miaofei Date: Wed, 11 Dec 2019 12:14:06 -0800 Subject: [PATCH 1/2] add stubs for rmw_get_publishers_info_by_topic and rmw_get_subscriptions_info_by_topic --- rmw_cyclonedds_cpp/CMakeLists.txt | 1 + rmw_cyclonedds_cpp/src/rmw_get_topic_info.cpp | 42 +++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 rmw_cyclonedds_cpp/src/rmw_get_topic_info.cpp diff --git a/rmw_cyclonedds_cpp/CMakeLists.txt b/rmw_cyclonedds_cpp/CMakeLists.txt index fe819f18..7a67bd7d 100644 --- a/rmw_cyclonedds_cpp/CMakeLists.txt +++ b/rmw_cyclonedds_cpp/CMakeLists.txt @@ -50,6 +50,7 @@ ament_export_dependencies(rosidl_typesupport_introspection_cpp) add_library(rmw_cyclonedds_cpp src/rmw_node.cpp + src/rmw_get_topic_info.cpp src/serdata.cpp src/serdes.cpp src/graphrhc.cpp diff --git a/rmw_cyclonedds_cpp/src/rmw_get_topic_info.cpp b/rmw_cyclonedds_cpp/src/rmw_get_topic_info.cpp new file mode 100644 index 00000000..205d5234 --- /dev/null +++ b/rmw_cyclonedds_cpp/src/rmw_get_topic_info.cpp @@ -0,0 +1,42 @@ +// Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// +// 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/error_handling.h" +#include "rmw/get_topic_info.h" +#include "rmw/topic_info_array.h" + +extern "C" +{ +rmw_ret_t +rmw_get_publishers_info_by_topic( + const rmw_node_t * /* unused_param */, + rcutils_allocator_t * /* unused_param */, + const char * /* unused_param */, + bool /* unused_param */, + rmw_topic_info_array_t * /* unused_param */) +{ + return RMW_RET_UNSUPPORTED; +} + +rmw_ret_t +rmw_get_subscriptions_info_by_topic( + const rmw_node_t * /* unused_param */, + rcutils_allocator_t * /* unused_param */, + const char * /* unused_param */, + bool /* unused_param */, + rmw_topic_info_array_t * /* unused_param */) +{ + return RMW_RET_UNSUPPORTED; +} +} // extern "C" From aeaebafbce6b2af45f6a1bd040c0b488e71bf99a Mon Sep 17 00:00:00 2001 From: Miaofei Date: Thu, 9 Jan 2020 23:44:37 -0800 Subject: [PATCH 2/2] rename *topic_info* to *topic_endpoint_info* Signed-off-by: Miaofei --- rmw_cyclonedds_cpp/CMakeLists.txt | 2 +- ...get_topic_info.cpp => rmw_get_topic_endpoint_info.cpp} | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) rename rmw_cyclonedds_cpp/src/{rmw_get_topic_info.cpp => rmw_get_topic_endpoint_info.cpp} (85%) diff --git a/rmw_cyclonedds_cpp/CMakeLists.txt b/rmw_cyclonedds_cpp/CMakeLists.txt index 7a67bd7d..9736e5a6 100644 --- a/rmw_cyclonedds_cpp/CMakeLists.txt +++ b/rmw_cyclonedds_cpp/CMakeLists.txt @@ -50,7 +50,7 @@ ament_export_dependencies(rosidl_typesupport_introspection_cpp) add_library(rmw_cyclonedds_cpp src/rmw_node.cpp - src/rmw_get_topic_info.cpp + src/rmw_get_topic_endpoint_info.cpp src/serdata.cpp src/serdes.cpp src/graphrhc.cpp diff --git a/rmw_cyclonedds_cpp/src/rmw_get_topic_info.cpp b/rmw_cyclonedds_cpp/src/rmw_get_topic_endpoint_info.cpp similarity index 85% rename from rmw_cyclonedds_cpp/src/rmw_get_topic_info.cpp rename to rmw_cyclonedds_cpp/src/rmw_get_topic_endpoint_info.cpp index 205d5234..6b482d74 100644 --- a/rmw_cyclonedds_cpp/src/rmw_get_topic_info.cpp +++ b/rmw_cyclonedds_cpp/src/rmw_get_topic_endpoint_info.cpp @@ -13,8 +13,8 @@ // limitations under the License. #include "rmw/error_handling.h" -#include "rmw/get_topic_info.h" -#include "rmw/topic_info_array.h" +#include "rmw/get_topic_endpoint_info.h" +#include "rmw/topic_endpoint_info_array.h" extern "C" { @@ -24,7 +24,7 @@ rmw_get_publishers_info_by_topic( rcutils_allocator_t * /* unused_param */, const char * /* unused_param */, bool /* unused_param */, - rmw_topic_info_array_t * /* unused_param */) + rmw_topic_endpoint_info_array_t * /* unused_param */) { return RMW_RET_UNSUPPORTED; } @@ -35,7 +35,7 @@ rmw_get_subscriptions_info_by_topic( rcutils_allocator_t * /* unused_param */, const char * /* unused_param */, bool /* unused_param */, - rmw_topic_info_array_t * /* unused_param */) + rmw_topic_endpoint_info_array_t * /* unused_param */) { return RMW_RET_UNSUPPORTED; }