Specifying an Array or Matrix with Variable Size

Note

Only arrays/matrices of kind Variable and specified as explicit references can have variable sizes.

Arrays and matrices used as messages and arrays/matrices of record type cannot have variable sizes.

  1. Open the properties editor for the array/matrix.
  2. Use the Name field to edit the element name.
  3. In the Attributes area, activate the Reference option.

    The other attributes are disabled.

  4. In the Kind combo box, select the kind Variable.

  5. In the combo boxes of the Variant Size field, select *.

    The X (and Y) field(s) and the Reference option are disabled.

  6. In the Basic Type combo box, assign the element type.

    The basic scalar types, Enumeration, Std_ReturnTypeCloseda data type that contains the names of AUTOSAR errors; see RTE Access Macros – Error Codes, and Record are available.

    If you select Enumeration or Record, the Closedfollowing happens.

    The Component combo box appears. It offers all enumerations or records in the database/workspace for selection.

    • Select a suitable enumeration or record.
  7. In the Scope field, determine the scope of the element.
  8. Specify external and internal access.

    Explicit references cannot be calibrated or measured in an experiment; the settings in the Calibration Access field are irrelevant.

  9. Click OK to close the properties editor.

  10. Initialize the reference via one of the following possibilities:

See also

Variable Size of Arrays and Matrices

Opening the Properties Editor

Editing the Configuration of an Array or Matrix

Scalar Types

Software Component Editors – RTE Access Macros

Editing the Element Scope

Enabling or Disabling Elements

Mapping a Reference

Using References Without Initialization

Kind of Elements