Behind the Scenes
When a DaVinci Project is loaded, DaVinci Configurator Classic loads the referenced ARXML files from the DaVinci Project Settings in a specific order. The AUTOSAR elements from these files are merged into the in-memory model in that order. If the same element is defined in multiple files, especially when elements are defined as AUTOSAR splitable, Model Merge Conflicts can arise.
Some conflicts can be resolved automatically if the user activates the option described in Automatic Conflict Resolution. Other conflicts require Manual Resolution.
Non-Splitable Elements
Some elements in AUTOSAR are defined as non-splitable. These elements should be defined only once across all ARXML files. When a non-splitable element is defined in multiple files, a conflict can arise.
Implicitly Resolved Conflicts
The following scenarios are exceptions and do not lead to conflicts reported to the user. The tool merges these elements or values based on Model Merge Priority implicitly.
This internal conflict is called Implicitly Resolved Conflict.
| The in-memory model contains only one instance of the element for following scenarios. |
Equal Elements
If a non-splitable element is defined multiple times and its contents are identical, no conflict is reported and the tool ignores the duplication.
Ignored Elements
DaVinci Configurator defines some AUTOSAR elements as exceptions if conflicting. When a conflict for such an element is found, the conflict is informationally reported and always automatically resolved, even if Automatic Conflict Resolution is not activated. The conflict is ignored and does not negatively influence the Model Merge.
Following types of conflicting elements are always resolved:
-
DocumentationBlock
-
MultiLanguageOverviewParagraph
-
MultiLanguageParagraph
-
MultiLanguagePlainText
-
MultiLanguageVerbatim
-
MultilanguageLongName
Conflicting Elements
XML Attributes
Conflicts in XML attributes are reported by DaVinci Configurator, because attributes must be unique for one XML element.
If Automatic Conflict Resolution is activated, XML attribute conflicts are merged based on Model Merge Priority.
| Only conflicts for checksum (S) and timestamp (T) XML attributes are not reported and are ignored. For convenience, the tool always chooses the value based on Model Merge Priority. |
Model Merge Priority
The DaVinci Configurator uses a priority-based model merge to load content from ARXML files. If two ARXML files define the same AUTOSAR element with different content, a merge conflict can arise on project load.
The ARXML files referenced in the DaVinci Project Settings are assigned a priority based on their type and/or directory structure. These priorities of ARXML files define, in ascending order, which file’s content is prioritized in case of a conflict.
|
The DaVinci Configurator saves data into the ARXML files conflict-free. Any conflict resolved by Automatic Conflict Resolution overwrites the content of corresponding ARXML files on the next triggered project save. Note that conflicts with read-only files are still possible, as these are not overwritten by the tool. |
Priority Types
When a Model Merge Conflict arises, this priority is used to resolve the conflict if Automatic Conflict Resolution is activated or when an Implicitly Resolved Conflict is found.
|
A higher priority number means the objects of these locations win in case of a conflict. We recommend to recheck any automatic conflict resolutions before saving the project. For this the priorities help you by understanding why a specific value was chosen by the tool. |
The following table shows the detailed priority assignment of the different source types.
| Priority | Source Type | Referenced in |
|---|---|---|
1 |
Platform Types |
|
2 |
BSWMD |
* |
3 |
DaVinci Developer Classic Workspace |
|
4 |
IFP Recommended EcuC |
|
5 |
Application Components |
|
6 |
Timing Extension |
|
7 |
IFP EcuC & IFP Diagnostic EcuC |
|
8 |
Definition Restriction |
|
9 |
IFP HarmonizedExtract EcuC |
|
10 |
External EcuC File |
|
11 |
Recommended User-Authored EcuC |
|
12 |
Software Components |
|
13 |
Internal Behavior |
|
14 |
Evaluated Variant Set |
|
15 |
Structured Extract |
|
16 |
User-Authored EcuC |
*: Files from the BSW Package are loaded automatically. The BSW Package is always provided to any DaVinci Configurator task in the corresponding user interface and is not referenced by the DaVinci Project Settings.
-
File
AC.arxml(Application Components, Prio. 5) defines an AUTOSAR element with short nameXInitCfg. -
File
SC.arxml(Software Components, Prio. 12) also defines an AUTOSAR element with short nameXInitCfg.
Assuming both elements have the same AUTOSAR path, for example /Init/XInitCfg, and contain different attributes, a merge conflict arises on project load.
During automatic merge, the value from SC.arxml is chosen because it has the higher priority (12 vs. 5).
Manual Resolution
For manual conflict resolution, it can be helpful to understand which file source types are conflicting. When in doubt, use the described Priorities of ARXML Source Types of DaVinci Configurator as guidance.
For more information on how to manually resolve conflicts, see Manual Resolution.
Automatic Conflict Resolution
For Automatic Conflict Resolution, the priority assignment is used to resolve differences automatically. If a merge conflict is found between content from two files, the assigned priorities are considered to resolve and merge values.
When a conflict is resolved automatically, the object or value from the location with the higher priority wins. See Automatic Conflict Resolution for information how to activate the option and recommended steps.
|
We recommend rechecking any Automatic Conflict Resolution before saving the project. For this, the table Priorities of ARXML Source Types helps explain why a specific value was chosen by the tool. |
Directories
The above priority assignment is defined for different types of ARXML files, which can be referenced in the ArxmlProjectContent.json as
-
dir (a single directory),
-
dirList (a list of directories),
-
fileList (a list of files) or
-
file (a single file).
Directories are considered as follows:
-
All files inside a referenced directory inherit the priority of the directory type.
-
Inside a directory, the next-level priority is determined by file names.
-
For each directory, subdirectories are also considered.
-
Subdirectories are recursively searched for ARXML files.
-
All found ARXML files are alphabetically sorted.
-
-
If files or directories are referenced as a list in the DaVinci Project Settings, the list order is taken into account.
folderX
|-- a.arxml
|-- folderY (Subfolder)
|-- z.arxml
|-- c.arxml
If there is a merge conflict between a.arxml and c.arxml, the value of a.arxml would be prioritized by Automatic Conflict Resolution.
DaVinci Developer Classic Workspace
ARXML files loaded from DaVinci Developer Classic Workspace are not affected by the general Model Merge Priority rules of DaVinci Configurator.
| All files of the DaVinci Developer Classic Workspace are loaded as defined by the DaVinci Developer Classic. |
The in-model representation of the corresponding ARXML files is identical to the one in DaVinci Developer Classic. The assigned priority for DaVinci Developer Classic Workspace only applies in case of conflicts with other ARXML files for DaVinci Configurator.