Why does my generated code have additional parameters when I am using Multi-Instance Capable Code in Stateflow Coder 5.0 (R13) or later?
古いコメントを表示
When I generate code from a Stateflow chart, some functions contain errors. The resulting code is not the same as it was in Stateflow Coder 4.1 (R12.1). The number of parameters passed to a function is not the same as when it has been declared.
For example, assume a function is declared with 3 parameters. When I call it, the code passes 5 parameters. The last two parameters are a repetition of the previous two.
Assume the declaration is:
void accessory_socket_f(SFaccessory_socket_fInstanceStruct *chartInstance,
SFaccessory_socket_fInputDataStruct
*chartInputData,SFaccessory_socket_fOutputDataStruct *chartOutputData)
With Stateflow Coder 4.1 (R12.1), the following code is produced:
accessory_socket_f(chartInstance, chartInputData, chartOutputData);
With Stateflow Coder 5.0 (R13), the following code is produced:
accessory_socket_f(chartInstance,chartInputData, chartOutputData,
chartInputData, chartOutputData);
This causes compilation errors.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Stateflow についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!