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.

Further Conflicts

DaVinci Configurator identifies all further conflicts, especially for splitable elements, based on AUTOSAR schema rules. It reports them with a type and a more specific cause.

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.

Table 1. Priorities of ARXML Source Types
Priority Source Type Referenced in

1

Platform Types

ArxmlProjectContent.json

2

BSWMD

[1]

3

DaVinci Developer Classic Workspace

General.json [2]

4

IFP Recommended EcuC

ArxmlProjectContent.json

5

Application Components

ArxmlProjectContent.json

6

Timing Extension

ArxmlProjectContent.json

7

IFP EcuC & IFP Diagnostic EcuC

ArxmlProjectContent.json

8

As-code Recommended EcuC

9

Read-only as-code file

10

Definition Restriction

ArxmlProjectContent.json

11

IFP HarmonizedExtract EcuC

ArxmlProjectContent.json

12

External EcuC File

ArxmlProjectContent.json

13

Recommended User-Authored EcuC

ArxmlProjectContent.json

14

Software Components

ArxmlProjectContent.json

15

Derived Internal Behavior

ArxmlProjectContent.json

16

User-Authored Internal Behavior

ArxmlProjectContent.json

17

Evaluated Variant Set

ArxmlProjectContent.json

18

Structured Extract

ArxmlProjectContent.json

19

User-Authored EcuC

ArxmlProjectContent.json

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.

Example 1. Merge Conflict Between Two ARXML Files
  • File AC.arxml (Application Components, priority 5) defines an AUTOSAR element with the short name XInitCfg.

  • File SC.arxml (Software Components, priority 14) also defines an AUTOSAR element with the short name XInitCfg.

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:

  1. Every file inside a referenced directory inherits the priority of the directory type.

  2. For each directory, DaVinci Configurator also considers subdirectories.

    1. It searches subdirectories recursively for ARXML files.

    2. 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.

ArxmlProjectContent.json
"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.

ArxmlProjectContent.json
"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.


1. 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.
2. The internal DvDevC priority order of files is respected. See DaVinci Developer Classic Workspace for more details.