RTE Access Macros

The runtime environment or RTE specifies access macros for each communication mechanism.

The AUTOSAR RTE specification contains a list of error codes that can be returned by RTE access macros. These error codes can be accessed in the model via the RTE Status element in the Basic Blocks palette or toolbar.

ASCET provides a built-in enumeration type, Std_ReturnType, that contains possible error codes. All enumeration values defined by the AUTOSAR standard are made known to each SWC and thus are valid to be used, even if no element with such a type has been created.

The Std_ReturnType type is available as basic type for scalar variables and parameters, as well as for arrays and matrices. It can be selected in the respective properties editors.

Available Error Codes:

Note

Use the error codes exactly as given in the table below. The prefix RTE_E_, required to provide compliance to the AUTOSAR standard, is inserted during AUTOSAR code generation.

In existing models, error codes still use the RTE_E_ prefix. If AUTOSAR code is generated, the old names starting with RTE_E_ are accepted. They are treated as if you had removed the prefix. A warning WMdl1192 is issued that asks you to change the model.

Error code

Available in AUTOSAR Release

Meaning

COM_BUSY

≥ R4.2.2

The transmission/reception could not be performed due to another transmission/reception currently ongoing for the same signal.

COM_STOPPED

all supported

The RTE could not perform the operation because the communication service is currently not available (inter-ECU communication only).

IN_EXCLUSIVE_AREA

all supported

The error is returned by a blocking API and indicates that the runnable could not enter a wait state.

This can happen, for example, because one executable entity of the current task's call stack has entered an exclusive area.

INVALID

all supported

data element is invalid

LIMIT

all supported

A internal RTE limit has been exceeded. Request could not be handled. OUT buffers are not modified.

MAX_AGE_EXCEEDED

all supported

data element is outdated

Can be combined with other error codes.

NEVER_RECEIVED

all supported

No data received for the corresponding unqueued data element since system start or partition restart.

NO_DATA

all supported

An explicit read API call returned no data. (This is no error.)

OK

all supported

no error occurred

OUT_OF_RANGE

≥ R4.2.2

received data element out of range

SEG_FAULT

all supported

The error can be returned by an RTE API if the parameters contain a direct or indirect reference to memory that is not accessible from the callers partition.

HARD_TRANSFORMER_ERROR

≥ R4.2.2

An error occurred during transformation.

TRANSFORMER_LIMIT

≥ R4.2.2

Buffer for transformation operation could not be created.

SOFT_TRANSFORMER_ERROR

≥ R4.2.2

An error occurred during transformation. The error is reported even though valid data is produced as output (comparable to a warning).

TIMEOUT

all supported

A blocking API call returned due to expiry of a local timeout rather than the intended result. OUT buffers are not modified.

The interpretation of this being an error depends on the application.

TRANSMIT_ACK

all supported

transmission acknowledgment received

UNCONNECTED

all supported

The port used for communication is not connected.