Skip to content

Commit

Permalink
Topic add matched event description (#3406)
Browse files Browse the repository at this point in the history
Signed-off-by: Barry Xu <barry.xu@sony.com>
  • Loading branch information
Barry-Xu-2018 authored Apr 13, 2023
1 parent 5268630 commit fbc0cfb
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions source/Concepts/About-Quality-of-Service-Settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -301,3 +301,22 @@ Developers may subscribe to the following QoS events that are associated with a
* Requested incompatible QoS

The subscription has encountered a publisher on the same topic that is offering a QoS profile that does not satisfy the requested QoS profile, resulting in no connection between the subscription and that publisher.


Matched events
--------------

In addition to QoS events, matched events can be generated when any publisher and subscription establishes or drops the connection between them.
Developers may provide each publisher and subscription with callback functions that are triggered by matched events and handle them in a way they see fit, similar to how messages received on a topic are handled.

* matched

Developers can subscribe to this event with a publisher or a subscription.

* publisher: this event happens when it finds a subscription which matches the topic and has compatible QoS or a connected subscription is disconnected
* subscription: this event happens when it finds a publisher which matches the topic and has compatible QoS or a connected publisher is disconnected

There are demo code on how to use event.

* rclcpp: `demo code <https://github.com/ros2/demos/tree/{REPOS_FILE_BRANCH}/demo_nodes_cpp/src/events/matched_event_detect.cpp>`
* rclpy: `demo code <https://github.com/ros2/demos/tree/rolling/{REPOS_FILE_BRANCH}/demo_nodes_py/events/matched_event_detect.py>`

0 comments on commit fbc0cfb

Please sign in to comment.