CLSID_VIO_VEHICLE_SPEED

This CLSID returns the current vehicle speed.

Name

Vehicle speed

Access

Read, shareable or exclusive

Range

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

Input

None

Output

Type: VT_UI2 (unsigned short)
Measurement: VIOMEASUREMENT_SPEED
Units: VIOUNITS_KILOMETERSPERHOUR

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: Vehicle speed in kilometers per hour

Example

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