This article describes how to edit AUTOSAR Application Primitive Data Types in SystemWeaver.
- The SWExtension.Autosar extension for the swExplorer client
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, STRING and BOOLEAN.
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.
For VALUE, the following options are available to describe the Application Data Type:
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.
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.
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:
The minimum allowed internal application value.
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. CLOSED means larger than the minimum value. UNDEFINED means that the interval type is not defined.
Max interval type
Defines the interval type for the maximum value. OPEN means less than or equal to the maximum value. CLOSED means less than the maximum value. UNDEFINED means that the interval type is not defined.
The scaling factor of the internal value.
The offset of the internal value to the physical Value.
The denominator of the formula. This is commonly set to 1.
The computed minimum physical value.
The computed maximum physical value.
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.
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.
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.
Defining Data Constraints
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.
The 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.
This datatype category defines a single value interpreted as a string.
The following attributes are available:
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.
This datatype category defines a value that can be either True or False.
The Boolean datatype category gives no further options.
Saving the Information
When you are finished defining the Data Type, press 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.