public static interface OpenNI.DeviceConnectedListener
OpenNI.addDeviceConnectedListener(org.openni.OpenNI.DeviceConnectedListener)
function to add your listener object to OpenNI's list of listeners. Your handler function will
then be called whenever the event occurs. A
OpenNI.removeDeviceConnectedListener(org.openni.OpenNI.DeviceConnectedListener)
function is also provided, if you want to have your class stop listening to these events for
any reason.Modifier and Type | Method | Description |
---|---|---|
void |
onDeviceConnected(DeviceInfo info) |
Callback function for the onDeviceConnected event.
|
void onDeviceConnected(DeviceInfo info)
DeviceInfo
object for the newly
connected device will be supplied. Note that once a device is removed, if it was opened by a
Device
object, that object can no longer be used to access the device, even if it was
reconnected. Once a device was reconnected, Device.open(String)
should be
called again in order to use this device.
If you wish to open the new device as it is connected, simply query the provided DeviceInfo
object to obtain the URI of the device, and pass this URI to the
Device.open(String)
function.