Clarify the error codes in serialized_message.h

Open
#273 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c
Domain
api

Research direction

Start with rmw/include/rmw/serialized_message.h and inspect how its wrappers call rcutils_uint8_array_* and document their return values. Determine the required RCUTILS-to-RMW error-code conversion and update the wrappers so their behavior matches the documented RMW codes; no test file is named in the issue.

Written by the indexing model from the issue text.

Description

backlog enhancement

https://github.com/ros2/rmw/blob/master/rmw/include/rmw/serialized_message.h is an extremely thin wrapper around rcutils_uint8_array_*. The problem with this is that users expect that these functions return RMW_* error codes, when in reality they return RCUTILS_* error codes. Even the documentation is confused about this; it is documented as returning RMW_* error codes, which is just incorrect.

My suggestion is that we make these static inline functions instead, with a conversion between the RCUTILS error codes that are returned from the rcutils_uint8_array functions and the RMW error codes that they are documented to return.

Dominant language
C
Stars
121
Forks
89
Avg merge
17h 40m
Merged PRs (30d)
3

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ros2/rmw

All issues in ros2/rmw

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.