digraph {
  browser [label = "Browser"]
  cli [label = "User CLI"]
  cvd_import_locations [URL = "https://cs.android.com/android/platform/superproject/+/master:device/google/cuttlefish/host/commands/cvd_import_locations/"]
  cvd_update_location [URL = "https://cs.android.com/android/platform/superproject/+/master:device/google/cuttlefish/host/commands/cvd_update_location/"]
  gnss_grpc_proxy [label = < <B>gnss_grpc_proxy</B> >]
  gnss_grpc_server [label = "TCP gRPC", shape = "rectangle"]
  run_cvd [URL = "https://cs.android.com/android/platform/superproject/+/master:device/google/cuttlefish/host/commands/run_cvd/"]
  vmm [label = "crosvm / qemu"]
  webrtc
  subgraph fifos {
    rank = same;
    host_gnss_console_in [color = "green", label = "internal/gnsshvc_fifo_vm.in", shape = "rectangle"]
    host_gnss_console_out [color = "green", label = "internal/gnsshvc_fifo_vm.out", shape = "rectangle"]
    host_fixed_location_console_in [color = "blue", label = "internal/locationhvc_fifo_vm.in", shape = "rectangle"]
    host_fixed_location_console_out [color = "blue", label = "internal/locationhvc_fifo_vm.out", shape = "rectangle"]
  }
  subgraph cluster_android {
    label = "Android"

    gnss_hal [label = "vendor.gnss-default", URL = "https://cs.android.com/android/platform/superproject/+/master:hardware/interfaces/gnss/aidl/default/"]
    subgraph consoles {
      rank = same;
      fixed_location_console [color = "blue", label = "/dev/hvc6 | /dev/gnss1", shape = "rectangle"]
      gnss_console [color = "green", label = "/dev/hvc5 | /dev/gnss0", shape = "rectangle"]
    }
  }

  cli -> cvd_import_locations
  cli -> cvd_update_location
  browser -> webrtc

  run_cvd -> gnss_grpc_proxy

  fixed_location_console -> gnss_hal [color = "blue", dir = "both"]
  gnss_console -> gnss_hal [color = "green", dir = "both"]

  cvd_import_locations -> gnss_grpc_server [dir = "both"]
  cvd_update_location -> gnss_grpc_server [dir = "both"]
  webrtc -> gnss_grpc_server [dir = "both"]

  gnss_grpc_server -> gnss_grpc_proxy [dir = "both"]

  gnss_grpc_proxy -> host_gnss_console_in [color = "green"]
  host_gnss_console_out -> gnss_grpc_proxy [color = "green"]

  vmm -> host_gnss_console_out [color = "green"]
  host_gnss_console_in -> vmm [color = "green"]

  host_fixed_location_console_in -> gnss_grpc_proxy [color = "blue", dir = "back"]
  host_fixed_location_console_out -> gnss_grpc_proxy [color = "blue"]

  host_fixed_location_console_out -> vmm [color = "blue"]
  host_fixed_location_console_in -> vmm [color = "blue", dir = "back"]

  vmm -> fixed_location_console [color = "blue", dir = "both"]
  vmm -> gnss_console [color = "green", dir = "both"]
}
