Hexagon: VTD

Vendor information

Vendor

Web page

Product name

Version

Hexagon AB

https://hexagon.com

Virtual Test Drive

2.0 - 2022.4

Categories

MDL 🛈

APL 🛈

BAN 🛈

BMA 🛈

SVC 🛈

DGN 🛈

FIU 🛈

EES 🛈

FCT 🛈

DBG 🛈

IMG 🛈

AUDIO 🛈

ENVSIM 🛈

ENVCOM 🛈

✓

Platform

Operating system

Support

Windows

✓

Linux

✓

Ports

Specifics

Basic information on dealing with environmental simulations can be found in section Tab Environment Simulation.

This tool connection enables the loading of VTD scenarios as well as the starting and stopping of the simulation. After the start of a scenario, its signals are ready for read access and can be recorded for a subsequent trace analysis.

Please note that the current tool connection does not support RDB connections via UDP.

Configuration

Tool configuration

VTD runs only in a Linux environment, but Tool Server requires a Windows installation. Therefore, setting up a VTD connection to a remote computer is different than using similar tools.

  1. Create a new, local tool host in the test bench configuration.

  2. Navigate to VTD and select Add tool from the context menu.

  3. Click on New port in the same context menu and adjust the port ID if necessary.

  4. Configure the TBC options.

  5. Create a new test configuration and select the created model port there.

TBC options

Please note that the Unix path specified in Project directory on VTD toolhost points to a directory that contains all projects managed by the VTD installation as well as a link called “Current”. The tool connection can copy a local project directory to the remote computer on tool start. To use this functionality, set the path of Local project source directory. The content of this directory is transferred to the path specified in Project directory on VTD toolhost at configuration start. You can also specify a path to a startup script on the Linux system that starts VTD on the remote computer.

Warning

If a Local project source directory is copied to the VTD toolhost, folders with the same name in the path specified in Project directory on VTD toolhost will be overwritten.

Sensor recordings

This adapter allows to record sensor data streams. There are several ways to configure sensors in VTD. On the one hand, new sensors can be configured via the user interface, on the other hand, these can also be managed with configuration files. The global configuration is located at [VTD]/Data/Distros/Distro/Config/ModuleManager/moduleManager.xml. Both variants are independent of each other. However sensors created via the user interface are only started if the simulation is also started manually in the GUI. Therefore sensors to be used with ecu.test should be specified in the configuration file.

Unlike normal signals available in VTD, sensor data can not be read during the test case. Also the recording can be achieved using tool jobs Start-, Stop- and FetchRdbRecording. The latter returns the path to the recording, which can be incorporated into the trace analysis with a subsequent “Add Trace” step.

Startup script

Due to the large number of possible configurations and start variants, this connection supports the non-blocking execution of a Bash / Shell script during startup. If project files are copied, the script is triggered after a successful transfer. An example script is shown below. Please note that the script should be made executable (console command: `` chmod + x vtdStartScript.sh``).

#!/bin/sh

# The VTD project to load
vtdProject=SampleProject

pathToVTDBin=~/VTD.2.1/bin
vtdStartupScript=./vtdStart.sh
vtdKillScript=./vtdStop.sh


# Possible workaround if the Linux system does
# not display the VTD GUI when starting via SSH
export DISPLAY=:0

cd $pathToVTDBin
# Stop a possibly still running VTD instance
$vtdKillScript
# Give VTD a few seconds to wrap up unfinished tasks
sleep 5s

# Start a new VTD instance
$vtdStartupScript -autoConfig -project="$vtdProject"

SSH access

SSH access to the VTD computer is required. Among others SSH access is needed for downloading the recordings, automatic upload of projects and tool start.

To create keys, the command ssh-keygen can be called in a Linux terminal. The following prompts can be confirmed without further input by pressing Enter. The location of the key pair is displayed in the terminal. The content of the public key must now be entered in a file authorized_keys, located in the same folder. If this file does not exist, it must be created manually. The private part of the key, which by default is named id_rsa, should be transferred to the test host and specified in the corresponding TBC option.

Alternatively, a keypair can be generated with PuTTYgen (section 8.2.1), the public key has to be moved to the Linux host (section 8.3). Please note that a private key without a passphrase (section 8.2.7) is required, since ecu.test does not provide a way to enter the passphrase. The generated key pair must be converted to the OpenSSH format (section 8.2.12) afterwards.

Parameterization in ecu.test and OpenSCENARIO Workflow with the scenario.architect

Tutorial OpenSCENARIO Workflow with scenario.architect describes how to create or edit XOSC scenarios with the scenario.architect. This can be done directly out of the VTD tool connection. Afterwards the scenarios can be parameterized in ecu.test.

Name

Available if

Default value

Valid values

Type

Description

Common

Installation directory

Common

string

Absolute Unix file path to the VTD installation directory on the VTD host.

Project directory on VTD toolhost

Common

string

Absolute Unix file path to the VTD project folder on the VTD host in which the VTD projects are located.

Project directory

Common

remote

[local, remote]


Display values:

  • local: Copy local directory to tool host

  • remote: Use remote directory from tool host

string

Copy project directory or use directory on VTD tool host.

Lokales Projektquellverzeichnis

Common » Project directory: ‘local’

string

Path to the local project directory, which contains all VTD projects. Can be specified absolutely or relative to the workspace. The contents of the folder are transferred to the folder defined in the “Project directory on VTD toolhost” option on the VTD tool host when the tool connection is started.

Tool connection

Hostname

Tool connection

uri

IP address or DNS name of the VTD host

SCP-Port

Tool connection

48179

int

SCP port that is used to connect to VTD

Use RDB signals

Tool connection

☑

bool

True if signals are to be accessed (display of signals in the model tree, read steps, trace analysis). This option requires VTD to be configured to send a RDB stream via a TCP connection.

Main RDB Port

Tool connection » Use RDB signals

48190

int

RDB port that is used to connect to the main RDB data stream of VTD - no ports of sensor data streams should be specified for this option.

SSH

Tool connection

Port

Tool connection » SSH

22

int

SSH port, through which the VTD host is reachable.

User name

Tool connection » SSH

string

Username for SSH access on the VTD host.

Key path

Tool connection » SSH

string

Path to the private SSH key for host-based authentication. The path can be given as an absolute path or as a relative path starting from the workspace.

Optional

Startup script

Optional

string

Absolute Unix style path to a VTD start script on the Linux VTD host, which is executed before establishing a connection to VTD.

Timeout for tool call ❲in sec.❳

‘600’

string

Timeout after which a tool call is aborted.

FetchRdbRecording

Fetches the recording for an RDB data stream and saves it in the report directory.

Parameterization

Parameter

Name

Available if

Default value

Valid values

Type

Description

portNumber

int

Port number of the RDB data stream for which the recording should be retrieved.

ReadScpCommand

Waits for a given SCP XML tag and returns the received SCP message.

Parameterization

Parameter

Name

Available if

Default value

Valid values

Type

Description

scpTagName

string

Name of the XML tag of the SCP message to be read (e.g. SimCtrl).

timeout

int

Maximum wait time in seconds for the SCP message.

RunScpCommand

Sends a user-defined SCP message and optionally waits for a response with a specified SCP tag.

Parameterization

Parameter

Name

Available if

Default value

Valid values

Type

Description

answerScpTagName

string

Optional name of the XML tag to be waited for in the SCP response. If this option is left empty, the job returns immediately after sending.

answerTimeout

10

int

Time in seconds to wait for a response at most when the SCP tag name is set. If the value is 0 or less, the system waits indefinitely.

scpMessage

string

Scp message, which will be sent to VTD.

StartRdbRecording

Starts the recording for an RDB data stream

Parameterization

Parameter

Name

Available if

Default value

Valid values

Type

Description

portNumber

int

Port number of the RDB data stream for which the recording should be started.

StopRdbRecording

Stops the recording for an RDB data stream

Parameterization

Parameter

Name

Available if

Default value

Valid values

Type

Description

portNumber

int

Port number of the RDB data stream for which the recording should be stopped.