Class BleRemoteValueAttributeAbstract<ParentClass, ChildrenClass>Abstract

Type Parameters

  • ParentClass

  • ChildrenClass

Hierarchy

Constructors

Properties

onread?: ((data) => void)

Type declaration

    • (data): void
    • Callback function when read value.

      Parameters

      • data: any

      Returns void

onwrite?: ((result) => void)

Type declaration

    • (result): void
    • Callback function when write value finished.

      Parameters

      • result: any

      Returns void

uuid: string

It is uuid as string.

console.log(attr.uuid); // => '4C84'

Methods

  • Wrapper for [[readWait]] with data converting to text. It convert UTF-8 and write binary array to string.

    It throws an error when failed.

    Returns Promise<null | string>

  • Wrapper for [[writeWait]] with data converting from number. It writes data as 1byte.

    It throws an error when failed.

    Parameters

    • val: number
    • Optional needResponse: boolean

    Returns Promise<boolean>

  • Wrapper for [[writeWait]] with data converting from text. It convert string to UTF-8 and write binary array.

    It throws an error when failed.

    Parameters

    • str: string
    • Optional needResponse: boolean

    Returns Promise<boolean>

Generated using TypeDoc