Skip to main content
Version: v3

mstOnCharaNotification

Start from API_LEVEL 3.0 . Please refer to API_LEVEL.

Register Characteristic Notification to reach the callback function.

Type

function mstOnCharaNotification(callback: Callback): Result

Parameters

Callback

TypeDescription
(profile: Profile, uuid: UUID, data: Data, length: Length) => voidCharacteristic Notification arrives at the callback function

Profile

TypeDescription
numberProfile pointer

UUID

TypeDescription
stringCharacteristic UUID string

Data

TypeDescription
ArrayBufferIt is recommended to use the Uint8Array view to read the data

Length

TypeDescription
numberData length

Result

TypeDescription
booleanThe result of the function call, true means success, false means failure

Example

import { mstOnCharaNotification } from '@zos/ble'

// ...