Topic
  • No replies
SystemAdmin
SystemAdmin
15 Posts

Pinned topic More info on DLL integration with STM and more questions

‏2009-02-04T17:51:52Z |
Question:

It has been suggested that it is possible to run an external c code executable as different thread and be able to read/write to various Statemate variables as the model is simulating (the "Connecting user reference code to simulation
manual" says I can do this).

But a couple of questions

1/ Is this supported on PC, I can only find reference to makefile options
for solaris, SunOs and HP (which we do not support any more ).

2/ Can the executable be a DLL and still make the calls that are mentioned
in the manual ??

3/ If the answer to either of the above questions is yes, what do I need to
set the make file compiler options to ?? and can I do it with MSVC 6 ??

4/ Finally, will the C code and O files described in the manual be
compilable in a C++ environment (as they want a c++ dll) ?

Thanks in advance
Answer:

1/ Yes, this should also work on PC

2/ Yes, a dll can call the functions you see in the manual, that's how simulation runs user-code

3/ To get an example makefile you can run simulation on a model with external code, and see the makefile created in the workarea under ana\<profile name>

4/ I think it should work in a C++ environment too