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 start-virtual-environment.exe
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:
# 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.
# Optional.
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}/GL_vs2017_${BUILD_VARIANT}_DLL"
# - "path/to/plugin2/lib/${PLATFORM_TARGET}/GL_vs2017_${BUILD_VARIANT}_DLL"
# 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}/GL_vs2017_${BUILD_VARIANT}_DLL"
# 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. The default value is localhost.
# Optional.
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, run the start-virtual-environment.exe
at:
<Kanzi VR Package>\examples\ExampleDashboard\bin\start-virtual-environment.exe
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.