Skip to content

Latest commit

 

History

History
468 lines (279 loc) · 13.9 KB

devicediscoverymanager.md

File metadata and controls

468 lines (279 loc) · 13.9 KB

Ortho Remote - v0.4.0 / DeviceDiscoveryManager

Class: DeviceDiscoveryManager

A device manager is the main entry for connecting to Ortho Remote devices. It offers device discovery and

Hierarchy

  • EventEmitter

    DeviceDiscoveryManager

Table of contents

Accessors

Methods

Accessors

discoveredDevices

• get discoveredDevices(): OrthoRemote[]

All discovered devices by the device manager

Returns: OrthoRemote[]


discoveryState

• get discoveryState(): DeviceDiscoveryState

Active discovery state

Returns: DeviceDiscoveryState


defaultManager

Static get defaultManager(): DeviceDiscoveryManager

Default device discovery manager to manage discovery of one or more Ortho Remote devices

Returns: DeviceDiscoveryManager

Methods

addListener

addListener(eventName: "device", listener: OnDeviceDiscoveredCallback): DeviceDiscoveryManager

Parameters

Name Type
eventName "device"
listener OnDeviceDiscoveredCallback

Returns: DeviceDiscoveryManager

Inherited from: EventEmitter.addListener

addListener(eventName: "error", listener: OnErrorCallback): DeviceDiscoveryManager

Parameters

Name Type
eventName "error"
listener OnErrorCallback

Returns: DeviceDiscoveryManager

Inherited from: EventEmitter.addListener

addListener(eventName: "started" | "stopped", listener: OnEventCallback): DeviceDiscoveryManager

Parameters

Name Type
eventName "started" | "stopped"
listener OnEventCallback

Returns: DeviceDiscoveryManager

Inherited from: EventEmitter.addListener


listenerCount

listenerCount(type: "error" | "device" | "started" | "stopped"): number

Parameters

Name Type
type "error" | "device" | "started" | "stopped"

Returns: number

Inherited from: EventEmitter.listenerCount


listeners

listeners(eventName: "device"): OnDeviceDiscoveredCallback[]

Parameters

Name Type
eventName "device"

Returns: OnDeviceDiscoveredCallback[]

Inherited from: EventEmitter.listeners

listeners(eventName: "error"): OnErrorCallback[]

Parameters

Name Type
eventName "error"

Returns: OnErrorCallback[]

Inherited from: EventEmitter.listeners

listeners(eventName: "started" | "stopped"): OnEventCallback[]

Parameters

Name Type
eventName "started" | "stopped"

Returns: OnEventCallback[]

Inherited from: EventEmitter.listeners


off

off(eventName: "device", listener: OnDeviceDiscoveredCallback): DeviceDiscoveryManager

Parameters

Name Type
eventName "device"
listener OnDeviceDiscoveredCallback

Returns: DeviceDiscoveryManager

Inherited from: EventEmitter.off

off(eventName: "error", listener: OnErrorCallback): DeviceDiscoveryManager

Parameters

Name Type
eventName "error"
listener OnErrorCallback

Returns: DeviceDiscoveryManager

Inherited from: EventEmitter.off

off(eventName: "started" | "stopped", listener: OnEventCallback): DeviceDiscoveryManager

Parameters

Name Type
eventName "started" | "stopped"
listener OnEventCallback

Returns: DeviceDiscoveryManager

Inherited from: EventEmitter.off


on

on(eventName: "device", listener: OnDeviceDiscoveredCallback): DeviceDiscoveryManager

Parameters

Name Type
eventName "device"
listener OnDeviceDiscoveredCallback

Returns: DeviceDiscoveryManager

Inherited from: EventEmitter.on

on(eventName: "error", listener: OnErrorCallback): DeviceDiscoveryManager

Parameters

Name Type
eventName "error"
listener OnErrorCallback

Returns: DeviceDiscoveryManager

Inherited from: EventEmitter.on

on(eventName: "started" | "stopped", listener: OnEventCallback): DeviceDiscoveryManager

Parameters

Name Type
eventName "started" | "stopped"
listener OnEventCallback

Returns: DeviceDiscoveryManager

Inherited from: EventEmitter.on


once

once(eventName: "device", listener: OnDeviceDiscoveredCallback): DeviceDiscoveryManager

Parameters

Name Type
eventName "device"
listener OnDeviceDiscoveredCallback

Returns: DeviceDiscoveryManager

Inherited from: EventEmitter.once

once(eventName: "error", listener: OnErrorCallback): DeviceDiscoveryManager

Parameters

Name Type
eventName "error"
listener OnErrorCallback

Returns: DeviceDiscoveryManager

Inherited from: EventEmitter.once

once(eventName: "started" | "stopped", listener: OnEventCallback): DeviceDiscoveryManager

Parameters

Name Type
eventName "started" | "stopped"
listener OnEventCallback

Returns: DeviceDiscoveryManager

Inherited from: EventEmitter.once


prependListener

prependListener(eventName: "device", listener: OnDeviceDiscoveredCallback): DeviceDiscoveryManager

Parameters

Name Type
eventName "device"
listener OnDeviceDiscoveredCallback

Returns: DeviceDiscoveryManager

Inherited from: EventEmitter.prependListener

prependListener(eventName: "error", listener: OnErrorCallback): DeviceDiscoveryManager

Parameters

Name Type
eventName "error"
listener OnErrorCallback

Returns: DeviceDiscoveryManager

Inherited from: EventEmitter.prependListener

prependListener(eventName: "started" | "stopped", listener: OnEventCallback): DeviceDiscoveryManager

Parameters

Name Type
eventName "started" | "stopped"
listener OnEventCallback

Returns: DeviceDiscoveryManager

Inherited from: EventEmitter.prependListener


prependOnceListener

prependOnceListener(eventName: "device", listener: OnDeviceDiscoveredCallback): DeviceDiscoveryManager

Parameters

Name Type
eventName "device"
listener OnDeviceDiscoveredCallback

Returns: DeviceDiscoveryManager

Inherited from: EventEmitter.prependOnceListener

prependOnceListener(eventName: "error", listener: OnErrorCallback): DeviceDiscoveryManager

Parameters

Name Type
eventName "error"
listener OnErrorCallback

Returns: DeviceDiscoveryManager

Inherited from: EventEmitter.prependOnceListener

prependOnceListener(eventName: "started" | "stopped", listener: OnEventCallback): DeviceDiscoveryManager

Parameters

Name Type
eventName "started" | "stopped"
listener OnEventCallback

Returns: DeviceDiscoveryManager

Inherited from: EventEmitter.prependOnceListener


removeListener

removeListener(eventName: "device", listener: OnDeviceDiscoveredCallback): DeviceDiscoveryManager

Parameters

Name Type
eventName "device"
listener OnDeviceDiscoveredCallback

Returns: DeviceDiscoveryManager

Inherited from: EventEmitter.removeListener

removeListener(eventName: "error", listener: OnErrorCallback): DeviceDiscoveryManager

Parameters

Name Type
eventName "error"
listener OnErrorCallback

Returns: DeviceDiscoveryManager

Inherited from: EventEmitter.removeListener

removeListener(eventName: "started" | "stopped", listener: OnEventCallback): DeviceDiscoveryManager

Parameters

Name Type
eventName "started" | "stopped"
listener OnEventCallback

Returns: DeviceDiscoveryManager

Inherited from: EventEmitter.removeListener


startDiscoverySession

startDiscoverySession(options?: DeviceDiscoverySessionOptions): DeviceDiscoverySession

Start a new discovery session to discover Ortho Remote devices

Parameters

Name Type Description
options? DeviceDiscoverySessionOptions discovery session options

Returns: DeviceDiscoverySession

Session object initialized based on options and to observe discovery events on


stopDiscovery

stopDiscovery(): void

Stops all discovery sessions in progress

Returns: void


stopDiscoverySession

stopDiscoverySession(session: DeviceDiscoverySession): void

Stops and removes a session from the list of managed sessions. When all session have been removed discovery will cease.

Use DeviceDiscoverySession.stop

Parameters

Name Type Description
session DeviceDiscoverySession session to remove

Returns: void