CLSID_VIO_TIMING_ADVANCE

This CLSID returns the ignition spark advance.

Name

Ignition timing advance

Access

Read, shareable or exclusive

Range

Type: VT_I2 (signed short fixed point decimal)
Low: –64.0
High: +63.5

Input

None

Output

Type: VT_I2 (signed short fixed point decimal)
Measurement: VIOMEASUREMENT_ROTATION
Units: VIOUNITS_DEGREES

Remarks

API device objects expect the following data types and sizes when sending data to and from the mini-drivers:

Mini-driver input

None

Mini-driver output

Type: SHORT *
Size: 2 bytes
Description: Ignition advance in 0.1 degree increments

Example

HRESULT hr;
IVIO_Device *pTiming;
VIODEVICEMETRICS dmMetrics;
VARIANT vDeviceData;
float fTiming;
//Create an instance of the ignition timing advance device and get its 
//IVIO_Device interface.
hr = CoCreateInstance(CLSID_VIO_TIMING_ADVANCE, NULL,
                     CLSCTX_INPROC_SERVER, IID_VIODEVICE,
                     &pTiming);
//Get the metrics for the ignition timing advance device.
pTiming->get_Metrics(&dmMetrics);
//Ask the device for timing, given in fixed-point form.
pTiming->GetData(&vDeviceData, 3000);
//Get the timing and convert it to a float type.
fTiming = ((float) vDeviceData.iVal) * (10.0 ^ dmMetrics.lExponent);
//Release the reference to the interface.
pTiming->Release();