Create and Convert Evaluated Variant Definition File

Methods to Specify EVS Definition File

The EVS can be defined either directly in VS Code or through terminal commands, providing flexibility for both graphical and command-line workflows.

Via Visual Studio Code

  1. To create a JSON-based variant definition file, go to File  New File and select New DaVinci-AUTOSAR-JSON File or right-click in the Explorer and choose DaVinci  New DaVinci-AUTOSAR-JSON File from the context menu. Select evaluated-variant-set from the context menu to define variants.

  2. Choose either the detailed or compact variant file template to begin designing.

    • Both templates support evaluated variant sets and allow specifying a variant name or path.

    • The detailed template additionally supports criterion definitions from the start.

  3. The variant definition file will be created in your folder as compact or detailed .evs.json and will appear in the Explorer.

This file is automatically associated with the appropriate JSON schema, enabling editing with autocomplition and validation.

To preview the ARXML content of the JSON file, click on ARXML Preview in the file’s title menu.

With Terminal Commands

  1. Navigate to the installation path of DaVinci-AUTOSAR-JSON and execute export in evs domain and to get an Evaluated Variant Definition File and select compact or detailed template.

    • Both templates support evaluated variant sets and allow specifying a variant name or path.

    • The detailed template additionally supports criterion definitions from the start.

      $ dvarjson evs export -s -e compact
  2. The variant definition file will be created as compact or detailed .evs.json.

Conversion Methods of EVS Definition File in ARXML

The EVS can now not only be specified but also converted either in VS Code or via CLI commands.

Via Visual Studio Code

  1. To generate an ARXML file from a variant definition file, select the file in the Explorer and choose DaVinci  Convert to ARXML from the context menu.

  2. You will be prompted to choose a destination path and specify a file name for the converted ARXML file.

  3. After you confirm the destination path and file name, the ARXML variant definition or legacy diagnostic data definition file will be generated.

With Terminal Commands

  1. Navigate to the installation path of DaVinci-AUTOSAR-JSON and execute convert to get an ARXML Evaluated Variant Set.

    $ dvarjson evs convert -i <compact.evs.json>