Class: OBDIIKLine

OBDIIKLine

Provides attributes for configuring the K-Line (ISO-K) interface for OBD-II. Accessible from obdII.OBDII#kline.


Members


baud :number

Gets/sets the KLine baud rate.

Type:
  • number
Since:
  • 0.4 (WAT 1.4)

<readonly> busPower :bool

Gets the state of the KLine power, which is supplied externally.

Type:
  • bool
Since:
  • 0.4 (WAT 1.4)

enabled :bool

Gets/sets the enabled state of KLine. When enabled, PIDs can be read or written using KLine if they are configured to use KLine. Note that KLine configuration changes will not take affect until the next time that KLine is enabled.

Type:
  • bool
Since:
  • 0.4 (WAT 1.4)

retries :number

Gets/sets the CAN retry attempts. A PID that fails will be re-tried the number of times specified before reporting a failure. Same as obdII.OBDIICAN#retries.

Type:
  • number
Since:
  • 0.5 (WAT 2.0)

serial :wat.SerialPort

Gets/sets the serial port to use for KLine

Type:
Since:
  • 0.4 (WAT 1.4)
Example
$obd.kline.serial = $hw.serial0;

srcAddr :number

Gets/sets source address of the kline interface, default: 0xFA

Type:
  • number
Since:
  • 0.4 (WAT 1.4)
Example
$obd.kline.srcAddr = 0xBB;

timeout :number

Gets/sets the PID timeout. This determines how long to wait for a response to a PID before considering it failed. Same as obdII.OBDIICAN#timeout.

Type:
  • number
Since:
  • 0.5 (WAT 2.0)