Include of custom code in generated

2 ビュー (過去 30 日間)
sanad al-areqi
sanad al-areqi 2020 年 8 月 6 日
コメント済み: Fangjun Jiang 2020 年 8 月 7 日
It is about including a custom code in the generated code using the Custom Code pane in the Model Configuration Parameters. As far as I know, the custom code will be inserted at the TOP of the header and source files generated for a model. In my case, the custom code must however be inserted at the BOTTOM since the custom code itself uses data types that are defined somewhere in the generated files.
Therefore, is there any way to force the inculsion to be done at the bottom rather than top of the generated?

回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2020 年 8 月 6 日
編集済み: Fangjun Jiang 2020 年 8 月 6 日
  2 件のコメント
sanad al-areqi
sanad al-areqi 2020 年 8 月 7 日
Thank you Fangjun for your prompt reply :-)
In fact, I have already tested these blocks in my model and the folowing error message occurs during the code generation process using the "grt.tlc" system target file:
"this type of block is not allowed for the C++ encapsulation interface feature"
That was the reason why I went back to the Custom Code pane in the Model Configuration Parameters with the hope to resolve this issue.
Fangjun Jiang
Fangjun Jiang 2020 年 8 月 7 日

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSimulink Coder についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by