Extended PIDs

Format

Decode a signal from a command response.

A format tells Pelican how to decode a signal from the response of a command. Pelican calculates the value like this:

var value: Double
if sign {
  value = SignedBitReader(response, bix, len)
} else {
  value = UnsignedBitReader(response, bix, len)
}
value = (value * mul / div + add).clamped(to: min...max)
return Measurement(value: value, unit: unit)

Properties

The OBDb schema defines these properties:

PropertyTypeRequiredDescription
bixintegerNoBit index in the response where the signal starts
lenintegerYesLength of the signal in bits
blsbbooleanNoByte is LSB (Least Significant Bit) first
signbooleanNoWhether the value is signed
minnumberNoMinimum valid scaled value for the signal
maxnumberNoMaximum valid scaled value for the signal
addnumberNoOffset to add to the raw value
mulnumberNoMultiplier to apply to the raw value
divnumberNoDivisor to apply to the raw value
unitstringNoUnit of measurement for the signal
nullminnumberNoValues below or equal to this value are considered null
nullmaxnumberNoValues above or equal to this value are considered null
ominnumberNoOptimal minimum scaled value
omaxnumberNoOptimal maximum scaled value
ovalnumberNoOptimal scaled value
mapobjectNoEnumeration of raw values (integer-keyed) to human-readable values

The format requires either map, or both max and unit.

Keyboard shortcuts

for/
Search the Handbook.
⌘K
Search the Handbook, also while you type in a field.
Esc
Close the search or a dialog.
?
Show these shortcuts.