diff --git a/rmw_cyclonedds_cpp/CMakeLists.txt b/rmw_cyclonedds_cpp/CMakeLists.txt index 8e827481..9b1de71f 100644 --- a/rmw_cyclonedds_cpp/CMakeLists.txt +++ b/rmw_cyclonedds_cpp/CMakeLists.txt @@ -53,6 +53,7 @@ ament_export_dependencies(rosidl_typesupport_introspection_c) ament_export_dependencies(rosidl_typesupport_introspection_cpp) add_library(rmw_cyclonedds_cpp + src/rmw_get_network_flow_endpoints.cpp src/rmw_node.cpp src/serdata.cpp src/serdes.cpp diff --git a/rmw_cyclonedds_cpp/src/rmw_get_network_flow_endpoints.cpp b/rmw_cyclonedds_cpp/src/rmw_get_network_flow_endpoints.cpp new file mode 100644 index 00000000..6dd25125 --- /dev/null +++ b/rmw_cyclonedds_cpp/src/rmw_get_network_flow_endpoints.cpp @@ -0,0 +1,47 @@ +// Copyright 2021 Ericsson AB +// +// 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_network_flow_endpoints.h" +#include "rmw/rmw.h" +#include "rmw/types.h" + +extern "C" +{ +rmw_ret_t +rmw_publisher_get_network_flow_endpoints( + const rmw_publisher_t * publisher, + rcutils_allocator_t * allocator, + rmw_network_flow_endpoint_array_t * network_flow_endpoint_array) +{ + (void) publisher; + (void) allocator; + (void) network_flow_endpoint_array; + RMW_SET_ERROR_MSG("rmw_publisher_get_network_flow_endpoints not implemented"); + return RMW_RET_UNSUPPORTED; +} + +rmw_ret_t +rmw_subscription_get_network_flow_endpoints( + const rmw_subscription_t * subscription, + rcutils_allocator_t * allocator, + rmw_network_flow_endpoint_array_t * network_flow_endpoint_array) +{ + (void) subscription; + (void) allocator; + (void) network_flow_endpoint_array; + RMW_SET_ERROR_MSG("rmw_subscription_get_network_flow_endpoints not implemented"); + return RMW_RET_UNSUPPORTED; +} +} // extern "C" diff --git a/rmw_cyclonedds_cpp/src/rmw_node.cpp b/rmw_cyclonedds_cpp/src/rmw_node.cpp index dc3dc2e2..48834804 100644 --- a/rmw_cyclonedds_cpp/src/rmw_node.cpp +++ b/rmw_cyclonedds_cpp/src/rmw_node.cpp @@ -2047,6 +2047,13 @@ extern "C" rmw_publisher_t * rmw_create_publisher( } } RMW_CHECK_ARGUMENT_FOR_NULL(publisher_options, nullptr); + if (publisher_options->require_unique_network_flow_endpoints == + RMW_UNIQUE_NETWORK_FLOW_ENDPOINTS_STRICTLY_REQUIRED) + { + RMW_SET_ERROR_MSG( + "Strict requirement on unique network flow endpoints for publishers not supported"); + return nullptr; + } rmw_publisher_t * pub = create_publisher( node->context->impl->ppant, node->context->impl->dds_pub, @@ -2425,6 +2432,13 @@ extern "C" rmw_subscription_t * rmw_create_subscription( } } RMW_CHECK_ARGUMENT_FOR_NULL(subscription_options, nullptr); + if (subscription_options->require_unique_network_flow_endpoints == + RMW_UNIQUE_NETWORK_FLOW_ENDPOINTS_STRICTLY_REQUIRED) + { + RMW_SET_ERROR_MSG( + "Strict requirement on unique network flow endpoints for subscriptions not supported"); + return nullptr; + } rmw_subscription_t * sub = create_subscription( node->context->impl->ppant, node->context->impl->dds_sub,