Implement root-level I/O as
Specify how generated code passes root-level input and output to nonreusable subcomponent execution entry-point function
Since R2025a
Model Configuration Pane: Code Generation / Interface
Description
The Implement root-level I/O as parameter controls how
root-level model input and output data is passed to a nonreusable subcomponent (model
reference) ,
model_step, or
model_initialize entry-point
function.model_terminate
Dependencies
To enable this parameter, set the Code interface packaging
(subcomponent) parameter to Nonreusable
function.
Settings
Auto (default) | Individual arguments | Global variablesAutoSame behavior as
Individual arguments.Individual argumentsPasses each root-level model input and output value to the subcomponent entry-point function as a separate argument.
Global variablesPasses each root-level model input and output value to the subcomponent entry-point function using global variables.
You cannot select
Global variablesif you:Customize the function prototype of the subcomponent
model_stepfunction.Assign a storage class other than
Autoto root-level I/O ports and signals that directly feed into or propagate out of the subcomponent.Configure the root-level model with a service interface or AUTOSAR target and connect root-level I/O ports directly to the subcomponent.
Recommended Settings
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No impact |
Programmatic Use
Parameter:
SubcomponentRootIOFormat |
| Type: character vector |
Values:
'Auto' | 'Individual arguments' | 'Global
variables' |
Default:
'Auto' |
Version History
Introduced in R2025a