GobySoft / dccl

Dynamic Compact Control Language
Other
17 stars 13 forks source link

Add oneof support in codec v4 #70

Closed dfenucci closed 3 years ago

tsaubergine commented 3 years ago

Hi -

Thank you very much for this pull request. A quick look at the code looks very good to me. Could you please add/update the following so I can merge this:

Thanks again for this valuable contribution!

dfenucci commented 3 years ago

Hi Toby,

here are the main updates I've done so far.

Thanks a lot

tsaubergine commented 3 years ago

Thanks - I'll take a deeper look later, but quick answers to your questions:

does the expected min/max size of a message include the header as well (i.e. the dccl.msg.id and the fields with in_head set to true)?

Yes, it includes the header as well, assuming you mean the call to dccl::Codec::size(): https://github.com/GobySoft/dccl/blob/3.0/src/codec.cpp#L429

I'm fine with excluding the use of oneof in the header, but I would like Codec to throw an exception if someone does mark a oneof field as in_head: true.

dfenucci commented 3 years ago

Thanks for the feedback.

I'm fine with excluding the use of oneof in the header, but I would like Codec to throw an exception if someone does mark a oneof field as in_head: true.

This is now implemented in this commit

tsaubergine commented 3 years ago

Thanks, this looks good to me, now. I have a bit more to do before I release DCCL4, but in the meantime you can access the DCCL4 pre-release Debian/Ubuntu packages as needed from the "continuous" repository:

dccl4-apps-dbgsym - debug symbols for dccl4-apps
dccl4-apps - Applications for the Dynamic Compact Control Language.
dccl4-compiler-dbgsym - debug symbols for dccl4-compiler
dccl4-compiler - Protobuf compiler for DCCL (protoc-gen-dccl): used to create Boost Units methods
dccl4-doc - Documentation for the Dynamic Compact Control Language.
libdccl4-dbgsym - debug symbols for libdccl4
libdccl4-dev - Developers' package for the Dynamic Compact Control Language.
libdccl4 - Libraries for the Dynamic Compact Control Language.

Thanks again for your valuable contribution.