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:


NameSIDTypeDimension
RangeDefault on Item Type
Compu CategoryARCBEnumerationSingleIDENTICAL, LINEAR, SCALE_LINEAR, SCALE_LINEAR_AND_TEXTTABLE, TEXTTABLE
ARCU
CategoryARCAEnumerationSingleVALUE, STRING, BOOLEANAR4P
Compu internal to physARXCXMLSingle

ARCU
Lower limit internal rangeARLOStringSingle

ARDC
Upper limit internal rangeARLUStringSingle

ARDC
Lower limit internal interval rangeARLTEnumeration
Single
OPEN, CLOSED, INFINITEARDC
Upper limit internal interval range
ARUT
Enumeration
Single
OPEN, CLOSED, INFINITE
ARDC
Lower limit physical range
ARLPStringSingle

ARDC
Upper limit physical range
ARLVString
Single

ARDC
Lower limit physical interval range
ARLREnumeration
Single
OPEN, CLOSED, INFINITE
ARDC
Upper limit physical interval range
ARUSEnumeration
Single
OPEN, CLOSED, INFINITE
ARDC
Max text sizeARSRString


AR4P
Fill characterARFIString
Single

AR4P
Array size semanticsAR4T

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.