Initializing the sensor object

Each sensor object source file contains an Initialize method that initializes the property keys and data-field keys for a specific sensor. This method is invoked by the sensor manager at startup. If a specified sensor is available, the CSensorManager::Start method invokes the corresponding Initialize method for that sensor.

After the hardware is connected and the driver verifies that it contains an accelerometer device, the CAcclerometer::AddAccelerometerPropertyKeys method is called to supply the property keys for the properties supported by the accelerometer and the CAccelerometer::AddAccelerometerDataFieldKeys method is called to supply the data field keys for the supported data fields. These methods are invoked from CAccelerometer::InitializeAccelerometer.

Related topics

The Sensor Diagnostic Tool
The Sensors HID Driver Sample
Writing a Sensor Device Driver



Send comments about this topic to Microsoft

Build date: 11/29/2012