C++ structure naming

1 次查看(过去 30 天)
Andrew
Andrew 2020-9-18
回答: BhaTTa 2024-9-2
I am auto coding a Simulink model in C++, the contains reference models and uses a mix of busses and integers as outputs my question is regarding is there a setting in the config file so that when auto coding in C++ the structre elements are named accroding to the outport name.

回答(1 个)

BhaTTa
BhaTTa 2024-9-2
@Andrew, when generating C++ code from a Simulink model, you can control how the elements of bus signals are named in the generated code. This includes naming the structure elements according to the outport names.
Below is the example where i named the inputs to the bus as inporting1 and inporting respectively and in the code genration you can see the variables names are same as the name given in the model.

类别

Help CenterFile Exchange 中查找有关 Deployment, Integration, and Supported Hardware 的更多信息

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by