Basic sending application for IVI example

This example shows how to turn any kzb file into a sending application without modifications.

For the contents of this example, the Kanzi VR feature uses the kzb file from the “Create a simple IVI application” tutorial in the main Kanzi workspace for streaming the IVI:

<KanziWorkspace>\Tutorials\First\Completed\Application\bin\first_application.kzb

Add the path to this file to the IVI stream in the config 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

To start the file, use start-virtual-environment.exe and virtual_environment_configuration.yaml. See Starting stream-enabled virtual environments for generic description and see Config and startup example on how to do this practice.

Modifying the config

To switch the IVI stream to another kzb file:

  1. Replace the value of the “kzb” key with the path to the other file. For example:

    <KanziWorkspace>\Tutorials\Pages\Completed\Application\bin\pages.kzb

  2. Close the applications from the previous round and re-run start-virtual-environment.exe.

To switch the IVI stream to a stream from another device, such as a kzb file from a computer or a screen from an Android device:

  1. Remove the “kzb” key.

  2. Set the value of the “host” key to match the hostname or IP address of another device that is reachable from the local network.

  3. Start the stream from the other device.

  4. Close the local applications from the previous round and re-run start-virtual-environment.exe.