Info
この質問は閉じられています。 編集または回答するには再度開いてください。
can I modify how a global data store is represented in generated code?
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Venkatachala Sarma
2016 年 3 月 8 日
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 件のコメント
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!