Explicit References

In ASCET versions prior to V6.0, the fact whether a reference type element is a reference or not is, in most cases, implicitly derived from its usage in the model: If an element has a connected set port, it is assumed to be used as reference. This occasionally leads to unexpected and unpredictable behavior; to avoid this, explicit references were introduced.

Implicit reference are no longer created if something is assigned to a reference type elements. The following happens instead:

The following non-scalar variables of a component (class, module, state machine, SWCClosed AUTOSAR software component (singular; plural is SWCs)) or project can be specified as explicit reference in the properties editor.

Note

Arrays, matrices and records used as messages must not be specified as explicit references. If they are, an error (MMdl794) is issued during code generation:

Element <name> is a message and a reference, but the combination is not allowed.

Non-scalar variables not listed here cannot be specified as explicit reference. Elements in Boolean tables, conditional tables, CT blocks, records and AUTOSAR interfaces cannot be specified as explicit reference, either.

The access possibilities for references can be specified in the properties editor, too. For explicit references in classes and modules, you can specify external and internal access; for explicit references in AUTOSAR software components and projects, you can specify only internal access. Available settings are:

external access

Set() Method

The explicit reference can be set to another data structure by other components.

Get() Method

The explicit reference can be used by other components.

internal access

Write for referenced element

The referenced element can be written from inside the component.

Note

If write access is enabled, the reference cannot be mapped to a parameter because parameters cannot be written.

Read for referenced element

The referenced element can be read from inside the component.

Explicit references are marked by an additional symbol, on top of the symbol denoting kind and scope.

local reference

exported reference

imported reference

Explicit references must be initialized, see Initialization of Explicit References.

In an experiment, explicit references cannot be measured or calibrated.

See also

Initialization of Explicit References

Value Types and Reference Types

Migration and Conversion of References

Specifying a Reference

Mapping a Reference

Implementing References

Component Manager – Promoting Information and Warnings

ASCET Options Window – Targets Node

Properties Editor

Messages