Added fake VHAL value generator based on JSON file
Note: It only supports a single generation task at any time. Mixed value
properties like diagnostics frame is not implemented yet. It only
supports properties with ON_CHANGE mode for now.
Bug: 76017041
Test: lunch bat_land-userdebug & m -j8; adb push <json_data>
/data/local/tmp; use python emulator to inject fake value "start" command
specifying the JSON data path on device; verify values on KitchenSink app
Change-Id: Ic964ef52a19422bab7015fe54c7e4c5ef8b47a55
diff --git a/automotive/vehicle/2.0/default/Android.bp b/automotive/vehicle/2.0/default/Android.bp
index 774bc4f..22ab079 100644
--- a/automotive/vehicle/2.0/default/Android.bp
+++ b/automotive/vehicle/2.0/default/Android.bp
@@ -62,6 +62,8 @@
"impl/vhal_v2_0/VehicleEmulator.cpp",
"impl/vhal_v2_0/PipeComm.cpp",
"impl/vhal_v2_0/SocketComm.cpp",
+ "impl/vhal_v2_0/LinearFakeValueGenerator.cpp",
+ "impl/vhal_v2_0/JsonFakeValueGenerator.cpp",
],
local_include_dirs: ["common/include/vhal_v2_0"],
export_include_dirs: ["impl"],
@@ -71,6 +73,7 @@
"libprotobuf-cpp-lite",
],
static_libs: [
+ "libjsoncpp",
"libqemu_pipe",
"android.hardware.automotive.vehicle@2.0-libproto-native",
],
@@ -107,6 +110,7 @@
"android.hardware.automotive.vehicle@2.0-manager-lib",
"android.hardware.automotive.vehicle@2.0-default-impl-lib",
"android.hardware.automotive.vehicle@2.0-libproto-native",
+ "libjsoncpp",
"libqemu_pipe",
],
}