Note The vehicle I/O APIs documented here are preliminary and subject to change.
The vehicle I/O API includes methods used to obtain diagnostic and maintenance data. You can write applications that retrieve and analyze this data and notify the vehicle driver of a mechanical malfunction or required maintenance. The vehicle I/O API enables you to control vehicle operations, such as locking and unlocking doors. You can also display data obtained from a vehicle computer or engine control unit to aide the driver to make driving decisions, for example, notifying the driver when to shift for optimal fuel efficiency or optimal acceleration. The following sections discuss the hardware and vehicle I/O API that enable such communication.
An Auto PC is equipped with a universal serial bus (USB) connected to a vehicle’s on-board diagnostic level II (OBD II) port by means of hardware known as a vehicle bus bridge. These hardware connections establish data flow between the vehicle on-board computer and an Auto PC.
The following illustration shows the vehicle I/O API and the hardware interface.
Interface |
Description |
VIOInitialize | Initializes the vehicle I/O API for a process or thread |
VIOUninitialize | Uninitializes the vehicle I/O API for a process or the current thread and frees resources that it was using |
IVIO_Vehicle | Retrieves pointers to the interfaces IVIO_EnumMetrics, IVIO_EnumDevices, and IVIO_EnumMaintenanceItems. |
IVIO_EnumMetrics | Enumerates basic vehicle data such as manufacturer, make, model, year, vehicle identification number (VIN), transmission, fuel system, and engine type |
IVIO_EnumMaintenanceItems | Enumerates a schedule of maintenance items |
IVIO_EnumMaintenanceEntry | Enumerates when a scheduled maintenance item was completed |
IVIO_EnumDevices | Enumerates a list of devices, such as sensors from which data can be retrieved |
IVIO_Device | Interfaces with vehicle hardware devices, such as sensors, from which data can be retrieved, for example, engine RPM or coolant temperature |
IVIO_DataValue | Returns data values from the enumeration interfaces to an application |
IVIO_EventSink | Notifies an application of an event |
IVIO_Ioctl | Communicates with a device driver |
IVIO_MiniDriver | Connects vehicle hardware and Auto PC software |
Note Many vehicle I/O API methods use a VARIANT as a parameter. A VARIANT is a special data type that can contain any kind of data except fixed-length string data and user-defined data types. A VARIANT enables different data types to be passed to a method. Many methods have a numeric parameter that is the time-out interval in milliseconds.