-
-
Notifications
You must be signed in to change notification settings - Fork 310
OBD Data model
The OBD data model is split into 2 different files, which are all in tab-delimited csv format:
- Data conversions
- Data items / PIDs
The conversion data contains all information which is required to convert a incoming data value into a physical, or textual representation value. Since there are multiple methods to convert binary data to meaningful information, several conversion types are supported. Also there are different measurement systems used around the world, so following, most common measurement systems are supported: metric and imperial.
In order to convert protocol data into numerical, or textual values, following conversion types are available:
- Linear numeric conversion to calculate physical values
- Conversion of numeric values to descriptive state messages.
- Field Parameters needs to contain: #### value*=state text[[;value=state text]...]
- Conversion of bit masked values to descriptive bit states.
- Field Parameters needs to contain: #### bit position*=state text[[;bit position=state text]...]
- Conversion of OBD P/I-Fault code numbers to it's fault description.
- Field Parameters: #### name of resource bundle
- Conversion from any numerical code number to it's fault description.
- Field Parameters: #### name of resource bundle
- Conversion from protocol buffer to ASCII string
- Textual ID of this conversion, which is used as reference for data items to be used
- Textual ID of the type of conversion. See description of conversion types below ...
- ID of variants to the selected conversion type (currently unused, always 0)
- System of measurement: METRIC / IMPERIAL.
- factor for numeric calculation
- divider for numeric calculation
- offset for numeric calculation
- physical offset for numeric calculation
- physical unit representation
- remarks to this data conversion
- parameter data for non linear/numeric conversions (like state lists, bit descriptions, etc.)
- in csv list format: #### key*=value[[;key=value]...]
All linear conversion items are calculated using following formula:
physicalValue = (rawValue + #### OFFS** ) * **FACT** / **DIV** + **PhOf
Data item / PID definitions contain all information to extract certain data elements out of the received communication data buffer like OBD service, OBD PID number, item position and length, together with the information of the data content, conversion and limitation to certain MIN/MAX limits.
Since OBD pids may contain more information, than just one measurement, multiple data items may be extracted/displayed fromout one PID data response.
- OBD service(s), which this data item is valid for. . comma separated list of HEX numbers
- OBD PID number which this data item is contained.
- Single HEX PID number
- Offset (in bytes) where this data is located within PID response payload data
- Length of data item in bytes within PID response payload data
- Bit offset (LSB) of relevant data within above bytes
- Number of relevant bits within above bytes
- Mask of relevant bits within above bytes
- Textual ID of data conversion to be used.
- See CONVERSION_ID
- Data display format definition (printf syntax)
- Minimum limit of value
- if not specified, limits are calculated automatically from conversion formula
- Maximum limit of value
- if not specified, limits are calculated automatically from conversion formula
- name of data item for label text translations (and named responses)
- Description label text for data item display
RAW numeric data is extracted from buffer as follows:
RAW value = (int)( buffer[ofs]...buffer[ofs+len] ) >> bit_ofs & ((1 << bit_len)-1) & bit_mask