Allow multiple instances of the same FMU#87
Merged
Conversation
Owner
Author
|
@markaren Do you think this solution will work? If so, I can extend it also for FMI 1 and FMI3. |
Contributor
|
I have included #86 in my project in and seems good so far (and this follows the same idea). Only thing is that the API outlined could possibly be simplified by embedding the fmiHandle pointer in the component handle or something. |
8e7445e to
6929b98
Compare
Owner
Author
|
I got it to work without providing two handles to the same function. Now there is one handle for the FMU, and one for each instance. I think this makes sense. |
Owner
Author
|
Now it works for all versions/types of FMI, and is tested by the Python tests. I will merge this later today if there are no objections. |
Contributor
|
Will give it a try ASAP |
Contributor
|
Builds and runs in my project as expected. Great work! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Separe the handle for the loaded FMU (fmiHandle, allocated by importing tool) from the handle to the FMU instance (fmiXComponent, allocated by the FMU). This should make it possible to instantiate multiple instances of the same FMU.
Resolves #85.