eProsima / Micro-XRCE-DDS-Gen

Micro XRCE-DDS IDL code generator tool. Looking for commercial support? Contact info@eprosima.com
Apache License 2.0
10 stars 13 forks source link

Force 4 Bytes to enum types #69

Closed pablogs9 closed 1 year ago

pablogs9 commented 1 year ago

This PR address https://github.com/eProsima/Micro-XRCE-DDS-Gen/issues/67

In general, it creates an intermediate typedef that forces the Enum types to be a uint32_t in the generated struct.

This way, the enum definition can be less than 4 B (due to short-enums) but the representation will be CDR compliant. Also the assignation shall be warning-less.