This CLSID returns the temperature of the air when it arrives in the engine.
Intake air temperature
Read, shareable or exclusive
Type: | VT_I2 (signed short) |
Low: | –128 |
High: | +255 |
None
Type: | VT_I2 (signed short) |
Measurement: | VIOMEASUREMENT_TEMPERATURE |
Units: | VIOUNITS_CELSIUS |
API device objects expect the following data types and sizes when sending data to and from the mini-drivers:
None
Type: | SHORT * |
Size: | 2 bytes |
Description: | Intake temperature in degrees Celsius |
HRESULT hr;
IVIO_Device *pIntakeTemp;
VARIANT vDeviceData;
SHORT sIntakeTemp;
float fThrottlePos, fMultiplier;
//Create an instance of the intake air temperature device and get its
//IVIO_Device interface.
hr = CoCreateInstance(CLSID_VIO_INTAKE_TEMP, NULL,
CLSCTX_INPROC_SERVER, IID_VIODEVICE,
&pIntakeTemp);
//Ask the device for intake temperature.
pIntakeTemp->GetData(&vDeviceData, 3000);
//Fetch the intake air temp, in degrees Celsius, from the VARIANT.
sIntakeTemp = vDeviceData.iVal;
//Release the reference to the interface.
pIntakeTemp->Release();