Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions rmw/include/rmw/get_node_info_and_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ extern "C"
* \return `RMW_RET_OK` if the query was successful, or
* \return `RMW_RET_INVALID_ARGUMENT` if the node is invalid, or
* \return `RMW_RET_INVALID_ARGUMENT` if any arguments are invalid, or
* \return `RMW_RET_NON_EXISTENT_NODE_NAME` if the node name wasn't found, or
* \return `RMW_RET_BAD_ALLOC` if memory allocation fails, or
* \return `RMW_RET_ERROR` if an unspecified error occurs.
*/
Expand Down Expand Up @@ -83,6 +84,7 @@ rmw_get_subscriber_names_and_types_by_node(
* \return `RMW_RET_OK` if the query was successful, or
* \return `RMW_RET_INVALID_ARGUMENT` if the node is invalid, or
* \return `RMW_RET_INVALID_ARGUMENT` if any arguments are invalid, or
* \return `RMW_RET_NON_EXISTENT_NODE_NAME` if the node name wasn't found, or
* \return `RMW_RET_BAD_ALLOC` if memory allocation fails, or
* \return `RMW_RET_ERROR` if an unspecified error occurs.
*/
Expand Down Expand Up @@ -118,6 +120,7 @@ rmw_get_publisher_names_and_types_by_node(
* \return `RMW_RET_OK` if the query was successful, or
* \return `RMW_RET_INVALID_ARGUMENT` if the node is invalid, or
* \return `RMW_RET_INVALID_ARGUMENT` if any arguments are invalid, or
* \return `RMW_RET_NON_EXISTENT_NODE_NAME` if the node name wasn't found, or
* \return `RMW_RET_BAD_ALLOC` if memory allocation fails, or
* \return `RMW_RET_ERROR` if an unspecified error occurs.
*/
Expand Down Expand Up @@ -153,6 +156,7 @@ rmw_get_service_names_and_types_by_node(
* \return `RMW_RET_OK` if the query was successful, or
* \return `RMW_RET_INVALID_ARGUMENT` if the node is invalid, or
* \return `RMW_RET_INVALID_ARGUMENT` if any arguments are invalid, or
* \return `RMW_RET_NON_EXISTENT_NODE_NAME` if the node name wasn't found, or
* \return `RMW_RET_BAD_ALLOC` if memory allocation fails, or
* \return `RMW_RET_ERROR` if an unspecified error occurs.
*/
Expand Down
4 changes: 4 additions & 0 deletions rmw/include/rmw/ret_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ typedef int32_t rmw_ret_t;
/// Incorrect rmw implementation.
#define RMW_RET_INCORRECT_RMW_IMPLEMENTATION 12

// rmw node specific ret codes in 2XX
/// Failed to find node name
#define RMW_RET_NON_EXISTENT_NODE_NAME 203
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why 203 instead of maybe 20?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found the matching define in rcl so this number makes sense. Maybe mention rcl in the existing comment.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it matter if they're matching? There's a convert function anyway.

Seems arbitrary to me.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I think the name needs to be updated according to ros2/rcl#492 (comment)

- RMW_RET_NON_EXISTENT_NODE_NAME
+ RMW_RET_NODE_NAME_NON_EXISTENT

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it matter if they're matching? There's a convert function anyway.

Seems arbitrary to me.

It's arbitrary yes, but I think it have some sense.

Also, I think the name needs to be updated according to ros2/rcl#492 (comment)

- RMW_RET_NON_EXISTENT_NODE_NAME
+ RMW_RET_NODE_NAME_NON_EXISTENT

Thanks, forgot to push that commit.


#ifdef __cplusplus
}
#endif
Expand Down