-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for user-specified content filters (#68)
* Add support for user-specified content filters. Signed-off-by: Andrea Sorbini <asorbini@rti.com> * - 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 <asorbini@rti.com> * Assume non-null options argument Signed-off-by: Andrea Sorbini <asorbini@rti.com> * - 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 <asorbini@rti.com> * Fix compilation error, oops. Signed-off-by: Andrea Sorbini <asorbini@rti.com> * - 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 <asorbini@rti.com> * Resolve memory leak for finalization on error. Signed-off-by: Andrea Sorbini <asorbini@rti.com> * Rename content filter public API. Signed-off-by: Andrea Sorbini <asorbini@rti.com> * Add client/service QoS getters (#67) Signed-off-by: Mauro Passerino <mpasserino@irobot.com> * Changelogs Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com> * 0.8.1 * Fix cpplint errors (#69) * Use static_cast instead of C-style cast Fixes cpplint error. Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Update NOLINT category Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <jacob@openrobotics.org> * 0.8.2 Signed-off-by: Audrow Nash <audrow@hey.com> * 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 <mpasserino@irobot.com> * Address PR suggestions Signed-off-by: Mauro Passerino <mpasserino@irobot.com> * Fix linter issues Signed-off-by: Mauro Passerino <mpasserino@irobot.com> Co-authored-by: Mauro Passerino <mpasserino@irobot.com> Co-authored-by: Alberto Soragna <alberto.soragna@gmail.com> * Changelog. (#73) Signed-off-by: Chris Lalancette <clalancette@openrobotics.org> * 0.9.0 * add stub for content filtered topic Signed-off-by: Chen Lihui <lihui.chen@sony.com> * * 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 <asorbini@rti.com> * Move custom SQL filter to rmw_connextdds_common Signed-off-by: Andrea Sorbini <asorbini@rti.com> * Try to resolve linking error on Windows. Signed-off-by: Andrea Sorbini <asorbini@rti.com> * Optionally disable writer-side CFT optimizations to support Windows. Signed-off-by: Andrea Sorbini <asorbini@rti.com> * No need to declare private CFT function on Windows. Signed-off-by: Andrea Sorbini <asorbini@rti.com> * remove stub implementation for ContentFilteredTopic. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> * address cpplint error. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> * Avoid conversion warnings on Windows. Signed-off-by: Andrea Sorbini <asorbini@rti.com> * Use strtol instead of sscanf to avoid warnings on Windows. Signed-off-by: Andrea Sorbini <asorbini@rti.com> * Avoid finalizing participants if factory is not available. Signed-off-by: Andrea Sorbini <asorbini@rti.com> Co-authored-by: mauropasse <mauropasse@hotmail.com> Co-authored-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com> Co-authored-by: Jacob Perron <jacob@openrobotics.org> Co-authored-by: Audrow Nash <audrow@hey.com> Co-authored-by: Steven! Ragnarök <nuclearsandwich@users.noreply.github.com> Co-authored-by: Steven! Ragnarök <steven@nuclearsandwich.com> Co-authored-by: iRobot ROS <49500531+irobot-ros@users.noreply.github.com> Co-authored-by: Mauro Passerino <mpasserino@irobot.com> Co-authored-by: Alberto Soragna <alberto.soragna@gmail.com> Co-authored-by: Chris Lalancette <clalancette@openrobotics.org> Co-authored-by: Chen Lihui <lihui.chen@sony.com> Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
- Loading branch information
1 parent
898e570
commit 2c97c79
Showing
19 changed files
with
1,566 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
rmw_connextdds_common/include/rmw_connextdds/custom_sql_filter.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// Copyright 2021 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. | ||
#ifndef RMW_CONNEXTDDS__CUSTOM_SQL_FILTER_HPP_ | ||
#define RMW_CONNEXTDDS__CUSTOM_SQL_FILTER_HPP_ | ||
|
||
#include "rmw_connextdds/dds_api.hpp" | ||
|
||
#if RMW_CONNEXT_DDS_API == RMW_CONNEXT_DDS_API_PRO | ||
|
||
namespace rti_connext_dds_custom_sql_filter | ||
{ | ||
|
||
struct CustomSqlFilterData | ||
{ | ||
DDS_SqlFilterGeneratorQos base; | ||
|
||
CustomSqlFilterData(); | ||
|
||
DDS_ReturnCode_t | ||
set_memory_management_property( | ||
const DDS_DomainParticipantQos & dp_qos); | ||
}; | ||
|
||
RMW_CONNEXTDDS_PUBLIC | ||
DDS_ReturnCode_t | ||
register_content_filter( | ||
DDS_DomainParticipant * const participant, | ||
CustomSqlFilterData * const filter_data); | ||
|
||
RMW_CONNEXTDDS_PUBLIC | ||
extern const char * const PLUGIN_NAME; | ||
|
||
} // namespace rti_connext_dds_custom_sql_filter | ||
|
||
#if !RMW_CONNEXT_BUILTIN_CFT_COMPATIBILITY_MODE | ||
extern "C" { | ||
// This is an internal function from RTI Connext DDS which allows a filter to | ||
// be registered as "built-in". We need this because we want this custom filter | ||
// to be a replacement for the built-in SQL-like filter. | ||
RMW_CONNEXTDDS_PUBLIC | ||
DDS_ReturnCode_t | ||
DDS_ContentFilter_register_filter( | ||
DDS_DomainParticipant * participant, | ||
const char * name, | ||
const struct DDS_ContentFilter * filter, | ||
const DDS_ContentFilterEvaluateFunction evaluateOnSerialized, | ||
const DDS_ContentFilterWriterEvaluateFunction writerEvaluateOnSerialized, | ||
const DDS_ContentFilterQueryFunction query, | ||
DDS_Boolean isBuiltin); | ||
} | ||
#endif // RMW_CONNEXT_BUILTIN_CFT_COMPATIBILITY_MODE | ||
|
||
#endif // RMW_CONNEXT_DDS_API == RMW_CONNEXT_DDS_API_PRO | ||
|
||
#endif // RMW_CONNEXTDDS__CUSTOM_SQL_FILTER_HPP_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.