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