This article describes how to configure the AUTOSAR Data Type Editor.


Prerequisites

  • Familiarity with SystemWeaver concepts such as Items, Parts and Attributes
  • Knowledge of XML
  • Assignment of the SW Architect role in the server
  • The SWExtension.Autosar extension file is located in the Client's swExplorerExtensions directory

Configuring the View

  1. Go to File > Configure the explorer
  2. On the Item views tab, find the Data type view in the Autosar group.
  3. Click View example XML and copy the script as a starting point for your configuration. 
  4. Click Edit configuration and paste the configuration in the Edit XML window. 
  5. Modify the configuration to meet the needs of the use case. (See the explanation of available elements below.)
  6. When you are ready to test and make it available to users, check the Active box. Users must log out and back in to see the new option.

Example Autosar Data Type Editor


The AUTOSAR Data type editor is activated on the Item Type with SID "AR4P", often called "Primitive" or "Application Primitive Data Type". 


Meta Model 

The below illustration shows which Item and Part Types are required to support the complete functionality of the AUTOSAR Data Type Editor:

Required Attribute Types

NameSIDTypeDimensionRangeRelated Item Type
Compu CategoryARCBEnumerationSingleIdentical, Linear, Scale linear, Scale linear text table, Text table, Bit field text tableARCU
CategoryARCAEnumerationSingleValue, String, BooleanAR4P
Compu internal to physARXCXMLSingle
ARCU
Lower limit internal rangeARLOStringSingle
ARDC
Upper limit internal rangeARLUStringSingle
ARDC
Lower limit internal interval rangeARLTEnumerationSingleOPEN, CLOSED, INFINITEARDC
Upper limit internal interval rangeARUTEnumerationSingleOPEN, CLOSED, INFINITEARDC
Lower limit physical rangeARLPStringSingle
ARDC
Upper limit physical rangeARLVStringSingle
ARDC
Lower limit physical interval rangeARLREnumerationSingleOPEN, CLOSED, INFINITEARDC
Upper limit physical interval rangeARUSEnumerationSingleOPEN, CLOSED, INFINITEARDC
Max text sizeARSRString

AR4P
Fill characterARFIStringSingle
AR4P
Array size semanticsAR4T

FIXED-SIZE, VARIABLE-SIZEAR4P


Tip: Set these attribute types to be "Restricted" so that they cannot be edited through the swExplorer interface without using the Data Type Editor.


Configuration

Note: As of release R35, SelectableUnitsPath and HintContextParts are no longer used. Including them in the configuration will not have any effect. Instead, create an Add Part Grid for the Unit part (ARUU). 


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>
  <GraphVisible>true</GraphVisible>
</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 clicked.



The below picture illustrates an example meta model for this configuration: 

Explanation of the Configuration Elements

<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 pipe "|". 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. 


<GraphVisible> displays a button for showing/hiding the graph. Valid options are "true" or "false" Default is "true".

 

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.