-
Notifications
You must be signed in to change notification settings - Fork 11
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
Feature/proxy-fmu #633
Feature/proxy-fmu #633
Conversation
Integration works locally at this point. |
1297921
to
c3e6e57
Compare
Not finding FMILibrary on linux when building proxyfmu is such a weird error. Note that the same error is reproduceable on a plain ubuntu installation. @kyllingstad any ideas? |
Doubt it. I ran with that update susessfully yesterday and here non proxy builds fails also. |
|
Just build cosim-cli locally with the conan package from this branch: Then reconfigured the House demo configuration to the following:
Testing with At first successful result:
But subsequent simulations gave:
Curious to hear if you see the same. |
Hmm, runs fine here (same case). You might have been unlucky with the port selection? |
You are probably right. For me, this specific case works ~3 out of 10 attempts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really good, great work! I have some comments about error handling and formatting that I'd like you to address, but otherwise, I think this is good to go.
(Sorry for taking so long before doing the review, btw.)
|
||
cosim::proxy::remote_slave::~remote_slave() | ||
{ | ||
remote_slave::end_simulation(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't looked into the functions you're calling here, but I just want to note that one cannot throw exceptions from destructors(*). So if there is a non-neglectible chance that these functions may throw, you may want to wrap the calls in a try
-catch
-statement and log a message on error.
(*) Or, you can, but it causes the program to immediately crash via std::terminate()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job!
# Conflicts: # src/cosim/fmuproxy/fmuproxy_client.cpp # tests/ssp_loader_fmuproxy_test.cpp
There is still the issue that this feature is not part of the unit testing though... |
This PR includes two unit test files. What feature is not part of the unit testing? |
Conan builds are not tested through the CI. |
Enabled testing for this feature. Tests passes, but some other issues appeared for gcc8. |
# Conflicts: # .github/workflows/ci-conan.yml # conanfile.py
Adds proxy-fmu support to libcosim. proxy-fmu is implemented in C++ and supports automatic spawning of new processes. Thus it replaces the current usage of the JVM based fmu-proxy solution.
Closes #628