mstGetProfileInstance
API_LEVEL
3.0开始支持,API 兼容性请参考 API_LEVEL。
根据 Profile name 和连接 ID 查询 Profile 指针。
类型
function mstGetProfileInstance(profileName: ProfileName, connectId: ConnectId): Result
参数
ProfileName
| 类型 | 说明 |
|---|---|
string | Profile 名称 |
ConnectId
| 类型 | 说明 |
|---|---|
number | 连接成功时返回的 ID |
Result
| 类型 | 说明 |
|---|---|
number|undefined | 查找成功返回 Profile 指针,失败返回 undefined |
代码示例
import { mstGetProfileInstance } from '@zos/ble'
// ...