CLSID_VIO_ENGINE_RPM

This CLSID returns the current crankshaft rotation rate.

Name

Engine RPM

Access

Read, shareable or exclusive

Range

Type: VT_UI2 (unsigned short)
Low: 0
High: 16,383

Input

None

Output

Type: VT_UI2 (unsigned short)
Measurement: VIOMEASUREMENT_ROTATIONALSPEED
Units: VIOUNITS_RPM

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: USHORT *
Size: 2 bytes
Description: Engine revolutions per minute (RPM)

Example

HRESULT hr;
IVIO_Device *pEngineRPM;
//Create the event sink; CEngineRPMSink is derived from //IVIO_EventSink.
IVIO_EventSink *iRpmSink = new CEngineRPMSink;
//Create an instance of the engine RPM device and get its 
//IVIO_Device interface.
hr = CoCreateInstance(CLSID_VIO_ENGINE_RPM, NULL,
                     CLSCTX_INPROC_SERVER, IID_VIODEVICE,
                     &pEngineRPM);
//Set the notification sink to notify every half second.
pEngineRPM->SetNotify(NULL, iRpmSink, 500);
.
.
. //Turn off the notification sink.
pVehicleSpeed->SetNotify(NULL, NULL, 0);
//Release the reference to the event sink.
iRpmSink->Release();
//Release the reference to the interface.
pEngineRPM->Release();