From a04f6d9001e48f100ca393843f9ad3f8db68ebb5 Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Mon, 13 Mar 2023 09:32:51 -0400 Subject: [PATCH] Add in inconsistent_topic implementation. (#1024) * Add in incompatible type implementation. Signed-off-by: Chris Lalancette --- rcl/include/rcl/event.h | 2 ++ rcl/src/rcl/event.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/rcl/include/rcl/event.h b/rcl/include/rcl/event.h index fea87d782..30858b68d 100644 --- a/rcl/include/rcl/event.h +++ b/rcl/include/rcl/event.h @@ -38,6 +38,7 @@ typedef enum rcl_publisher_event_type_e RCL_PUBLISHER_OFFERED_DEADLINE_MISSED, RCL_PUBLISHER_LIVELINESS_LOST, RCL_PUBLISHER_OFFERED_INCOMPATIBLE_QOS, + RCL_PUBLISHER_INCOMPATIBLE_TYPE, } rcl_publisher_event_type_t; /// Enumeration of all of the subscription events that may fire. @@ -47,6 +48,7 @@ typedef enum rcl_subscription_event_type_e RCL_SUBSCRIPTION_LIVELINESS_CHANGED, RCL_SUBSCRIPTION_REQUESTED_INCOMPATIBLE_QOS, RCL_SUBSCRIPTION_MESSAGE_LOST, + RCL_SUBSCRIPTION_INCOMPATIBLE_TYPE, } rcl_subscription_event_type_t; /// Internal rcl implementation struct. diff --git a/rcl/src/rcl/event.c b/rcl/src/rcl/event.c index 6196442d1..d71fafc62 100644 --- a/rcl/src/rcl/event.c +++ b/rcl/src/rcl/event.c @@ -64,6 +64,9 @@ rcl_publisher_event_init( case RCL_PUBLISHER_OFFERED_INCOMPATIBLE_QOS: rmw_event_type = RMW_EVENT_OFFERED_QOS_INCOMPATIBLE; break; + case RCL_PUBLISHER_INCOMPATIBLE_TYPE: + rmw_event_type = RMW_EVENT_PUBLISHER_INCOMPATIBLE_TYPE; + break; default: RCL_SET_ERROR_MSG("Event type for publisher not supported"); return RCL_RET_INVALID_ARGUMENT; @@ -118,6 +121,9 @@ rcl_subscription_event_init( case RCL_SUBSCRIPTION_MESSAGE_LOST: rmw_event_type = RMW_EVENT_MESSAGE_LOST; break; + case RCL_SUBSCRIPTION_INCOMPATIBLE_TYPE: + rmw_event_type = RMW_EVENT_SUBSCRIPTION_INCOMPATIBLE_TYPE; + break; default: RCL_SET_ERROR_MSG("Event type for subscription not supported"); return RCL_RET_INVALID_ARGUMENT;