Is there any way to convert sub model into atomic c code ? which can be used in embedded code ? #2185
Replies: 1 comment
-
Unfortunately, models can only be exported to C++, not C, since Hopsan is written in C++. If this works for you, the easiest way is to use the "Export to executable model" function (from the "Export" menu). This will generate source code and then compile it to an executable, but the source code will still be available in the target folder after the compilation. It should be possible to wrap this code in a C interface to hide all C++ features. Hopsan also provides a DLL with a plain C API, which is used for scripting from e.g. Matlab, Python and Julia. This enables loading and simulating an existing Hopsan model file. The files are found at /bin/hopsanc.dll and /hopsanc/include/hopsanc.h. |
Beta Was this translation helpful? Give feedback.
-
I am just qurious about the software. It looks good. I want to know that is there any way to convert submodel into atomic c code like simulink ?
Beta Was this translation helpful? Give feedback.
All reactions