Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
can I modify how a global data store is represented in generated code?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I have a model with several masked subsystems. These masks set values for constant blocks inside of the subsystem which are then used for simulating various things. I'd like to replace these constant blocks with DataStoreReads and the several debug displays with DataStoreWrites so that I can better manage/keep track of them. When I tie these DataStoreReads/Writes to a local DataStore and generate code (encapsulated C++), I get header files defining my struct and the the DataStore instantiated inside of the ModelClass. If I then make the internal states of the model public, I can see them in another tool. This works well but I'd rather not make the entire internal state public.
I set it to use a global data store (making a Simulink.Signal in the base workspace with all the necessary BusObjects) and now the instance of the DataStore isn't lumped into the internal state but is generated as an extern statement outside of the ModelClass. How can I get RealTimeWorkshop to define that extern as a member of the ModelClass (preferably marked "public")?
I am using R2013a on RedHat 5.
0 comentarios
Respuestas (1)
Venkatachala Sarma
el 8 de Mzo. de 2016
Instead of defining it as a global data store, define the Simulink.Signal inside the Model Workspace. By doing so I as able to get the data store as a parameter of the ModelClass.
Hope this helps.
0 comentarios
La pregunta está cerrada.
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!