-
Notifications
You must be signed in to change notification settings - Fork 435
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add content-filtered-topic interfaces (#1561)
* to support a feature of content filtered topic Signed-off-by: Chen Lihui <[email protected]> * update for checking memory allocated Signed-off-by: Chen Lihui <[email protected]> * set expression parameter only if filter is valid Signed-off-by: Chen Lihui <[email protected]> * add test Signed-off-by: Chen Lihui <[email protected]> * use a default empty value for expresion parameters Signed-off-by: Chen Lihui <[email protected]> * remove std_msgs dependency Signed-off-by: Chen Lihui <[email protected]> * use new rcl interface Signed-off-by: Chen Lihui <[email protected]> * remove unused include header files and fix unscrutify Signed-off-by: Chen Lihui <[email protected]> * update comment Signed-off-by: Chen Lihui <[email protected]> * update comment Signed-off-by: Chen Lihui <[email protected]> * rename Signed-off-by: Chen Lihui <[email protected]> * refactor test Signed-off-by: Chen Lihui <[email protected]> * relate to `rcutils_string_array_t expression_parameters` changed in rmw Signed-off-by: Chen Lihui <[email protected]> * remove the implementation temporary, add them with fallback in the feature 1. add DEFINE_CONTENT_FILTER with default(ON) to build content filter interfaces 2. user need a compile option(CONTENT_FILTER_ENABLE) to turn on the feature to set the filter or call the interfaces Signed-off-by: Chen Lihui <[email protected]> * update comments and check the option to build content filter test Signed-off-by: Chen Lihui <[email protected]> * add DDS content filter implementation Signed-off-by: Chen Lihui <[email protected]> * address review Signed-off-by: Chen Lihui <[email protected]> * rcl api changed Signed-off-by: Chen Lihui <[email protected]> * increase the filter propagation time Signed-off-by: Chen Lihui <[email protected]> * add rclcpp::ContentFilterOptions and use it as the return type of get_content_filter Signed-off-by: Chen Lihui <[email protected]> * increase the maximun time to wait message event and content filter propagation Signed-off-by: Chen Lihui <[email protected]> * cft member should be defined in the structure. to check the macro for interfaces is enough. Signed-off-by: Chen Lihui <[email protected]> * set test timeout to 120 Signed-off-by: Chen Lihui <[email protected]> * update doc Signed-off-by: Chen Lihui <[email protected]>
- Loading branch information
Chen Lihui
authored
Apr 4, 2022
1 parent
0699aeb
commit 03fa731
Showing
9 changed files
with
545 additions
and
0 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
38 changes: 38 additions & 0 deletions
38
rclcpp/include/rclcpp/subscription_content_filter_options.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,38 @@ | ||
// Copyright 2022 Open Source Robotics Foundation, Inc. | ||
// | ||
// 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 RCLCPP__SUBSCRIPTION_CONTENT_FILTER_OPTIONS_HPP_ | ||
#define RCLCPP__SUBSCRIPTION_CONTENT_FILTER_OPTIONS_HPP_ | ||
|
||
#include <string> | ||
#include <vector> | ||
|
||
namespace rclcpp | ||
{ | ||
|
||
/// Options to configure content filtered topic in the subscription. | ||
struct ContentFilterOptions | ||
{ | ||
/// Filter expression is similar to the WHERE part of an SQL clause. | ||
std::string filter_expression; | ||
/** | ||
* Expression parameters is the tokens placeholder ‘parameters’ (i.e., "%n" tokens begin from 0) | ||
* in the filter_expression. The maximum expression_parameters size is 100. | ||
*/ | ||
std::vector<std::string> expression_parameters; | ||
}; | ||
|
||
} // namespace rclcpp | ||
|
||
#endif // RCLCPP__SUBSCRIPTION_CONTENT_FILTER_OPTIONS_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
Oops, something went wrong.