Interrunnable Variables
AUTOSAR allows the configuration of interrunnable variables that provide a way for runnable entities of one SWC to communicate between themselves.
While inter-runnable communication is possible through user code and shared variable access (protected by exclusive areas), this can be inefficient when handling primitive data types since the exclusive area API calls are typically mapped onto the underlying Operating System’s resource control mechanism.
Interrunnable variables can be used as lightweight mechanisms for inter-runnable communication. They can be of scalar (i.e. cont, limitInt, wrapInt, sdisc, udisc, log), enum, composite (i.e. array or matrix) or complex (i.e. record) type. The main purpose of complex interrunnable variables is to guarantee data consistency over the values grouped in the record.
Interrunnable variables are declared by the RTE; they use similar communication mechanisms as sender-receiver communication, i.e. implicit and explicit communication. See the rules below for details.
Depending on the communication mode, interrunnable variables are displayed as shown in the table.
communication mode | type | in Outline tab | in block diagram SWC |
Explicit | Scalar |
|
|
Array |
|
| |
Matrix |
|
| |
Record |
|
| |
Implicit | Scalar |
|
|
Array |
|
| |
Matrix |
|
| |
Record |
|
|
Rules for non-scalar interrunnable variables:
Composite interrunnable variables must be of array or matrix type.
Note
If you use matrices as interrunnable variables, make sure that the Number of dimensions for fixed matrixestarget option is set to Two-dimensional.
Otherwise, a warning WMdl653 is issued during AUTOSAR code generation. By default, this warning is promoted to an error.
Array and matrix interrunnable variables can have implicit or explicit behavior (see also Rte_IrvIRead and Rte_IrvIWrite and Rte_IrvRead and Rte_IrvWrite) for read access.
Write access to an element inside an array/matrix interrunnable variable must be implicit. Explicit write access to an element inside an array/matrix interrunnable variable causes an error: MMdl1190 – %1 access to an array element <array>1[<x>,<y>2] (not mapped) cannot be explicit
Write access to an array/matrix interrunnable variable as a whole, i.e. via the Set port, can be explicit or implicit.
The initialization for composite interrunnable variables is not affected by the setting of the Generating Sparse Arraystarget option.
Complex interrunnable variables must be of record type.
Record interrunnable variables can have implicit or explicit behavior (see also Rte_IrvIRead and Rte_IrvIWrite and Rte_IrvRead and Rte_IrvWrite) for read access.
Write access to an element inside a record interrunnable variable must be implicit. Explicit write access to an element inside a record interrunnable variable causes an error: MMdl119 – Write access to a record element <record>.<record_element> (not mapped) cannot be explicit
Write access to a record interrunnable variable as a whole, i.e. via the Set port, can be explicit or implicit.
- Since ASCET V6.4.6, records used as complex interrunnable variables may contain matrices, or other records that contain matrices.
See also
Creating a Scalar Interrunnable Variable
Creating a Non-Scalar Interrunnable Variable















