Embedded Coder: How can I configure a Simulink model to generate model parameters as regular (non-static) C++ class members?
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Wojciech Przystas
il 24 Lug 2025
Commentato: Wojciech Przystas
il 22 Ago 2025
Using Embedded Coder, I would like to generate C++ code from my Simulink model and then use multiple instances of the C++ class in my custom C++ code.
How can I prevent model parameters from being generated with the static keyword, so that multiple instances of the generated model class can be used?
I tried different Model settings, StorageClasses and Code Mapping, but the code for the model parameters is always generated as "static":
// Tunable parameters
static P_signalGen_T signalGen_P;
0 Commenti
Risposta accettata
Pramil
il 29 Lug 2025
Hi Wojciech,
You can follow the instructions mentioned in the following MATLAB answer to make the model parameters "non-static":
Hope this helps!
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Deployment, Integration, and Supported Hardware in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!