mstOnDescWriteComplete
API_LEVEL
3.0
开始支持,API 兼容性请参考 API_LEVEL。
注册 Descriptor 数据写入完成回调函数。
类型
function mstOnDescWriteComplete(callback: Callback): Result
参数
Callback
类型 | 说明 |
---|---|
(profile: Profile, uuid: UUID, descUUID: DescUUID, status: Status) => void | Descriptor 数据写入完成回调函数 |
Profile
类型 | 说明 |
---|---|
number | Profile 指针 |
UUID
类型 | 说明 |
---|---|
string | Characteristic UUID 字符串 |
DescUUID
类型 | 说明 |
---|---|
string | Descriptor UUID 字符串 |
Status
类型 | 说明 |
---|---|
number | 状态,0 表示成功 |
Result
类型 | 说明 |
---|---|
boolean | 函数调用结果,true 表示成功、false 表示失败 |
代码示例
import { mstOnDescWriteComplete } from '@zos/ble'
// ...