Device function ( String arg0 ) { Device loc0 = new Device ( ) ; NativeMethods . checkReturnStatus ( NativeMethods . oniDeviceOpen ( arg0 , loc0 ) ) ; if ( loc0 . isFile ( ) ) { loc0 . mPlaybackControl = new PlaybackControl ( loc0 ) ; } return loc0 ; }
opens a device . this can either open a device chosen arbitrarily from all devices on the system , or open a specific device selected by passing this function the device uri . to open any device , simply device #open function . if multiple devicesare connected to the system , then one of them will be opened . this procedure is most useful when it is known that exactly one device is or can be connected to the system . in that case , requesting a list of all devices and iterating through it would be a waste of effort . if multiple devices are or may be connected to a system , then a uri will be required to select a specific device to open . there are two ways to obtain a uri : from a deviceconnected event , or by calling org.openni.openni #enumeratedevices . in the case of a deviceconnected event , the openni.deviceconnectedlistener will beprovided with a deviceinfo object as an argument to its openni.deviceconnectedlistener #ondeviceconnected deviceinfo function . the org.openni.deviceinfo #geturi function can then be used to obtain the uri.if the application is not using event handlers , then it can also call the static function org.openni.openni #enumeratedevices . this will return an array of deviceinfo objects , one for each device currently available to the system . the application can then iterate through this list and select the desired device . the uri is again obtained via the org.openni.deviceinfo #geturi function.standard codes of type status are returned indicating whether opening was successful . for opening a recording file , pass the file path as a uri . concode_field_sep PlaybackControl mPlaybackControl concode_elem_sep long mDeviceHandle concode_field_sep boolean isImageRegistrationModeSupported concode_elem_sep DeviceInfo getDeviceInfo concode_elem_sep SensorInfo getSensorInfo concode_elem_sep boolean hasSensor concode_elem_sep boolean isFile concode_elem_sep void setImageRegistrationMode concode_elem_sep long getHandle concode_elem_sep void setDepthColorSyncEnabled concode_elem_sep void close concode_elem_sep PlaybackControl getPlaybackControl concode_elem_sep ImageRegistrationMode getImageRegistrationMode