Why can't we call struct array in C language mode in stateflow

5 visualizaciones (últimos 30 días)
will wang
will wang el 20 de Jun. de 2022
Respondida: Muthukumar Ganesan el 25 de Jul. de 2022
I set the action language of stateflow to C language, and call the structure in stateflow like this;
"length = linkObjectS.adasDataInfo[0].length"
But there are always compilation errors.
"Indexing into arrays of structures is not supported in C action language."
But what is written in the help document can be used in this way
“In diagrams using C as the action language, use the 0-based index separated by square brackets。”

Respuestas (1)

Muthukumar Ganesan
Muthukumar Ganesan el 25 de Jul. de 2022
Hi,
Yes, Stateflow doesn't support accessing Bus arrays but it is possible with some workaround. I have prepared one and it is available here. Hope this helps.
Thanks.

Categorías

Más información sobre Stateflow en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by