Post-O. Finalize Vehicle HAL support for OBD2 diagnostics.
Add OBD2_DTC_INFO property to VHAL. This property returns a list of timestamps for which freeze frames are available to be read.
Make OBD2_FREEZE_FRAME indexed on timestamp, such that one has to pass a timestamp to retrieve the freeze frame at that timestamp.
Add OBD2_DTC_CLEAR to delete some or all of the freeze frames stored.
Test: build
Change-Id: I30344ffd6e7527f076b3382c32f5507973c9985b
diff --git a/automotive/vehicle/2.0/default/impl/DefaultConfig.h b/automotive/vehicle/2.0/default/impl/DefaultConfig.h
index 270bf8c..0c549b9 100644
--- a/automotive/vehicle/2.0/default/impl/DefaultConfig.h
+++ b/automotive/vehicle/2.0/default/impl/DefaultConfig.h
@@ -174,6 +174,18 @@
.access = VehiclePropertyAccess::READ,
.changeMode = VehiclePropertyChangeMode::ON_CHANGE,
.configArray = {0,0}
+ },
+
+ {
+ .prop = toInt(VehicleProperty::OBD2_FREEZE_FRAME_INFO),
+ .access = VehiclePropertyAccess::READ,
+ .changeMode = VehiclePropertyChangeMode::ON_CHANGE
+ },
+
+ {
+ .prop = toInt(VehicleProperty::OBD2_FREEZE_FRAME_CLEAR),
+ .access = VehiclePropertyAccess::WRITE,
+ .changeMode = VehiclePropertyChangeMode::ON_CHANGE
}
};