MCPcopy Create free account
hub / github.com/OpenKinect/libfreenect2 / isSameUsbDevice

Method isSameUsbDevice

src/libfreenect2.cpp:674–690  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

672}
673
674bool Freenect2DeviceImpl::isSameUsbDevice(libusb_device* other)
675{
676 bool result = false;
677
678 if(state_ != Closed && usb_device_ != 0)
679 {
680 unsigned char bus = libusb_get_bus_number(usb_device_);
681 unsigned char address = libusb_get_device_address(usb_device_);
682
683 unsigned char other_bus = libusb_get_bus_number(other);
684 unsigned char other_address = libusb_get_device_address(other);
685
686 result = (bus == other_bus) && (address == other_address);
687 }
688
689 return result;
690}
691
692std::string Freenect2DeviceImpl::getSerialNumber()
693{

Callers 1

tryGetDeviceMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected