Support root-level matrix I/O using one-dimensional arrays
Use one-dimensional C arrays to support root-level matrix I/O
Model Configuration Pane: Code Generation > AUTOSAR Code Generation Options
Description
Allow root-level matrix I/O for column-major array layout
Settings
'off' (default) | 'on''off'— For column-major array layout, software does not allow matrix I/O at the root level. If you try to build a model that has matrix I/O at the root level, the software produces an error.'on'— For AUTOSAR component models that use column-major array layout, software supports matrix I/O at the root level by generating code that implements matrices as one-dimensional arrays.
Tips
All models in a model hierarchy must specify the same value for this parameter.
For an AUTOSAR component model with multidimensional arrays, if you set the model configuration parameter Array layout to
Row-major, you can preserve dimensions of multidimensional arrays in the generated C code. Preserving array dimensions in the generated code can enhance code integration.When Array layout is set to
Row-major, Support root-level matrix I/O using one-dimensional arrays does not apply.Models configured for the AUTOSAR Classic Platform do not support multi-dimensional arrays for outports mapped with data access mode ImplicitSendByRef. When you validate the code mappings or try to generate code, the software produces an error if outports mapped with data access mode ImplicitSendByRef are present in the model. Use one-dimensional arrays or select a different data access mode.
Recommended Settings
| Application | Setting |
|---|---|
| Debugging | No Impact |
| Traceability | No Impact |
| Efficiency | No Impact |
| Safety precaution | No Impact |
Programmatic Use
Parameter: AutosarMatrixIOAsArray |
| Type: character vector |
Value: 'on' | 'off' |
Default: 'off' |
Version History
Introduced in R2011a
See Also
Topics
- Model Configuration Parameters: Code Generation AUTOSAR
- Root-Level Matrix I/O (AUTOSAR Blockset)