From 31694b5db65eabdbb295a57434c0c4df6a5d9165 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Tue, 11 Mar 2025 10:17:16 +0100 Subject: [PATCH] Added rmw_event_type_is_supported (#809) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added rmw_event_check_compatible Signed-off-by: Alejandro Hernandez Cordero * Fixed build Signed-off-by: Alejandro Hernandez Cordero * included review feedback Signed-off-by: Alejandro Hernandez Cordero * review feedback Signed-off-by: Alejandro Hernandez Cordero * Update rmw_fastrtps_cpp/src/rmw_event.cpp Co-authored-by: Miguel Company Signed-off-by: Alejandro Hernández Cordero * make linters happy Signed-off-by: Alejandro Hernandez Cordero --------- Signed-off-by: Alejandro Hernandez Cordero Signed-off-by: Alejandro Hernández Cordero Co-authored-by: Miguel Company (cherry picked from commit f202dff4251a62b829faba041f7a89f7d04447d8) --- rmw_fastrtps_cpp/src/rmw_event.cpp | 6 ++++++ rmw_fastrtps_dynamic_cpp/src/rmw_event.cpp | 6 ++++++ .../include/rmw_fastrtps_shared_cpp/rmw_common.hpp | 4 ++++ rmw_fastrtps_shared_cpp/src/rmw_event.cpp | 6 ++++++ 4 files changed, 22 insertions(+) diff --git a/rmw_fastrtps_cpp/src/rmw_event.cpp b/rmw_fastrtps_cpp/src/rmw_event.cpp index 56d8779e25..dc8ced7be5 100644 --- a/rmw_fastrtps_cpp/src/rmw_event.cpp +++ b/rmw_fastrtps_cpp/src/rmw_event.cpp @@ -61,4 +61,10 @@ rmw_event_set_callback( callback, user_data); } + +bool +rmw_event_type_is_supported(rmw_event_type_t rmw_event_type) +{ + return rmw_fastrtps_shared_cpp::__rmw_event_type_is_supported(rmw_event_type); +} } // extern "C" diff --git a/rmw_fastrtps_dynamic_cpp/src/rmw_event.cpp b/rmw_fastrtps_dynamic_cpp/src/rmw_event.cpp index 13163579d7..cdb61ea8b0 100644 --- a/rmw_fastrtps_dynamic_cpp/src/rmw_event.cpp +++ b/rmw_fastrtps_dynamic_cpp/src/rmw_event.cpp @@ -61,4 +61,10 @@ rmw_event_set_callback( callback, user_data); } + +bool +rmw_event_type_is_supported(rmw_event_type_t rmw_event_type) +{ + return rmw_fastrtps_shared_cpp::__rmw_event_type_is_supported(rmw_event_type); +} } // extern "C" diff --git a/rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/rmw_common.hpp b/rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/rmw_common.hpp index 1b4f73bc35..98ebf7d3d9 100644 --- a/rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/rmw_common.hpp +++ b/rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/rmw_common.hpp @@ -578,6 +578,10 @@ RMW_FASTRTPS_SHARED_CPP_PUBLIC bool __rmw_feature_supported(rmw_feature_t feature); +RMW_FASTRTPS_SHARED_CPP_PUBLIC +bool +__rmw_event_type_is_supported(rmw_event_type_t rmw_event_type); + } // namespace rmw_fastrtps_shared_cpp #endif // RMW_FASTRTPS_SHARED_CPP__RMW_COMMON_HPP_ diff --git a/rmw_fastrtps_shared_cpp/src/rmw_event.cpp b/rmw_fastrtps_shared_cpp/src/rmw_event.cpp index 0aa43a473d..2985d13594 100644 --- a/rmw_fastrtps_shared_cpp/src/rmw_event.cpp +++ b/rmw_fastrtps_shared_cpp/src/rmw_event.cpp @@ -164,4 +164,10 @@ __rmw_event_set_callback( return RMW_RET_OK; } +bool +__rmw_event_type_is_supported(rmw_event_type_t rmw_event_type) +{ + return rmw_fastrtps_shared_cpp::internal::is_event_supported(rmw_event_type); +} + } // namespace rmw_fastrtps_shared_cpp