CLSID_VIO_PARKING_BRAKE

This CLSID returns the status of the parking brake.

Name

Parking brake

Access

Read, shareable or exclusive

Range

Type: VT_UI4 (unsigned long bitmask)

The following table shows possible bitmask values.

Parking brake status
Bitmask value
VIOPARKINGBRAKE_OFF 0
VIOPARKINGBRAKE_ON 1

Input

None

Output

Type: VT_UI4 (unsigned long bitmask)
Measurement: VIOMEASUREMENT_DISCRETEMASK (bitmask)
Units: VIOUNITS_BITMASK

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: DWORD *
Size: 4 bytes
Description: Bitmask that contains VIOPARKINGBRAKE_* values.

Example

HRESULT hr;
IVIO_Device *pParkingBrake;
VARIANT vDeviceData;
BOOL bBrakeOn;
//Create an instance of the parking brake device component and get
//its IVIO_Device interface.
hr = CoCreateInstance(CLSID_VIO_PARKING_BRAKE, NULL,
                     CLSCTX_INPROC_SERVER, IID_VIODEVICE,
                     &pParkingBrake);
//Ask the device for its current status bits.
pParkingBrake->GetData(&vDeviceData, 1000);
//Fetch the status bits from the VARIANT.
bBrakeOn = (vDeviceData.ulVal != VIO_PARKINGBRAKE_OFF);
//Release the reference to the interface.
pParkingBrake->Release();