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 variables
Auto
Same behavior as
Individual arguments
.Individual arguments
Passes each root-level model input and output value to the subcomponent entry-point function as a separate argument.
Global variables
Passes each root-level model input and output value to the subcomponent entry-point function using global variables.
You cannot select
Global variables
if you:Customize the function prototype of the subcomponent
model_step
function.Assign a storage class other than
Auto
to 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