Skip to main content
版本:v3+

mstWriteDescriptor

API_LEVEL 3.0 开始支持,API 兼容性请参考 API_LEVEL。

注册 Characteristic notification 到达回调函数。

类型​

function mstWriteDescriptor(
profile: Profile,
uuid: UUID,
descUUID: DescUUID,
data: Data,
length: Length,
): Result

参数​

Profile​

类型说明
numberProfile 指针

UUID​

类型说明
stringCharacteristic UUID 字符串

DescUUID​

类型说明
stringDescriptor UUID 字符串

Data​

类型说明
ArrayBuffer读取到的数据,使用 Uint8Array 视图读取

Length​

类型说明
number数据长度

Result​

类型说明
boolean函数调用结果,true 表示成功、false 表示失败

代码示例​

import { mstWriteDescriptor } from '@zos/ble'

// ...