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

How to generate OSI trace file when simulating the example FMUs? #53

Open
Hela-Guesmi opened this issue Apr 1, 2020 · 1 comment
Open
Labels
question General questions about the standard, work-flow and code.

Comments

@Hela-Guesmi
Copy link

Hela-Guesmi commented Apr 1, 2020

Describe the problem

As a first test, I want to run the DummySource and the dummySensor FMUs in an FMI co-simulator. In order to be able to validate the simulation result, I would like to generate the trace files to read with the OSI visualizer.

Describe what you have already tried

I imported both FMUs in a middleware and simulated them. And I would like to validate the simulation result.

Ask your question

1- Is there any mechanism that allows to generate such trace files? I couldn't find in the documentation any C++ tutorial/example describing such option.
2- Is there also any reference trace file against which to compare?

@Hela-Guesmi Hela-Guesmi added the question General questions about the standard, work-flow and code. label Apr 1, 2020
@vkresch
Copy link
Contributor

vkresch commented Apr 6, 2020

@Hela-Guesmi use for the trace files generation python for now (see here an example) because C++ is very verbose in that regard.

If you still want to use C++ see here for google's tutorial on how to encode messages. If you learned how to serialize one message you can append those serialized messages in a loop into a file with $$__$$ separation (.txt files) or length separation (.osi files). Those files can than be played with the osi-visualizer.

Currently there is no reference file but the osi-validator repo have an example trace file which is used for validation tests. It can also be played with osi-visualizer when you decompress the file. Use lzma -d data/small_test.txt.lzma for decompressing when you're on a linux machine.

Hope this helps :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question General questions about the standard, work-flow and code.
Projects
None yet
Development

No branches or pull requests

2 participants