Exemple #1
0
        public UsbRootHub(string rootHubDevicePath)
        {
            var usbDevices = UsbDeviceListFactory.Create(rootHubDevicePath, this);

            PortNumber       = usbDevices.Count;
            ConnectedDevices = usbDevices.NotOfType(typeof(UnConnectUsbDevice));
        }
Exemple #2
0
        public UsbHub(IUsbDevice usbDevice)
        {
            var childDevices = UsbDeviceListFactory.Create(usbDevice.DevicePath, this);

            PortNumber       = childDevices.Count;
            ConnectedDevices = childDevices.NotOfType(typeof(UnConnectUsbDevice));

            PortNo            = usbDevice.PortNo;
            VendorId          = usbDevice.VendorId;
            ProductId         = usbDevice.ProductId;
            SupportSpeed      = usbDevice.SupportSpeed;
            CurrentUsbDevice  = usbDevice.CurrentUsbDevice;
            DeviceKey         = usbDevice.DeviceKey;
            DevicePath        = usbDevice.DevicePath;
            DeviceDescription = usbDevice.DeviceDescription;
            SerialNumber      = usbDevice.SerialNumber;
            Parent            = usbDevice.Parent;
        }