Welcome back and Happy New Year! As we resume our blog in the new year, we begin by doing a series of what we call drill-down posts, where we look at a particular part of the Sensor & Location Platform and do a deep dive into its various components and piece through its technical aspects.

We begin the series with the lowest building block – the Sensor DDI (Device Driver Interface). In order for the platform to consume sensor and location data from a source – either from a hardware provider or a logical software provider – it must be channeled via a Sensor Driver. The Sensor Driver acts as the interface between the data provider and the upper layers of the platform. Every sensor data provider must therefore have a corresponding driver that allows it to talk to the platform. The fundamental components of this Sensor Driver are the Sensor Class Extension and the Sensor DDI.  As usual, here’s a pretty picture :

SensorDDI

The Sensor Driver is based on the User-Mode Driver Framework (UMDF) model which is a standard Windows driver model. This is the user mode counterpart for the more prevalent KMDF (and the older WDM) driver model for kernel mode drivers. For all practical purposes, it is a Windows process named WUDFHost.exe.

There ‘Sensor Driver’ part of it are two COM interfaces – ISensorClassExtension and ISensorDriver. The Sensor Class Extension interface is the conduit which will channel data up the platform and the Sensor Driver is the callback interface that is used by the platform to communicate with the driver and eventually down-level hardware.We primarily use IOCTLs to communicate down-level. The data flow looks like this:

SensorDDI-DataFlow

Architecturally, that is all there is from a Sensor Driver perspective. Of course, the logical question is how does one go about writing a Sensor Driver ? Luckily, we have some sample drivers in the Windows 7 WDK to help you get started and Windows Developer Center has some great resources as well.

Next week, we’ll deep dive into the Sensor API. Until then, ciao !

-- Sensor & Location Platform Team

This posting is provided "AS IS" with no warranties and confers no rights.