Skip to content

Commit

Permalink
Support for ON_REQUESTED_INCOMPATIBLE_QOS and ON_OFFERED_INCOMPATIBLE…
Browse files Browse the repository at this point in the history
…_QOS events (ros2#535)

Signed-off-by: Jaison Titus <jaisontj92@gmail.com>
Signed-off-by: Miaofei <miaofei@amazon.com>
Co-authored-by: Miaofei <miaofei@amazon.com>
  • Loading branch information
jaisontj and mm318 committed Mar 27, 2020
1 parent c416feb commit 73948da
Show file tree
Hide file tree
Showing 3 changed files with 256 additions and 56 deletions.
6 changes: 4 additions & 2 deletions rcl/include/rcl/event.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ extern "C"
typedef enum rcl_publisher_event_type_t
{
RCL_PUBLISHER_OFFERED_DEADLINE_MISSED,
RCL_PUBLISHER_LIVELINESS_LOST
RCL_PUBLISHER_LIVELINESS_LOST,
RCL_PUBLISHER_OFFERED_INCOMPATIBLE_QOS,
} rcl_publisher_event_type_t;

typedef enum rcl_subscription_event_type_t
{
RCL_SUBSCRIPTION_REQUESTED_DEADLINE_MISSED,
RCL_SUBSCRIPTION_LIVELINESS_CHANGED
RCL_SUBSCRIPTION_LIVELINESS_CHANGED,
RCL_SUBSCRIPTION_REQUESTED_INCOMPATIBLE_QOS,
} rcl_subscription_event_type_t;

/// rmw struct.
Expand Down
6 changes: 6 additions & 0 deletions rcl/src/rcl/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ rcl_publisher_event_init(
case RCL_PUBLISHER_LIVELINESS_LOST:
rmw_event_type = RMW_EVENT_LIVELINESS_LOST;
break;
case RCL_PUBLISHER_OFFERED_INCOMPATIBLE_QOS:
rmw_event_type = RMW_EVENT_OFFERED_QOS_INCOMPATIBLE;
break;
default:
RCL_SET_ERROR_MSG("Event type for publisher not supported");
return RCL_RET_INVALID_ARGUMENT;
Expand Down Expand Up @@ -116,6 +119,9 @@ rcl_subscription_event_init(
case RCL_SUBSCRIPTION_LIVELINESS_CHANGED:
rmw_event_type = RMW_EVENT_LIVELINESS_CHANGED;
break;
case RCL_SUBSCRIPTION_REQUESTED_INCOMPATIBLE_QOS:
rmw_event_type = RMW_EVENT_REQUESTED_QOS_INCOMPATIBLE;
break;
default:
RCL_SET_ERROR_MSG("Event type for subscription not supported");
return RCL_RET_INVALID_ARGUMENT;
Expand Down
Loading

0 comments on commit 73948da

Please sign in to comment.