Skip to content

Commit

Permalink
add note about API break with get_actual_qos() (#348)
Browse files Browse the repository at this point in the history
Signed-off-by: William Woodall <william@osrfoundation.org>
  • Loading branch information
wjwwood authored Oct 8, 2019
1 parent 43a7eb7 commit 08ad23d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions source/Releases/Release-Eloquent-Elusor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,27 @@ Changes since the Dashing release
rclcpp
^^^^^^

API Break with ``get_actual_qos()``
"""""""""""""""""""""""""""""""""""

Introduced in Dashing, the ``get_actual_qos()`` method on the ``PublisherBase`` and ``SubscriptionBase`` previously returned an rmw type, ``rmw_qos_profile_t``, but that made it awkward to reuse with the creation of other entities.
Therefore it was updated to return a ``rclcpp::QoS`` instead.

Existing code will need to use the ``rclcpp::QoS::get_rmw_qos_profile()`` method if the rmw profile is still required.
For example:

.. code-block:: cpp
void my_func(const rmw_qos_profile_t & rmw_qos);
/* Previously: */
// my_func(some_pub->get_actual_qos());
/* Now: */
my_func(some_pub->get_actual_qos()->get_rmw_qos_profile());
The rationale for breaking this directly rather than doing a tick-tock is that it is a new function and is expected to be used infrequently by users.
Also, since only the return type is changing, adding a new function with a different would be to only way to do a deprecation cycle and ``get_actual_qos()`` is the most appropriate name, so we would be forced to pick a less obvious name for the method.

API Break with Publisher and Subscription Classes
"""""""""""""""""""""""""""""""""""""""""""""""""

Expand Down

0 comments on commit 08ad23d

Please sign in to comment.