Why does my generated code have additional parameters when I am using Multi-Instance Capable Code in Stateflow Coder 5.0 (R13) or later?
Afficher commentaires plus anciens
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.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Stateflow dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!