From 844770cde44bdcf052f9dee4690f3a0c2c036b7b Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Wed, 4 Jan 2017 10:50:35 -0800 Subject: [PATCH] Define property types for the live and freeze-frame sensor data. Change-Id: I462ab439df3c31b9f00d365f6a72f37690e01e98 Test: build --- vehicle/2.0/types.hal | 53 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/vehicle/2.0/types.hal b/vehicle/2.0/types.hal index d98a9823c8..62521cb15f 100644 --- a/vehicle/2.0/types.hal +++ b/vehicle/2.0/types.hal @@ -1644,6 +1644,59 @@ enum VehicleProperty: int32_t { | VehiclePropertyGroup:SYSTEM | VehiclePropertyType:COMPLEX | VehicleArea:GLOBAL), + + /* + * OBD2 Live Sensor Data + * + * This property uses COMPLEX data to send a snapshot of the current (live) + * values of the OBD2 sensors provided by the vehicle. + * + * Its contents are to be interpreted as follows: + * the indices defined in Obd2IntegerSensorIndex are to be used to + * read from int32Values; + * the indices defined in Obd2FloatSensorIndex are to be used to + * read from floatValues. + * + * For example, int32Values[0] corresponds to FUEL_SYSTEM_STATUS, and + * floatValues[0] corresponds to CALCULATED_ENGINE_LOAD. + * + * @change_mode VehiclePropertyChangeMode:ON_CHANGE + * @access VehiclePropertyAccess:READ + */ + OBD2_LIVE_FRAME = ( + 0x0D00 + | VehiclePropertyGroup:SYSTEM + | VehiclePropertyType:COMPLEX + | VehicleArea:GLOBAL), + + /* + * OBD2 Freeze Frame Sensor Data + * + * This property uses COMPLEX data to send a snapshot of the values of the + * OBD2 sensors provided by the vehicle at the time that a diagnostic + * troubleshooting code (DTC) was recorded by the vehicle. + * + * Its contents are to be interpreted as follows: + * the indices defined in Obd2IntegerSensorIndex are to be used to + * read from int32Values; + * the indices defined in Obd2FloatSensorIndex are to be used to + * read from floatValues; + * stringValue is the DTC that caused this freeze frame to be recorded. + * + * For example, int32Values[0] corresponds to FUEL_SYSTEM_STATUS, and + * floatValues[0] corresponds to CALCULATED_ENGINE_LOAD, and a possible + * valid stringValue is "P0176" to indicate a malfunction of the fuel + * composition sensor circuit. + * + * @change_mode VehiclePropertyChangeMode:ON_CHANGE + * @access VehiclePropertyAccess:READ + */ + OBD2_FREEZE_FRAME = ( + 0x0D01 + | VehiclePropertyGroup:SYSTEM + | VehiclePropertyType:COMPLEX + | VehicleArea:GLOBAL), + }; /*