Skip to content

Commit

Permalink
Warn on 'unknown' value
Browse files Browse the repository at this point in the history
Since it's possible for rmw's to return an unknown value if the policy is set to an unsupported value by ROS 2.

Signed-off-by: Jacob Perron <[email protected]>
  • Loading branch information
jacobperron committed Feb 22, 2021
1 parent c21f5cc commit 93e9aa2
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions rmw/include/rmw/qos_profiles.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,11 @@ typedef enum RMW_PUBLIC_TYPE rmw_qos_compatibility_type_t
* Two QoS profiles are compatible if a publisher and subcription
* using the QoS policies can communicate with each other.
*
* If any of the profile policies has the value "system default", then it may not be
* If any of the profile policies has the value "system default" or "unknown", then it may not be
* possible to determine the compatibilty.
* In this case, the output parameter `compatibility` is set to `RMW_QOS_COMPATIBILITY_WARNING`
* and `reason` is populated.
*
* Profile policies must not have the value "unknown".
* An "unknown" value is considered an error and `RMW_RET_INVALID_ARGUMENT` is returned.
* `compatibility` and `reason` will not be set.
*
* If there is a compatibility warning or error, and a buffer is provided for `reason`, then an
* explanation of all warnings and errors will be populated into the buffer, separated by
* semi-colons (`;`).
Expand Down Expand Up @@ -172,7 +168,6 @@ typedef enum RMW_PUBLIC_TYPE rmw_qos_compatibility_type_t
* \return `RMW_RET_OK` if the check was successful, or
* \return `RMW_RET_INVALID_ARGUMENT` if `compatiblity` is `nullptr`, or
* \return `RMW_RET_INVALID_ARGUMENT` if `reason` is `NULL` and `reason_size` is not zero, or
* \return `RMW_RET_INVALID_ARGUMENT` if any of the policies have value "unknown".
* \return `RMW_RET_ERROR` if there is an unexpected error.
*/
RMW_PUBLIC
Expand Down

0 comments on commit 93e9aa2

Please sign in to comment.