The purpose of this article is to describe how the configuration of the AUTOSAR Data Type Editor is performed.
Below is a screenshot of the editor:
The AUTOSAR Data type editor is activated on the Item Type with SID "AR4P" often called "Primitive" or "Application Primitive Data Type".
The picture below illustrates what Item and Part Types that are required to support the complete functionality of the AUTOSAR Data Type Editor:
The following Attribute Types are required:
|Name||SID||Type||Dimension||Range||Default on Item Type|
|Compu Category||ARCB||Enumeration||Single||IDENTICAL, LINEAR, SCALE_LINEAR, SCALE_LINEAR_AND_TEXTTABLE, TEXTTABLE||ARCU|
|Category||ARCA||Enumeration||Single||VALUE, STRING, BOOLEAN||AR4P|
|Compu internal to phys||ARXC||XML||Single||ARCU|
|Lower limit internal range||ARLO||String||Single||ARDC|
|Upper limit internal range||ARLU||String||Single||ARDC|
|Lower limit internal interval range||ARLT||Enumeration||Single||OPEN, CLOSED, INFINITE||ARDC|
|Upper limit internal interval range||ARUT||Enumeration||Single||OPEN, CLOSED, INFINITE||ARDC|
|Lower limit physical range||ARLP||String||Single||ARDC|
|Upper limit physical range||ARLV||String||Single||ARDC|
|Lower limit physical interval range||ARLR||Enumeration||Single||OPEN, CLOSED, INFINITE||ARDC|
|Upper limit physical interval range||ARUS||Enumeration||Single||OPEN, CLOSED, INFINITE||ARDC|
|Max text size||ARSR||String||AR4P|
|Array size semantics||AR4T||FIXED-SIZE, VARIABLE-SIZE||AR4P|
A recommendation is to set these attribute types to be "Restricted" so that they cannot be edited through the swExplorer interface without using the Data Type Editor.
The configuration for the AUTOSAR Data Type Editor can be found in the group "Autosar" with the Caption "Data type" in "Configure the explorer".
Below is the configuration XML for the Autosar Data Type Editor:
<Config> <SelectableUnitsPath>/AIUW/AIUV</SelectableUnitsPath> <HintContextParts>9IES;9ICF;ARSC;ARPP;ARDE;AR4Y*;AR4F*</HintContextParts> <IncludeDataConstraint>true</IncludeDataConstraint> </Config>
The elements "<SelectableUnitsPath>" and "<HintContextParts>" are used to configure how the "Select unit" dialog finds the available units. This dialog appears when the "Set unit" button is pressed.
Below is a picture of the "Select unit" dialog:
The below picture illustrates an example meta model for this configuration:
Below the XML tags in the configuration are explained:
"<HintContextParts>": Contains a comma separated list with the Part Types to be followed from the selected Application Primitive Data Type up to an Item, in this example the AUTOSAR System, that contains the available SW Units to choose from. It is possible to append a "*" to a Part Type SID to indicate that it is to be followed 0..* times. The items found are added to the drop down list with the label "Context Item". It is also possible to define multiple paths by separating a number of comma separated lists with a "|". Please note that the comma separated list describes the Part SID:s from top to bottom starting from the left.
"<SelectableUnitsPath>": Contains a Path expression that describes how to find the SW Units from in this case, the AUTOSAR System. The SW Units found are added to the list in the "Select unit" dialogue.
<IncludeDataConstraint>: Indicates whether or not the Data Constraint Functionality is available in the AUTOSAR Data Type Editor.
Note: For the Data Constraint Functionality to work the Item type Data Contraint (ARDC) needs to be available together with the Attribute Types for it, as defined in the Attribute table earlier in this article.