Constructor
new DeviceHub(context)
Parameters:
| Name | Type | Description |
|---|---|---|
context |
Context | a librealsense2 Context |
Methods
destroy()
Release resources associated with the object
isConnected() → {Boolean}
Check if a device is connected
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
Returns:
- Type
- Device | undefined