Vector Simulation and Test Environment for Visual Studio Code
This extension provides YAML schema validation for venvironment.yaml
, the ability to select an environment and the ability to run the simulation directly within Visual Studio Code. The selected environment also improves the experience with our Vector CAPL extension and our Vector Test Unit extension.
Validation of venvironment.yaml
If you have the YAML extension installed this extension automatically provides it with the YAML schemata for venvironment.yaml
and venvironment-basic.yaml
. This way you can catch schema violations early when working with those files. Their documentation you can find in the help of all Vector toolsets.
The Simulation and Test Environment extension requires a Vector toolset to be installed. The Vector toolset comes with the commercial products CANoe, CANoe4SW, and CANoe4SW Server Edition. It is also part of the freely available Vector Test Unit Runner.
By default, the latest version of the Vector toolset is used. To select a specific version, use the command Environment: Select Vector toolset
or the button in the status bar. The selection is persisted per workspace.
Your selection is synchronized across all Vector extensions you have installed.
Select an Environment
An environment is defined via venvironment.yaml
or venvironment-basic.yaml
and is built with the command line tools environment-make or environment-make-basic. Details on defining and building the environment can be found in the help of CANoe4SW Server Edition and Vector Test Unit Runner.
Selecting an environment vastly improves the experience with our Vector CAPL extension and our Vector Test Unit extension. It allows the Vector CAPL extension e.g., to correctly validate and complete symbols which are contained in the environment like signals and distributed objects (DOs).
The environment is selected with the command Environment: Select environment
or the button in the status bar, which shows a list of all environments located in the current workspace. If the environment is not located in the current workspace, the option Find in file system... allows selecting an environment from a different location. The selected environment is used for all open CAPL files. The option Reset environment clears the environment. The environment selection is persisted per workspace.
Run a Simulation
To run a simulation make sure you have CANoe4SW Server Edition installed and selected as Vector toolset.
Instead of execution CANoe4SW Server Edition manually with the CLI you can execute a simulation using this extension. We provide a command Environment: Run simulation
and a play button in the status bar which start the simulation of the currently selected environment. Starting the simulation with Vector Test Unit Runner in Visual Studio Code is not yet supported, but planned for future releases.