Windows 8.1 的地理位置驱动程序示例Geolocation driver sample for Windows 8.1


已弃用此文档和 Windows 8.1 的地理位置驱动程序示例。This documentation and the geolocation driver sample for Windows 8.1 has been deprecated.

Windows 8.1 的地理位置示例驱动程序演示了全球定位系统 (GPS) 设备的传感器驱动程序。The geolocation sample driver for Windows 8.1 demonstrates a sensor driver for a Global Positioning System (GPS) device. 此驱动程序不会连接到硬件;否则,它是完全符合构建 UMDF 传感器驱动程序的最佳实践。This driver does not connect to hardware; otherwise, it is fully compliant with best practices for building a UMDF sensor driver. 而不是发送实际的坐标,本示例模拟的传感器,发出海拔高度、 纬度、 经度和其他模拟的 GPS 数据。Instead of sending real coordinates, this sample simulates a sensor that issues altitude, latitude, longitude, and other simulated GPS data. 此外,此示例会发出可测试和调试时的时间戳。In addition, this sample issues a timestamp that is useful when testing and debugging.

此示例具有三个用途:首先,它演示了 UMDF 传感器驱动程序所需的最小功能。This sample serves three purposes: First, it demonstrates the minimal functionality required by a UMDF sensor driver. 其次,它提供了其生成有效的驱动程序的主干。Second, it provides a skeleton on which you can build a working driver. 第三,它包括像 GPS 这样的设备提供单选状态更改通知单选管理 API 的支持。Third, it includes support for the Radio Management API that provides notifications of radio-state changes for devices like a GPS.

传感器诊断工具The Sensor Diagnostic Tool
编写位置传感器驱动程序Writing a Location Sensor Driver
编写传感器设备驱动程序Writing a Sensor Device Driver