EN
Este conteúdo não está disponível em seu idioma, mas aqui está a versão em inglês.

Sensor driver file list

The files in a sensor sample driver source-file folder fall into two general categories. The first category consists of general files that are common to a UMDF sensor driver. The second consists of sensor-specific files that are required to support a specific HID-based sensor.

The following table describes the general files that are common to a UMDF sensor driver.

File nameContents
Device.cppContains an implementation of the CMyDevice member functions. This includes the OnPrepareHardware method which creates and initializes the sensor class extension.
Device.hContains a definition for the CMyDevice class.
Dllsup.cppContains the driver DLL’s entry point (DLLMain).
Driver.cppContains an implementation of the CMyDriver member functions. This includes the OnDeviceAdd method that creates an instance of the CMyDevice class (see description of Device.cpp).
Driver.hContains a definition of the CMyDriver class.
Internal.hContains local type definitions for the sample driver. These include sensor-specific HID definitions and general HID definitions.
Makefile.incRequired to build an .INF file.
Queue.cppContains an implementation of the CMyQueue member functions. This includes the CreateInstance method, which creates an instance of the I/O queue for the device. It also includes the OnDeviceIoControl method that forwards WPD I/O requests to the sensor class extension.
Queue.hContains a definition of the CMyQueue class.
Resource.hContains definitions consumed by SensorsSimpleHIDClassDriver.h.
Sensor.cppContains an implementation of the CSensor member functions. This includes the methods which return lists of supported properties and data fields and the methods which set writable properties and data fields.
Sensor.hContains a definition of the CSensor class.
SensDDI.cppContains an implementation of the ISensorDriver callback interface in the CSensorDdi class. The sensor class extension calls methods in this interface to retrieve supported data such as objects, properties, and events.
SensorManager.cppContains an implementation of the CSensorManager class. The methods in this class, as the name implies, manage the sensor device: starting it, stopping it, retrieving the device state, and so on.
SensorManager.hContains the definition of the CSensorManager class.
SensorsHIDClassDriver.defDeclares the module parameters.
SensorsHIDClassDriver.htmContains a high-level description of the sample driver.
SensorsHIDClassDriver.idlContains the necessary definitions for the driver’s COM component.
SensorsHIDClassDriver.infContains the information that Windows Setup requires when you install the in-box driver on x86 and amd64 computers.
SensorsHIDClassDriver.rcContains definitions for resources that the driver requires, such as file type, file description string, file version, and original file name.
SensorsHIDClassDriver-Win8x86Manual.infContains the information that is required when you manually install the driver on x86.
SourcesContains a series of macro definitions that are recognized by the Build utility

 

The following table lists the files that support the 18 categories of sensors enabled by the sample driver. All these categories return a timestamp data field. The table lists any additional data field associated with a particular class.

File nameContents
Accelerometer.cppContains an implementation of the CAccelerometer class. The methods in this class initialize the sensor, retrieve readable properties, set writable properties, and process asynchronous data from the sensor. The supported datafields return acceleration for 1-, 2-, and 3-axis devices.
Accelerometer.hContains the definition of the CAccelerometer class.
AmbientLIght.cppContains an implementation of the CAmbientLight class. The methods in this class initialize the sensor, retrieve readable properties, set writable properties, and process asynchronous data from the sensor. The supported data fields return LUX, light temperature in degrees Kelvin, and chromacity.
AmbientLight.hContains the definition of the CAmbientLight class.
AtmosPressure.cppContains an implementation of the CBarometer class. The methods in this class initialize the sensor, retrieve readable properties and process asynchronous data from the sensor. The supported data field returns the atmospheric pressure.
AtmosPressure.hContains the definition of the CBarometer class.
Compass.cppContains an implementation of the CCompass class. The methods in this class initialize the sensor, retrieve readable properties, set writable properties, and process asynchronous data from the sensor. The supported data fields include the compass heading in X-, Y-, and Z-degrees and the compensated and uncompensated magnetic and true-north headings.
Compass.hContains the definition of the CCompass class.
Current.cppContains an implementation of the CCurrent class. The methods in this class initialize the sensor, retrieve readable properties, set writable properties, and process asynchronous data from the sensor. The supported data field includes the current as measured in amps.
Current.hContains the definition of the CCurrent class
Custom.cppContains an implementation of the CCustom class. The methods in this class: initialize the sensor, retrieve readable properties, set writable properties, and process asynchronous data from the sensor. If you create a unique sensor that is not supported by existing classes in the driver, you can use this class to support your device.
Custom.hContains the definition of the CCustom class.
Distance.cppContains an implementation of the CDistance class. The methods in this class: initialize the sensor, retrieve readable properties, set writable properties, and process asynchronous data from the sensor. The supported data fields include distance measurements for 1-, 2-, and 3-axis devices.
Distance.hContains the definition of the CDistance class.
Frequency.cppContains an implementation of the CFrequency class. The methods in this class initialize the sensor, retrieve readable properties, set writable properties, and process asynchronous data from the sensor. The supported data field can be used to measure periodic events such as fan speed.
Frequency.hContains the definition of the CFrequency class.
Generic.cppContains an implementation of the CGeneric class. The methods in this class initialize the sensor, retrieve readable properties, set writable properties, and process asynchronous data from the sensor.

A custom sensor presents itself to the sensor API as a custom device with certain properties. A generic sensor, on the other hand, presents itself by using category and type fields that are defined in Sensors.h.

Generic.hContains the definition of the CGeneric class.
Gyrometer.cppContains an implementation of the CGyrometer class. The methods in this class initialize the sensor, retrieve readable properties, set writable properties, and process asynchronous data from the sensor. The supported data fields measure angular acceleration and support 1-, 2-, and 3-axis sensors.
Gyrometer.hContains the definition of the CGyrometer class.
Humidity.cppContains an implementation of the CHumidity class. The methods in this class initialize the sensor, retrieve readable properties, set writable properties, and process asynchronous data from the sensor. The supported data field measures relative humidity as a percentage.
Humidity.hContains the definition of the CHumidity class.
Inclinometer.cppContains an implementation of the CInclinometer class. The methods in this class initialize the sensor, retrieve readable properties, set writable properties, and process asynchronous data from the sensor. The supported data fields measure incline for 1-, 2-, and 3-axis sensors.
Inclinometer.hContains the definition of the CInclinometer class.
Orientation.cppContains an implementation of the COrientation class. The methods in this class initialize the sensor, retrieve readable properties, set writable properties, and process asynchronous data from the sensor. The supported data fields measure device orientation by using an aggregation of several sensors.
Orientation.hContains the definition of the COrientation class.
Potentiometer.cppContains an implementation of the CPotentiometer class. The methods in this class initialize the sensor, retrieve readable properties, set writable properties, and process asynchronous data from the sensor. The supported data field returns a percentage of the maximum range.
Potentiometer.hContains the definition of the CPotentiometer class.
Power.cppContains an implementation of the CPower class. The methods in this class initialize the sensor, retrieve readable properties, set writable properties, and process asynchronous data from the sensor. The supported data field measures power in watts.
Power.hContains the definition of the CPower class.
Presence.cppContains an implementation of the CPresence class. The methods in this class initialize the sensor, retrieve readable properties, set writable properties, and process asynchronous data from the sensor. This class supports two sets of datafields. The first returns human presence status, and the second returns human proximity data in meters.
Presence.hContains the definition of the CPresence class.
Switches.cppContains an implementation of the CSwitch class. The methods in this class initialize the sensor, retrieve readable properties, set writable properties, and process asynchronous data from the sensor. This class supports multiple sets of datafields. The simplest returns a single Boolean switch state, another returns the state of an array of Boolean switches, another returns the state of a multivalue switch, and so on.
Switches.hContains the definition of the CSwitch class.
Thermometer.cppContains an implementation of the CThermometer class. The methods in this class initialize the sensor, retrieve readable properties, set writable properties, and process asynchronous data from the sensor. The supported datafield returns the current temperature in degrees Celsius.
Thermometer.hContains the definition of the CThermometer class.
Unsupported.cppContains an implementation of the CUnsupported class. The methods in this class initialize the sensor, retrieve readable properties, set writable properties, and process asynchronous data from the sensor. This class supports a single timestamp datafield.
Unsupported.hContains the definition of the CUnsupported class.
Voltage.cppContains an implementation of the CVoltage class. The methods in this class initialize the sensor, retrieve readable properties, set writable properties, and process asynchronous data from the sensor. The supported datafield is a voltage measurement.
Voltage.hContains the definition of the CVoltage class.

 

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

Mostrar:
© 2014 Microsoft