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
| Type | Description |
|---|---|
(profile: Profile, uuid: UUID, data: Data, length: Length) => void | Characteristic Notification arrives at the callback function |
Profile
| Type | Description |
|---|---|
number | Profile pointer |
UUID
| Type | Description |
|---|---|
string | Characteristic UUID string |
Data
| Type | Description |
|---|---|
ArrayBuffer | It is recommended to use the Uint8Array view to read the data |
Length
| Type | Description |
|---|---|
number | Data length |
Result
| Type | Description |
|---|---|
boolean | The result of the function call, true means success, false means failure |
Example
import { mstOnCharaNotification } from '@zos/ble'
// ...