Skip to content

Commit c1a8203

Browse files
committed
[SIM]双卡切卡相关接口描述更改
1 parent 3f8b0d8 commit c1a8203

File tree

2 files changed

+29
-10
lines changed

2 files changed

+29
-10
lines changed

en-us/api/QuecPythonClasslib.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,6 +1284,16 @@ switchcard api.(just supported on the 1606 platform)
12841284

12851285
Call this API to registers the listening callback function.(just supported on the 1606 platform)
12861286

1287+
* Note
1288+
1289+
Not all switchcard failures are returned via callbacks:
1290+
1. The target card does not exist or is abnormal
1291+
2. The target card is the current card
1292+
In the preceding cases, the card switching interface directly returns -1 and does not enter the actual card switching process. Therefore, the callback is not triggered
1293+
1294+
If the card switching condition is met, the card switching interface returns 0, and the underlying task is created to perform the card switching process.
1295+
If the card switching fails or succeeds, the system returns the result through callback
1296+
12871297
* Parameter
12881298

12891299
| Parameter | Type | Description |
@@ -1297,8 +1307,8 @@ Call this API to registers the listening callback function.(just supported on th
12971307
* Example
12981308

12991309
```python
1300-
HELIOS_SIM_SWITCH_CURRSIM_PSDC_UP(switchcard succeeded)
1301-
HELIOS_SIM_SWITCH_ERROR(switchcard failed)
1310+
HELIOS_SIM_SWITCH_CURRSIM_PSDC_UP(switchcard succeeded7
1311+
HELIOS_SIM_SWITCH_ERROR(switchcard failed: 8
13021312

13031313
typedef enum
13041314
{
@@ -1319,7 +1329,7 @@ def cb(args):
13191329
switchcard_state = args
13201330
print('sim switchcard states:{}'.format(switchcard_state))
13211331

1322-
sim.setCallback(cb)
1332+
sim.setSwitchcardCallback(cb)
13231333
```
13241334

13251335

zh-cn/api/QuecPythonClasslib.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1255,11 +1255,11 @@ sim.setCallback(cb)
12551255

12561256

12571257

1258-
##### sim卡获取当前卡接口
1258+
##### 获取当前卡的SimId
12591259

12601260
> **sim.getCurSimid()**
12611261

1262-
sim卡获取当前卡接口。(仅1606平台支持)
1262+
获取当前卡的SimId。(仅1606平台支持)
12631263

12641264
* 参数
12651265

@@ -1280,7 +1280,7 @@ sim卡获取当前卡接口。(仅1606平台支持)
12801280

12811281

12821282

1283-
##### sim卡切卡接口
1283+
##### 切卡接口
12841284

12851285
> **sim.switchCard(simid)**
12861286

@@ -1309,12 +1309,21 @@ sim卡切卡接口。(仅1606平台支持)
13091309

13101310

13111311

1312-
##### SIM卡切卡注册监听回调函数
1312+
##### 注册监听SIM卡切卡状态回调函数
13131313

13141314
> **sim.setSwitchcardCallback(usrFun)**
13151315

13161316
注册监听回调函数。响应SIM卡切卡动作。(仅1606平台支持)
13171317

1318+
*注意
1319+
1320+
不是所有的切卡失败都会通过回调返回:
1321+
1、目标卡不存在或者目标卡状态异常
1322+
2、目标卡是当前卡
1323+
以上情况切卡接口直接返回-1,不会走到实际切卡的流程,也就不会触发回调
1324+
1325+
如果满足切卡条件,切卡接口返回0,底层建立task走切卡流程,这个时候切卡失败或者成功,会通过callback返回
1326+
13181327
* 参数
13191328

13201329
| 参数 | 参数类型 | 参数说明 |
@@ -1330,8 +1339,8 @@ sim卡切卡接口。(仅1606平台支持)
13301339
```python
13311340

13321341
//切卡状态枚举值,目前给到python侧的数据只有:
1333-
HELIOS_SIM_SWITCH_CURRSIM_PSDC_UP(切卡成功)
1334-
HELIOS_SIM_SWITCH_ERROR(切卡失败)
1342+
HELIOS_SIM_SWITCH_CURRSIM_PSDC_UP(切卡成功:7
1343+
HELIOS_SIM_SWITCH_ERROR(切卡失败:8
13351344

13361345
typedef enum
13371346
{
@@ -1352,7 +1361,7 @@ def cb(args):
13521361
switchcard_state = args
13531362
print('sim switchcard states:{}'.format(switchcard_state))
13541363

1355-
sim.setCallback(cb)
1364+
sim.setSwitchcardCallback(cb)
13561365
```
13571366

13581367

0 commit comments

Comments
 (0)