This CLSID returns the engine load, which is the current airflow as a percentage of the peak airflow into the engine.
Engine load
Read, shareable or exclusive
Type: | VT_UI2 (unsigned short fixed point decimal) |
Low: | 0.0 |
High: | 99.2 |
None
Type: | VT_UI2 (unsigned short fixed point decimal) |
Measurement: | VIOMEASUREMENT_PERCENTAGE |
Units: | VIOUNITS_PERCENT |
API device objects expect the following data types and sizes when sending data to and from the mini-drivers:
None
Type: | USHORT * |
Size: | 2 bytes |
Description: | Engine load in 0.1% increments |
HRESULT hr;
IVIO_Device *pEngineLoad;
//Create a notification sink; EngineLoadSink is derived from //IVIO_EventSink.
IVIO_EventSink *iEngineLoadSink = CEngineLoadSink;
//Create an instance of the engine load device and get its
//IVIO_Device interface.
hr = CoCreateInstance(CLSID_VIO_ENGINE_LOAD, NULL,
CLSCTX_INPROC_SERVER, IID_VIODEVICE,
&pEngineLoad);
//Set the notification sink for the engine load.
pEngineLoad->SetNofify(NULL, iEngineLoadSink, 500);
. . .
//Remove the notification sink.
pEngineLoad->SetNotify(NULL, NULL, 0);
//Release the notification sink.
iEngineLoadSink->Release();
//Release the reference to the interface.
pEngineLoad->Release();