Export (0) Print
Expand All

Event Constants

The Windows Sensor and Location platform defines constants for driver events. Sensor manfuactureres can also define their own constants.

Sensor Event Types

The platform defines the following sensor event type identifiers.

Sensor event typeDescription
SENSOR_EVENT_ACCELEROMETER_SHAKE
{825F5A94-0F48-4396-9CA0-6ECB5C99D915}

Indicates that the device was shaken.

SENSOR_EVENT_DATA_UPDATED
{2ED0F2A4-0087-41D3-87DB-6773370B3C88}

Indicates that new data is available.

SENSOR_EVENT_PROPERTY_CHANGED
{2358F099-84C9-4D3D-90DF-C2421E2B2045}

Indicates that a property value changed. Check the IPortableDeviceValues interface, passed through the pEventData parameter to OnEvent, to determine which property changed and its new value.

SENSOR_EVENT_STATE_CHANGED
{BFD96016-6BD7-4560-AD34-F2F6607E8F81}

Indicates a change of operational state, for example, from SENSOR_STATE_INITIALIZING to SENSOR_STATE_READY.

Sensor Event PROPERTYKEYs

Platform-defined property keys for events are based on the following GUID:

{64346E30-8728-4B34-BDF6-4F52442C5C28}

The sensor platform defines the following PROPERTYKEYs that identify sensor event parameters.

Sensor event PROPERTYKEY and PIDDescription
SENSOR_EVENT_PARAMETER_EVENT_ID
(PID = 2)

Indicates that the GUID value in IPortableDeviceValues is an event type ID, such as SENSOR_EVENT_DATA_UPDATED.

SENSOR_EVENT_PARAMETER_STATE
(PID = 3)

Indicates that the unsigned integer value in IPortableDeviceValues is a sensor state, such as SENSOR_STATE_READY.

Sensor Error PROPERTYKEYs

Platform-defined property keys for errors will be based on the following GUID:

{77112BCD-FCE1-4f43-B8B8-A88256ADB4B3}

The sensor platform reserves this GUID for future use.

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

None supported

Header

Sensors.h

 

 

Community Additions

ADD
Show:
© 2015 Microsoft