Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WebBluetoothDevice

Hierarchy

  • EventEmitter
    • WebBluetoothDevice

Implements

Index

Constructors

constructor

Properties

Static defaultMaxListeners

defaultMaxListeners: number

Accessors

Id

  • get Id(): string
  • Returns string

Name

  • get Name(): string
  • Returns string

Methods

Protected CharacteristicValueChanged

  • CharacteristicValueChanged(aEvent: Event, aCharacteristic: string): void
  • Parameters

    • aEvent: Event
    • aCharacteristic: string

    Returns void

Connect

  • Connect(): Promise<void>
  • Returns Promise<void>

Disconnect

  • Disconnect(): Promise<void>
  • Returns Promise<void>

OnDisconnect

  • OnDisconnect(): void
  • Returns void

ReadString

  • ReadString(aCharacteristic: string): Promise<string>
  • Parameters

    • aCharacteristic: string

    Returns Promise<string>

ReadValue

  • ReadValue(aCharacteristic: string): Promise<BufferSource>
  • Parameters

    • aCharacteristic: string

    Returns Promise<BufferSource>

Subscribe

  • Subscribe(aCharacteristic: string): Promise<void>
  • Parameters

    • aCharacteristic: string

    Returns Promise<void>

Unsubscribe

  • Unsubscribe(aCharacteristic: string): Promise<void>
  • Parameters

    • aCharacteristic: string

    Returns Promise<void>

WriteString

  • WriteString(aCharacteristic: string, aValue: string): Promise<void>
  • Parameters

    • aCharacteristic: string
    • aValue: string

    Returns Promise<void>

WriteValue

  • WriteValue(aCharacteristic: string, aValue: Uint8Array): Promise<void>
  • Parameters

    • aCharacteristic: string
    • aValue: Uint8Array

    Returns Promise<void>

addListener

  • addListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

eventNames

  • eventNames(): Array<string | symbol>
  • Returns Array<string | symbol>

getMaxListeners

  • getMaxListeners(): number
  • Returns number

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

off

  • off(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

on

  • on(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

once

  • once(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependListener

  • prependListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

rawListeners

  • rawListeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

removeAllListeners

  • removeAllListeners(event?: string | symbol): this
  • Parameters

    • Optional event: string | symbol

    Returns this

removeListener

  • removeListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

setMaxListeners

  • setMaxListeners(n: number): this
  • Parameters

    • n: number

    Returns this

Static CreateDevice

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number
  • deprecated

    since v4.0.0

    Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

Generated using TypeDoc