Skip to content
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

Handling of TypeDefinitions and UnitDefinitions #119

Open
Arend-Abbing opened this issue Dec 20, 2021 · 4 comments
Open

Handling of TypeDefinitions and UnitDefinitions #119

Arend-Abbing opened this issue Dec 20, 2021 · 4 comments

Comments

@Arend-Abbing
Copy link

TypeDefinitions and UnitDefinitions specified in the modelDescription.xml file of an FMU are not handled by the fmi4cpp xml parsing software

@markaren
Copy link
Member

markaren commented Dec 20, 2021

Indeed, see also #100
It has simply never been added and I don't have any immediate plans to do so either.
I'm happy to receive a PR for it though..

@Arend-Abbing
Copy link
Author

Thanks for the quick response. I'm wrapping FMU's in our hydrodynamics simulation software framework and I known from experience that it can be pretty helpful when the units are exposed to simulation engineers when searching for integration mistakes. Therefore, I added the processing of the TypeDefinitions to the model_description_parser.cpp. What shall I do with it?

@markaren
Copy link
Member

model_description_base needs to be updated with the missing fields, and the parser then sets those during parsing. Ideally with a type safe API and a default value of std::optional<>

Something, something

@Arend-Abbing
Copy link
Author

What I did for know is setting the unit field of a double scalar with the unit parameter of the corresponding TypeDefinition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants