New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Who shall define the prefix for source code FMUs? #420
Comments
Comment by andreas.junghanns on 5 Jun 2017 15:31 UTC This is something to be clarified/defined for the next standard version. |
The specification states that the function prefix must be the modelIdentifier in the xml
This partially contradicts the second options. |
My question is what is the usage of the FMU with Source code. What I interpret is if an FMU contains the C source code, the importer tool can compile the source code on the fly and generate the DLL (if the tool does not find the appropriate DLL inside the FMU). |
decision |
Design meeting in Regensburg: Discussion: Problem occured: Will be clarified (by Masoud and Torsten S.) |
Changed milestone to 2.0.1 as this is only a clarification of FMI 2.0 behaviour. Shall be merged also to fmi 3.0 |
to build shared library (see modelica#420)
Summary for FMI Design meeting in Renningen The discussion is split between:
Current problems in FMI 2.0:
Use cases:
What can be fixed/clarifieid in FMI 2.0.1, what shall be changed FMI 3? For FMI 2.0.1: describe the current situation (with different interpretations and how an importing tool can handle FMUs with or without an internally defined prefix. Proposals for Polling for FMI 3:
Questions to 2:
@pmai, @IZacharias and others: please comment and improve the wording of the alternatives to decide on. |
Decision at Design Meeting (copy from the meeting minutes https://github.com/modelica/fmi-design/blob/master/Meetings/2019-06-25_FMI-Design-Meeting-Renningen/MeetingMinutes.adoc ) #420: Prefixes for FMI functions: Proposals:
Irina: According to our experience with FMI 2.0, tools which generate source code FMUs do it in a correct way. Torsten S: Proposal: make it explicit in FMI 2.0.1, this is the default solution for 3.0. If anyone wants to have a different solution, he must explain why. Andreas: Poll: 1. I don’t care, if it is solution 1 or 2 from above: 12
Decision: We go for solution 2! We can fix this in 2.0.1, right? |
Stating that C-file must include at the beginning a `define` of `FMI2_FUNCTION_PREFIX` Add text that fmi2functions.h has to be included. Adding non normative text.
Closing as included in merged PR #549 |
Reported by cbertsch on 5 Jun 2017 15:26 UTC
I have a perhaps naive question regarding the prefixing of FMI-Functions in source code FMUs.
Citing from the FMI 2.0 Standard p.14:
I am wondering, if the prefix shall be defined in the source code (as I have done it in the reference FMUs now) or by the importing tool in the compile command with something like
(Visual Studio specific: (https://msdn.microsoft.com/en-us/library/aa235412%28v=vs.60%29.aspx) or -D for gcc https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html)
The advantage of this solution would be, that multiple instances of the same source-code FMU could be compiled and that the same C-Code code could also be used to create a dynamic link library (e.g. for a different OS)
Or do I get something wrong?
Migrated-From: https://trac.fmi-standard.org/ticket/420
The text was updated successfully, but these errors were encountered: