Class: DeviceHub

DeviceHub(context)

Encapsulate the handling of 'device-changed' notification, when devices are conncted or disconnected. It can connect to the existing device(s) in system, and/or wait for the arrival/removal of devices.

Constructor

new DeviceHub(context)

Parameters:
Name Type Description
context Context a librealsense2 Context
Source:

Methods

destroy()

Release resources associated with the object
Source:

isConnected() → {Boolean}

Check if a device is connected
Source:
Returns:
Type
Boolean

waitForDevice() → {Device|undefined}

If any device is connected return it, otherwise wait until next RealSense device connects. Calling this method multiple times will cycle through connected devices
Source:
Returns:
Type
Device | undefined