Sync Job Contracts
A sync job contract defines which parts of an ECU configuration ECU Project Synchronization shares. This page describes the format of a contract and how to find the paths of the elements you want to share.
Sync Job Contract Format
A sync job contract is a JSON file with the file name extension .json.
It selects the elements of the ECU configuration that dvcfg-b project publish exports and dvcfg-b project sync takes over.
| JSON key | Type | Description |
|---|---|---|
|
String |
Required.
Unique name of the contract.
The |
|
String |
Optional.
Owner of the contract, for example the name of the platform team.
It’s written to the file |
|
Array |
Selects all instances of a definition in the active module configurations. Each entry contains:
|
|
Array |
Selects single elements of the configuration. Each entry contains:
|
A contract needs at least one entry in definitions or instances.
Unknown keys are ignored.
| Value | Selected content |
|---|---|
|
The container with all parameters, references, and sub-containers, recursively. |
|
The container with its own parameters and references, but without its sub-containers. Select the sub-containers you need with additional entries. |
For a selected parameter, includeSubElements has no effect.
The parent containers of a selected element are always added to the published data, so the element can be placed at the same position in the consuming project.
Example
The following contract shares the following parts of the configuration:
-
All crypto keys and key elements of the hardware security module, selected by their definitions.
-
The general Com settings, selected by a definition path without package.
-
One NvM block and the PDU
ComIPdu_001, each with all sub-containers. -
The PDU
ComIPdu_002without its sub-containers. -
The single parameter
ComConfigurationId.
{
"name": "platform-com-hsm",
"origin": "Platform Team",
"definitions": [
{
"definition": "/MICROSAR/Crypto_30_vHsm/Crypto/CryptoKeyElements",
"includeSubElements": true
},
{
"definition": "/MICROSAR/Crypto_30_vHsm/Crypto/CryptoKeys",
"includeSubElements": true
},
{
"definition": "Com/ComGeneral",
"includeSubElements": true
}
],
"instances": [
{
"instance": "/ActiveEcuC/NvM/DemPrimaryDataBlocks",
"includeSubElements": true
},
{
"instance": "/ActiveEcuC/Com/ComConfig/ComIPdu_001",
"includeSubElements": true
},
{
"instance": "/ActiveEcuC/Com/ComConfig/ComIPdu_002",
"includeSubElements": false
},
{
"instance": "/ActiveEcuC/Com/ComConfig[ComConfigurationId]"
}
]
}
Where Contracts Are Found
dvcfg-b project publish and dvcfg-b project sync search the following folders recursively for files with the extension .json:
-
The folder
Misc/SyncJobContractsof the BSW Package that you pass with-b. -
Every folder that you pass with
-l(--sync-job-location).
Keep only contracts in these folders.
A .json file that isn’t valid JSON stops the command.
Use a unique name for each contract.
Finding Instance and Definition Paths
A sync job contract selects elements by their instance path or by their definition path. You don’t have to type these paths: copy them from the GUI client of DaVinci Configurator Classic Version 6.
| Element | Instance path, for instances |
Definition path, for definitions |
|---|---|---|
Module configuration |
|
|
Container |
|
|
Parameter or reference |
Path of the container, followed by the short name of the parameter definition in square brackets. |
|
Parameter or reference with several values |
Zero-based index of the value, a colon, and the short name of the definition. |
|
In variant projects, an instance path can end with the variants the element is visible in, for example /ActiveEcuC/Can/CanConfigSet/CanHardwareObject[0:CanControllerRef]{VariantA,VariantB}.
-
Open the publishing project in a GUI client and select the element you want to share.
-
Copy the path:
-
In the GUI client Evo 2, open the Properties view. Copy the value of Short Name Path in the Status section for an instance path, or the value of DefinitionRef in the Definition section for a definition path.
-
In the GUI client Evo 1, open the context menu of the element and select Copy Short Name Path for an instance path, or Copy Definition for a definition path. If you select several elements, the paths of all elements are copied, one path per line.
-
-
Paste the path into the
instanceordefinitionfield of the contract.
|
An instance path contains the package of the active ECU configuration, for example |