Editing an Array or Matrix

Note

This instruction applies only to arrays with maximal 2048 elements and matrices with maximal 63 @ 63 elements. Larger arrays and matrices can be edited as described in Editing Data of a Large Array or Matrix.

  1. Open the data editor for the array.
  2. Adjust the number of actual x-axis points in the "x-Size" field.

    The specified number of cells is created. During an experiment additional x-axis points can be added, but only up to the maximum size.

  3. In the editor window, double-click a cell in the "Value" line.

    For an array of scalar data type, the cell becomes an input field.

    For an array of enumeration or Std_ReturnTypeClosed a data type that contains the names of AUTOSAR errors; see RTE Access Macros – Error Codes type, the cell becomes a combo box that contains all available enumerators/error codes.

    Note

    In a non-AUTOSAR environment, the integer values corresponding to the enum values of a Std_ReturnType array/matrix are generated as literals, independent of the value selected for Generation of Enums in the project properties. Elements with model type Std_ReturnType have a unit8 type in the C code.

    In an AUTOSAR environment, the prefix RTE_E_ is added to the enum values of a Std_ReturnType array/matrix, to provide compliance to the AUTOSAR standard.

    For an array of record type, the cell becomes a combo box that contains all data sets of the record.

  4. Enter or select a value and press <Enter>.

    Decreased values are marked by a downward arrow, increased values are marked by an upward arrow: / /

    For an array of enumeration type, decrease or increase is determined by the value of the selected enumerator. For an array of record type, decrease or increase is determined by the selected data set's position in the list of data sets.

  5. Repeat for all the other values.
  6. Click OK to accept your settings.

For a matrix, the table editor shows the index and output values of both axes and contains four setup fields for the size. Otherwise, the editor is used in exactly the same way as for arrays.

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

Editing Data of a Large Array or Matrix

Opening a Data Editor

Software Component Editors – RTE Access Macros

Project Properties – Code Generation Options

Initialization of Arrays and Matrices

ASCET Options – Targets Node