NTNU-IHB / FMI4cpp

FMI 2.0 implementation written in modern C++.
MIT License
93 stars 34 forks source link

How to Create, Build, and Run a New FMI4cpp File #144

Closed Number-One-Intern closed 2 weeks ago

Number-One-Intern commented 2 weeks ago

Hello again, I am still very new to cmake. I have no issues running and the building the base FMI4cpp folder itself or the examples within. And I have a general understanding of how to write code to use and import FMU's. But I lack the knowledge how to specifically build and run a new file. Say for example, I wanted to write a new .cpp that runs a motor FMU. I have written a basic file that should compile with no errors. But I am currently stuck at trying to build and run it specifically via FMI4cpp. What would be the cmake commands to do so or what would the process of how to do that be? (Also I'm sure I missed this somewhere but what would be the syntax for setting an FMU input in FMI4cpp?"

markaren commented 2 weeks ago

This is a very open question not specific to FMI4cpp. You have some options:

I'm not able to dwelve much deeper into this as it is a general C/C++ question.

syntax for setting an FMU input

You have read_XXX for reading and write_XXX for writing that takes either a single scalar or a vector of values.