matlab structure in generated code for variant control
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
is there anyway to control how a matlab structure is generated with embedded coder? for example setting the storage class or name? currently the structure has a random name and only appears if I have parameters set to tunable, it is also nested inside another data structure.
I want to use the structure to control a variant subsystem. Trying to use a simulink.parameter with a bus data type does not work for embedded coder codegen (startup activation).
0 Kommentare
Antworten (1)
Aman
am 15 Mär. 2024
Hi Jake,
From the information provided, I understand that you want to have control over the name and the storage class in the generated code.
In order to give a custom name to the structure in the generated code, you can use the "coder.cstructname" function, which names the C structure type in the generated code. It can also be used to give a name to the nested structure that is your desired requirement. You can refer to the following documentation link, which discusses the same.
In order to control the storage class in the generated code, you can utilize the "CoderInfo" property of the "Simulink.Parameter" object and the "CustomStorageClass" property of the "CoderInfo" to set the custom storage class. You can refer to the following documentation to learn more about it.
I hope this will help you proceed with your workflow.
0 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!