未验证 提交 7625b197 编写于 作者: O openharmony_ci 提交者: Gitee

!10482 多模子系统错误码md整改

Merge pull request !10482 from mayunteng/master
......@@ -13,7 +13,7 @@
import inputDeviceCooperate from '@ohos.multimodalInput.inputDeviceCooperate'
```
## inputDeviceCooperate.enable<sup>9+</sup>
## inputDeviceCooperate.enable
enable(enable: boolean, callback: AsyncCallback\<void>): void
......@@ -46,7 +46,7 @@ try {
}
```
## inputDeviceCooperate.enable<sup>9+</sup>
## inputDeviceCooperate.enable
enable(enable: boolean): Promise\<void>
......@@ -84,7 +84,7 @@ try {
}
```
## inputDeviceCooperate.start<sup>9+</sup>
## inputDeviceCooperate.start
start(sinkDeviceDescriptor: string, srcInputDeviceId: number, callback: AsyncCallback\<void>): void
......@@ -100,7 +100,14 @@ start(sinkDeviceDescriptor: string, srcInputDeviceId: number, callback: AsyncCal
| srcInputDeviceId | number | 是 | 键鼠穿越待穿越外设标识符。 |
| callback | AsyncCallback\<void> | 是 | 异步回调函数。当键鼠穿越启动成功,err为undefined,否则为错误对象。|
**错误码:**
以下错误码的详细介绍请参见[ohos.multimodalinput错误码](../errorcodes/errorcodes-multimodalinput.md)
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 4400001 | Incorrect descriptor for the target device. |
| 4400002 | Failed to operate the input device. |
**示例**
......@@ -118,7 +125,7 @@ try {
}
```
## inputDeviceCooperate.start<sup>9+</sup>
## inputDeviceCooperate.start
start(sinkDeviceDescriptor: string, srcInputDeviceId: number): Promise\<void>
......@@ -141,7 +148,14 @@ start(sinkDeviceDescriptor: string, srcInputDeviceId: number): Promise\<void>
| ---------------------- | ------------------------------- |
| Promise\<void> | Promise实例,用于异步获取结果。 |
**错误码:**
以下错误码的详细介绍请参见[ohos.multimodalinput错误码](../errorcodes/errorcodes-multimodalinput.md)
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 4400001 | Incorrect descriptor for the target device. |
| 4400002 | Failed to operate the input device. |
**示例**
......@@ -157,7 +171,7 @@ try {
}
```
## inputDeviceCooperate.stop<sup>9+</sup>
## inputDeviceCooperate.stop
stop(callback: AsyncCallback\<void>): void
......@@ -189,7 +203,7 @@ try {
}
```
## inputDeviceCooperate.stop<sup>9+</sup>
## inputDeviceCooperate.stop
stop(): Promise\<void>
......@@ -217,7 +231,7 @@ try {
}
```
## inputDeviceCooperate.getState<sup>9+</sup>
## inputDeviceCooperate.getState
getState(deviceDescriptor: string, callback: AsyncCallback<{ state: boolean }>): void
......@@ -248,7 +262,7 @@ try {
}
```
## inputDeviceCooperate.getState<sup>9+</sup>
## inputDeviceCooperate.getState
getState(deviceDescriptor: string): Promise<{ state: boolean }>
......@@ -286,7 +300,7 @@ try {
}
```
## on('cooperation')<sup>9+</sup>
## on('cooperation')
on(type: 'cooperation', callback: AsyncCallback<{ deviceDescriptor: string, eventMsg: EventMsg }>): void
......@@ -319,7 +333,7 @@ try {
}
```
## off('cooperation')<sup>9+</sup>
## off('cooperation')
off(type: 'cooperation', callback?: AsyncCallback\<void>): void
......@@ -352,7 +366,7 @@ try {
}
```
## EventMsg<sup>9+</sup>
## EventMsg
键鼠穿越事件。
......@@ -364,4 +378,4 @@ try {
| MSG_COOPERATE_INFO_SUCCESS | 201 | 键鼠穿越消息,表示键鼠穿越成功。 |
| MSG_COOPERATE_INFO_FAIL | 202 | 键鼠穿越消息,表示键鼠穿越失败。 |
| MSG_COOPERATE_STATE_ON | 500 | 键鼠穿越状态,表示键鼠穿越状态开启。 |
| MSG_COOPERATE_STATE_OFF | 501 | 键鼠穿越状态,表示键鼠穿越状态关闭。 |
\ No newline at end of file
| MSG_COOPERATE_STATE_OFF | 501 | 键鼠穿越状态,表示键鼠穿越状态关闭。 |
# 多模输入子系统错误码
## 201 权限校验失败
### 错误信息
Permission denied.
### 错误描述
当调用监听模块on和off接口时,若没有申请权限,会报此错误码。
### 可能原因
监听、去监听鼠标和触屏事件时未配置相应的权限。
### 处理步骤
查看权限是否已适配,具体配置方式请参考[权限申请声明](../../security/accesstoken-guidelines.md)
## 401 参数检查错误
### 错误信息
The parameter invalid.
### 错误描述
当调用监听模块或者键鼠穿越等其他模块接口时,若传入参数的类型或者范围不匹配,会报此错误码。
### 可能原因
1. 入参类型错误不匹配,如监听接口传入type为非string类型等。
2. 入参范围不匹配,如插上设备信息时传入非法的deviceId。
### 处理步骤
检查入参类型和范围是否匹配。
# 键鼠穿越管理错误码
## 4400001 目标设备描述符错误
### 错误信息
**错误信息**
Incorrect descriptor for the target device.
### 错误描述
当调用键鼠穿越start接口时,若设备无效,会报此错误码。
**错误描述**
### 可能原因
当调用键鼠穿越接口传入无效的设备描述符参数时,系统会产生此错误码。
1.穿越目标设备不存在(设备未组网)。
**可能原因**
2.目标设备描述符为空。
1. 穿越目标设备不存在(设备未组网)。
2. 目标设备描述符为空。
### 处理步骤
**处理步骤**
1. 确认键鼠穿越目标设备是否已正确与本地设备完整组网。
2. 正确使用穿越目标设备的设备描述符。
1. 确认键鼠穿越目标设备是否已正确与本地设备完整组网。
2. 正确使用穿越目标设备的设备描述符。
## 4400002 操作输入设备失败
### 错误信息
**错误信息**
Failed to operate the input device.
### 错误描述
**错误描述**
当调用键鼠穿越start接口时,若穿越状态异常,会报此错误码。
当调用键鼠穿越接口时穿越状态异常,系统会产生此错误码。
### 可能原因
**可能原因**
1. 发起键鼠穿越时,本机键鼠穿越为穿出状态。
2. 关闭键鼠穿越时,本机键鼠穿越为自由态。
3. 发起关闭键鼠穿越时,本机键鼠穿越状态正在切换中。
### 处理步骤
**处理步骤**
1. 发起键鼠穿越时,本机键鼠穿越状态需要为非穿出状态。
2. 关闭键鼠穿越时,本机键鼠穿越状态需要为非自由态。
3. 发起关闭键鼠穿越时,本机键鼠穿越状态不能处于切换中。
\ No newline at end of file
1. 发起键鼠穿越时,请检查本机键鼠穿越状态是否为非穿出状态。
2. 关闭键鼠穿越时,请检查本机键鼠穿越状态是否为非自由态。
3. 发起关闭键鼠穿越时,请检查本机键鼠穿越状态是否在切换中。
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册