Editing Data of a Large Array or Matrix
Note |
|---|
This instruction applies to arrays larger than 2048 elements and matrices with one or both axes larger than 63 elements. Smaller arrays and matrices can be edited as described in Editing an Array or Matrix. |
To edit data of an array larger than 2048 elements or a matrix with one or both axes larger than 63 elements, you have to create an ASCII file with the array/matrix data and import that file.
Create an ASCII file named *.dat.
You can create an empty file, or you can export the data of the desired array/matrix.
Note
You must use the extension *.dat because you cannot import files with other extensions.
Edit the file and enter the
array/matrix values. During import into a matrix, each row in the ASCII file is imported to one row in the matrix, even if the matrix row is shorter or longer than the row in the ASCII file. Therefore, enter all values for a matrix row into the same row in the ASCII file.
- Save the file.
To import the data from the ASCII file, do the following:
Proceed as described in Reading the Data for an Array, Matrix, Characteristic Line/Map from a File.
If the *.dat file is
larger than the array/matrix, you are asked if you want to change the max. size of the element. Yes changes the array/matrix size, No keeps the array/matrix size and ignores the surplus entries in the *.dat file. Click Yes or No to continue.
The data is imported to the array/matrix.
For an array, the data in the *.dat file are imported consecutively. For a matrix, each row in the *.dat file is imported to one matrix row.
- To check the import result, you can, e.g., view the generated code.
Note |
|---|
In a non-AUTOSAR environment, the integer values corresponding to the enum values of a Std_ReturnType In an AUTOSAR environment, the prefix RTE_E_ is added to the enum values of a Std_ReturnType |
If you want to optimize the generated initialization code of arrays/matrices of scalar or enumeration type, activate the Generating Sparse Arrays target option. See also Initialization of Arrays and Matrices.
See also
Writing Data of Arrays, Matrices, Characteristic Lines/Maps to a File
Software Component Editors – RTE Access Macros
Reading the Data for an Array, Matrix, Characteristic Line/Map from a File
Project Properties – Code Generation Options