Skip to content

Latest commit

 

History

History
46 lines (37 loc) · 2.21 KB

README.md

File metadata and controls

46 lines (37 loc) · 2.21 KB

Sample: Digital Twin Graph

The Digital Twin Graph sample demonstrates the use of the Digital Twin Graph Service.

This sample has two providers. The vehicle-core provider handles the vehicle, the vehicle's cabin and the cabin's seats. The seat-massager provider handles all of the seats' seat massagers.

The graph representation for the vehicle in this sample is shown below.

Graph Diagram

Follow these instructions to run the demo.

Steps:

  1. The best way to run the demo is by using four windows: one running the In-Vehicle Digital Twin, two running the Digital Twin Providers and one running the Digital Twin Consumer. Orientate the four windows so that they are lined up in a column. The top window can be used for the In-Vehicle Digital Twin. The middle two windows can be used for the Digital Twin Providers. The bottom window can be used for the Digital Twin Consumer.
  2. In each window, change directory to the directory containing the build artifacts. Make sure that you replace "{repo-root-dir}" with the repository root directory on the machine where you are running the demo.
    cd {repo-root-dir}/target/debug

  3. Create the four config files with the following contents, if they are not already there:
    ---- invehicle_digital_twin_settings.yaml ----
    invehicle_digital_twin_authority: "0.0.0.0:5010"

    ---- digital_twin_graph_settings.yaml ----
    base_authority: "0.0.0.0:5010"

    ---- consumer_settings.yaml ----
    consumer_authority: "0.0.0.0:6010"
    invehicle_digital_twin_uri: "http://0.0.0.0:5010"

    ---- seat_massager_provider_settings.yaml ----
    provider_authority: "0.0.0.0:4020"
    invehicle_digital_twin_uri: "http://0.0.0.0:5010"

  4. In the top window, run:
    ./invehicle-digital-twin

  5. In the second window, run:
    ./graph-vehicle-core-provider

  6. In the third window, run:
    ./graph-seat-massager-provider

  7. In the bottom window, run:
    ./graph-consumer

  8. Use control-c in each of the windows when you wish to stop the demo.

A templated version of each config file can be found in:

  • {repo-root-dir}/core/invehicle-digital-twin/template
  • {repo-root-dir}/samples/common/template