Automatic Mapping

Mapping each individual message, NV variablesClosed non-volatile variable, or imported parameter can be time-consuming if you have a lot of these elements. To simplify the task, the software component editor provides an auto-mapping function.

By default, auto-mapping maps messages, NV variables, or imported parameters and AUTOSAR elements with identical names. To make auto-mapping more effective, you can define patterns that are used to map messages, NV variables, or imported parameters and AUTOSAR elements with different names. With these patterns, you can, for example, take into account prefixes and/or postfixes.

Default patterns are defined in the ASCET options, Appearance\Editors\Software Component node. These patterns are available in the combo boxes of the Parameter Mapping view, the Internal Access and External Access tabs of the Message Mapping view, and in the NV-Data Mapping view. You can add your own patterns, either via the ASCET options window or via the combo boxes.

Auto-mapping automatically maps unconnected messages, NV variables, or imported parameters in the software component to AUTOSAR elements with a matching name and type (i.e. scalar, array, matrix, or record) according to the following heuristic:

Note

There is no guarantee that a message, NV variable, or imported parameter and an AUTOSAR element with matching names represent the same concept.

For example, a message named Speed that represents speed in km/h is not the same as an AUTOSAR element named Speed that represents speed in miles/h.

You must therefore verify that any auto-mappings represent valid connections.

Matching names are derived from the currently selected pattern.

If you add a prefix or postfix to one of these templates, auto-mapping works as shown in the following table.

pattern

auto-mapping result

Parameter Mapping tab

prefix_%IMPORTED.NAME%

An imported parameter name and a Calibration parameter prefix_name of the same type (i.e. scalar, array, matrix, or record) are mapped.

%IMPORTED.NAME%_postfix

An imported parameter name and a Calibration parameter name_postfix of the same type (i.e. scalar, array, matrix, or record) are mapped.

prefix_%CALIBRATION.NAME%

An imported parameter prefix_name and a Calibration parameter name of the same type (i.e. scalar, array, matrix, or record) are mapped.

%CALIBRATION.NAME%_postfix

An imported parameter name_postfix and a Calibration parameter name of the same type (i.e. scalar, array, matrix, or record) are mapped.

Note

Names of classes, modules, Calibration interfaces or records are not considered.

Internal Access tab

prefix_%MESSAGE.NAME%

A message name and an interrunnable variable prefix_name of the same type (i.e. scalar, array, matrix, or record) are mapped.

%MESSAGE.NAME%_postfix

A message name and an interrunnable variable name_postfix of the same type (i.e. scalar, array, matrix, or record) are mapped.

prefix_%VARIABLE.NAME%

A message prefix_name and an interrunnable variable name of the same type (i.e. scalar, array, matrix, or record) are mapped.

%VARIABLE.NAME%_postfix

A message name_postfix and an interrunnable variable name of the same type (i.e. scalar, array, matrix, or record) are mapped.

Note

Names of modules or records are not considered.

External Access tab

prefix_%MESSAGE.NAME%

A message name and an interface element prefix_name of the same type (i.e. scalar, array, matrix, or record) are mapped.

%MESSAGE.NAME%_postfix

A message name and an interface element name_postfix of the same type (i.e. scalar, array, matrix, or record) are mapped.

prefix_%VARIABLE.NAME%

A message prefix_name and an interface element name of the same type (i.e. scalar, array, matrix, or record) are mapped.

%VARIABLE.NAME%_postfix

A message name_postfix and an interface element name of the same type (i.e. scalar, array, matrix, or record) are mapped.

Note

Names of modules, SenderReceiver interfaces or records are not considered.

NV-Data Mapping tab

prefix_%NVVARIABLE.NAME%

An NV variable name and an interface element prefix_name of the same type (i.e. scalar, array, matrix, or record) are mapped.

%NVVARIABLE.NAME%_postfix

An NV variable name and an interface element name_postfix of the same type (i.e. scalar, array, matrix, or record) are mapped.

prefix_%ELEMENT.NAME%

An NV variable prefix_name and an interface element name of the same type (i.e. scalar, array, matrix, or record) are mapped.

%ELEMENT.NAME%_postfix

An NV variable name_postfix and an interface element name of the same type (i.e. scalar, array, matrix, or record) are mapped.

Note

Names of classes, modules, NVData interfaces, or records are not considered.

Keep in mind the following rules when you define a template:

Auto-mapping is accessed via the Mapping menu or – in the respective views – the Auto-Mapping context menu option or the Auto-Mapping button; see also Accessing ASCET Messages – step 6, Accessing Calibration Parameters – step 5, or Accessing Non-Volatile Variables – step 5.

See also

Accessing ASCET Messages

Accessing Calibration Parameters

Accessing Non-Volatile Variables

Message Mapping

Parameter Mapping

NV Data Mapping