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
- Go to File > Configure the explorer.
- On the Item views tab, find the Data type view in the Autosar group.
- Click View example XML and copy the script as a starting point for your configuration.
- Click Edit configuration and paste the configuration in the Edit XML window.
- Modify the configuration to meet the needs of the use case. (See the explanation of available elements below.)
- 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
Name | SID | Type | Dimension | Range | Related Item Type |
Compu Category | ARCB | Enumeration | Single | Identical, Linear, Scale linear, Scale linear text table, Text table, Bit field text table | 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 | ||
Fill character | ARFI | String | Single | AR4P | |
Array size semantics | AR4T | FIXED-SIZE, VARIABLE-SIZE | AR4P |
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. |