RustDDS icon indicating copy to clipboard operation
RustDDS copied to clipboard

CDR De/Serialization

Open sanderkukk opened this issue 4 years ago • 4 comments

Hello,

Is the current built in CDR using equivalent to openDDS XCDR1 or XCDR2 ?

sanderkukk avatar Nov 22 '22 06:11 sanderkukk

I do not know. The current built-in CDR serializer is according to Common Data Representation spec from OMG, in this document , Section 15.3. It may interoperate or may not.

So far, we have not implemented the XTypes specification.

Please do some experiments and tell us about your findings, so we know if we are missing something.

jhelovuo avatar Nov 23 '22 06:11 jhelovuo

AFAICT XCDR1/2 are defined in: https://www.omg.org/spec/DDS-XTypes and are extensions over CDR, however it looks like some of the extensions might be part of RTPS already - so you may already have some/most of it.

Would you be interested in separating out the serde lib in RustDDS to a standalone library? I have interest in trying to use it with CycloneDDS (where bindings are encouraged to encode messages themselves)

willstott101 avatar Feb 14 '23 11:02 willstott101

If you mean the CDR serialization/deserialization parts, then yes, why not.

It is not in our current roadmap, and therefore not a priority item, but if you would like to do it, then please go ahead. Then you could use it independent of RustDDS if you like.

However, I would like to be the owner of that package/repo, as CDR serialization is an integral part of RustDDS.

jhelovuo avatar Feb 14 '23 12:02 jhelovuo

Great, I don't have any particular roadmap for it either, but it's very useful to know that you would be fine with that happening. I wouldn't even mind it remaining in this repo as a second crate (using cargo workspace), but a second repo might make it easier to have more owners/contributors if that lib was used as a building block for other DDS-related crates.

If I explore this I'll make a new repo under my name and let you know, you can then feel free to push under your namespace, and I can retro-actively turn mine into a fork I suppose :+1:

willstott101 avatar Feb 14 '23 15:02 willstott101