OBD2_LIVE_FRAME
What it is
OBD2 Live Sensor Data
Reports a snapshot of the current (live) values of the OBD2 sensors available.
The configArray is set as follows: configArray[0] = number of vendor-specific integer-valued sensors configArray[1] = number of vendor-specific float-valued sensors
The values of this property are to be interpreted as in the following example. Considering a configArray = {2,3} int32Values must be a vector containing Obd2IntegerSensorIndex.LAST_SYSTEM_INDEX + 2 elements (that is, 33 elements); floatValues must be a vector containing Obd2FloatSensorIndex.LAST_SYSTEM_INDEX + 3 elements (that is, 73 elements);
It is possible for each frame to contain a different subset of sensor values, both system provided sensors, and vendor-specific ones. In order to support that, the bytes element of the property value is used as a bitmask,.
bytes must have a sufficient number of bytes to represent the total number of possible sensors (in this case, 14 bytes to represent 106 possible values); it is to be read as a contiguous bitmask such that each bit indicates the presence or absence of a sensor from the frame, starting with as many bits as the size of int32Values, immediately followed by as many bits as the size of floatValues.
For example, should bytes[0] = 0x4C (0b01001100) it would mean that: int32Values[0 and 1] are not valid sensor values int32Values[2 and 3] are valid sensor values int32Values[4 and 5] are not valid sensor values int32Values[6] is a valid sensor value int32Values[7] is not a valid sensor value Should bytes[5] = 0x61 (0b01100001) it would mean that: int32Values[32] is a valid sensor value floatValues[0 thru 3] are not valid sensor values floatValues[4 and 5] are valid sensor values floatValues[6] is not a valid sensor value
How the ID is built
A property ID is a 32-bit value packing four fields. Reading 0x11e00d00 apart:
| Field | Mask | Value | Means |
|---|---|---|---|
| Group | 0xf0000000 | 0x10000000 | SYSTEM |
| Area | 0x0f000000 | 0x01000000 | GLOBAL |
| Type | 0x00ff0000 | 0x00e00000 | MIXED |
| Ordinal | 0x0000ffff | 0x00000d00 | 0xd00 |
Reading it from an app
CarPropertyManager mgr = (CarPropertyManager)
car.getCarManager(Car.PROPERTY_SERVICE);
CarPropertyValue<Object> value =
mgr.getProperty(VehiclePropertyIds.OBD2_LIVE_FRAME, 0);This property is read-only — writes are rejected. It fires a callback whenever the value changes.

