Documentation
    Preparing search index...

    Interface BleServiceOptions

    Options for createBleService.

    interface BleServiceOptions {
        close?: (
            sessionId: string,
            reason: string | undefined,
            context: BleServiceContext,
        ) => void | Promise<void>;
        destroyWindow?: (windowId: string) => void;
        open?: (
            request: BleOpenRequest,
            context: BleServiceContext,
        ) => BleOpenResult | Promise<BleOpenResult>;
        read?: (
            sessionId: string,
            target: BleAttribute,
            context: BleServiceContext,
        ) => number[] | Promise<number[]>;
        services?: (
            sessionId: string,
            context: BleServiceContext,
        ) => BleService[] | Promise<BleService[]>;
        subscribe?: (
            sessionId: string,
            target: BleAttribute,
            context: BleServiceContext,
        ) => void | Promise<void>;
        unsubscribe?: (
            sessionId: string,
            target: BleAttribute,
            context: BleServiceContext,
        ) => void | Promise<void>;
        write?: (
            sessionId: string,
            target: BleAttribute,
            data: readonly number[],
            options: BleWriteOptions | undefined,
            context: BleServiceContext,
        ) => void | Promise<void>;
    }
    Index

    Properties

    close?: (
        sessionId: string,
        reason: string | undefined,
        context: BleServiceContext,
    ) => void | Promise<void>

    Host-owned BLE close hook.

    destroyWindow?: (windowId: string) => void

    Optional host cleanup when a napplet window is destroyed.

    open?: (
        request: BleOpenRequest,
        context: BleServiceContext,
    ) => BleOpenResult | Promise<BleOpenResult>

    Host-owned BLE open hook.

    read?: (
        sessionId: string,
        target: BleAttribute,
        context: BleServiceContext,
    ) => number[] | Promise<number[]>

    Host-owned GATT read hook.

    services?: (
        sessionId: string,
        context: BleServiceContext,
    ) => BleService[] | Promise<BleService[]>

    Host-owned GATT service listing hook.

    subscribe?: (
        sessionId: string,
        target: BleAttribute,
        context: BleServiceContext,
    ) => void | Promise<void>

    Host-owned notification subscription hook.

    unsubscribe?: (
        sessionId: string,
        target: BleAttribute,
        context: BleServiceContext,
    ) => void | Promise<void>

    Host-owned notification unsubscribe hook.

    write?: (
        sessionId: string,
        target: BleAttribute,
        data: readonly number[],
        options: BleWriteOptions | undefined,
        context: BleServiceContext,
    ) => void | Promise<void>

    Host-owned GATT write hook.