Example #1
0
        public AquaComputerGroup(ISettings settings)
        {
            _report.AppendLine("AquaComputer Hardware");
            _report.AppendLine();

            foreach (HidDevice dev in DeviceList.Local.GetHidDevices(0x0c70))
            {
                string productName = dev.GetProductName();
                productName = productName.Substring(0, 1).ToUpper() + productName.Substring(1);

                switch (dev.ProductID)
                {
                case 0xF00E:
                {
                    var device = new D5Next(dev, settings);
                    _report.AppendLine($"Device name: {productName}");
                    _report.AppendLine($"Firmware version: {device.FirmwareVersion}");
                    _report.AppendLine();
                    _hardware.Add(device);
                    break;
                }

                case 0xf0b6:
                {
                    var device = new AquastreamXT(dev, settings);
                    _report.AppendLine($"Device name: {productName}");
                    _report.AppendLine($"Device variant: {device.Variant}");
                    _report.AppendLine($"Firmware version: {device.FirmwareVersion}");
                    _report.AppendLine($"{device.Status}");
                    _report.AppendLine();
                    _hardware.Add(device);
                    break;
                }

                case 0xf003:
                {
                    var device = new MPS(dev, settings);
                    _report.AppendLine($"Device name: {productName}");
                    _report.AppendLine($"Firmware version: {device.FirmwareVersion}");
                    _report.AppendLine($"{device.Status}");
                    _report.AppendLine();
                    _hardware.Add(device);
                    break;
                }

                default:
                {
                    _report.AppendLine($"Unknown Hardware PID: {dev.ProductID} Name: {productName}");
                    _report.AppendLine();
                    break;
                }
                }
            }

            if (_hardware.Count == 0)
            {
                _report.AppendLine("No AquaComputer Hardware found.");
                _report.AppendLine();
            }
        }
Example #2
0
        public AquaComputerGroup(ISettings settings)
        {
            _report.AppendLine("AquaComputer Hardware");
            _report.AppendLine();

            foreach (HidDevice dev in HidDevices.Enumerate(0x0c70))
            {
                dev.ReadProduct(out byte[] productNameBytes);
                string productName = Encoding.Unicode.GetString(productNameBytes).Replace("\0", string.Empty);
                productName = productName.Substring(0, 1).ToUpper() + productName.Substring(1);

                switch (dev.Attributes.ProductId)
                {
                case 0xf0b6:
                {
                    var device = new AquastreamXT(dev, settings);
                    _report.AppendLine($"Device name: {productName}");
                    _report.AppendLine($"Device variant: {device.Variant}");
                    _report.AppendLine($"Firmware version: {device.FirmwareVersion}");
                    _report.AppendLine($"{device.Status}");
                    _report.AppendLine();
                    _hardware.Add(device);
                    break;
                }

                case 0xf003:
                {
                    var device = new MPS(dev, settings);
                    _report.AppendLine($"Device name: {productName}");
                    _report.AppendLine($"Firmware version: {device.FirmwareVersion}");
                    _report.AppendLine($"{device.Status}");
                    _report.AppendLine();
                    _hardware.Add(device);
                    break;
                }

                default:
                {
                    _report.AppendLine($"Unknown Hardware PID: {dev.Attributes.ProductHexId} Name: {productName}");
                    _report.AppendLine();
                    break;
                }
                }
            }

            if (_hardware.Count == 0)
            {
                _report.AppendLine("No AquaComputer Hardware found.");
                _report.AppendLine();
            }
        }