modelon-community / fmi-library

C library for importing FMUs
Other
116 stars 34 forks source link

terminalsAndIcons for FMI2 + refactoring #133

Closed PeterMeisrimelModelon closed 3 months ago

PeterMeisrimelModelon commented 4 months ago

Adding current terminalsAndIcons parsing to FMI2 + some refactoring.

Re-factoring:

  1. Split XML lists from fmi3_xml_parser.h/c into fmi3_xml_model_description_scheme.h & fmi_xml_terminals_and_icons_scheme.h, merged together again fmi3_xml_parser_scheme.h
  2. Split some parsing utility functionality into fmi3_xml_parser_util.h/c
  3. Split the implementation of fmi3_xml_parser_context into fmi3_xml_parser_context_impl.h
  4. Renamed most terminalsAndIcons stuff (files, structs/types, functions) from fmi3* to fmi*, where possible.
  5. Fixed documentation for Terminals and Icons.

For FMI2 + terminalsAndIcons

  1. Added parsing of terminalsAndIcons to FMI2
  2. Duplicated terminalsAndIcons functions for FMI2 variants, when necessary.
  3. Duplicated testutils functionality to FMI2. Could use macros here instead to create the same functions for FMI2 + 3?
  4. Duplicated non error specifics tests for terminalsAndIcons for FMI2.

What is not included thus far:

  1. Definite separation of fmi3 & terminalsAndIcons parser, currently using same parser + schema list
  2. terminalsAndIcons xml callbacks (vendor annotation parsing). Options are to use 1. Separate callbacks, would require API change or 2. Using the same as FMI2/3, would require re-factoring to unify the FMI2 + 3 ones or 3. another option?

Might be easier to review commit by commit.