Open TheFixer opened 4 years ago
I'd be happy to accept a PR that addresses 1, and in principle I would be happy with one addressing 2 as well. I doubt there are many users of dds_takecdr
but there is at least one (https://github.com/ros2/rmw_cyclonedds).
I have another suggestion for dealing with point 2. I remember takecdr
got introduced as a quick hack to test performance for invoking operations via a unix stream socket and it sort of managed to escape that old experiment and made its way into the API. Back then, Cyclone really only dealt with CDR serialised data, but today the only remnant of that is the message validation code that requires the "encoding" field to be set to CDR.
So, it would arguably make sense to switch to a new name, say read_ref
and take_ref
, because what they really do is hand out references to the internal abstracted samples. (This is something different from the "loaned samples" in the spec, because those are in application representation.) In those new functions, the parameters can have the correct order and dds_takecdr
can then become a deprecated wrapper.
Does that make sense?
@eboasson Yes, that makes sense. I'll try to address these issues one by one in different PRs.
Hi,
I noticed a few issues regarding the implementation of dds_takecdr().
I am happy to address issue 1 and provide a PR for it if you think this makes sense. I doubt whether you think it is worthwhile to address 2 since this would involve an API change.
Can you let me know if it makes sense to provide a PR for issue 1? Can you also let me know what your position is regarding issue 2?