Skip to content
Brendan Whitfield edited this page Feb 7, 2015 · 23 revisions

An OBDCommand in python-OBD is an object used to query information from the vehicle. They contain all of the information neccessary to perform the query, and decode the cars response. Python-OBD has built in tables for the most common commands. They can be looked up by name, or by mode/PID (for a full list, see Command Tables).

import obd

c = obd.commands.RPM

# OR

c = obd.commands['RPM']

# OR

c = obd.commands[1][12] # mode 1, PID 12 (RPM)

Methods

Commands.has_command(self, command):

Checks the internal command tables for the existance of the given OBDCommand object.


Commands.has_name(self, name):

Checks the internal command tables for a command with the given name. This is also the function of the in operator.


Commands.has_pid(self, mode, pid):

Checks the internal command tables for a command with the given mode and PID.

Docs have been moved to python-obd.readthedocs.org

Clone this wiki locally