• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# AIDL VHAL libraries and reference implementation.
2---
3
4This directory stores the libraries useful for implementing vendor AIDL VHAL.
5This directory also stores a reference fake implementation for AIDL VHAL.
6
7## default_config
8
9Stores the default vehicle property configurations for reference vehicle HAL.
10Vendor implementation could copy this library but must update the configuration
11to meet their own requirements, e.g. enable or disable certain properties or
12update the initial value for certain properties.
13
14##	fake_impl
15
16Contains libraries used specifically for the fake reference VHAL implementation.
17These libraries are for test only and must not be directly used for vendor
18VHAL implementation.
19
20These libraries contain test-spcific logic and must not run directly on a real
21vehicle.
22
23## grpc
24
25Stores code for GRPC based VHAL implementation.
26
27## hardware
28
29Defines an interface `IVehicleHardware.h` which vendor must implement for
30vehicle-specific logic if they want to follow our reference VHAL design.
31
32## proto
33
34Stores Some protobuf files translated from AIDL VHAL interface types. These
35files are used in GRPC VHAL implementation.
36
37## utils
38
39Defines a library `VehicleHalUtils` which provides useful utility functions for
40VHAL implementation. Vendor VHAL could use this library.
41
42## vhal
43
44Defines a library `DefaultVehicleHal` which provides generic logic for all VHAL
45implementations (including reference VHAL). Vendor VHAL implementation could
46use this library, along with their own implementation for `IVehicleHardware`
47interface.
48
49Also defines a binary `android.hardware.automotive.vehicle@V3-default-service`
50which is the reference VHAL implementation. It implements `IVehicle.aidl`
51interface. It uses `DefaultVehicleHal`, along with `FakeVehicleHardware`
52(in fake_impl). It simulates the vehicle bus interaction by using an
53in-memory map. Meaning that all properties (except for some special ones) are
54just written into a hash map and read from a hash map without relying on any
55hardware. As a result, the reference implementation can run on emulator or
56any host environment.
57
58Vendor must not directly use the reference implementation for a real vehicle.