Skip to content

#934 PLCgen: Re-implement enum conversion, use smaller data types for conversion to constants or integers.

Albert Hofkamp requested to merge 934-smaller-type-for-converted-enums into develop

Patch

  • Moves the "count" to "number-of-bits" conversion magic for type selection into PlcElementaryType for more general usage.
  • Reroutes existing enumeration handling all to the type generator (for as far as it wasn't there already)
  • Adds new converted enumeration data storage back-end to the type generator, with 3 conversion functions.
  • Glues the rerouted and already existing requests in the type generator to the new back-end.
  • Updates unit test and oee.cif.tests project.

End-user visible changes:

  • The handling of enums has been improved, using bit-like types rather than integers, using smaller types when possible, and having more direct traceability to the input CIF model.

Addresses #934 (closed)

Edited by Dennis Hendriks

Merge request reports