diff --git a/rmw_connextdds/src/rmw_api_impl_ndds.cpp b/rmw_connextdds/src/rmw_api_impl_ndds.cpp index 19251f1c..ae9e9356 100644 --- a/rmw_connextdds/src/rmw_api_impl_ndds.cpp +++ b/rmw_connextdds/src/rmw_api_impl_ndds.cpp @@ -962,5 +962,15 @@ rmw_subscription_get_network_flow_endpoints( bool rmw_feature_supported(rmw_feature_t feature) { - return rmw_api_connextdds_feature_supported(feature); + switch (feature) { + case RMW_FEATURE_MESSAGE_INFO_RECEPTION_SEQUENCE_NUMBER: + case RMW_FEATURE_MESSAGE_INFO_PUBLICATION_SEQUENCE_NUMBER: + { + return true; + } + default: + { + return false; + } + } } diff --git a/rmw_connextdds_common/CMakeLists.txt b/rmw_connextdds_common/CMakeLists.txt index 86ef857b..aea621d6 100644 --- a/rmw_connextdds_common/CMakeLists.txt +++ b/rmw_connextdds_common/CMakeLists.txt @@ -135,7 +135,6 @@ set(RMW_CONNEXT_COMMON_SOURCE_CPP src/common/rmw_network_flow_endpoints.cpp src/common/rmw_graph.cpp src/common/rmw_event.cpp - src/common/rmw_features.cpp src/common/rmw_impl.cpp src/common/rmw_impl_waitset_std.cpp src/common/rmw_info.cpp diff --git a/rmw_connextdds_common/src/common/rmw_features.cpp b/rmw_connextdds_common/src/common/rmw_features.cpp deleted file mode 100644 index c94092cd..00000000 --- a/rmw_connextdds_common/src/common/rmw_features.cpp +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2022 Real-Time Innovations, Inc. (RTI) -// -// 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_connextdds/rmw_impl.hpp" - -#include "rmw/features.h" - -/****************************************************************************** - * Feature supported functions - ******************************************************************************/ - -bool -rmw_api_connextdds_feature_supported(rmw_feature_t feature) -{ - if ( - feature == RMW_FEATURE_MESSAGE_INFO_PUBLICATION_SEQUENCE_NUMBER || - feature == RMW_FEATURE_MESSAGE_INFO_RECEPTION_SEQUENCE_NUMBER) - { - return true; - } - return false; -} diff --git a/rmw_connextdds_common/src/common/rmw_impl.cpp b/rmw_connextdds_common/src/common/rmw_impl.cpp index c8f63928..c453bf71 100644 --- a/rmw_connextdds_common/src/common/rmw_impl.cpp +++ b/rmw_connextdds_common/src/common/rmw_impl.cpp @@ -1970,9 +1970,13 @@ rmw_connextdds_message_info_from_dds( to->publication_sequence_number = static_cast((from->publication_sequence_number).high) << 32 | static_cast((from->publication_sequence_number).low); +#if RMW_CONNEXT_DDS_API == RMW_CONNEXT_DDS_API_PRO to->reception_sequence_number = static_cast((from->reception_sequence_number).high) << 32 | static_cast((from->reception_sequence_number).low); +#else + to->reception_sequence_number = RMW_MESSAGE_INFO_SEQUENCE_NUMBER_UNSUPPORTED; +#endif // RMW_CONNEXT_DDS_API == RMW_CONNEXT_DDS_API_PRO } /****************************************************************************** diff --git a/rmw_connextddsmicro/src/rmw_api_impl_rtime.cpp b/rmw_connextddsmicro/src/rmw_api_impl_rtime.cpp index 7d1f6cc8..c70b1b69 100644 --- a/rmw_connextddsmicro/src/rmw_api_impl_rtime.cpp +++ b/rmw_connextddsmicro/src/rmw_api_impl_rtime.cpp @@ -967,5 +967,14 @@ rmw_subscription_get_network_flow_endpoints( bool rmw_feature_supported(rmw_feature_t feature) { - return rmw_api_connextdds_feature_supported(feature); + switch (feature) { + case RMW_FEATURE_MESSAGE_INFO_PUBLICATION_SEQUENCE_NUMBER: + { + return true; + } + default: + { + return false; + } + } }