Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NearestScanner

Scan nearest core cube

Hierarchy

Index

Constructors

constructor

  • new NearestScanner(scanWindowMs?: number, timeoutMs?: number): NearestScanner
  • Constructor of NearestScanner class

    Parameters

    • Default value scanWindowMs: number = NearestScanner.SCAN_WINDOW_MS

      scan time duration in millisecond.

    • Default value timeoutMs: number = Scanner.DEFAULT_TIMEOUT_MS

      timeout duration in millisecond. 0 means no timeout.

    Returns NearestScanner

Properties

Protected eventEmitter

eventEmitter: TypedEmitter<Event> = new EventEmitter() as TypedEmitter<Event>

Static Protected DEFAULT_TIMEOUT_MS

DEFAULT_TIMEOUT_MS: number = 0

Static Protected SCAN_WINDOW_MS

SCAN_WINDOW_MS: number = 1000

Methods

Protected executor

  • executor(resolve: function): void

off

  • off<E>(event: E, listener: Event[E]): this

on

  • on<E>(event: E, listener: Event[E]): this

Protected onDiscover

  • onDiscover(peripheral: Peripheral): void

Protected onStateChange

  • onStateChange(state: string): void

start

stop

  • stop(): void

Generated using TypeDoc