Class: OBDIIPIDs

OBDIIPIDs

Provides methods for creating modes and properties for accessing modes.

Modes are accessible as properties of this object, named after the mode.


Methods


createMode(mode [, name] [, standardMode])

Creates a new mode that can be used to create PIDs.

NOTE: Modes that have been created by createMode will not be cleaned up by the garbage collector until the plugin is unloaded (e.g. during a refresh). To force a mode to be removed before unload, call deleteMode.

Parameters:
Name Type Argument Default Description
mode number

The number of the mode to create. Mode numbers are defined by the OBD-II standard.

name string <optional>
""

The name of the mode. If provided, the mode will be accessible via the OBDIIPIDs object by name after it is created.

standardMode bool <optional>
false

Indicates if the mode is defined in the OBD standard, or if it is a custom mode. This is only used to set the obdII.OBDIIMode#standardMode property, but otherwise does not affect the mode.

Since:
  • 0.3 (WAT 1.3)
Returns:
Type
obdII.OBDIIMode

deleteMode(mode)

Deletes a mode that was created using createMode. The mode must not be accessed after it has been deleted.

Parameters:
Name Type Description
mode obdII.OBDIIMode

Mode to delete.

Since:
  • 0.3 (WAT 1.3)