This article describes how to edit Autosar Application Primitive Data Types in SystemWeaver.


Tip: If you are not familiar with Autosar's Application Data Types, see Autosar Application Data Types or visit www.autosar.org.


Prerequisites


Activating the Data Type Editor

The Datatype Editor view is available when you select an Application Primitive Data Type.


The workflow and the available options are described in detail below.


Selecting the Data Type Category

The first step in the Data Type Editor is to choose the appropriate Datatype Category. The available options are: 

  • Value: a primitive value
  • String: a single value interpreted as a string
  • Boolean: a value that can be either True or False 

The available options for each selection above are described in detail below.


Selecting Value

For "Value", the following attributes are available to describe the Application Data Type:

                             

Unit

If applicable, a Unit can be selected to describe the unit of this data type in the physical domain. Defining a Unit is optional.


Compu method category

This attribute describes the type of translation from internal application values to the physical domain, e.g., from UINT8 to m/s. Defining a Compu method category is mandatory. The options are described below.


Identical

An internal application value corresponds directly to its value in the physical domain. No conversion needs to be defined to describe the translation of application values to the physical domain.


Linear

A linear conversion algorithm is defined to describe the translation of internal application values to the physical domain on the below format:


An explanation of the values are available below:


Min

The minimum allowed internal application value.

Max

The maximum allowed internal application value.

Min interval type 

Defines the interval type for the minimum value. OPEN means larger than or equal to the minimum value. The CLOSED area is limited by the value given. The value itself is included. CLOSED is the default value.

Max interval type

Defines the interval type for the maximum value. OPEN means less than or equal to the maximum value. The CLOSED area is limited by the value given. The value itself is included. CLOSED is the default value. 

Resolution

The scaling factor of the internal value.

Offset

The offset of the internal value to the physical Value.

Denominator

The denominator of the formula. This is commonly set to 1.

Physical min

The computed minimum physical value.

Physical max

The computed maximum physical value.


Scale linear

Multiple linear conversion algorithms are defined to describe the translation of internal application values to the physical domain.

For how to define a linear conversion algorithm, see the previous LINEAR section. By pressing Add row, one more linear conversion is defined. By pressing Delete, the corresponding linear conversion is removed. 


Scale linear text table

Multiple linear conversion algorithms are defined to describe the translation of internal application values to the physical domain together with named values.

For how to define a linear conversion algorithm, see the previous LINEAR section. By entering a value in the Const column, that interval will be interpreted as a named value. If you remove the Const value, it will be interpreted as a linear conversion. By pressing Add row, one more linear conversion or named value is defined. By pressing Delete, the corresponding linear conversion or named value is removed. 


Text table

An internal application value is translated to a named value in the physical domain.

The interval definition is the same as for the previously described LINEAR conversions. To define a named value, enter its name in the Constant column. By pressing Add row, one more named value is defined. By pressing Delete, the corresponding named value is removed. 


Bit field text table

Similar to TEXTTABLE but for bit fields.


Defining Data Constraints

To add a data constraint, click Add constraint


The data constraints settings define the limits for what value range that is allowed to be defined. These values need to be inside or equal to the range of a described linearization. If the limits are the same, it is possible to copy the limits from the linearization using the Copy limits from Compu method button. Depending on your choice of Compu method category, the limits to define are either for the allowed internal value range or for the allowed physical value range.


Data Constraint limits are shown in the Graph as red lines. If the red lines are horizontal, the Data Constraint is for the Physical domain. If the red lines are vertical, the Data Constraint is for the application internal domain.


Selecting String

This datatype category defines a single value interpreted as a string.


For String, the following attributes are available to describe the Application Data Type:


Unit

If applicable, a Unit can be selected to describe the unit of this data type in the physical domain. Defining a Unit is optional.


Array size semantics(mandatory)

Defines if the array of strings is of a fixed or dynamic size.


Max text size(mandatory)

Defines the number of characters allowed in the string.


Fill Character(optional)

Defines a character that is used for padding up to the Max text size, if necessary. The fill character is defined either as a decimal or hexadecimal number according to the ASCII format.


Selecting Boolean

This datatype category defines a value that can be either True or False.


For Boolean, the following attributes are available to describe the Application Data Type: 


Unit

If applicable, a Unit can be selected to describe the unit of this data type in the physical domain. Defining a Unit is optional.


Saving the Information

When you are finished defining the Data Type, click the Save button. Unlike many of the views in SystemWeaver, the Data Type Editor requires you to save before the information is stored in SystemWeaver. 


Note: The Data Type Editor view is configurable, therefore, some of the features described here may not be available in your installation.