XML Config File

Most of the configuration is provided via a XML document. It is designed, to be very flexible in usage as well as easy to create.

Minimum Working Example

This example consists of OBD Service 01, with Parameter 004 and one channel.

<OBD-II version = "1.0">
   <Service id = "001" name = "Show current data">
      <Parameter id = "004" name = "Calculated engine load" frequency = "1">
         <Channel unit = "%">
            <NumericValue bit_length = "8" bit_offset = "0" type = "unsigned"/>
            <LinearScaling offset = "0" scale = "0.39215"/>
            <Range min = "0" max = "100"/>
         </Channel>
      </Parameter>
   </Service>
</OBD-II>

OBD 2 Service

An OXYGEN OBD 2 xml file describes one or more OBD 2 Services. Each Service has its own Service Id and name.

<Service id = "001" name = "Show current data">
   </Service>

<Service id = "005" name = "Oxygen sensor monitor">
   </Service>

Service Property

Value Options

Mandatory

Example

Description

name

string

yes

“My Endpoint”

Friendly name of the Service

id

number

yes

“1” until “/0xff”

Identification of the Service.

OBD 2 Parameter

Each OBD 2 Service includes one or more OBD 2 Parameters. Each Parameter has its a Parameter Id name and polling rate.

<Parameter id="004" name="Calculated engine load" frequency="1">
   ...
</Parameter>

<Parameter id="0xA6" name="Odometer">
   ...
</Parameter>

Parameter Property

Value Options

Mandatory

Example

Description

name

string

yes

“My Endpoint”

Friendly name of the Service

id

number

yes

“1”..”255”

Identification of the Service.

frequency

number

no

“0.01” until “10” Hz

Polling rate of the parameters channels

Channels

A Channel describe one return value of an OBD 2 Parameter request. Since one OBD 2 Parameter can return multiple values, one OBD 2 Parameter can include multiple channel sections.

<Parameter id="020" name="Oxygen Sensor 1" frequency="1">
   <Channel name="Voltage" unit="V">
      ...
   </Channel>

   <Channel name="Short term fuel trim" unit="%">
      ...
   </Channel>
</Parameter>

Channel Property

Value Options

Mandatory

Example

Description

name

string

no

“Coolant temperature”

Friendly name of a return value. For identifying OXYGEN data channels, the Parameter name and channel name are used if multiple channels are present.

unit

string

no

“km/h”

Unit of the underlying numeric value.

Numeric Value

The numeric value entry specifies position and type of the returned value. This is a mandatory entry of an OBD 2 channel.

<Channel name="Voltage" unit="V">
   <NumericValue bit_length="8" bit_offset="0" type="unsigned"/>
</Channel>

Property

Value Options

Mandatory

Example

Description

bit_length

number

yes

“8”, “16”

Size of the response value. This should be multiple of 8 (number of bits per byte).

bit_offset

number

yes

“0”, “8”, “16”

Offset of the response values first bit. Since OBD return values always start at the beginning of one byte, this should be 0, 8, 16, …

type

string

yes

“signed”, “unsigned”

Signed or unsigned number representation of the returned value. Signed specifies the two’s complement value representation.

Range

The range xml section describes the physical range of the underlying value and is mandatory.

<Channel name="Voltage" unit="V">
   <Range min="0" max="1.275"/>
</Channel>

Property

Value Options

Mandatory

Example

Description

min

number

yes

“-40.0”

Minimum value

max

number

yes

“215”

Unit of the channel’s underlying numeric value.

Linear Scaling

This is an optional xml tag for an OBD 2 Channel. The scaling parameters normally can be computed out of the OBD 2 Channel range entry. But sometimes the returned physical value range differs to the returned computer value range. For this the linear scaling tag specifies the real linear equation param-eters.

<Channel name="Voltage" unit="V">
   <LinearScaling offset="0" scale="0.39215"/>
</Channel>

Property

Value Options

Mandatory

Example

Description

offset

number

yes

“-40.0”

Offset of the linear equation

scale

number

yes

“0.39”

Factor of the linear equation