Bewerken

Delen via


EVT_SENSOR_DRIVER_SET_BATCH_LATENCY callback function (sensorscx.h)

This callback function sets the batch latency for a specified sensor.

Syntax

EVT_SENSOR_DRIVER_SET_BATCH_LATENCY EvtSensorDriverSetBatchLatency;

NTSTATUS EvtSensorDriverSetBatchLatency(
  [in] SENSOROBJECT Sensor,
  [in] ULONG BatchLatencyMs
)
{...}

Parameters

[in] Sensor

A reference to a sensor object.

[in] BatchLatencyMs

The batch latency, expressed in milliseconds.

Return value

This function returns STATUS_SUCCESS when completed successfully.

Note The class extension (CX) only uses the NT_SUCCESS macro to determine if the call to the driver’s Evt function was successful, but does not take any action if the function failed or does not return STATUS_SUCCESS.

Remarks

The driver can set the batch latency to a value that is less than or equal to BatchLatencyMs, depending on buffer availability. For information about the sensor properties that a data batching sensor driver must report, see Common sensor properties.

It is important to note that there is no change implied to sensor data delivery methods and events, due to data batching. When data batching latency expires, the driver will call SensorsCxSensorDataReady repeatedly to deliver all the buffered data samples, one at a time. The data samples are sent, along with the timestamp information in their PKEY_SensorData_Timestamp data fields. The timestamp information (of data type VT_FILETIME) shows the time at which a sample was taken.

For more information about the VT_FILETIME data type, see MSDN PROPVARIANT structure.

Requirements

Requirement Value
Target Platform Windows
Header sensorscx.h
IRQL requires_same

See also

MSDN PROPVARIANT structure

SensorsCxSensorDataReady