DvCliAdaptive is a command-line interface for working with DaVinci Developer Adaptive projects.

The CLI provides commands to inspect project contents, validate, generate, and run script tasks. This reference summarizes commands and their options and usage as well as exit codes.

Basic Syntax

DvCliAdaptive [-v | --version] [-h | --help] [COMMAND] [ARGS...]

Global Options

Commands

Overview

Command

Purpose

list-generators

Lists the currently available generators.

list-model-files

Lists all files used in the loaded project/model.

list-scopes

Lists all available scopes in the loaded project/model.

list-script-tasks

 

Lists all available script tasks.

validate

Validates the given project and reports any issues.

generate

Validates and then generates the given project.

run

Executes the specified script task(s).

Using Abbreviations

The DaVinci Developer Adaptive CLI supports abbreviations.

If the CLI finds exactly one match, then the command is executed. If the CLI finds multiple matches, execution of the CLI is cancelled.

Case-Sensitivity:

  • Abbreviations: case-insensitive
  • Full command: case-insensitive

Examples:

# Command
list-model-files
# Case-insensitive full command
list-Model-Files
# Case-insensitive abbreviated command
list-M-F or l-M-F.

Common Options

The following argument options are available for almost all commands. The exception is list-generators with only the basic options.

Basic Options

Basic Options

Argument

Purpose

-b=<folder>,

--bsw-package=<folder>

Directory of the BSW package.

--log-file=<file>

Specifies the path for the log file.

--verbose

Enables the verbose output of logging messages.

-h,

--help

Display the help.

Project Options

notice

Note: Specify the path to a ADPA project (-p) OR to the model folders (--models). You cannot use both arguments for the same command line.

Project Options

Argument

Purpose

-p=<file>,

--project=<file>

Specifies the path to an ADPA project.

--models=<folder>[,<folder>...]

Specifies the paths to folders containing model files.

--referenced-projects=<folder>[,<folder>...]

Specifies additional search locations for referenced projects.

--no-mex-migration

Disables the execution of automatic MEX migration.

--save

Persists any changes to the files after execution.

--schema-validation

Validates the model against the schema.

Command Options and Usage

list-generators

Lists the currently available generators.

Syntax:

DvCliAdaptive list-generators [ARGS...]

Examples:

DvCliAdaptive list-generators

DvCliAdaptive list-generators -b=./bsw –verbose

DvCliAdaptive list-generators --log-file=output.log

DvCliAdaptive list-generators --help

Options:

list-model-files

Lists all files used in the loaded project/model.

Syntax:

DvCliAdaptive list-model-files [ARGS...]

Examples:

DvCliAdaptive list-model-files
    -p="C:\Project\main.adpa"

DvCliAdaptive list-model-files
    -b="C:\BSW"
    --models="C:\Models\A,C:\Models\B"
    --log-file="C:\Logs\example.log"
    --save
    --schema-validation

Options:

list-scopes

Lists all available scopes in the loaded project/model.

Syntax:

DvCliAdaptive list-scopes [ARGS...]

Example:

DvCliAdaptive list-scopes
    --p="C:\project\main.adpa"
    --referenced-projects="D:\project\myotherproject.adpa,D:\dev\projects\project.adpa"
    --save
    --schema-validation

DvCliAdaptive list-scopes
    --models="C:\Models\A,C:\Models\B"

Options:

list-script-tasks

Lists all available script tasks.

Syntax:

DvCliAdaptive list-script-tasks [ARGS...]

Example:

DvCliAdaptive list-script-tasks
    -p="project.adpa"

DvCliAdaptive list-script-tasks
    --models="/home/user/models/base,/home/user/models/extended"
    --tasks="InitTask,ValidateTask"
    --task-args="InitTask:mode=fast"
    --task-args="ValidateTask:level=high"

Options:

Script Options

Argument

Purpose

--script-locations=<folder>[,<folder>...]

Specifies additional folders to search for scripts.

--ignore-user-script-locations

Exclude all script locations of the scopes

  • User@Machine and
  • User@Project.

--tasks=<taskName>[,<taskName>...]

Specifies one or more script tasks to execute, separated by commas.

--task-args=<taskName:key=value>

Passes arguments to the specified script task.

validate

Validates the given project and reports any issues.

Syntax:

DvCliAdaptive validate [ARGS...]

Typical use: Run before generation to catch configuration errors.

Example:

DvCliAdaptive validate
    --models="/home/user/models/base,/home/user/models/extended"
    --report-dir="/home/user/reports"
    --report-type="xml"

DvCliAdaptive validate
    -p="project.adpa"
    --report-dir="/home/user/reports"
    --report-type="html,json"
    --full

Options:

Generation and Validation Options

Argument

Purpose

--generators=<generator>[,<generator>...]

Defines the generators to use.

If not specified, all available generators are included.

--excluded-generators=<generator>[,<generator>...]

Defines which generators should be ignored.

--scopes=<scope>[,<scope>...]

Specifies the model scopes that will be used.

All available scopes are used if this option is omitted.

--include-autosar

Enables the display of non-generator AUTOSAR warnings.

--ignore-warnings=<validationId>[,<validationId>...]

Specifies the IDs of validation results to be ignored.

--report-dir=<reportDir>

Specified the path to the execution report.

--report-type=<reportType>[,<reportType>...]...

Specifies the report format.

Valid options are:

  • XML
  • HTML
  • JSON
  • None

--gen-args-universal=<key=value>

Passes arguments to all code generators.

--gen-args=<generator:key=value>

Passes arguments to the specified code generators.

--full

Validates the entire model in the project specified by the -p option.

It uses all available generators and scopes for the validation.

generate

Validates and then generates the given project.

Syntax:

DvCliAdaptive generate [ARGS...]

notice

Note: Generation stops if validation fails.

Example:

DvCliAdaptive generate
    -b="/home/user/bsw"
    -p="project.adpa"
    --referenced-projects="/home/user/ref1,/home/user/ref2"
    --excluded-generators="GenC
    --ignore-warnings="VAL001,VAL002"
    --report-dir="/home/user/reports"
    --report-type="html,json"
    --gen-args-universal="optimize=true"
    --gen-args="GenA:mode=fast"
    --gen-args="GenB:level=high"
    -o="/home/user/output"

DvCliAdaptive generate
    --models="/home/user/models/base,/home/user/models/extended"
    --generators="GenA,GenB"
    -o="/home/user/output"

Options:

  • Generation and Validation Options

    Argument

    Purpose

    --generators=<generator>[,<generator>...]

    Defines the generators to use.

    If not specified, all available generators are included.

    --excluded-generators=<generator>[,<generator>...]

    Defines which generators should be ignored.

    --scopes=<scope>[,<scope>...]

    Specifies the model scopes that will be used.

    All available scopes are used if this option is omitted.

    --include-autosar

    Enables the display of non-generator AUTOSAR warnings.

    --ignore-warnings=<validationId>[,<validationId>...]

    Specifies the IDs of validation results to be ignored.

    --report-dir=<reportDir>

    Specified the path to the execution report.

    --report-type=<reportType>[,<reportType>...]...

    Specifies the report format.

    Valid options are:

    • XML
    • HTML
    • JSON
    • None

    --gen-args-universal=<key=value>

    Passes arguments to all code generators.

    --gen-args=<generator:key=value>

    Passes arguments to the specified code generators.

    -o=<folder>

    Specifies the output folder for the generated data files.

    --output=<folder>

    Specifies the output folder for the generated data files.

Run

Executes the specified script task(s).

Syntax:

DvCliAdaptive run [ARGS...]

Example:

DvCliAdaptive run
    --script-locations="/home/user/scripts,/opt/scripts"
    --ignore-user-script-locations
    --log-file="/home/user/logs/full_run.log"
    --verbose
    --tasks="BuildTask,DeployTask"
    --task-args="BuildTask:optimize=true"
    --task-args="DeployTask:env=prod"
    --no-mex-migration
    --save
    --schema-validation

Options:

Script Options

Argument

Purpose

--script-locations=<folder>[,<folder>...]

Specifies additional folders to search for scripts.

--ignore-user-script-locations

Exclude all script locations of the scopes

  • User@Machine and
  • User@Project.

--tasks=<taskName>[,<taskName>...]

Specifies one or more script tasks to execute, separated by commas.

--task-args=<taskName:key=value>

Passes arguments to the specified script task.

task-help

Shows help for a specific script task.

Syntax:

DvCliAdaptive task-help [ARGS...]

Example:

DvCliAdaptive task-help
    -p="project.adpa"
    --script-locations="/home/user/scripts,/opt/scripts"
    --tasks="BuildTask,DeployTask

Options:

Script Options

Argument

Purpose

--script-locations=<folder>[,<folder>...]

Specifies additional folders to search for scripts.

--ignore-user-script-locations

Exclude all script locations of the scopes

  • User@Machine and
  • User@Project.

--tasks=<taskName>[,<taskName>...]

Specifies one or more script tasks to execute, separated by commas.

--task-args=<taskName:key=value>

Passes arguments to the specified script task.

Exit Codes

DvCliAdaptive Exit Codes

Exit Code

Description

0

Successful program execution.

1

Command execution failed.

2

Usage error: User input for the command was incorrect.