Config and startup example¶
This example demonstrates how you can configure several applications so that they start and connect.
To start the Kanzi VR example application, use either the Kanzi VR Launcher or the Kanzi Studio Preview.
See Starting all virtual environment processes and Starting a streaming application in the Kanzi Studio Preview.
Configuration file¶
The path to the configuration file:
<Kanzi VR Package>\examples\ExampleDashboard\bin\virtual_environment_configuration.yaml
Content of the configuration file:
# The configuration supports environment variable expansion with ${ENVIRONMENT_VARIABLE}.
# start_virtual_environment.exe adds these definitions automatically:
# - ${KANZI_HOME} defines the Kanzi workspace. For example, "c:/KanziWorkspace_3_9_1_211".
# - ${KANZI_VR_HOME} defines the Kanzi VR installation directory. For example, "c:/KanziWorkspace_3_9_1_211/Engine/plugins/kanzi-vr".
# - ${BUILD_VARIANT} defines the build variant. For example, "Debug" or "Release".
# - ${LIB_VARIANT} defines the library directory for the configuration. For example, "GL_vs2017_Release_DLL".
# - ${PLATFORM_TARGET} defines the platform target. For example, "Win64".
# Defines the installation location of the resource files that are
# used when streaming to a web browser. The path can be absolute or relative to the
# configuration file.
# Optional.
webResourcePath: "${KANZI_VR_HOME}/plugins-streaming/streaming-web-resources"
# Introduces the virtual environment to be started.
# Required.
virtual_environment:
# Introduces the kzb file that contains the model of the virtual environment.
# Set as <project_name>.kzb.cfg that lists all the kzb files used in the project.
# If the project uses a single kzb file, you can point only to that kzb file.
# Required.
kzb: exampledashboard.kzb.cfg
# Introduces additional paths to be used for searching binary dependencies.
# Can contain either a single path or a list of paths that you want to add to
# the PATH environment variable for the executable to be started. For example, use this
# to load feature packs or plugins whose binaries are in a different directory.
# Optional.
# extraPath:
# - "path/to/plugin1/lib/${PLATFORM_TARGET}/${LIB_VARIANT}"
# - "path/to/plugin2/lib/${PLATFORM_TARGET}/${LIB_VARIANT}"
# Defines a list of streams configured by their individual properties.
# Required.
streams:
# Introduces the kzb file to be started for this stream.
# Required only if you are using start-virtual-environment.exe and want to
# start this kzb file in the Streaming Kzb Player on the local computer.
# Optional.
- kzb: ${KANZI_VR_HOME}/examples/StreamSenderExample/bin/streamsenderexample.kzb.cfg
# Introduces either a single path or a list of paths that you want to add to
# the PATH environment variable that is used for searching binary dependencies.
# Works the same way as in virtual_environment.
# Optional.
# extraPath: "path/to/plugin3/lib/${PLATFORM_TARGET}/${LIB_VARIANT}"
# Defines a single stream ID or a list of stream IDs for which the host and port
# are configured.
# Required.
streamId:
- Cluster
- HUD
# Defines the host for the streams.
# Required.
host: localhost
# Defines the port for the streams.
# Required.
port: 9072
- kzb: "${KANZI_HOME}/Tutorials/First/Completed/Application/bin/first_application.kzb.cfg"
streamId: IVI
host: localhost
port: 9073
See Virtual environment configuration file.
The example configuration file defines:
The kzb files to start:
Content for the receiving application comes from the
exampledashboard.kzb
.Stream sending is done by the
StreamSenderExample.kzb
andfirst_application.kzb
.
Cluster, HUD, and IVI streama.
All streams originate from the local computer.
The ports for Cluster, HUD, and IVI streams are
9072
,9072
, and9073
respectively.
Starting the example application¶
To start the example application:
Open the Kanzi VR Launcher at
<Kanzi VR Package>/launcher/Kanzi VR Launcher.exe
.Select the example configuration file at
<Kanzi VR Package>/examples/ExampleDashboard/bin/virtual_environment_configuration.yaml
.Click Start.
This applies the configuration from the previous section and starts the correct processes.
Using the Kanzi Studio Preview with the example¶
To use the Kanzi Studio Preview with the example:
Start the processes using the guidance from the previous section.
Close the process that you want to see in the Kanzi Studio Preview.
Load the project into Kanzi Studio and start the preview.
Now the project is visible in Kanzi Studio for live editing and you can see effect of the edits also in context of the other running applications.
To learn how to use the example with VR hardware, see Using virtual environments.
To learn how to setup Kanzi Studio for Kanzi VR, see Setting up Kanzi Studio.