Class: OBDII

OBDII

Provides methods and attributes for configuring OBD and creating modes.

The PIDs (the pre-defined ones and the created ones) are accessible from pids, which organizes the PIDs into related groups called modes. The modes are accessible as properties of the object returned by pids, named after the mode. The PIDs are then accessible the same way from the mode.


Example
var obd = $wat.load('obd-II')[0];
obd.pids.vInfo.vin.onComplete.connect(function(value) {
   console.log("VIN is " + value);
});
obd.pids.vInfo.vin.get();

Members


baud :number

Gets/sets the CAN baud rate.

Type:
  • number
Since:
  • 0.1 (WAT 1.1)
Deprecated:

<readonly> busPower :bool

Gets the state of the CAN power, which is supplied externally by the CAN bus.

Type:
  • bool
Since:
  • 0.1 (WAT 1.1)
Deprecated:

<readonly> can :obdII.OBDIICAN

Gets an object that contains configuration for OBD-II via CAN

Type:
Since:
  • 0.4 (WAT 1.4)

enabled :bool

Gets/sets the enabled state of OBD-II. When enabled, PIDs can be read or written using the configured bus. Note that bus configuration changes will not take affect until the next time that OBD-II is enabled.

Type:
  • bool
Since:
  • 0.1 (WAT 1.1)
Deprecated:

<readonly> kline :obdII.OBDIIKLine

Gets an object that conatins configuration for OBD-II via K-Line

Type:
Since:
  • 0.4 (WAT 1.4)

<readonly> pids :obdII.OBDIIPIDs

Gets an object that can be used to access the PIDs grouped into modes

Type:
Since:
  • 0.1 (WAT 1.1)