public LinuxDevItem(string deviceFileName, byte busNumber, byte deviceAddress, LibUsbDeviceDescriptor monoUsbDeviceDescriptor)
        {
            DeviceFileName = deviceFileName;
            BusNumber = busNumber;
            DeviceAddress = deviceAddress;


            DeviceDescriptor = new UsbDeviceDescriptor(monoUsbDeviceDescriptor);
        }
        internal UsbDeviceInfo(UsbDevice usbDevice, LibUsbDeviceDescriptor usbDeviceDescriptor)
        {
            mUsbDevice = usbDevice;

            mDeviceDescriptor = new UsbDeviceDescriptor();
            mDeviceDescriptor.BcdDevice = usbDeviceDescriptor.BcdDevice;
            mDeviceDescriptor.BcdUsb = usbDeviceDescriptor.BcdUsb;
            mDeviceDescriptor.Class = usbDeviceDescriptor.Class;
            mDeviceDescriptor.ConfigurationCount = usbDeviceDescriptor.ConfigurationCount;
            mDeviceDescriptor.DescriptorType = usbDeviceDescriptor.DescriptorType;
            mDeviceDescriptor.Length = usbDeviceDescriptor.Length;
            mDeviceDescriptor.ManufacturerStringIndex = usbDeviceDescriptor.ManufacturerStringIndex;
            mDeviceDescriptor.MaxPacketSize0 = usbDeviceDescriptor.MaxPacketSize0;
            mDeviceDescriptor.ProductID = usbDeviceDescriptor.ProductID;
            mDeviceDescriptor.ProductStringIndex = usbDeviceDescriptor.ProductStringIndex;
            mDeviceDescriptor.Protocol = usbDeviceDescriptor.Protocol;
            mDeviceDescriptor.SerialStringIndex = usbDeviceDescriptor.SerialStringIndex;
            mDeviceDescriptor.SubClass = usbDeviceDescriptor.SubClass;
            mDeviceDescriptor.VendorID = usbDeviceDescriptor.VendorID;
        }
 internal UsbDeviceDescriptor(LibUsbDeviceDescriptor usbDeviceDescriptor)
 {
     BcdDevice = usbDeviceDescriptor.BcdDevice;
     BcdUsb = usbDeviceDescriptor.BcdUsb;
     Class = usbDeviceDescriptor.Class;
     ConfigurationCount = usbDeviceDescriptor.ConfigurationCount;
     DescriptorType = usbDeviceDescriptor.DescriptorType;
     Length = usbDeviceDescriptor.Length;
     ManufacturerStringIndex = usbDeviceDescriptor.ManufacturerStringIndex;
     MaxPacketSize0 = usbDeviceDescriptor.MaxPacketSize0;
     ProductID = usbDeviceDescriptor.ProductID;
     ProductStringIndex = usbDeviceDescriptor.ProductStringIndex;
     Protocol = usbDeviceDescriptor.Protocol;
     SerialStringIndex = usbDeviceDescriptor.SerialStringIndex;
     SubClass = usbDeviceDescriptor.SubClass;
     VendorID = usbDeviceDescriptor.VendorID;
 }
        private LibUsbError GetDeviceDescriptor(out LibUsbDeviceDescriptor monoUsbDeviceDescriptor)
        {
            LibUsbError ec = LibUsbError.Success;

            monoUsbDeviceDescriptor = new LibUsbDeviceDescriptor();
            //Console.WriteLine("MonoUsbProfile:GetDeviceDescriptor");
            ec = (LibUsbError) LibUsbApi.GetDeviceDescriptor(mMonoUSBProfileHandle, monoUsbDeviceDescriptor);
            if (ec != LibUsbError.Success)
            {
#if LIBUSBDOTNET
                UsbError.Error(ErrorCode.MonoApiError, (int) ec, "GetDeviceDescriptor Failed", this);
#endif
                monoUsbDeviceDescriptor = null;
            }
            return ec;
        }