Behind the Scenes
When you load a DaVinci Project, DaVinci Configurator Classic loads the ARXML files referenced in the DaVinci Project Settings in a specific order. It merges the AUTOSAR elements from these files into the in-memory model in that same order. When the same element is defined in multiple files, Model Merge Conflicts can arise, especially for elements marked as AUTOSAR splitable.
DaVinci Configurator resolves some conflicts automatically if you activate the option described in Automatic Conflict Resolution. Other conflicts require manual resolution.
Non-Splitable Elements
AUTOSAR defines some elements as non-splitable. You must define such an element 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 that do not block project load.
DaVinci Configurator merges these elements or values implicitly, based on Model Merge Priority.
These conflicts are called Implicitly Resolved Conflict and are tagged [IMPLICITLY RESOLVED] in the Model Merge Report.
DaVinci Configurator reports such a conflict as a note and always resolves it automatically, even when Automatic Conflict Resolution is not active.
| For the following scenarios, the in-memory model keeps only one instance of the element. |
Equal Elements
If a non-splitable element is defined multiple times with identical content, DaVinci Configurator reports no conflict and ignores the duplication.
Ignored Elements
DaVinci Configurator treats some AUTOSAR elements as exceptions when they conflict. It always resolves (ignores) conflicts of these elements, so they do not affect the Model Merge:
-
DocumentationBlock
-
MultiLanguageOverviewParagraph
-
MultiLanguageParagraph
-
MultiLanguagePlainText
-
MultiLanguageVerbatim
-
MultilanguageLongName
Conflicting Elements
XML Attributes
DaVinci Configurator reports conflicts in XML attributes, because each attribute must be unique for one XML element.
When Automatic Conflict Resolution is active, DaVinci Configurator merges XML attribute conflicts based on Model Merge Priority.
| DaVinci Configurator does not report conflicts for the checksum (S) and timestamp (T) XML attributes and ignores them. For convenience, it always chooses the value based on Model Merge Priority. |
Model Merge Priority
DaVinci Configurator uses a priority-based model merge to load content from ARXML files. When two ARXML files define the same AUTOSAR element with different content, a merge conflict can arise on project load.
DaVinci Configurator assigns each ARXML file a priority based on its type or directory structure, or both. In ascending order, this priority decides which file’s content wins in a conflict.
|
DaVinci Configurator saves data into the ARXML files conflict-free. On the next project save, any conflict that Automatic Conflict Resolution resolved overwrites the content of the corresponding ARXML files. Conflicts with read-only files are still possible, because DaVinci Configurator does not overwrite them. |
Priority Types
DaVinci Configurator uses this priority to resolve a Model Merge conflict when Automatic Conflict Resolution is active or when it finds an Implicitly Resolved Conflict.
| A higher priority number means the objects at that location win in a conflict. |
The following table shows the priority for each source type.
| Priority | Source Type | Referenced in |
|---|---|---|
1 |
Platform Types |
|
2 |
BSWMD |
[1] |
3 |
DaVinci Developer Classic Workspace |
|
4 |
IFP Recommended EcuC |
|
5 |
Application Components |
|
6 |
Timing Extension |
|
7 |
IFP EcuC & IFP Diagnostic EcuC |
|
8 |
As-code Recommended EcuC |
|
9 |
Read-only as-code file |
|
10 |
Definition Restriction |
|
11 |
IFP HarmonizedExtract EcuC |
|
12 |
External EcuC File |
|
13 |
Recommended User-Authored EcuC |
|
14 |
Software Components |
|
15 |
Derived Internal Behavior |
|
16 |
User-Authored Internal Behavior |
|
17 |
Evaluated Variant Set |
|
18 |
Structured Extract |
|
19 |
User-Authored EcuC |
Automatic Conflict Resolution and implicit resolution keep the value from the location with the higher priority. For manual resolution, use the Priorities of ARXML Source Types to decide which source type should win. Either way, recheck the result before you save the project.
-
File
AC.arxml(Application Components, priority 5) defines an AUTOSAR element with the short nameXInitCfg. -
File
SC.arxml(Software Components, priority 14) also defines an AUTOSAR element with the short nameXInitCfg.
Both elements share the same AUTOSAR path, for example /Init/XInitCfg, but contain different attributes, so a merge conflict arises on project load.
During the automatic merge, DaVinci Configurator chooses the value from SC.arxml, because it has the higher priority (14 vs. 5).
Directories
The priority assignment above applies to the different types of ARXML files that you reference in the ArxmlProjectContent.json as:
-
dir(a single directory) -
dirList(a list of directories) -
fileList(a list of files) -
file(a single file)
DaVinci Configurator handles directories as follows:
-
Every file inside a referenced directory inherits the priority of the directory type.
-
For each directory, DaVinci Configurator also considers subdirectories.
-
It searches subdirectories recursively for ARXML files.
-
It sorts all found ARXML files alphabetically.
-
Example
Given a setting with a directory reference and following ARXML files, the automatic conflict resolution, based on the alphabetical order, prioritizes the value of a.arxml for a merge conflict between a.arxml and c.arxml.
"location": {
"dir": "../folderX"
}
folderX
|-- a.arxml
|-- folderY (Subfolder)
|-- z.arxml
|-- c.arxml
In case of a file list, the given order of the files determines the priority in descending order, so the first file has the highest priority, which is file a.arxml in the example below.
"fileList": [
"../a.arxml",
"../c.arxml"
]
DaVinci Developer Classic Workspace
The general Model Merge Priority rules of DaVinci Configurator do not affect ARXML files loaded from the DaVinci Developer Classic Workspace.
| DaVinci Configurator loads all files of the DaVinci Developer Classic Workspace as defined by DaVinci Developer Classic. |
The in-model representation of these ARXML files is identical to the one in DaVinci Developer Classic. The priority assigned to the DaVinci Developer Classic Workspace applies only in conflicts with other ARXML files.