ghorwin / FMICodeGenerator

A Code Generator that creates native C/C++ code to build Functional Mock-Up Units (FMU) with support for FMI version 2.0 (rollback)
BSD 3-Clause "New" or "Revised" License
51 stars 25 forks source link

Fix modelDescription.xml for an empty lists of outputs #50

Closed MathiasMalandain closed 5 months ago

MathiasMalandain commented 5 months ago

Description

The generated modelDescription.xml was invalid in the case when the generated FMU had no outputs. This modest PR fixes this corner case.

ghorwin commented 5 months ago

Hi Mathias,

thanks for the pointer. Actually, from the standard specification and empty tag is not invalid, but in fact, some FMI importing tools may have problems with it. Hence, your fix suggestions is good for compatibility improvement.

I'd implement it slightly different (mainly naming of the template vars) and commit this shortly. Hence, I close this pull request.