Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
15b1ab91
D
Docs
项目概览
OpenHarmony
/
Docs
大约 2 年 前同步成功
通知
161
Star
293
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
15b1ab91
编写于
7月 28, 2022
作者:
S
sunxuejiao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
docs:modify sensor inaccurate description of some sentences
Signed-off-by:
N
sunxuejiao
<
sunxuejiao5@huawei.com
>
上级
1e87415c
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
225 addition
and
215 deletion
+225
-215
zh-cn/device-dev/driver/driver-peripherals-sensor-des.md
zh-cn/device-dev/driver/driver-peripherals-sensor-des.md
+13
-13
zh-cn/device-dev/reference/hdi-apis/_light_effect.md
zh-cn/device-dev/reference/hdi-apis/_light_effect.md
+6
-6
zh-cn/device-dev/reference/hdi-apis/_light_interface.md
zh-cn/device-dev/reference/hdi-apis/_light_interface.md
+18
-17
zh-cn/device-dev/reference/hdi-apis/_sensor.md
zh-cn/device-dev/reference/hdi-apis/_sensor.md
+101
-101
zh-cn/device-dev/reference/hdi-apis/_sensor_information.md
zh-cn/device-dev/reference/hdi-apis/_sensor_information.md
+20
-20
zh-cn/device-dev/reference/hdi-apis/_sensor_interface.md
zh-cn/device-dev/reference/hdi-apis/_sensor_interface.md
+42
-42
zh-cn/device-dev/reference/hdi-apis/light_8typeh.md
zh-cn/device-dev/reference/hdi-apis/light_8typeh.md
+8
-4
zh-cn/device-dev/reference/hdi-apis/light__if_8h.md
zh-cn/device-dev/reference/hdi-apis/light__if_8h.md
+11
-6
zh-cn/device-dev/reference/hdi-apis/sensor__if_8h.md
zh-cn/device-dev/reference/hdi-apis/sensor__if_8h.md
+6
-6
未找到文件。
zh-cn/device-dev/driver/driver-peripherals-sensor-des.md
浏览文件 @
15b1ab91
# Sensor
# Sensor
## 概述
## 概述
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
Sensor驱动模型屏蔽硬件器件差异,为上层Sensor服务系统提供稳定的Sensor基础能力接口,包括Sensor列表查询、Sensor启停、Sensor订阅及取消订阅,Sensor参数配置等功能。Sensor设备驱动的开发是基于HDF驱动框架基础上,结合操作系统适配层(OSAL)和平台驱动接口(比如I2C/SPI/UART总线等平台资源)能力,屏蔽不同操作系统和平台总线资源差异,实现Sensor驱动“一次开发,多系统部署”的目标。Sensor驱动模型如图1所示。
Sensor驱动模型屏蔽硬件器件差异,为上层Sensor服务系统提供稳定的Sensor基础能力接口,包括Sensor列表查询、Sensor启停、Sensor订阅及取消订阅,Sensor参数配置等功能。Sensor设备驱动的开发是基于HDF驱动框架基础上,结合操作系统适配层(OSAL)和平台驱动接口(比如I2C/SPI/UART总线等平台资源)能力,屏蔽不同操作系统和平台总线资源差异,实现Sensor驱动“一次开发,多系统部署”的目标。Sensor驱动模型如图1所示。
**图 1**
Sensor驱动模型图
**图 1**
Sensor驱动模型图


### 基本概念
### 基本概念
...
@@ -64,16 +64,16 @@ Sensor驱动模型对外开放的API接口能力的具体实现请参考:
...
@@ -64,16 +64,16 @@ Sensor驱动模型对外开放的API接口能力的具体实现请参考:
**表 1**
Sensor驱动模型对外API接口功能介绍
**表 1**
Sensor驱动模型对外API接口功能介绍
| 接口名 | 功能描述 |
| 接口名 | 功能描述 |
| ----- | -------- |
| ----- | -------- |
| int32_t GetAllSensors(struct SensorInformation
**
sensorInfo, int32_t
*
count) | 获取系统中注册的所有传感器信息,一组完整传感器信息包括传感器名字、设备厂商、固件版本号、硬件版本号、传感器类型编号、传感器标识、最大量程、精度、功耗。 |
| int32_t GetAllSensors(struct SensorInformation
**
sensorInfo, int32_t
*
count) | 获取系统中注册的所有传感器信息,一组完整传感器信息包括传感器名字、设备厂商、固件版本号、硬件版本号、传感器类型编号、传感器标识、最大量程、精度、功耗。 |
| int32_t Enable(int32_t sensorId) | 使能指定传感器设备,只有数据订阅者使能传感器后,才能获取订阅的传感器数据。 |
| int32_t Enable(int32_t sensorId) | 使能指定传感器设备,只有数据订阅者使能传感器后,才能获取订阅的传感器数据。 |
| int32_t Disable(int32_t sensorId) | 去使能指定传感器设备。 |
| int32_t Disable(int32_t sensorId) | 去使能指定传感器设备。 |
| int32_t SetBatch(int32_t sensorId, int64_t samplingInterval, int64_t reportInterval) | 设置指定传感器的数据采样间隔和数据上报间隔。 |
| int32_t SetBatch(int32_t sensorId, int64_t samplingInterval, int64_t reportInterval) | 设置指定传感器的数据采样间隔和数据上报间隔。 |
| int32_t SetMode(int32_t sensorId, int32_t mode) | 设置指定传感器的工作模式,不同的工作模式,上报数据方式不同。 |
| int32_t SetMode(int32_t sensorId, int32_t mode) | 设置指定传感器的工作模式,不同的工作模式,上报数据方式不同。 |
| int32_t SetOption(int32_t sensorId, uint32_t option) | 设置指定传感器量程,精度等可选配置。 |
| int32_t SetOption(int32_t sensorId, uint32_t option) | 设置指定传感器量程,精度等可选配置。 |
| int32_t Register(int32_t groupId, RecordDataCallback cb) | 订阅者根据不同groupId注册传感器数据回调函数,系统会将获取到的传感器数据上报给订阅者。 |
| int32_t Register(int32_t groupId, RecordDataCallback cb) | 订阅者根据不同groupId注册传感器数据回调函数,系统会将获取到的传感器数据上报给订阅者。 |
| int32_t Unregister(int32_t groupId, RecordDataCallback cb) | 订阅者根据groupId和回调函数注销对应订阅者的传感器数据回调函数。 |
| int32_t Unregister(int32_t groupId, RecordDataCallback cb) | 订阅者根据groupId和回调函数注销对应订阅者的传感器数据回调函数。 |
...
@@ -81,7 +81,7 @@ Sensor驱动模型对驱动开发者开放的功能接口,驱动开发者无
...
@@ -81,7 +81,7 @@ Sensor驱动模型对驱动开发者开放的功能接口,驱动开发者无
**表2**
Sensor驱动模型对驱动开发者开放的功能接口列表
**表2**
Sensor驱动模型对驱动开发者开放的功能接口列表
| 接口名 | 功能描述 |
| 接口名 | 功能描述 |
| ----- | -------- |
| ----- | -------- |
| int32_t AddSensorDevice(const struct SensorDeviceInfo
*
deviceInfo) | 添加当前类型的传感器设备到传感器设备管理。 |
| int32_t AddSensorDevice(const struct SensorDeviceInfo
*
deviceInfo) | 添加当前类型的传感器设备到传感器设备管理。 |
| int32_t DeleteSensorDevice(const struct SensorBasicInfo
*
sensorBaseInfo) | 删除传感器设备管理里指定的传感器设备。 |
| int32_t DeleteSensorDevice(const struct SensorBasicInfo
*
sensorBaseInfo) | 删除传感器设备管理里指定的传感器设备。 |
...
@@ -101,7 +101,7 @@ Sensor驱动模型要求驱动开发者实现的接口功能,请参考:
...
@@ -101,7 +101,7 @@ Sensor驱动模型要求驱动开发者实现的接口功能,请参考:
**表 3**
Sensor驱动模型要求驱动开发者实现的接口列表
**表 3**
Sensor驱动模型要求驱动开发者实现的接口列表
| 接口名 | 功能描述 |
| 接口名 | 功能描述 |
| ----- | -------- |
| ----- | -------- |
| int32_t init(void) | 传感器设备探测成功后,需要对传感器设备初始化配置。 |
| int32_t init(void) | 传感器设备探测成功后,需要对传感器设备初始化配置。 |
| int32_t Enable(void) | 根据当前传感器设备的HCS配置,下发传感器设备使能操作组的寄存器配置。 |
| int32_t Enable(void) | 根据当前传感器设备的HCS配置,下发传感器设备使能操作组的寄存器配置。 |
...
@@ -545,7 +545,7 @@ void HdfSensorTest::SetUpTestCase()
...
@@ -545,7 +545,7 @@ void HdfSensorTest::SetUpTestCase()
{
{
g_sensorDev = NewSensorInterfaceInstance();
g_sensorDev = NewSensorInterfaceInstance();
if (g_sensorDev == nullptr) {
if (g_sensorDev == nullptr) {
printf("test sensor
Hdi get M
odule instance failed\n\r");
printf("test sensor
get m
odule instance failed\n\r");
}
}
}
}
/* 用例资源释放 */
/* 用例资源释放 */
...
...
zh-cn/device-dev/reference/hdi-apis/_light_effect.md
浏览文件 @
15b1ab91
...
@@ -13,10 +13,10 @@
...
@@ -13,10 +13,10 @@
### Public 属性
### Public 属性
| Public
属性 | 描述 |
| Public
属性 | 描述 |
| -------- | -------- |
| -------- | -------- |
|
[
lightBrightness
](
#lightbrightness
)
| 亮度值。 |
|
[
lightBrightness
](
#lightbrightness
)
| 亮度值。 |
|
[
flashEffect
](
#flasheffect
)
| 闪烁模式。 |
|
[
flashEffect
](
#flasheffect
)
| 闪烁模式。 |
## **详细描述**
## **详细描述**
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
### flashEffect
### flashEffect
```
```
struct LightFlashEffect LightEffect::flashEffect
struct LightFlashEffect LightEffect::flashEffect
```
```
...
@@ -47,11 +47,11 @@ struct LightFlashEffect LightEffect::flashEffect
...
@@ -47,11 +47,11 @@ struct LightFlashEffect LightEffect::flashEffect
### lightBrightness
### lightBrightness
```
```
int32_t LightEffect::lightBrightness
int32_t LightEffect::lightBrightness
```
```
**描述:**
**描述:**
亮度值:Bits 24–31为扩展位,Bits 16–23为红色,
bits 8–15为绿色,bits 0–7为蓝色。 如果字节段不等于0,指
示打开相应颜色的灯。
亮度值:Bits 24–31为扩展位,Bits 16–23为红色,
Bits 8–15为绿色,Bits 0–7为蓝色。 如果相对应的字节段不等于0,表
示打开相应颜色的灯。
zh-cn/device-dev/reference/hdi-apis/_light_interface.md
浏览文件 @
15b1ab91
...
@@ -13,18 +13,18 @@
...
@@ -13,18 +13,18 @@
### Public 属性
### Public 属性
| Public
属性 | 描述 |
| Public
属性 | 描述 |
| -------- | -------- |
| -------- | -------- |
| (
[GetLightInfo](#getlightinfo)
)([out]
struct
[LightInfo](_light_info.md)
\*\*lightInfo,
[out]
uint32_t
\*
count) | 获取当前系统中所有类型的灯信息。
[
更多...
](
#getlightinfo
)
|
| (
[GetLightInfo](#getlightinfo)
)([out]
struct
[LightInfo](_light_info.md)
\*\*lightInfo,
[out]
uint32_t
\*
count) | 获取当前系统中所有类型的灯信息。
[
更多...
](
#getlightinfo
)
|
| (
[TurnOnLight](#turnonlight)
)([in]
uint32_t
lightId,
[in]
struct
[LightEffect](_light_effect.md)
\*
effect) | 根据指定的灯ID打开列表中的可用灯。
[
更多...
](
#turnonlight
)
|
| (
[TurnOnLight](#turnonlight)
)([in]
uint32_t
lightId,
[in]
struct
[LightEffect](_light_effect.md)
\*
effect) | 根据指定的灯ID打开列表中的可用灯。
[
更多...
](
#turnonlight
)
|
| (
[TurnOffLight](#turnofflight)
)([in]
uint32_t
lightId) | 根据指定的灯ID关闭列表中的可用灯。
[
更多...
](
#turnofflight
)
|
| (
[TurnOffLight](#turnofflight)
)([in]
uint32_t
lightId) | 根据指定的灯ID关闭列表中的可用灯。
[
更多...
](
#turnofflight
)
|
## **详细描述**
## **详细描述**
定义可以在灯上执行的基本操作。
定义可以在灯上执行的基本操作。
操作包括获取灯的信息、打开或关闭灯、设置灯的亮度
或
闪烁模式。
操作包括获取灯的信息、打开或关闭灯、设置灯的亮度
和
闪烁模式。
## **类成员变量说明**
## **类成员变量说明**
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
### GetLightInfo
### GetLightInfo
```
```
int32_t(* LightInterface::GetLightInfo) ([out] struct LightInfo **lightInfo,[out] uint32_t *count)
int32_t(* LightInterface::GetLightInfo) ([out] struct LightInfo **lightInfo,[out] uint32_t *count)
```
```
...
@@ -43,10 +43,10 @@ int32_t(* LightInterface::GetLightInfo) ([out] struct LightInfo **lightInfo,[out
...
@@ -43,10 +43,10 @@ int32_t(* LightInterface::GetLightInfo) ([out] struct LightInfo **lightInfo,[out
**参数:**
**参数:**
| 名称 | 描述 |
| 名称 | 描述 |
| -------- | -------- |
| -------- | -------- |
| lightInfo | 表示指向灯信息的二级指针,详见
[
LightInfo
](
_light_info.md
)
。 |
| lightInfo | 表示指向灯信息的二级指针,详见
[
LightInfo
](
_light_info.md
)
。 |
| count | 表示指向灯数量的指针。 |
| count | 表示指向灯数量的指针。 |
**返回:**
**返回:**
...
@@ -57,7 +57,7 @@ int32_t(* LightInterface::GetLightInfo) ([out] struct LightInfo **lightInfo,[out
...
@@ -57,7 +57,7 @@ int32_t(* LightInterface::GetLightInfo) ([out] struct LightInfo **lightInfo,[out
### TurnOffLight
### TurnOffLight
```
```
int32_t(* LightInterface::TurnOffLight) ([in] uint32_t lightId)
int32_t(* LightInterface::TurnOffLight) ([in] uint32_t lightId)
```
```
...
@@ -68,9 +68,9 @@ int32_t(* LightInterface::TurnOffLight) ([in] uint32_t lightId)
...
@@ -68,9 +68,9 @@ int32_t(* LightInterface::TurnOffLight) ([in] uint32_t lightId)
**参数:**
**参数:**
| 名称 | 描述 |
| 名称 | 描述 |
| -------- | -------- |
| -------- | -------- |
| lightId | 表示灯ID,详见
[
LightId
](
_light.md#lightid
)
。 |
| lightId | 表示灯ID,详见
[
LightId
](
_light.md#lightid
)
。 |
**返回:**
**返回:**
...
@@ -81,7 +81,7 @@ int32_t(* LightInterface::TurnOffLight) ([in] uint32_t lightId)
...
@@ -81,7 +81,7 @@ int32_t(* LightInterface::TurnOffLight) ([in] uint32_t lightId)
### TurnOnLight
### TurnOnLight
```
```
int32_t(* LightInterface::TurnOnLight) ([in] uint32_t lightId,[in] struct LightEffect *effect)
int32_t(* LightInterface::TurnOnLight) ([in] uint32_t lightId,[in] struct LightEffect *effect)
```
```
...
@@ -92,10 +92,10 @@ int32_t(* LightInterface::TurnOnLight) ([in] uint32_t lightId,[in] struct LightE
...
@@ -92,10 +92,10 @@ int32_t(* LightInterface::TurnOnLight) ([in] uint32_t lightId,[in] struct LightE
**参数:**
**参数:**
| 名称 | 描述 |
| 名称 | 描述 |
| -------- | -------- |
| -------- | -------- |
| lightId | 表示灯ID,详见
[
LightId
](
_light.md#lightid
)
。 |
| lightId | 表示灯ID,详见
[
LightId
](
_light.md#lightid
)
。 |
| effect | 表示指向灯效果的指针,如果lightbrightness字段为0时,
灯的亮度根据HCS配置的默认亮度进行设置,详见
[
LightEffect
](
_light_effect.md
)
。 |
| effect | 表示指向灯效果的指针,如果lightbrightness字段为0时,
灯的亮度根据HCS配置的默认亮度进行设置,详见
[
LightEffect
](
_light_effect.md
)
。 |
**返回:**
**返回:**
...
@@ -105,4 +105,5 @@ int32_t(* LightInterface::TurnOnLight) ([in] uint32_t lightId,[in] struct LightE
...
@@ -105,4 +105,5 @@ int32_t(* LightInterface::TurnOnLight) ([in] uint32_t lightId,[in] struct LightE
如果不支持闪烁设置,则返回-2。
如果不支持闪烁设置,则返回-2。
如果不支持亮度设置,则返回3。
如果不支持亮度设置,则返回-3。
zh-cn/device-dev/reference/hdi-apis/_sensor.md
浏览文件 @
15b1ab91
...
@@ -6,61 +6,61 @@
...
@@ -6,61 +6,61 @@
### 文件
### 文件
| 文件 | 描述 |
| 文件 | 描述 |
| -------- | -------- |
| -------- | -------- |
|
[
sensor_if.h
](
sensor__if_8h.md
)
| Sensor模块对外通用的接口声明文件,提供获取传感器设备信息、订阅/
去订阅传感器数据、
使能/去使能传感器、设置传感器模式、设置传感器精度,量程等可选配置接口定义。 |
|
[
sensor_if.h
](
sensor__if_8h.md
)
| Sensor模块对外通用的接口声明文件,提供获取传感器设备信息、订阅/
取消订阅传感器数据、
使能/去使能传感器、设置传感器模式、设置传感器精度,量程等可选配置接口定义。 |
|
[
sensor_type.h
](
sensor__type_8h.md
)
| 定义传感器模块所使用的传感器类型,传感器信息,传感器数据结构等数据类型。 |
|
[
sensor_type.h
](
sensor__type_8h.md
)
| 定义传感器模块所使用的传感器类型,传感器信息,传感器数据结构等数据类型。 |
### 类
### 类
| 类 | 描述 |
| 类 | 描述 |
| -------- | -------- |
| -------- | -------- |
|
[
SensorInterface
](
_sensor_interface.md
)
| 提供sensor设备基本控制操作接口。
[
更多...
](
_sensor_interface.md
)
|
|
[
SensorInterface
](
_sensor_interface.md
)
| 提供sensor设备基本控制操作接口。
[
更多...
](
_sensor_interface.md
)
|
|
[
SensorInformation
](
_sensor_information.md
)
| 定义传感器基本信息。
[
更多...
](
_sensor_information.md
)
|
|
[
SensorInformation
](
_sensor_information.md
)
| 定义传感器基本信息。
[
更多...
](
_sensor_information.md
)
|
|
[
SensorEvents
](
_sensor_events.md
)
| 上报传感器数据结构。
[
更多...
](
_sensor_events.md
)
|
|
[
SensorEvents
](
_sensor_events.md
)
| 上报传感器数据结构。
[
更多...
](
_sensor_events.md
)
|
### 宏定义
### 宏定义
| 宏定义 | 描述 |
| 宏定义 | 描述 |
| -------- | -------- |
| -------- | -------- |
|
[
SENSOR_NAME_MAX_LEN
](
#sensornamemaxlen
)
32 | Sensor名称的最大长度。 |
|
[
SENSOR_NAME_MAX_LEN
](
#sensornamemaxlen
)
32 | Sensor名称的最大长度。 |
|
[
SENSOR_VERSION_MAX_LEN
](
#sensorversionmaxlen
)
16 | Sensor版本号的最大长度。 |
|
[
SENSOR_VERSION_MAX_LEN
](
#sensorversionmaxlen
)
16 | Sensor版本号的最大长度。 |
### 类型定义
### 类型定义
| 类型定义 | 描述 |
| 类型定义 | 描述 |
| -------- | -------- |
| -------- | -------- |
| (
[
RecordDataCallback
](
#recorddatacallback
)
)
(const
struct
[SensorEvents](_sensor_events.md)
\*
) | 传感器上报数据回调函数的定义,传感器服务用户在订阅传感器时,
需要注册上报数据回调函数,传感器使能后,传感器服务用户可以接受到传感器数据,详见[SensorInterface](_sensor_interface.md)。
[
更多...
](
#recorddatacallback
)
|
| (
[
RecordDataCallback
](
#recorddatacallback
)
)
(const
struct
[SensorEvents](_sensor_events.md)
\*
) | 传感器上报数据回调函数的定义,传感器服务用户在订阅传感器时,
需要注册上报数据回调函数,传感器使能后,传感器服务用户可以接受到传感器数据,详见[SensorInterface](_sensor_interface.md)。
[
更多...
](
#recorddatacallback
)
|
### 枚举
### 枚举
| 枚举 | 描述 |
| 枚举 | 描述 |
| -------- | -------- |
| -------- | -------- |
|
[
SensorStatus
](
#sensorstatus
)
{
SENSOR_SUCCESS
=
0,
SENSOR_FAILURE
=
-1,
SENSOR_NOT_SUPPORT
=
-2,
SENSOR_INVALID_PARAM
=
-3,
SENSOR_INVALID_SERVICE
=
-4,
SENSOR_NULL_PTR
=
-5
} | 定义传感器模块返回值类型。
[
更多...
](
#sensorstatus
)
|
|
[
SensorStatus
](
#sensorstatus
)
{
SENSOR_SUCCESS
=
0,
SENSOR_FAILURE
=
-1,
SENSOR_NOT_SUPPORT
=
-2,
SENSOR_INVALID_PARAM
=
-3,
SENSOR_INVALID_SERVICE
=
-4,
SENSOR_NULL_PTR
=
-5
} | 定义传感器模块返回值类型。
[
更多...
](
#sensorstatus
)
|
|
[
SensorTypeTag
](
#sensortypetag
)
{
SENSOR_TYPE_NONE
=
0,
SENSOR_TYPE_ACCELEROMETER
=
1,
SENSOR_TYPE_GYROSCOPE
=
2,
SENSOR_TYPE_PHOTOPLETHYSMOGRAPH
=
3,
SENSOR_TYPE_ELECTROCARDIOGRAPH
=
4,
SENSOR_TYPE_AMBIENT_LIGHT
=
5,
SENSOR_TYPE_MAGNETIC_FIELD
=
6,
SENSOR_TYPE_CAPACITIVE
=
7,
SENSOR_TYPE_BAROMETER
=
8,
SENSOR_TYPE_TEMPERATURE
=
9,
SENSOR_TYPE_HALL
=
10,
SENSOR_TYPE_GESTURE
=
11,
SENSOR_TYPE_PROXIMITY
=
12,
SENSOR_TYPE_HUMIDITY
=
13,
SENSOR_TYPE_MEDICAL_BEGIN
=
128,
SENSOR_TYPE_MEDICAL_END
=
160,
SENSOR_TYPE_PHYSICAL_MAX
=
255,
SENSOR_TYPE_ORIENTATION
=
256,
SENSOR_TYPE_GRAVITY
=
257,
SENSOR_TYPE_LINEAR_ACCELERATION
=
258,
SENSOR_TYPE_ROTATION_VECTOR
=
259,
SENSOR_TYPE_AMBIENT_TEMPERATURE
=
260,
SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED
=
261,
SENSOR_TYPE_GAME_ROTATION_VECTOR
=
262,
SENSOR_TYPE_GYROSCOPE_UNCALIBRATED
=
263,
SENSOR_TYPE_SIGNIFICANT_MOTION
=
264,
SENSOR_TYPE_PEDOMETER_DETECTION
=
265,
SENSOR_TYPE_PEDOMETER
=
266,
SENSOR_TYPE_GEOMAGNETIC_ROTATION_VECTOR
=
277,
SENSOR_TYPE_HEART_RATE
=
278,
SENSOR_TYPE_DEVICE_ORIENTATION
=
279,
SENSOR_TYPE_WEAR_DETECTION
=
280,
SENSOR_TYPE_ACCELEROMETER_UNCALIBRATED
=
281,
SENSOR_TYPE_MAX
} | 定义传感器类型标识。
[
更多...
](
#sensortypetag
)
|
|
[
SensorTypeTag
](
#sensortypetag
)
{
SENSOR_TYPE_NONE
=
0,
SENSOR_TYPE_ACCELEROMETER
=
1,
SENSOR_TYPE_GYROSCOPE
=
2,
SENSOR_TYPE_PHOTOPLETHYSMOGRAPH
=
3,
SENSOR_TYPE_ELECTROCARDIOGRAPH
=
4,
SENSOR_TYPE_AMBIENT_LIGHT
=
5,
SENSOR_TYPE_MAGNETIC_FIELD
=
6,
SENSOR_TYPE_CAPACITIVE
=
7,
SENSOR_TYPE_BAROMETER
=
8,
SENSOR_TYPE_TEMPERATURE
=
9,
SENSOR_TYPE_HALL
=
10,
SENSOR_TYPE_GESTURE
=
11,
SENSOR_TYPE_PROXIMITY
=
12,
SENSOR_TYPE_HUMIDITY
=
13,
SENSOR_TYPE_MEDICAL_BEGIN
=
128,
SENSOR_TYPE_MEDICAL_END
=
160,
SENSOR_TYPE_PHYSICAL_MAX
=
255,
SENSOR_TYPE_ORIENTATION
=
256,
SENSOR_TYPE_GRAVITY
=
257,
SENSOR_TYPE_LINEAR_ACCELERATION
=
258,
SENSOR_TYPE_ROTATION_VECTOR
=
259,
SENSOR_TYPE_AMBIENT_TEMPERATURE
=
260,
SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED
=
261,
SENSOR_TYPE_GAME_ROTATION_VECTOR
=
262,
SENSOR_TYPE_GYROSCOPE_UNCALIBRATED
=
263,
SENSOR_TYPE_SIGNIFICANT_MOTION
=
264,
SENSOR_TYPE_PEDOMETER_DETECTION
=
265,
SENSOR_TYPE_PEDOMETER
=
266,
SENSOR_TYPE_GEOMAGNETIC_ROTATION_VECTOR
=
277,
SENSOR_TYPE_HEART_RATE
=
278,
SENSOR_TYPE_DEVICE_ORIENTATION
=
279,
SENSOR_TYPE_WEAR_DETECTION
=
280,
SENSOR_TYPE_ACCELEROMETER_UNCALIBRATED
=
281,
SENSOR_TYPE_MAX
} | 定义传感器类型标识。
[
更多...
](
#sensortypetag
)
|
|
[
SensorAccuracyType
](
#sensoraccuracytype
)
{
SENSOR_NO_ACCURACY
=
0,
SENSOR_LOW_ACCURACY
=
1,
SENSOR_MEDIUM_ACCURACY
=
2,
SENSOR_HIGH_ACCURACY
=
3,
SENSOR_MAX_ACCURACY
} | 传感器的精度类型。
[
更多...
](
#sensoraccuracytype
)
|
|
[
SensorAccuracyType
](
#sensoraccuracytype
)
{
SENSOR_NO_ACCURACY
=
0,
SENSOR_LOW_ACCURACY
=
1,
SENSOR_MEDIUM_ACCURACY
=
2,
SENSOR_HIGH_ACCURACY
=
3,
SENSOR_MAX_ACCURACY
} | 传感器的精度类型。
[
更多...
](
#sensoraccuracytype
)
|
|
[
SensorRangeType
](
#sensorrangetype
)
{
SENSOR_RANGE_LEVEL1
=
0,
SENSOR_RANGE_LEVEL2
=
1,
SENSOR_RANGE_LEVEL3
=
2,
SENSOR_RANGE_LEVEL_MAX
} | 传感器的量程级别。
[
更多...
](
#sensorrangetype
)
|
|
[
SensorRangeType
](
#sensorrangetype
)
{
SENSOR_RANGE_LEVEL1
=
0,
SENSOR_RANGE_LEVEL2
=
1,
SENSOR_RANGE_LEVEL3
=
2,
SENSOR_RANGE_LEVEL_MAX
} | 传感器的量程级别。
[
更多...
](
#sensorrangetype
)
|
|
[
SensorModeType
](
#sensormodetype
)
{
SENSOR_MODE_DEFAULT
=
0,
SENSOR_MODE_REALTIME
=
1,
SENSOR_MODE_ON_CHANGE
=
2,
SENSOR_MODE_ONE_SHOT
=
3,
SENSOR_MODE_FIFO_MODE
=
4,
SENSOR_MODE_MAX
} | 传感器的工作模式。
[
更多...
](
#sensormodetype
)
|
|
[
SensorModeType
](
#sensormodetype
)
{
SENSOR_MODE_DEFAULT
=
0,
SENSOR_MODE_REALTIME
=
1,
SENSOR_MODE_ON_CHANGE
=
2,
SENSOR_MODE_ONE_SHOT
=
3,
SENSOR_MODE_FIFO_MODE
=
4,
SENSOR_MODE_MAX
} | 传感器的工作模式。
[
更多...
](
#sensormodetype
)
|
|
[
SensorGroupType
](
#sensorgrouptype
)
{
TRADITIONAL_SENSOR_TYPE
=
0,
MEDICAL_SENSOR_TYPE
=
1,
SENSOR_GROUP_TYPE_MAX
} | 枚举传感器的硬件服务组。
[
更多...
](
#sensorgrouptype
)
|
|
[
SensorGroupType
](
#sensorgrouptype
)
{
TRADITIONAL_SENSOR_TYPE
=
0,
MEDICAL_SENSOR_TYPE
=
1,
SENSOR_GROUP_TYPE_MAX
} | 枚举传感器的硬件服务组。
[
更多...
](
#sensorgrouptype
)
|
### 函数
### 函数
| 函数 | 描述 |
| 函数 | 描述 |
| -------- | -------- |
| -------- | -------- |
|
[
NewSensorInterfaceInstance
](
#newsensorinterfaceinstance
)
(void) | 创建传感器接口实例。
[
更多...
](
#newsensorinterfaceinstance
)
|
|
[
NewSensorInterfaceInstance
](
#newsensorinterfaceinstance
)
(void) | 创建传感器接口实例。
[
更多...
](
#newsensorinterfaceinstance
)
|
|
[
FreeSensorInterfaceInstance
](
#freesensorinterfaceinstance
)
(void) | 释放传感器接口实例。
[
更多...
](
#freesensorinterfaceinstance
)
|
|
[
FreeSensorInterfaceInstance
](
#freesensorinterfaceinstance
)
(void) | 释放传感器接口实例。
[
更多...
](
#freesensorinterfaceinstance
)
|
## **详细描述**
## **详细描述**
传感器设备驱动对传感器服务提供通用的接口能力。
传感器设备驱动对传感器服务提供通用的接口能力。
模块提供传感器服务对传感器驱动访问统一接口,服务获取驱动对象或者代理后, 通过其提供的各类方法,以传感器id区分访问不同类型传感器设备,实现获取传感器设备信息、订阅/
去
订阅传感器数据、 使能/去使能传感器、设置传感器模式、设置传感器精度、量程等可选配置等。
模块提供传感器服务对传感器驱动访问统一接口,服务获取驱动对象或者代理后, 通过其提供的各类方法,以传感器id区分访问不同类型传感器设备,实现获取传感器设备信息、订阅/
取消
订阅传感器数据、 使能/去使能传感器、设置传感器模式、设置传感器精度、量程等可选配置等。
**Since:**
**Since:**
...
@@ -76,7 +76,7 @@
...
@@ -76,7 +76,7 @@
### SENSOR_NAME_MAX_LEN
### SENSOR_NAME_MAX_LEN
```
```
#define SENSOR_NAME_MAX_LEN 32
#define SENSOR_NAME_MAX_LEN 32
```
```
...
@@ -88,7 +88,7 @@ Sensor名称的最大长度。
...
@@ -88,7 +88,7 @@ Sensor名称的最大长度。
### SENSOR_VERSION_MAX_LEN
### SENSOR_VERSION_MAX_LEN
```
```
#define SENSOR_VERSION_MAX_LEN 16
#define SENSOR_VERSION_MAX_LEN 16
```
```
...
@@ -103,7 +103,7 @@ Sensor版本号的最大长度。
...
@@ -103,7 +103,7 @@ Sensor版本号的最大长度。
### RecordDataCallback
### RecordDataCallback
```
```
typedef int32_t(* RecordDataCallback) (const struct SensorEvents *)
typedef int32_t(* RecordDataCallback) (const struct SensorEvents *)
```
```
...
@@ -118,7 +118,7 @@ typedef int32_t(* RecordDataCallback) (const struct SensorEvents *)
...
@@ -118,7 +118,7 @@ typedef int32_t(* RecordDataCallback) (const struct SensorEvents *)
### SensorAccuracyType
### SensorAccuracyType
```
```
enum SensorAccuracyType
enum SensorAccuracyType
```
```
...
@@ -127,18 +127,18 @@ enum SensorAccuracyType
...
@@ -127,18 +127,18 @@ enum SensorAccuracyType
传感器的精度类型。
传感器的精度类型。
| 枚举值 | 描述 |
| 枚举值 | 描述 |
| -------- | -------- |
| -------- | -------- |
| SENSOR_NO_ACCURACY | 无精度类型。 |
| SENSOR_NO_ACCURACY | 无精度类型。 |
| SENSOR_LOW_ACCURACY | 低精度类型。 |
| SENSOR_LOW_ACCURACY | 低精度类型。 |
| SENSOR_MEDIUM_ACCURACY | 中等精度类型。 |
| SENSOR_MEDIUM_ACCURACY | 中等精度类型。 |
| SENSOR_HIGH_ACCURACY | 高精度类型。 |
| SENSOR_HIGH_ACCURACY | 高精度类型。 |
| SENSOR_MAX_ACCURACY | 最大精度类型。 |
| SENSOR_MAX_ACCURACY | 最大精度类型。 |
### SensorGroupType
### SensorGroupType
```
```
enum SensorGroupType
enum SensorGroupType
```
```
...
@@ -147,16 +147,16 @@ enum SensorGroupType
...
@@ -147,16 +147,16 @@ enum SensorGroupType
枚举传感器的硬件服务组。
枚举传感器的硬件服务组。
| 枚举值 | 描述 |
| 枚举值 | 描述 |
| -------- | -------- |
| -------- | -------- |
| TRADITIONAL_SENSOR_TYPE | 传统传感器类型,传感器ID枚举值范围为128-160。 |
| TRADITIONAL_SENSOR_TYPE | 传统传感器类型,传感器ID枚举值范围为128-160。 |
| MEDICAL_SENSOR_TYPE | 医疗传感器类型,传感器ID枚举值范围不在128-160之间。 |
| MEDICAL_SENSOR_TYPE | 医疗传感器类型,传感器ID枚举值范围不在128-160之间。 |
| SENSOR_GROUP_TYPE_MAX | 最大传感器类型。 |
| SENSOR_GROUP_TYPE_MAX | 最大传感器类型。 |
### SensorModeType
### SensorModeType
```
```
enum SensorModeType
enum SensorModeType
```
```
...
@@ -165,19 +165,19 @@ enum SensorModeType
...
@@ -165,19 +165,19 @@ enum SensorModeType
传感器的工作模式。
传感器的工作模式。
| 枚举值 | 描述 |
| 枚举值 | 描述 |
| -------- | -------- |
| -------- | -------- |
| SENSOR_MODE_DEFAULT | 传感器默认工作模式状态。 |
| SENSOR_MODE_DEFAULT | 传感器默认工作模式状态。 |
| SENSOR_MODE_REALTIME | 传感器实时工作模式状态,一组数据上报一次。 |
| SENSOR_MODE_REALTIME | 传感器实时工作模式状态,一组数据上报一次。 |
| SENSOR_MODE_ON_CHANGE | 传感器实时工作模式状态,状态变更上报一次。 |
| SENSOR_MODE_ON_CHANGE | 传感器实时工作模式状态,状态变更上报一次。 |
| SENSOR_MODE_ONE_SHOT | 传感器实时工作模式状态,只上报一次。 |
| SENSOR_MODE_ONE_SHOT | 传感器实时工作模式状态,只上报一次。 |
| SENSOR_MODE_FIFO_MODE | 传感器缓存工作模式状态,根据配置的缓存大小上报。 |
| SENSOR_MODE_FIFO_MODE | 传感器缓存工作模式状态,根据配置的缓存大小上报。 |
| SENSOR_MODE_MAX | 传感器最大类型标识。 |
| SENSOR_MODE_MAX | 传感器最大类型标识。 |
### SensorRangeType
### SensorRangeType
```
```
enum SensorRangeType
enum SensorRangeType
```
```
...
@@ -186,17 +186,17 @@ enum SensorRangeType
...
@@ -186,17 +186,17 @@ enum SensorRangeType
传感器的量程级别。
传感器的量程级别。
| 枚举值 | 描述 |
| 枚举值 | 描述 |
| -------- | -------- |
| -------- | -------- |
| SENSOR_RANGE_LEVEL1 | 量程级别1。 |
| SENSOR_RANGE_LEVEL1 | 量程级别1。 |
| SENSOR_RANGE_LEVEL2 | 量程级别2。 |
| SENSOR_RANGE_LEVEL2 | 量程级别2。 |
| SENSOR_RANGE_LEVEL3 | 量程级别3。 |
| SENSOR_RANGE_LEVEL3 | 量程级别3。 |
| SENSOR_RANGE_LEVEL_MAX | 量程最大级别。 |
| SENSOR_RANGE_LEVEL_MAX | 量程最大级别。 |
### SensorStatus
### SensorStatus
```
```
enum SensorStatus
enum SensorStatus
```
```
...
@@ -205,19 +205,19 @@ enum SensorStatus
...
@@ -205,19 +205,19 @@ enum SensorStatus
定义传感器模块返回值类型。
定义传感器模块返回值类型。
| 枚举值 | 描述 |
| 枚举值 | 描述 |
| -------- | -------- |
| -------- | -------- |
| SENSOR_SUCCESS | 传感器执行成功。 |
| SENSOR_SUCCESS | 传感器执行成功。 |
| SENSOR_FAILURE | 传感器执行失败。 |
| SENSOR_FAILURE | 传感器执行失败。 |
| SENSOR_NOT_SUPPORT | 传感器不支持。 |
| SENSOR_NOT_SUPPORT | 传感器不支持。 |
| SENSOR_INVALID_PARAM | 传感器无效参数。 |
| SENSOR_INVALID_PARAM | 传感器无效参数。 |
| SENSOR_INVALID_SERVICE | 传感器无效服务。 |
| SENSOR_INVALID_SERVICE | 传感器无效服务。 |
| SENSOR_NULL_PTR | 传感器空指针。 |
| SENSOR_NULL_PTR | 传感器空指针。 |
### SensorTypeTag
### SensorTypeTag
```
```
enum SensorTypeTag
enum SensorTypeTag
```
```
...
@@ -226,42 +226,42 @@ enum SensorTypeTag
...
@@ -226,42 +226,42 @@ enum SensorTypeTag
定义传感器类型标识。
定义传感器类型标识。
| 枚举值 | 描述 |
| 枚举值 | 描述 |
| -------- | -------- |
| -------- | -------- |
| SENSOR_TYPE_NONE | 空传感器类型,用于测试。 |
| SENSOR_TYPE_NONE | 空传感器类型,用于测试。 |
| SENSOR_TYPE_ACCELEROMETER | 加速度传感器。 |
| SENSOR_TYPE_ACCELEROMETER | 加速度传感器。 |
| SENSOR_TYPE_GYROSCOPE | 陀螺仪传感器。 |
| SENSOR_TYPE_GYROSCOPE | 陀螺仪传感器。 |
| SENSOR_TYPE_PHOTOPLETHYSMOGRAPH | 心率传感器。 |
| SENSOR_TYPE_PHOTOPLETHYSMOGRAPH | 心率传感器。 |
| SENSOR_TYPE_ELECTROCARDIOGRAPH | 心电传感器。 |
| SENSOR_TYPE_ELECTROCARDIOGRAPH | 心电传感器。 |
| SENSOR_TYPE_AMBIENT_LIGHT | 环境光传感器。 |
| SENSOR_TYPE_AMBIENT_LIGHT | 环境光传感器。 |
| SENSOR_TYPE_MAGNETIC_FIELD | 地磁传感器。 |
| SENSOR_TYPE_MAGNETIC_FIELD | 地磁传感器。 |
| SENSOR_TYPE_CAPACITIVE | 电容传感器。 |
| SENSOR_TYPE_CAPACITIVE | 电容传感器。 |
| SENSOR_TYPE_BAROMETER | 气压计传感器。 |
| SENSOR_TYPE_BAROMETER | 气压计传感器。 |
| SENSOR_TYPE_TEMPERATURE | 温度传感器。 |
| SENSOR_TYPE_TEMPERATURE | 温度传感器。 |
| SENSOR_TYPE_HALL | 霍尔传感器。 |
| SENSOR_TYPE_HALL | 霍尔传感器。 |
| SENSOR_TYPE_GESTURE | 手势传感器。 |
| SENSOR_TYPE_GESTURE | 手势传感器。 |
| SENSOR_TYPE_PROXIMITY | 接近光传感器。 |
| SENSOR_TYPE_PROXIMITY | 接近光传感器。 |
| SENSOR_TYPE_HUMIDITY | 湿度传感器。 |
| SENSOR_TYPE_HUMIDITY | 湿度传感器。 |
| SENSOR_TYPE_MEDICAL_BEGIN | 医疗传感器ID枚举值范围的开始。 |
| SENSOR_TYPE_MEDICAL_BEGIN | 医疗传感器ID枚举值范围的开始。 |
| SENSOR_TYPE_MEDICAL_END | 医疗传感器ID枚举值范围的结束。 |
| SENSOR_TYPE_MEDICAL_END | 医疗传感器ID枚举值范围的结束。 |
| SENSOR_TYPE_PHYSICAL_MAX | 物理传感器最大类型。 |
| SENSOR_TYPE_PHYSICAL_MAX | 物理传感器最大类型。 |
| SENSOR_TYPE_ORIENTATION | 方向传感器。 |
| SENSOR_TYPE_ORIENTATION | 方向传感器。 |
| SENSOR_TYPE_GRAVITY | 重力传感器。 |
| SENSOR_TYPE_GRAVITY | 重力传感器。 |
| SENSOR_TYPE_LINEAR_ACCELERATION | 线性加速度传感器。 |
| SENSOR_TYPE_LINEAR_ACCELERATION | 线性加速度传感器。 |
| SENSOR_TYPE_ROTATION_VECTOR | 旋转矢量传感器。 |
| SENSOR_TYPE_ROTATION_VECTOR | 旋转矢量传感器。 |
| SENSOR_TYPE_AMBIENT_TEMPERATURE | 环境温度传感器 |
| SENSOR_TYPE_AMBIENT_TEMPERATURE | 环境温度传感器 |
| SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED | 未校准磁场传感器。 |
| SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED | 未校准磁场传感器。 |
| SENSOR_TYPE_GAME_ROTATION_VECTOR | 游戏旋转矢量传感器。 |
| SENSOR_TYPE_GAME_ROTATION_VECTOR | 游戏旋转矢量传感器。 |
| SENSOR_TYPE_GYROSCOPE_UNCALIBRATED | 未校准陀螺仪传感器。 |
| SENSOR_TYPE_GYROSCOPE_UNCALIBRATED | 未校准陀螺仪传感器。 |
| SENSOR_TYPE_SIGNIFICANT_MOTION | 大幅度动作传感器。 |
| SENSOR_TYPE_SIGNIFICANT_MOTION | 大幅度动作传感器。 |
| SENSOR_TYPE_PEDOMETER_DETECTION | 计步器检测传感器。 |
| SENSOR_TYPE_PEDOMETER_DETECTION | 计步器检测传感器。 |
| SENSOR_TYPE_PEDOMETER | 计步器传感器。 |
| SENSOR_TYPE_PEDOMETER | 计步器传感器。 |
| SENSOR_TYPE_GEOMAGNETIC_ROTATION_VECTOR | 地磁旋转矢量传感器。 |
| SENSOR_TYPE_GEOMAGNETIC_ROTATION_VECTOR | 地磁旋转矢量传感器。 |
| SENSOR_TYPE_HEART_RATE | 心率传感器。 |
| SENSOR_TYPE_HEART_RATE | 心率传感器。 |
| SENSOR_TYPE_DEVICE_ORIENTATION | 设备方向传感器。 |
| SENSOR_TYPE_DEVICE_ORIENTATION | 设备方向传感器。 |
| SENSOR_TYPE_WEAR_DETECTION | 佩戴检测传感器。 |
| SENSOR_TYPE_WEAR_DETECTION | 佩戴检测传感器。 |
| SENSOR_TYPE_ACCELEROMETER_UNCALIBRATED | 未校准加速度传感器。 |
| SENSOR_TYPE_ACCELEROMETER_UNCALIBRATED | 未校准加速度传感器。 |
| SENSOR_TYPE_MAX | 传感器类型最大个数标识。 |
| SENSOR_TYPE_MAX | 传感器类型最大个数标识。 |
## **函数说明**
## **函数说明**
...
@@ -269,7 +269,7 @@ enum SensorTypeTag
...
@@ -269,7 +269,7 @@ enum SensorTypeTag
### FreeSensorInterfaceInstance()
### FreeSensorInterfaceInstance()
```
```
int32_t FreeSensorInterfaceInstance (void )
int32_t FreeSensorInterfaceInstance (void )
```
```
...
@@ -295,7 +295,7 @@ int32_t FreeSensorInterfaceInstance (void )
...
@@ -295,7 +295,7 @@ int32_t FreeSensorInterfaceInstance (void )
### NewSensorInterfaceInstance()
### NewSensorInterfaceInstance()
```
```
const struct SensorInterface* NewSensorInterfaceInstance (void )
const struct SensorInterface* NewSensorInterfaceInstance (void )
```
```
...
@@ -306,10 +306,10 @@ const struct SensorInterface* NewSensorInterfaceInstance (void )
...
@@ -306,10 +306,10 @@ const struct SensorInterface* NewSensorInterfaceInstance (void )
**参数:**
**参数:**
| 名称 | 描述 |
| 名称 | 描述 |
| -------- | -------- |
| -------- | -------- |
| sensorId | 表示传感器ID。有关详细信息,详见
[
SensorTypeTag
](
#sensortypetag
)
。 |
| sensorId | 表示传感器ID。有关详细信息,详见
[
SensorTypeTag
](
#sensortypetag
)
。 |
| cb | 表示要注册的回调函数。有关详细信息,详见
[
RecordDataCallback
](
#recorddatacallback
)
。 |
| cb | 表示要注册的回调函数。有关详细信息,详见
[
RecordDataCallback
](
#recorddatacallback
)
。 |
**返回:**
**返回:**
...
...
zh-cn/device-dev/reference/hdi-apis/_sensor_information.md
浏览文件 @
15b1ab91
...
@@ -13,17 +13,17 @@
...
@@ -13,17 +13,17 @@
### Public 属性
### Public 属性
| Public
属性 | 描述 |
| Public
属性 | 描述 |
| -------- | -------- |
| -------- | -------- |
|
[
sensorName
](
#sensorname
)
[
[SENSOR_NAME_MAX_LEN
](
_sensor.md#sensornamemaxlen
)
] | 传感器名称。 |
|
[
sensorName
](
#sensorname
)
[
[SENSOR_NAME_MAX_LEN
](
_sensor.md#sensornamemaxlen
)
] | 传感器名称。 |
|
[
vendorName
](
#vendorname
)
[
[SENSOR_NAME_MAX_LEN
](
_sensor.md#sensornamemaxlen
)
] | 传感器设备厂商。 |
|
[
vendorName
](
#vendorname
)
[
[SENSOR_NAME_MAX_LEN
](
_sensor.md#sensornamemaxlen
)
] | 传感器设备厂商。 |
|
[
firmwareVersion
](
#firmwareversion
)
[
[SENSOR_VERSION_MAX_LEN
](
_sensor.md#sensorversionmaxlen
)
] | 传感器固件版本号。 |
|
[
firmwareVersion
](
#firmwareversion
)
[
[SENSOR_VERSION_MAX_LEN
](
_sensor.md#sensorversionmaxlen
)
] | 传感器固件版本号。 |
|
[
hardwareVersion
](
#hardwareversion
)
<br/>
[
[SENSOR_VERSION_MAX_LEN
](
_sensor.md#sensorversionmaxlen
)
] | 传感器硬件版本号。 |
|
[
hardwareVersion
](
#hardwareversion
)
<br/>
[
[SENSOR_VERSION_MAX_LEN
](
_sensor.md#sensorversionmaxlen
)
] | 传感器硬件版本号。 |
|
[
sensorTypeId
](
#sensortypeid
)
| 传感器类型编号
, |
|
[
sensorTypeId
](
#sensortypeid
)
| 传感器类型编号
。 |
|
[
sensorId
](
#sensorid
)
| 传感器的标识号,
有传感器驱动开发者定义。 |
|
[
sensorId
](
#sensorid
)
| 传感器的标识号,
由传感器驱动开发者定义。 |
|
[
maxRange
](
#maxrange
)
| 传感器的最大量程。 |
|
[
maxRange
](
#maxrange
)
| 传感器的最大量程。 |
|
[
accuracy
](
#accuracy
)
| 传感器的精度。 |
|
[
accuracy
](
#accuracy
)
| 传感器的精度。 |
|
[
power
](
#power
)
| 传感器的功耗。 |
|
[
power
](
#power
)
| 传感器的功耗。 |
## **详细描述**
## **详细描述**
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
### accuracy
### accuracy
```
```
float SensorInformation::accuracy
float SensorInformation::accuracy
```
```
...
@@ -54,7 +54,7 @@ float SensorInformation::accuracy
...
@@ -54,7 +54,7 @@ float SensorInformation::accuracy
### firmwareVersion
### firmwareVersion
```
```
char SensorInformation::firmwareVersion[SENSOR_VERSION_MAX_LEN]
char SensorInformation::firmwareVersion[SENSOR_VERSION_MAX_LEN]
```
```
...
@@ -66,7 +66,7 @@ char SensorInformation::firmwareVersion[SENSOR_VERSION_MAX_LEN]
...
@@ -66,7 +66,7 @@ char SensorInformation::firmwareVersion[SENSOR_VERSION_MAX_LEN]
### hardwareVersion
### hardwareVersion
```
```
char SensorInformation::hardwareVersion[SENSOR_VERSION_MAX_LEN]
char SensorInformation::hardwareVersion[SENSOR_VERSION_MAX_LEN]
```
```
...
@@ -78,7 +78,7 @@ char SensorInformation::hardwareVersion[SENSOR_VERSION_MAX_LEN]
...
@@ -78,7 +78,7 @@ char SensorInformation::hardwareVersion[SENSOR_VERSION_MAX_LEN]
### maxRange
### maxRange
```
```
float SensorInformation::maxRange
float SensorInformation::maxRange
```
```
...
@@ -90,19 +90,19 @@ float SensorInformation::maxRange
...
@@ -90,19 +90,19 @@ float SensorInformation::maxRange
### sensorId
### sensorId
```
```
int32_t SensorInformation::sensorId
int32_t SensorInformation::sensorId
```
```
**描述:**
**描述:**
传感器的标识号,
有
传感器驱动开发者定义。
传感器的标识号,
由
传感器驱动开发者定义。
### sensorName
### sensorName
```
```
char SensorInformation::sensorName[SENSOR_NAME_MAX_LEN]
char SensorInformation::sensorName[SENSOR_NAME_MAX_LEN]
```
```
...
@@ -114,7 +114,7 @@ char SensorInformation::sensorName[SENSOR_NAME_MAX_LEN]
...
@@ -114,7 +114,7 @@ char SensorInformation::sensorName[SENSOR_NAME_MAX_LEN]
### sensorTypeId
### sensorTypeId
```
```
int32_t SensorInformation::sensorTypeId
int32_t SensorInformation::sensorTypeId
```
```
...
@@ -126,7 +126,7 @@ int32_t SensorInformation::sensorTypeId
...
@@ -126,7 +126,7 @@ int32_t SensorInformation::sensorTypeId
### vendorName
### vendorName
```
```
char SensorInformation::vendorName[SENSOR_NAME_MAX_LEN]
char SensorInformation::vendorName[SENSOR_NAME_MAX_LEN]
```
```
...
@@ -138,7 +138,7 @@ char SensorInformation::vendorName[SENSOR_NAME_MAX_LEN]
...
@@ -138,7 +138,7 @@ char SensorInformation::vendorName[SENSOR_NAME_MAX_LEN]
### power
### power
```
```
char SensorInformation::power
char SensorInformation::power
```
```
...
...
zh-cn/device-dev/reference/hdi-apis/_sensor_interface.md
浏览文件 @
15b1ab91
...
@@ -13,23 +13,23 @@
...
@@ -13,23 +13,23 @@
### Public 属性
### Public 属性
| Public
属性 | 描述 |
| Public
属性 | 描述 |
| -------- | -------- |
| -------- | -------- |
| (
[GetAllSensors](#getallsensors)
)([out]
struct
[SensorInformation](_sensor_information.md)
\*\*sensorInfo,
[out]
int32_t
\*
count) | 获取当前系统中所有类型的传感器信息。
[
更多...
](
#getallsensors
)
|
| (
[GetAllSensors](#getallsensors)
)([out]
struct
[SensorInformation](_sensor_information.md)
\*\*sensorInfo,
[out]
int32_t
\*
count) | 获取当前系统中所有类型的传感器信息。
[
更多...
](
#getallsensors
)
|
| (
[Enable](#enable)
)([in]
int32_t
sensorId) | 根据传感器设备类型标识使能传感器信息列表里存在的设备,只有数据订阅者使能传感器后,才能获取订阅的传感器数据。
[
更多...
](
#enable
)
|
| (
[Enable](#enable)
)([in]
int32_t
sensorId) | 根据传感器设备类型标识使能传感器信息列表里存在的设备,只有数据订阅者使能传感器后,才能获取订阅的传感器数据。
[
更多...
](
#enable
)
|
| (
[Disable](#disable)
)([in]
int32_t
sensorId) | 根据传感器设备类型标识去使能传感器信息列表里存在的设备。
[
更多...
](
#disable
)
|
| (
[Disable](#disable)
)([in]
int32_t
sensorId) | 根据传感器设备类型标识去使能传感器信息列表里存在的设备。
[
更多...
](
#disable
)
|
| (
[SetBatch](#setbatch)
)([in]
int32_t
sensorId,
[in]
int64_t
samplingInterval,
[in]
int64_t
reportInterval) | 设置指定传感器的数据采样间隔和数据上报间隔。
[
更多...
](
#setbatch
)
|
| (
[SetBatch](#setbatch)
)([in]
int32_t
sensorId,
[in]
int64_t
samplingInterval,
[in]
int64_t
reportInterval) | 设置指定传感器的数据采样间隔和数据上报间隔。
[
更多...
](
#setbatch
)
|
| (
[SetMode](#setmode)
)([in]
int32_t
sensorId,
[in]
int32_t
mode) | 设置指定传感器的数据上报模式,不同的工作模式,上报数据的方式不同。
[
更多...
](
#setmode
)
|
| (
[SetMode](#setmode)
)([in]
int32_t
sensorId,
[in]
int32_t
mode) | 设置指定传感器的数据上报模式,不同的工作模式,上报数据的方式不同。
[
更多...
](
#setmode
)
|
| (
[SetOption](#setoption)
)([in]
int32_t
sensorId,
[in]
uint32_t
option) | 设置指定传感器量程、精度等可选配置。
[
更多...
](
#setoption
)
|
| (
[SetOption](#setoption)
)([in]
int32_t
sensorId,
[in]
uint32_t
option) | 设置指定传感器量程、精度等可选配置。
[
更多...
](
#setoption
)
|
| (
[Register](#register)
)([in]
int32_t
groupId,
[in]
[RecordDataCallback](_sensor.md#recorddatacallback)
cb) | 订阅者注册传感器数据回调函数,系统会将获取到的传感器数据上报给订阅者。
[
更多...
](
#register
)
|
| (
[Register](#register)
)([in]
int32_t
groupId,
[in]
[RecordDataCallback](_sensor.md#recorddatacallback)
cb) | 订阅者注册传感器数据回调函数,系统会将获取到的传感器数据上报给订阅者。
[
更多...
](
#register
)
|
| (
[Unregister](#unregister)
)([in]
int32_t
groupId,
[in]
[RecordDataCallback](_sensor.md#recorddatacallback)
cb) | 订阅者
去注册传感器数据回调函数。
[
更多...
](
#unregister
)
|
| (
[Unregister](#unregister)
)([in]
int32_t
groupId,
[in]
[RecordDataCallback](_sensor.md#recorddatacallback)
cb) | 订阅者
取消注册传感器数据回调函数。
[
更多...
](
#unregister
)
|
## **详细描述**
## **详细描述**
提供sensor设备基本控制操作接口。
提供sensor设备基本控制操作接口。
结构体提供获取传感器设备信息、订阅/
去
订阅传感器数据、使能/去使能传感器、设置传感器模式、设置传感器精度、量程等可选配置接口定义。
结构体提供获取传感器设备信息、订阅/
取消
订阅传感器数据、使能/去使能传感器、设置传感器模式、设置传感器精度、量程等可选配置接口定义。
## **类成员变量说明**
## **类成员变量说明**
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
### Disable
### Disable
```
```
int32_t(* SensorInterface::Disable) ([in] int32_t sensorId)
int32_t(* SensorInterface::Disable) ([in] int32_t sensorId)
```
```
...
@@ -48,9 +48,9 @@ int32_t(* SensorInterface::Disable) ([in] int32_t sensorId)
...
@@ -48,9 +48,9 @@ int32_t(* SensorInterface::Disable) ([in] int32_t sensorId)
**参数:**
**参数:**
| 名称 | 描述 |
| 名称 | 描述 |
| -------- | -------- |
| -------- | -------- |
| sensorId | 唯一标识一个传感器设备类型,详见
[
SensorTypeTag
](
_sensor.md#sensortypetag
)
。 |
| sensorId | 唯一标识一个传感器设备类型,详见
[
SensorTypeTag
](
_sensor.md#sensortypetag
)
。 |
**返回:**
**返回:**
...
@@ -61,7 +61,7 @@ int32_t(* SensorInterface::Disable) ([in] int32_t sensorId)
...
@@ -61,7 +61,7 @@ int32_t(* SensorInterface::Disable) ([in] int32_t sensorId)
### Enable
### Enable
```
```
int32_t(* SensorInterface::Enable) ([in] int32_t sensorId)
int32_t(* SensorInterface::Enable) ([in] int32_t sensorId)
```
```
...
@@ -72,9 +72,9 @@ int32_t(* SensorInterface::Enable) ([in] int32_t sensorId)
...
@@ -72,9 +72,9 @@ int32_t(* SensorInterface::Enable) ([in] int32_t sensorId)
**参数:**
**参数:**
| 名称 | 描述 |
| 名称 | 描述 |
| -------- | -------- |
| -------- | -------- |
| sensorId | 唯一标识一个传感器设备类型,详见
[
SensorTypeTag
](
_sensor.md#sensortypetag
)
。 |
| sensorId | 唯一标识一个传感器设备类型,详见
[
SensorTypeTag
](
_sensor.md#sensortypetag
)
。 |
**返回:**
**返回:**
...
@@ -85,7 +85,7 @@ int32_t(* SensorInterface::Enable) ([in] int32_t sensorId)
...
@@ -85,7 +85,7 @@ int32_t(* SensorInterface::Enable) ([in] int32_t sensorId)
### GetAllSensors
### GetAllSensors
```
```
int32_t(* SensorInterface::GetAllSensors) ([out] struct SensorInformation **sensorInfo,[out] int32_t *count)
int32_t(* SensorInterface::GetAllSensors) ([out] struct SensorInformation **sensorInfo,[out] int32_t *count)
```
```
...
@@ -96,10 +96,10 @@ int32_t(* SensorInterface::GetAllSensors) ([out] struct SensorInformation **sens
...
@@ -96,10 +96,10 @@ int32_t(* SensorInterface::GetAllSensors) ([out] struct SensorInformation **sens
**参数:**
**参数:**
| 名称 | 描述 |
| 名称 | 描述 |
| -------- | -------- |
| -------- | -------- |
| sensorInfo | 输出系统中注册的所有传感器信息,一种类型传感器信息包括传感器名字、设备厂商、
固件版本号、硬件版本号、传感器类型编号、传感器标识、最大量程、精度、功耗,详见
[
SensorInformation
](
_sensor_information.md
)
。 |
| sensorInfo | 输出系统中注册的所有传感器信息,一种类型传感器信息包括传感器名字、设备厂商、
固件版本号、硬件版本号、传感器类型编号、传感器标识、最大量程、精度、功耗,详见
[
SensorInformation
](
_sensor_information.md
)
。 |
| count | 输出系统中注册的传感器数量。 |
| count | 输出系统中注册的传感器数量。 |
**返回:**
**返回:**
...
@@ -110,7 +110,7 @@ int32_t(* SensorInterface::GetAllSensors) ([out] struct SensorInformation **sens
...
@@ -110,7 +110,7 @@ int32_t(* SensorInterface::GetAllSensors) ([out] struct SensorInformation **sens
### Register
### Register
```
```
int32_t(* SensorInterface::Register) ([in] int32_t groupId,[in] RecordDataCallback cb)
int32_t(* SensorInterface::Register) ([in] int32_t groupId,[in] RecordDataCallback cb)
```
```
...
@@ -121,10 +121,10 @@ int32_t(* SensorInterface::Register) ([in] int32_t groupId,[in] RecordDataCallba
...
@@ -121,10 +121,10 @@ int32_t(* SensorInterface::Register) ([in] int32_t groupId,[in] RecordDataCallba
**参数:**
**参数:**
| 名称 | 描述 |
| 名称 | 描述 |
| -------- | -------- |
| -------- | -------- |
| groupId | 传感器组ID。
sensorId枚举值范围为128-160,表示已订阅医疗传感器服务,只需成功订阅一次,无需重复订阅。
sensorId枚举值范围不在128-160之间,这意味着传统传感器已订阅,只需成功订阅一次,无需重复订阅。 |
| groupId | 传感器组ID。
sensorId枚举值范围为128-160,表示已订阅医疗传感器服务,只需成功订阅一次,无需重复订阅。
sensorId枚举值范围不在128-160之间,这意味着传统传感器已订阅,只需成功订阅一次,无需重复订阅。 |
| cb | 要注册的回调函数,详见
[
RecordDataCallback
](
_sensor.md#recorddatacallback
)
。 |
| cb | 要注册的回调函数,详见
[
RecordDataCallback
](
_sensor.md#recorddatacallback
)
。 |
**返回:**
**返回:**
...
@@ -135,7 +135,7 @@ int32_t(* SensorInterface::Register) ([in] int32_t groupId,[in] RecordDataCallba
...
@@ -135,7 +135,7 @@ int32_t(* SensorInterface::Register) ([in] int32_t groupId,[in] RecordDataCallba
### SetBatch
### SetBatch
```
```
int32_t(* SensorInterface::SetBatch) ([in] int32_t sensorId,[in] int64_t samplingInterval,[in] int64_t reportInterval)
int32_t(* SensorInterface::SetBatch) ([in] int32_t sensorId,[in] int64_t samplingInterval,[in] int64_t reportInterval)
```
```
...
@@ -146,11 +146,11 @@ int32_t(* SensorInterface::SetBatch) ([in] int32_t sensorId,[in] int64_t samplin
...
@@ -146,11 +146,11 @@ int32_t(* SensorInterface::SetBatch) ([in] int32_t sensorId,[in] int64_t samplin
**参数:**
**参数:**
| 名称 | 描述 |
| 名称 | 描述 |
| -------- | -------- |
| -------- | -------- |
| sensorId | 唯一标识一个传感器设备类型,详见
[
SensorTypeTag
](
_sensor.md#sensortypetag
)
。 |
| sensorId | 唯一标识一个传感器设备类型,详见
[
SensorTypeTag
](
_sensor.md#sensortypetag
)
。 |
| samplingInterval | 设置指定传感器的数据采样间隔,单位纳秒。 |
| samplingInterval | 设置指定传感器的数据采样间隔,单位纳秒。 |
| reportInterval | 表示传感器数据上报间隔,单位纳秒。 |
| reportInterval | 表示传感器数据上报间隔,单位纳秒。 |
**返回:**
**返回:**
...
@@ -161,7 +161,7 @@ int32_t(* SensorInterface::SetBatch) ([in] int32_t sensorId,[in] int64_t samplin
...
@@ -161,7 +161,7 @@ int32_t(* SensorInterface::SetBatch) ([in] int32_t sensorId,[in] int64_t samplin
### SetMode
### SetMode
```
```
int32_t(* SensorInterface::SetMode) ([in] int32_t sensorId,[in] int32_t mode)
int32_t(* SensorInterface::SetMode) ([in] int32_t sensorId,[in] int32_t mode)
```
```
...
@@ -172,10 +172,10 @@ int32_t(* SensorInterface::SetMode) ([in] int32_t sensorId,[in] int32_t mode)
...
@@ -172,10 +172,10 @@ int32_t(* SensorInterface::SetMode) ([in] int32_t sensorId,[in] int32_t mode)
**参数:**
**参数:**
| 名称 | 描述 |
| 名称 | 描述 |
| -------- | -------- |
| -------- | -------- |
| sensorId | 唯一标识一个传感器设备类型,详见
[
SensorTypeTag
](
_sensor.md#sensortypetag
)
。 |
| sensorId | 唯一标识一个传感器设备类型,详见
[
SensorTypeTag
](
_sensor.md#sensortypetag
)
。 |
| mode | 传感器的数据上报模式,详见
[
SensorModeType
](
_sensor.md#sensormodetype
)
。 |
| mode | 传感器的数据上报模式,详见
[
SensorModeType
](
_sensor.md#sensormodetype
)
。 |
**返回:**
**返回:**
...
@@ -186,7 +186,7 @@ int32_t(* SensorInterface::SetMode) ([in] int32_t sensorId,[in] int32_t mode)
...
@@ -186,7 +186,7 @@ int32_t(* SensorInterface::SetMode) ([in] int32_t sensorId,[in] int32_t mode)
### SetOption
### SetOption
```
```
int32_t(* SensorInterface::SetOption) ([in] int32_t sensorId,[in] uint32_t option)
int32_t(* SensorInterface::SetOption) ([in] int32_t sensorId,[in] uint32_t option)
```
```
...
@@ -197,10 +197,10 @@ int32_t(* SensorInterface::SetOption) ([in] int32_t sensorId,[in] uint32_t optio
...
@@ -197,10 +197,10 @@ int32_t(* SensorInterface::SetOption) ([in] int32_t sensorId,[in] uint32_t optio
**参数:**
**参数:**
| 名称 | 描述 |
| 名称 | 描述 |
| -------- | -------- |
| -------- | -------- |
| sensorId | 唯一标识一个传感器设备类型,详见
[
SensorTypeTag
](
_sensor.md#sensortypetag
)
。 |
| sensorId | 唯一标识一个传感器设备类型,详见
[
SensorTypeTag
](
_sensor.md#sensortypetag
)
。 |
| option | 传感器的量程、精度等配置。 |
| option | 传感器的量程、精度等配置。 |
**返回:**
**返回:**
...
@@ -211,21 +211,21 @@ int32_t(* SensorInterface::SetOption) ([in] int32_t sensorId,[in] uint32_t optio
...
@@ -211,21 +211,21 @@ int32_t(* SensorInterface::SetOption) ([in] int32_t sensorId,[in] uint32_t optio
### Unregister
### Unregister
```
```
int32_t(* SensorInterface::Unregister) ([in] int32_t groupId,[in] RecordDataCallback cb)
int32_t(* SensorInterface::Unregister) ([in] int32_t groupId,[in] RecordDataCallback cb)
```
```
**描述:**
**描述:**
订阅者
去
注册传感器数据回调函数。
订阅者
取消
注册传感器数据回调函数。
**参数:**
**参数:**
| 名称 | 描述 |
| 名称 | 描述 |
| -------- | -------- |
| -------- | -------- |
| groupId | 传感器组ID。
sensorId枚举值范围为128-160,表示已订阅医疗传感器服务。只需成功取消订阅一次,无需重复取消订阅。
sensorId枚举值范围不在128-160之间,这意味着传统传感器已订阅。并且成功取消订阅。 |
| groupId | 传感器组ID。
sensorId枚举值范围为128-160,表示已订阅医疗传感器服务。只需成功取消订阅一次,无需重复取消订阅。
sensorId枚举值范围不在128-160之间,这意味着传统传感器已订阅。并且成功取消订阅。 |
| cb | 要
注册的回调函数,详见
[
RecordDataCallback
](
_sensor.md#recorddatacallback
)
。 |
| cb | 要
取消注册的回调函数,详见
[
RecordDataCallback
](
_sensor.md#recorddatacallback
)
。 |
**返回:**
**返回:**
...
...
zh-cn/device-dev/reference/hdi-apis/light_8typeh.md
浏览文件 @
15b1ab91
...
@@ -13,11 +13,11 @@
...
@@ -13,11 +13,11 @@
### 类
### 类
| 类 | 描述 |
| 类 | 描述 |
| -------- | -------- |
| -------- | -------- |
| LightFlashEffect | 定义闪烁参数。
[
更多...
](
_light_flash_effect.md
)
|
| LightFlashEffect | 定义闪烁参数。
[
更多...
](
_light_flash_effect.md
)
|
| LightEffect | 定义灯的效果参数。
[
更多...
](
_light_effect.md
)
|
| LightEffect | 定义灯的效果参数。
[
更多...
](
_light_effect.md
)
|
| LightInfo | 定义灯的基本信息。
[
更多...
](
_light_info.md
)
|
| LightInfo | 定义灯的基本信息。
[
更多...
](
_light_info.md
)
|
## **详细描述**
## **详细描述**
...
@@ -27,3 +27,7 @@
...
@@ -27,3 +27,7 @@
**Since:**
**Since:**
3.
1
3.
1
**Version:**
1.
0
\ No newline at end of file
zh-cn/device-dev/reference/hdi-apis/light__if_8h.md
浏览文件 @
15b1ab91
...
@@ -13,23 +13,28 @@
...
@@ -13,23 +13,28 @@
### 类
### 类
| 类 | 描述 |
| 类 | 描述 |
| -------- | -------- |
| -------- | -------- |
|
[
LightInterface
](
_light_interface.md
)
| 定义可以在灯上执行的基本操作。
[
更多...
](
_light_interface.md
)
|
|
[
LightInterface
](
_light_interface.md
)
| 定义可以在灯上执行的基本操作。
[
更多...
](
_light_interface.md
)
|
### 函数
### 函数
| 函数 | 描述 |
| 函数 | 描述 |
| -------- | -------- |
| -------- | -------- |
|
[
NewLightInterfaceInstance
](
_light.md#newlightinterfaceinstance
)
(void) | 创建LightInterface实例。
[
更多...
](
_light.md#newlightinterfaceinstance
)
|
|
[
NewLightInterfaceInstance
](
_light.md#newlightinterfaceinstance
)
(void) | 创建LightInterface实例。
[
更多...
](
_light.md#newlightinterfaceinstance
)
|
|
[
FreeLightInterfaceInstance
](
_light.md#freelightinterfaceinstance
)
(void) | 释放LightInterface实例和相关资源。
[
更多...
](
_light.md#freelightinterfaceinstance
)
|
|
[
FreeLightInterfaceInstance
](
_light.md#freelightinterfaceinstance
)
(void) | 释放LightInterface实例和相关资源。
[
更多...
](
_light.md#freelightinterfaceinstance
)
|
## **详细描述**
## **详细描述**
声明light模块的通用API,可用于获取灯ID、打开或关闭灯、并设置灯光亮度和闪烁模式。
声明light模块的通用API,可用于获取灯ID、打开或关闭灯、并设置灯光亮度和闪烁模式。
**Sinc
[更多...](_light_flash_effect.md)e更多...[更多...](_light_info.md)
:**
**Sinc
e
:**
3.
1
3.
1
**Version:**
1.
0
zh-cn/device-dev/reference/hdi-apis/sensor__if_8h.md
浏览文件 @
15b1ab91
...
@@ -13,22 +13,22 @@
...
@@ -13,22 +13,22 @@
### 类
### 类
| 类 | 描述 |
| 类 | 描述 |
| -------- | -------- |
| -------- | -------- |
|
[
SensorInterface
](
_sensor_interface.md
)
| 提供sensor设备基本控制操作接口。
[
更多...
](
_sensor_interface.md
)
|
|
[
SensorInterface
](
_sensor_interface.md
)
| 提供sensor设备基本控制操作接口。
[
更多...
](
_sensor_interface.md
)
|
### 函数
### 函数
| 函数 | 描述 |
| 函数 | 描述 |
| -------- | -------- |
| -------- | -------- |
|
[
NewSensorInterfaceInstance
](
_sensor.md#newsensorinterfaceinstance
)
(void) | 创建传感器接口实例。
[
更多...
](
_sensor.md#newsensorinterfaceinstance
)
|
|
[
NewSensorInterfaceInstance
](
_sensor.md#newsensorinterfaceinstance
)
(void) | 创建传感器接口实例。
[
更多...
](
_sensor.md#newsensorinterfaceinstance
)
|
|
[
FreeSensorInterfaceInstance
](
_sensor.md#freesensorinterfaceinstance
)
(void) | 释放传感器接口实例。
[
更多...
](
_sensor.md#freesensorinterfaceinstance
)
|
|
[
FreeSensorInterfaceInstance
](
_sensor.md#freesensorinterfaceinstance
)
(void) | 释放传感器接口实例。
[
更多...
](
_sensor.md#freesensorinterfaceinstance
)
|
## **详细描述**
## **详细描述**
Sensor模块对外通用的接口声明文件,提供获取传感器设备信息、订阅/
去
订阅传感器数据、 使能/去使能传感器、设置传感器模式、设置传感器精度,量程等可选配置接口定义。
Sensor模块对外通用的接口声明文件,提供获取传感器设备信息、订阅/
取消
订阅传感器数据、 使能/去使能传感器、设置传感器模式、设置传感器精度,量程等可选配置接口定义。
**Since:**
**Since:**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录