表示传感器。
通常,通过调用 ISensorCollection::GetAt 或 ISensorManager::GetSensorByID 来检索指向 ISensor 的指针,但其他方法也可以检索此指针。 其他各种传感器 API 方法使用指向 ISensor 的指针来提供有关特定传感器的信息,或使你能够指定要用于特定作的传感器。
除了从 IUnknown 继承的方法外, ISensor 接口还公开了以下方法。
继承
ISensor 接口继承自 IUnknown 接口。
Methods
ISensor 接口具有这些方法。
|
ISensor::GetCategory 检索传感器类别的标识符。 |
|
ISensor::GetData 检索最新的传感器数据报告。 |
|
ISensor::GetEventInterest 检索当前事件兴趣设置。 |
|
ISensor::GetFriendlyName 检索用户希望看到的传感器名称。 |
|
ISensor::GetID 检索传感器的唯一标识符。 |
|
ISensor::GetProperties 检索多个传感器属性。 |
|
ISensor::GetProperty 检索属性值。 |
|
ISensor::GetState 检索传感器的当前作状态。 |
|
ISensor::GetSupportedDataFields 检索一组 PROPERTYKEY,这些属性表示传感器可以提供的数据字段。 |
|
ISensor::GetType 检索传感器类型 ID。 |
|
ISensor::SetEventInterest 指定要接收的传感器事件的列表。 |
|
ISensor::SetEventSink 指定接收传感器事件通知的接口。 |
|
ISensor::SetProperties 指定传感器属性。 |
|
ISensor::SupportsDataField 指示传感器是否支持指定的数据字段。 |
|
ISensor::SupportsEvent 指示传感器是否支持指定的事件。 |
要求
| Requirement | 价值 |
|---|---|
| 最低支持的客户端 | Windows 7 [仅限桌面应用] |
| 支持的最低服务器 | 无受支持的版本 |
| 目标平台 | Windows操作系统 |
| Header | sensorsapi.h |