Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Legacy Code Tool and Simulink Builder Block for C++ Structs and Classes

4 ビュー (過去 30 日間)
Erin
Erin 2013 年 8 月 26 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I have C++ code containing both structs and classes. I need to be able to call the functions in these classes with the structs as inputs/outputs into a function block to use in Simulink. What is the best way to go about this?
I know the s-function builder isn't supported with C++ and the documentation states that the Legacy Code Tool can't handle C++ objects.
It states: "Can interface with C++ functions, but not C++ objects. One way of working around this limitation is to use the S-Function Builder to generate the shell of an S-function and then call the legacy C++ code from the S-function's mdlOutputs callback function."
Is there an example of this or what is the best way?
Thank you.

回答 (0 件)

この質問は閉じられています。

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by