From 5ac238a2c70e6c16ed82067188f390e099388523 Mon Sep 17 00:00:00 2001 From: yamacir-kit Date: Thu, 19 Dec 2024 12:03:00 +0900 Subject: [PATCH] Rename class `SubscriberWrapper` to `Subscriber` Signed-off-by: yamacir-kit --- .../include/concealer/autoware_universe.hpp | 10 +++++----- .../concealer/field_operator_application.hpp | 20 +++++++++---------- ...{subscriber_wrapper.hpp => subscriber.hpp} | 12 +++++------ 3 files changed, 21 insertions(+), 21 deletions(-) rename external/concealer/include/concealer/{subscriber_wrapper.hpp => subscriber.hpp} (89%) diff --git a/external/concealer/include/concealer/autoware_universe.hpp b/external/concealer/include/concealer/autoware_universe.hpp index 8a0be6efd3e..dddaf9adbb5 100644 --- a/external/concealer/include/concealer/autoware_universe.hpp +++ b/external/concealer/include/concealer/autoware_universe.hpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include @@ -57,10 +57,10 @@ class AutowareUniverse : public rclcpp::Node, using TurnIndicatorsReport = autoware_vehicle_msgs::msg::TurnIndicatorsReport; using VelocityReport = autoware_vehicle_msgs::msg::VelocityReport; - SubscriberWrapper getCommand; - SubscriberWrapper getGearCommand; - SubscriberWrapper getTurnIndicatorsCommand; - SubscriberWrapper getPathWithLaneId; + Subscriber getCommand; + Subscriber getGearCommand; + Subscriber getTurnIndicatorsCommand; + Subscriber getPathWithLaneId; Publisher setAcceleration; Publisher setOdometry; diff --git a/external/concealer/include/concealer/field_operator_application.hpp b/external/concealer/include/concealer/field_operator_application.hpp index 59a640032a7..7b70906fc25 100644 --- a/external/concealer/include/concealer/field_operator_application.hpp +++ b/external/concealer/include/concealer/field_operator_application.hpp @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include #include @@ -107,17 +107,17 @@ struct FieldOperatorApplication : public rclcpp::Node, using SetVelocityLimit = tier4_external_api_msgs::srv::SetVelocityLimit; using ChangeOperationMode = autoware_adapi_v1_msgs::srv::ChangeOperationMode; - SubscriberWrapper getAutowareState; - SubscriberWrapper getCommand; - SubscriberWrapper getCooperateStatusArray; - SubscriberWrapper getEmergencyState; + Subscriber getAutowareState; + Subscriber getCommand; + Subscriber getCooperateStatusArray; + Subscriber getEmergencyState; #if __has_include() - SubscriberWrapper getLocalizationState; + Subscriber getLocalizationState; #endif - SubscriberWrapper getMrmState; - SubscriberWrapper getPathWithLaneId; - SubscriberWrapper getTrajectory; - SubscriberWrapper getTurnIndicatorsCommand; + Subscriber getMrmState; + Subscriber getPathWithLaneId; + Subscriber getTrajectory; + Subscriber getTurnIndicatorsCommand; ServiceWithValidation requestClearRoute; ServiceWithValidation requestCooperateCommands; diff --git a/external/concealer/include/concealer/subscriber_wrapper.hpp b/external/concealer/include/concealer/subscriber.hpp similarity index 89% rename from external/concealer/include/concealer/subscriber_wrapper.hpp rename to external/concealer/include/concealer/subscriber.hpp index eb4fde75af0..e32a51ab9a4 100644 --- a/external/concealer/include/concealer/subscriber_wrapper.hpp +++ b/external/concealer/include/concealer/subscriber.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef CONCEALER__SUBSCRIBER_WRAPPER_HPP_ -#define CONCEALER__SUBSCRIBER_WRAPPER_HPP_ +#ifndef CONCEALER__SUBSCRIBER_HPP_ +#define CONCEALER__SUBSCRIBER_HPP_ #include #include @@ -21,7 +21,7 @@ namespace concealer { template -class SubscriberWrapper +class Subscriber { typename Message::ConstSharedPtr current_value = std::make_shared(); @@ -31,7 +31,7 @@ class SubscriberWrapper auto operator()() const -> const auto & { return *std::atomic_load(¤t_value); } template - explicit SubscriberWrapper( + explicit Subscriber( const std::string & topic, const rclcpp::QoS & quality_of_service, Autoware & autoware, const Callback & callback) : subscription(autoware.template create_subscription( @@ -45,7 +45,7 @@ class SubscriberWrapper } template - explicit SubscriberWrapper( + explicit Subscriber( const std::string & topic, const rclcpp::QoS & quality_of_service, Autoware & autoware) : subscription(autoware.template create_subscription( topic, quality_of_service, [this](const typename Message::ConstSharedPtr & message) { @@ -56,4 +56,4 @@ class SubscriberWrapper }; } // namespace concealer -#endif // CONCEALER__SUBSCRIBER_WRAPPER_HPP_ +#endif // CONCEALER__SUBSCRIBER_HPP_