Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 54 additions & 52 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,54 @@
# DaVinci Samples

Welcome to **DaVinci Samples**, an open-source repository designed to help developers understand and adopt **DaVinci Configurator Classic Version 6** workflows more easily.

## 📌 What is This Repository For?

This repository provides sample resources to help you integrate DaVinci Configurator Classic Version 6 workflows:

- **Ready-Set-Go-Scripts** demonstrating how DaVinci Configurator Classic Version 6 integrates into typical MICROSAR projects.
- **davinci-workspace-setup**: Create a new DaVinci Project and link additional workspaces. Execute project import and update.

## 🛠 Requirements

Always required:

- Activated DaVinci Configurator Classic Version 6 License
- A valid MICROSAR BSW package

If using scripts:

- DaVinci Developer Classic (Release 4.17 SP2 or newer)
- DaVinci Team (Release 6.2 or newer)

## 🚀 Getting Started

1. Clone the repository:

```bash
git clone https://github.com/vectorgrp/davinci-samples.git
```

2. Explore the samples:
- Navigate to the folder that matches your use case.
3. Follow the instructions in each folder’s README to get started.

## 📂 Repository Structure

```text
davinci-samples/
├─ ready-set-go-scripts/ # Ready-to-use scripts for quick workflow setup
├─ .editorconfig # Editor configuration for consistent coding styles across IDEs
├─ .gitignore # Specifies files and directories to be ignored by Git
├─ LICENSE # License information
├─ README.md # Main documentation for the repository
└─ SECURITY.md # Security policy
```

## 📖 Documentation

Check the repository folders for step-by-step guides and explanations.

[Learn more about DaVinci Configurator Classic Version 6.](https://help.vector.com/davinci-configurator-classic/en/current/index.html)
# DaVinci Samples

Welcome to **DaVinci Samples**, an open-source repository designed to help developers understand and adopt **DaVinci Configurator Classic Version 6** workflows more easily.

## 📌 What is This Repository For?

This repository provides sample resources to help you integrate DaVinci Configurator Classic Version 6 workflows:

- **AppInt-Examples** shows you how to use the Application Integration Library in an Automation Interface project and in a DaVinci Application Integration (former DaVinci Team) pipeline
- **Ready-Set-Go-Scripts** demonstrating how DaVinci Configurator Classic Version 6 integrates into typical MICROSAR projects.
- **davinci-workspace-setup**: Create a new DaVinci Project and link additional workspaces. Execute project import and update.

## 🛠 Requirements

Always required:

- Activated DaVinci Configurator Classic Version 6 License
- A valid MICROSAR BSW package

If using scripts:

- DaVinci Developer Classic (Release 4.17 SP2 or newer)
- DaVinci Application Integration (Release 22.x or newer, former DaVinci Team)

## 🚀 Getting Started

1. Clone the repository:

```bash
git clone https://github.com/vectorgrp/davinci-samples.git
```

2. Explore the samples:
- Navigate to the folder that matches your use case.
3. Follow the instructions in each folder’s README to get started.

## 📂 Repository Structure

```text
davinci-samples/
├─ appint-examples/ # Example Automation Interface project and DaVinci Application Integration setup using the Application Integration Library
├─ ready-set-go-scripts/ # Ready-to-use scripts for quick workflow setup
├─ .editorconfig # Editor configuration for consistent coding styles across IDEs
├─ .gitignore # Specifies files and directories to be ignored by Git
├─ LICENSE # License information
├─ README.md # Main documentation for the repository
└─ SECURITY.md # Security policy
```

## 📖 Documentation

Check the repository folders for step-by-step guides and explanations.

[Learn more about DaVinci Configurator Classic Version 6.](https://help.vector.com/davinci-configurator-classic/en/current/index.html)
7 changes: 7 additions & 0 deletions appint-examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# AppInt Examples

## 📦 What Does This Folder Contain?

- **AppInt-Examples** shows you how to use the Application Integration Library in an Automation Interface project and in a DaVinci Application Integration (former DaVinci Team) pipeline
- **pai-project**: Example Automation Interface project, where the Application Integration Library is wrapped as multiple script tasks with exemplary instruction
- **dvappint-snippet**: Snippet of a build.gradle file, how to integrate those script tasks into a DaVinci Application Integration pipeline
15 changes: 15 additions & 0 deletions appint-examples/dvappint-snippet/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Setup

Take the exemplary `build.gradle` and adapt the tasks to your liking in your own DaVinci Application Integration Gradle project (former DaVinci Team).

At the moment you could replace the following tasks:
- ConfigureMemStack -> CustomScriptTask calling "configureMemStack" script task from the pai-project
- ConfigureDiagStack -> CustomScriptTask calling "configureDiagStack" script task from the pai-project
- ConfigureEcuStateManagement -> CustomScriptTask calling "configureEcuStateManagement" script task from the pai-project

Make sure that the task order is kept in place.

Keep in mind, that the JSON instructions are not considered in the CustomScriptTask.

Either you parse them yourself in the script task or you rewrite the instructions as shown in the pai-project.

44 changes: 44 additions & 0 deletions appint-examples/dvappint-snippet/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import com.vector.dvt.ci.wf.tasks.helper.CustomScriptTask

plugins {
id 'com.vector.dvt.ci.vttintegration' version '22.+'
}

tasks.register("appIntConfigureEcuStateManagement", CustomScriptTask) {
group = 'custom'
addCustomScriptTask 'configureEcuStateManagement'
customScriptDirectories = ['../pai-project/build/libs']
inputWorkspace = configureWatchdogManagement.outputZip
configurator = dvtWorkflow.configurator
bswPackage = dvtWorkflow.bswPackage
}

tasks.register("appIntConfigureDiagStack", CustomScriptTask) {
group = 'custom'
addCustomScriptTask 'configureDiagStack'
customScriptDirectories = ['../pai-project/build/libs']
inputWorkspace = appIntConfigureEcuStateManagement.outputZip
configurator = dvtWorkflow.configurator
bswPackage = dvtWorkflow.bswPackage
}

tasks.named("setInitValues"){
inputWorkspace = appIntConfigureDiagStack.outputZip
}

tasks.register("appIntConfigureMemStack", CustomScriptTask) {
group = 'custom'
addCustomScriptTask 'configureMemStack'
customScriptDirectories = ['../pai-project/build/libs']
inputWorkspace = setInitValues.outputZip
configurator = dvtWorkflow.configurator
bswPackage = dvtWorkflow.bswPackage
}

tasks.named("serviceSwcTaskMappingConstraints"){
inputWorkspace = appIntConfigureMemStack.outputZip
}

tasks.named("serviceSwcTaskMapping"){
inputWorkspace = appIntConfigureMemStack.outputZip
}
10 changes: 10 additions & 0 deletions appint-examples/pai-project/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Gradle
.gradle/
build/
!gradle/wrapper/gradle-wrapper.jar

# Kotlin
.kotlin/

# IDE (already covered at repo root, kept here for standalone use)
.idea/
9 changes: 9 additions & 0 deletions appint-examples/pai-project/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Setup

Replace the path to the DaVinci Configurator Classic Evo1 in the `gradle.properties`.
Then you should be able to build the project.

In each script task you can adapt the API usage to your liking.
Some examples:
- You can modify the collected instances, before passing them to the configuration. You could for example drop certain instances to ignore them
- You can adapt the instructions provided for the MemStack Configuration.
20 changes: 20 additions & 0 deletions appint-examples/pai-project/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
plugins {
alias(libs.plugins.automationPlugin)
alias(libs.plugins.kotlinJvm)
alias(libs.plugins.kotlinSamWithReceiver)
}

repositories {
maven {
setUrl("https://packages.vehub.vector.com/maven")
}
}

dependencies {
implementation("com.vector.ecusdk:appint:0.1.0")
}

scriptProject {
classes = ["ConfigureEcuStateManagement", "ConfigureMemStack", "ConfigureDiagnosticStack"]
cfgPath = file(dvcfgPath)
}
4 changes: 4 additions & 0 deletions appint-examples/pai-project/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
kotlin.stdlib.default.dependency=false

#TODO: fill in your Cfg path
#dvcfgPath=<yourDvcfgPath>
10 changes: 10 additions & 0 deletions appint-examples/pai-project/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[plugins]
automationPlugin = { id = "com.vector.cfg.pai.automation-build-gradle", version = "1.5.3" }
kotlinJvm = { id = "org.jetbrains.kotlin.jvm", version = "2.3.0" }
kotlinSamWithReceiver = { id = "org.jetbrains.kotlin.plugin.sam.with.receiver", version = "2.3.0" }

[libraries]
junitBom = { group = "org.junit", name = "junit-bom", version = "5.14.4" }
junitApi = { group = "org.junit.jupiter", name = "junit-jupiter-api" }
junitEngine = { group = "org.junit.jupiter", name = "junit-jupiter-engine" }
junitPlatformLauncher = { group = "org.junit.platform", name = "junit-platform-launcher" }
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.0-bin.zip
networkTimeout=20000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading