This "issue" is even more pronounced if the coding interface "Pass rooot-level I/O" to "Structure reference" instead of "Part of model data structure".
The example main then uses the following structure:
void rt_OneStep(RT_MODEL *const rtM){
uz_codegen0_step(rtM, &rtU, &rtY);
}
The function OneStep is called in main and passed the local pointer rtM (which is set to the global pointer rtMPtr) and then the function OneStep uses the global varibles rtU and rtY directly.
This even more confuses me regarding the proper usage of the generated code structure and the reasoning behind the pointer rtM since the StepFunction uses two globals anyway. What is the benefit of the function scoped variable in this case?