Skip to content

Commit 3a88dad

Browse files
cwechtivanpaunoChen Lihuiasorbinimauropasse
authored
Event listeners distinct (#109)
* Add sequence numbers to message info structure (#74) * Fill reception_sequence_number/publication_sequence_number in all rmw_take_*_with_info() functions Signed-off-by: Ivan Santiago Paunovic <[email protected]> * Add rmw_feature_supported() Signed-off-by: Ivan Santiago Paunovic <[email protected]> * add stub for content filtered topic (#77) * add stub for content filtered topic Signed-off-by: Chen Lihui <[email protected]> * Add support for user-specified content filters (#68) * Add support for user-specified content filters. Signed-off-by: Andrea Sorbini <[email protected]> * - Resolve memory leak of custom content-filter resources - Add missing package dependencies for rti_connext_dds_custom_sql_filter - Clean up all participants upon factory finalization - Reset context state upon finalization (rmw_connextddsmicro) Signed-off-by: Andrea Sorbini <[email protected]> * Assume non-null options argument Signed-off-by: Andrea Sorbini <[email protected]> * - Return error when retrieving content-filter from a subscription that doesn't have one. - Rename internal functions related to content-filters Signed-off-by: Andrea Sorbini <[email protected]> * Fix compilation error, oops. Signed-off-by: Andrea Sorbini <[email protected]> * - Define RMW_CONNEXT_DEBUG when building Debug libraries. - Make sure participant is enabled before deleting contained entities when using Connext debug libraries. Signed-off-by: Andrea Sorbini <[email protected]> * Resolve memory leak for finalization on error. Signed-off-by: Andrea Sorbini <[email protected]> * Rename content filter public API. Signed-off-by: Andrea Sorbini <[email protected]> * Add client/service QoS getters (#67) Signed-off-by: Mauro Passerino <[email protected]> * Changelogs Signed-off-by: Ivan Santiago Paunovic <[email protected]> * 0.8.1 * Fix cpplint errors (#69) * Use static_cast instead of C-style cast Fixes cpplint error. Signed-off-by: Jacob Perron <[email protected]> * Update NOLINT category Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <[email protected]> * 0.8.2 Signed-off-by: Audrow Nash <[email protected]> * Update rti-connext-dds dependency to 6.0.1. (#71) Now that this package is available in the ROS bootstrap repository for Ubuntu Focal and Jammy we can bump the expected dependency version. * 0.8.3 * Add rmw listener apis (#44) * Add stubs for setting listener callbacks Signed-off-by: Mauro Passerino <[email protected]> * Address PR suggestions Signed-off-by: Mauro Passerino <[email protected]> * Fix linter issues Signed-off-by: Mauro Passerino <[email protected]> Co-authored-by: Mauro Passerino <[email protected]> Co-authored-by: Alberto Soragna <[email protected]> * Changelog. (#73) Signed-off-by: Chris Lalancette <[email protected]> * 0.9.0 * add stub for content filtered topic Signed-off-by: Chen Lihui <[email protected]> * * Rebased branch asorbini/cft on top of 0.9.0. * Resolved CFT finalization issues on error. * Verified and cleaned up build for rmw_connextddsmicro. Signed-off-by: Andrea Sorbini <[email protected]> * Move custom SQL filter to rmw_connextdds_common Signed-off-by: Andrea Sorbini <[email protected]> * Try to resolve linking error on Windows. Signed-off-by: Andrea Sorbini <[email protected]> * Optionally disable writer-side CFT optimizations to support Windows. Signed-off-by: Andrea Sorbini <[email protected]> * No need to declare private CFT function on Windows. Signed-off-by: Andrea Sorbini <[email protected]> * remove stub implementation for ContentFilteredTopic. Signed-off-by: Tomoya Fujita <[email protected]> * address cpplint error. Signed-off-by: Tomoya Fujita <[email protected]> * Avoid conversion warnings on Windows. Signed-off-by: Andrea Sorbini <[email protected]> * Use strtol instead of sscanf to avoid warnings on Windows. Signed-off-by: Andrea Sorbini <[email protected]> * Avoid finalizing participants if factory is not available. Signed-off-by: Andrea Sorbini <[email protected]> Co-authored-by: mauropasse <[email protected]> Co-authored-by: Ivan Santiago Paunovic <[email protected]> Co-authored-by: Jacob Perron <[email protected]> Co-authored-by: Audrow Nash <[email protected]> Co-authored-by: Steven! Ragnarök <[email protected]> Co-authored-by: Steven! Ragnarök <[email protected]> Co-authored-by: iRobot ROS <[email protected]> Co-authored-by: Mauro Passerino <[email protected]> Co-authored-by: Alberto Soragna <[email protected]> Co-authored-by: Chris Lalancette <[email protected]> Co-authored-by: Chen Lihui <[email protected]> Co-authored-by: Tomoya Fujita <[email protected]> * 0.10.0 Signed-off-by: Audrow Nash <[email protected]> * Update launch_testing_ros output filter prefixes for Connext6 (#80) Signed-off-by: Ivan Santiago Paunovic <[email protected]> * Properly initialize CDR stream before using it for filtering (#81) Signed-off-by: Andrea Sorbini <[email protected]> * Exclude missing sample info fields when building rmw_connextddsmicro (#79) * Exclude missing sample info fields when building micro. * Report features individually for each RMW implementation. * Return special value for unsupported sequence numbers. Signed-off-by: Andrea Sorbini <[email protected]> Co-authored-by: Chris Lalancette <[email protected]> * 0.11.0 Signed-off-by: Audrow Nash <[email protected]> * Resolve build error with RTI Connext DDS 5.3.1 (#82) Signed-off-by: Andrea Sorbini <[email protected]> * Changelog. Signed-off-by: Chris Lalancette <[email protected]> * 0.11.1 * Use destinct callbacks for each event type --------- Signed-off-by: Ivan Santiago Paunovic <[email protected]> Signed-off-by: Chen Lihui <[email protected]> Signed-off-by: Audrow Nash <[email protected]> Signed-off-by: Andrea Sorbini <[email protected]> Signed-off-by: Chris Lalancette <[email protected]> Co-authored-by: Ivan Santiago Paunovic <[email protected]> Co-authored-by: Chen Lihui <[email protected]> Co-authored-by: Andrea Sorbini <[email protected]> Co-authored-by: mauropasse <[email protected]> Co-authored-by: Jacob Perron <[email protected]> Co-authored-by: Audrow Nash <[email protected]> Co-authored-by: Steven! Ragnarök <[email protected]> Co-authored-by: Steven! Ragnarök <[email protected]> Co-authored-by: iRobot ROS <[email protected]> Co-authored-by: Mauro Passerino <[email protected]> Co-authored-by: Alberto Soragna <[email protected]> Co-authored-by: Chris Lalancette <[email protected]> Co-authored-by: Tomoya Fujita <[email protected]>
1 parent 2dd4e92 commit 3a88dad

31 files changed

+1752
-155
lines changed

rmw_connextdds/CHANGELOG.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22
Changelog for package rmw_connextdds
33
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44

5+
0.11.1 (2022-04-26)
6+
-------------------
7+
8+
0.11.0 (2022-04-08)
9+
-------------------
10+
* Exclude missing sample info fields when building rmw_connextddsmicro (`#79 <https://github.com/ros2/rmw_connextdds/issues/79>`_)
11+
* Update launch_testing_ros output filter prefixes for Connext6 (`#80 <https://github.com/ros2/rmw_connextdds/issues/80>`_)
12+
* Contributors: Andrea Sorbini, Ivan Santiago Paunovic
13+
14+
0.10.0 (2022-03-28)
15+
-------------------
16+
* Add support for user-specified content filters (`#68 <https://github.com/ros2/rmw_connextdds/issues/68>`_)
17+
* add stub for content filtered topic (`#77 <https://github.com/ros2/rmw_connextdds/issues/77>`_)
18+
* Contributors: Andrea Sorbini, Chen Lihui, Ivan Santiago Paunovic
19+
520
0.9.0 (2022-03-01)
621
------------------
722
* Add rmw listener apis (`#44 <https://github.com/rticommunity/rmw_connextdds/issues/44>`_)

rmw_connextdds/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ ament_package(
7373
)
7474

7575
ament_index_register_resource("rmw_output_prefixes"
76-
CONTENT "RTI Data Distribution Service\nExpires on")
76+
CONTENT "RTI Data Distribution Service\nRTI Connext DDS\nExpires on")

rmw_connextdds/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
44
<name>rmw_connextdds</name>
5-
<version>0.9.0</version>
5+
<version>0.11.1</version>
66
<description>A ROS2 RMW implementation built with RTI Connext DDS Professional.</description>
77
<maintainer email="[email protected]">Andrea Sorbini</maintainer>
88
<license>Apache License 2.0</license>

rmw_connextdds/src/rmw_api_impl_ndds.cpp

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -716,6 +716,24 @@ rmw_subscription_get_actual_qos(
716716
return rmw_api_connextdds_subscription_get_actual_qos(subscription, qos);
717717
}
718718

719+
rmw_ret_t
720+
rmw_subscription_set_content_filter(
721+
rmw_subscription_t * subscription,
722+
const rmw_subscription_content_filter_options_t * options)
723+
{
724+
return rmw_api_connextdds_subscription_set_content_filter(
725+
subscription, options);
726+
}
727+
728+
rmw_ret_t
729+
rmw_subscription_get_content_filter(
730+
const rmw_subscription_t * subscription,
731+
rcutils_allocator_t * allocator,
732+
rmw_subscription_content_filter_options_t * options)
733+
{
734+
return rmw_api_connextdds_subscription_get_content_filter(
735+
subscription, allocator, options);
736+
}
719737

720738
rmw_ret_t
721739
rmw_destroy_subscription(
@@ -937,3 +955,22 @@ rmw_subscription_get_network_flow_endpoints(
937955
allocator,
938956
network_flow_endpoint_array);
939957
}
958+
959+
/******************************************************************************
960+
* Feature support functions
961+
******************************************************************************/
962+
bool
963+
rmw_feature_supported(rmw_feature_t feature)
964+
{
965+
switch (feature) {
966+
case RMW_FEATURE_MESSAGE_INFO_RECEPTION_SEQUENCE_NUMBER:
967+
case RMW_FEATURE_MESSAGE_INFO_PUBLICATION_SEQUENCE_NUMBER:
968+
{
969+
return true;
970+
}
971+
default:
972+
{
973+
return false;
974+
}
975+
}
976+
}

rmw_connextdds_common/CHANGELOG.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@
22
Changelog for package rmw_connextdds_common
33
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44

5+
0.11.1 (2022-04-26)
6+
-------------------
7+
* Resolve build error with RTI Connext DDS 5.3.1 (`#82 <https://github.com/ros2/rmw_connextdds/issues/82>`_)
8+
* Contributors: Andrea Sorbini
9+
10+
0.11.0 (2022-04-08)
11+
-------------------
12+
* Exclude missing sample info fields when building rmw_connextddsmicro (`#79 <https://github.com/ros2/rmw_connextdds/issues/79>`_)
13+
* Properly initialize CDR stream before using it for filtering (`#81 <https://github.com/ros2/rmw_connextdds/issues/81>`_)
14+
* Contributors: Andrea Sorbini
15+
16+
0.10.0 (2022-03-28)
17+
-------------------
18+
* Add support for user-specified content filters (`#68 <https://github.com/ros2/rmw_connextdds/issues/68>`_)
19+
* add stub for content filtered topic (`#77 <https://github.com/ros2/rmw_connextdds/issues/77>`_)
20+
* Add sequence numbers to message info structure (`#74 <https://github.com/ros2/rmw_connextdds/issues/74>`_)
21+
* Contributors: Andrea Sorbini, Chen Lihui, Ivan Santiago Paunovic
22+
523
0.9.0 (2022-03-01)
624
------------------
725
* Add rmw listener apis (`#44 <https://github.com/rticommunity/rmw_connextdds/issues/44>`_)

rmw_connextdds_common/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,19 @@ function(rtirmw_add_library)
6262
ament_target_dependencies(${_rti_build_NAME}
6363
${_rti_build_DEPS})
6464

65+
set(_extra_defines)
66+
if("${CMAKE_BUILD_TYPE}" MATCHES "[dD]ebug")
67+
list(APPEND _extra_defines "RMW_CONNEXT_DEBUG=1")
68+
endif()
69+
6570
target_compile_definitions(${_rti_build_NAME}
6671
PUBLIC
6772
RMW_VERSION_MAJOR=${rmw_VERSION_MAJOR}
6873
RMW_VERSION_MINOR=${rmw_VERSION_MINOR}
6974
RMW_VERSION_PATCH=${rmw_VERSION_PATCH}
7075
RMW_CONNEXT_DDS_API=RMW_CONNEXT_DDS_API_${_rti_build_API}
7176
${_rti_build_DEFINES}
77+
${_extra_defines}
7278
)
7379

7480
set(private_defines)
@@ -188,6 +194,9 @@ else()
188194
if("${CONNEXTDDS_VERSION}" VERSION_LESS "6.0.0")
189195
list(APPEND extra_defines "RMW_CONNEXT_DDS_API_PRO_LEGACY=1")
190196
endif()
197+
if(CONNEXTDDS_ARCH MATCHES ".*Win.*")
198+
list(APPEND extra_defines "RMW_CONNEXT_BUILTIN_CFT_COMPATIBILITY_MODE=1")
199+
endif()
191200
rtirmw_add_library(
192201
NAME ${PROJECT_NAME}_pro
193202
API PRO
@@ -196,8 +205,10 @@ else()
196205
src/ndds/rmw_type_support_ndds.cpp
197206
src/ndds/rmw_typecode.cpp
198207
src/ndds/dds_api_ndds.cpp
208+
src/ndds/custom_sql_filter.cpp
199209
include/rmw_connextdds/typecode.hpp
200210
include/rmw_connextdds/dds_api_ndds.hpp
211+
include/rmw_connextdds/custom_sql_filter.hpp
201212
DEPS ${RMW_CONNEXT_DEPS}
202213
LIBRARIES RTIConnextDDS::c_api
203214
DEFINES ${extra_defines})
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
// Copyright 2021 Real-Time Innovations, Inc. (RTI)
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
#ifndef RMW_CONNEXTDDS__CUSTOM_SQL_FILTER_HPP_
15+
#define RMW_CONNEXTDDS__CUSTOM_SQL_FILTER_HPP_
16+
17+
#include "rmw_connextdds/dds_api.hpp"
18+
19+
#if RMW_CONNEXT_DDS_API == RMW_CONNEXT_DDS_API_PRO
20+
21+
namespace rti_connext_dds_custom_sql_filter
22+
{
23+
24+
struct CustomSqlFilterData
25+
{
26+
DDS_SqlFilterGeneratorQos base;
27+
28+
CustomSqlFilterData();
29+
30+
DDS_ReturnCode_t
31+
set_memory_management_property(
32+
const DDS_DomainParticipantQos & dp_qos);
33+
};
34+
35+
RMW_CONNEXTDDS_PUBLIC
36+
DDS_ReturnCode_t
37+
register_content_filter(
38+
DDS_DomainParticipant * const participant,
39+
CustomSqlFilterData * const filter_data);
40+
41+
RMW_CONNEXTDDS_PUBLIC
42+
extern const char * const PLUGIN_NAME;
43+
44+
} // namespace rti_connext_dds_custom_sql_filter
45+
46+
#if !RMW_CONNEXT_BUILTIN_CFT_COMPATIBILITY_MODE
47+
extern "C" {
48+
// This is an internal function from RTI Connext DDS which allows a filter to
49+
// be registered as "built-in". We need this because we want this custom filter
50+
// to be a replacement for the built-in SQL-like filter.
51+
RMW_CONNEXTDDS_PUBLIC
52+
DDS_ReturnCode_t
53+
DDS_ContentFilter_register_filter(
54+
DDS_DomainParticipant * participant,
55+
const char * name,
56+
const struct DDS_ContentFilter * filter,
57+
const DDS_ContentFilterEvaluateFunction evaluateOnSerialized,
58+
const DDS_ContentFilterWriterEvaluateFunction writerEvaluateOnSerialized,
59+
const DDS_ContentFilterQueryFunction query,
60+
DDS_Boolean isBuiltin);
61+
}
62+
#endif // RMW_CONNEXT_BUILTIN_CFT_COMPATIBILITY_MODE
63+
64+
#endif // RMW_CONNEXT_DDS_API == RMW_CONNEXT_DDS_API_PRO
65+
66+
#endif // RMW_CONNEXTDDS__CUSTOM_SQL_FILTER_HPP_

rmw_connextdds_common/include/rmw_connextdds/dds_api.hpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,19 @@ rmw_connextdds_initialize_participant_qos_impl(
6565
rmw_context_impl_t * const ctx,
6666
DDS_DomainParticipantQos * const dp_qos);
6767

68+
rmw_ret_t
69+
rmw_connextdds_configure_participant(
70+
rmw_context_impl_t * const ctx,
71+
DDS_DomainParticipant * const participant);
72+
6873
rmw_ret_t
6974
rmw_connextdds_create_contentfilteredtopic(
7075
rmw_context_impl_t * const ctx,
7176
DDS_DomainParticipant * const dp,
7277
DDS_Topic * const base_topic,
7378
const char * const cft_name,
7479
const char * const cft_filter,
80+
const rcutils_string_array_t * const cft_expression_parameters,
7581
DDS_TopicDescription ** const cft_out);
7682

7783
rmw_ret_t
@@ -263,4 +269,16 @@ rmw_connextdds_enable_security(
263269
DDS_SECURITY_PROPERTY_PREFIX ".logging.log_level"
264270
#endif /* DDS_SECURITY_LOGGING_LEVEL_PROPERTY */
265271

272+
rmw_ret_t
273+
rmw_connextdds_set_cft_filter_expression(
274+
DDS_TopicDescription * const topic_desc,
275+
const char * const cft_expression,
276+
const rcutils_string_array_t * const cft_expression_parameters);
277+
278+
rmw_ret_t
279+
rmw_connextdds_get_cft_filter_expression(
280+
DDS_TopicDescription * const topic_desc,
281+
rcutils_allocator_t * const allocator,
282+
rmw_subscription_content_filter_options_t * const options);
283+
266284
#endif // RMW_CONNEXTDDS__DDS_API_HPP_

rmw_connextdds_common/include/rmw_connextdds/dds_api_ndds.hpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,6 @@
1919

2020
#include "rcutils/types.h"
2121

22-
DDS_SEQUENCE(RMW_Connext_Uint8ArrayPtrSeq, rcutils_uint8_array_t *);
23-
24-
typedef RMW_Connext_Uint8ArrayPtrSeq RMW_Connext_UntypedSampleSeq;
25-
26-
#define RMW_Connext_UntypedSampleSeq_INITIALIZER DDS_SEQUENCE_INITIALIZER
27-
28-
#define DDS_UntypedSampleSeq_get_reference(seq_, i_) \
29-
*RMW_Connext_Uint8ArrayPtrSeq_get_reference(seq_, i_)
30-
31-
#define DDS_UntypedSampleSeq_get_length(seq_) \
32-
RMW_Connext_Uint8ArrayPtrSeq_get_length(seq_)
33-
3422
#if RMW_CONNEXT_DDS_API_PRO_LEGACY
3523
#ifndef RTIXCdrLong_MAX
3624
#define RTIXCdrLong_MAX 2147483647

rmw_connextdds_common/include/rmw_connextdds/rmw_api_impl.hpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
#include "rmw_connextdds/context.hpp"
1919

20+
#include "rmw/features.h"
21+
2022
/*****************************************************************************
2123
* Context API
2224
*****************************************************************************/
@@ -481,6 +483,18 @@ rmw_api_connextdds_subscription_get_actual_qos(
481483
const rmw_subscription_t * subscription,
482484
rmw_qos_profile_t * qos);
483485

486+
RMW_CONNEXTDDS_PUBLIC
487+
rmw_ret_t
488+
rmw_api_connextdds_subscription_set_content_filter(
489+
rmw_subscription_t * subscription,
490+
const rmw_subscription_content_filter_options_t * options);
491+
492+
RMW_CONNEXTDDS_PUBLIC
493+
rmw_ret_t
494+
rmw_api_connextdds_subscription_get_content_filter(
495+
const rmw_subscription_t * subscription,
496+
rcutils_allocator_t * const allocator,
497+
rmw_subscription_content_filter_options_t * options);
484498

485499
RMW_CONNEXTDDS_PUBLIC
486500
rmw_ret_t
@@ -637,4 +651,11 @@ rmw_api_connextdds_subscription_get_network_flow_endpoints(
637651
rcutils_allocator_t * allocator,
638652
rmw_network_flow_endpoint_array_t * network_flow_endpoint_array);
639653

654+
/******************************************************************************
655+
* Feature support functions
656+
******************************************************************************/
657+
RMW_CONNEXTDDS_PUBLIC
658+
bool
659+
rmw_api_connextdds_feature_supported(rmw_feature_t feature);
660+
640661
#endif // RMW_CONNEXTDDS__RMW_API_IMPL_HPP_

0 commit comments

Comments
 (0)