Bluetooth Remote GATT Service class

Hierarchy

  • EventDispatcher<ServiceEvents>
    • BluetoothRemoteGATTServiceImpl

Implements

  • BluetoothRemoteGATTService

Constructors

Properties

device: BluetoothDeviceImpl = undefined

The device the service is related to

emitter: EventEmitter = ...
isPrimary: boolean = false

Whether the service is a primary one

uuid: string = undefined

The unique identifier of the service

Accessors

  • set oncharacteristicvaluechanged(fn: (ev: Event) => void): void
  • Parameters

    • fn: (ev: Event) => void

    Returns void

  • set onserviceadded(fn: (ev: Event) => void): void
  • Parameters

    • fn: (ev: Event) => void

    Returns void

  • set onservicechanged(fn: (ev: Event) => void): void
  • Parameters

    • fn: (ev: Event) => void

    Returns void

  • set onserviceremoved(fn: (ev: Event) => void): void
  • Parameters

    • fn: (ev: Event) => void

    Returns void

Methods

  • Type Parameters

    • K extends keyof ServiceEvents

    Parameters

    • type: K
    • listener: (this: this, ev: ServiceEvents[K]) => void

    Returns void

  • Type Parameters

    • K extends keyof ServiceEvents

    Parameters

    • type: K
    • listener: EventListener

    Returns void

  • Parameters

    • event: Event

    Returns boolean

  • Gets a single characteristic contained in the service

    Parameters

    • characteristic: BluetoothCharacteristicUUID

      characteristic UUID

    Returns Promise<BluetoothRemoteGATTCharacteristic>

    Promise containing the characteristic

  • Gets a list of characteristics contained in the service

    Parameters

    • Optionalcharacteristic: BluetoothCharacteristicUUID

      characteristic UUID

    Returns Promise<BluetoothRemoteGATTCharacteristic[]>

    Promise containing an array of characteristics

  • Gets a single service included in the service

    Parameters

    • service: BluetoothServiceUUID

      service UUID

    Returns Promise<BluetoothRemoteGATTService>

    Promise containing the service

  • Gets a list of services included in the service

    Parameters

    • Optionalservice: BluetoothServiceUUID

      service UUID

    Returns Promise<BluetoothRemoteGATTService[]>

    Promise containing an array of services

  • Type Parameters

    • K extends keyof ServiceEvents

    Parameters

    • type: K
    • callback: (this: this, ev: ServiceEvents[K]) => void

    Returns void

  • Type Parameters

    • K extends keyof ServiceEvents

    Parameters

    • type: K
    • callback: EventListener

    Returns void