internal LinkDeviceModern(USB.BaseUSBDevice usbDevice, byte channel)
     : base(usbDevice, channel)
 {
     lock (subDeviceLock)
     {
         RefreshCoreValues();
     }
 }
        internal static BaseLinkDevice CreateNew(USB.BaseUSBDevice usbDevice, byte channel, byte deviceType)
        {
            switch (deviceType)
            {
            case 0x5:
                return(new LinkDeviceModern(usbDevice, channel));

            case 0x3:
                return(new LinkDeviceAFP(usbDevice, channel));

            case 0x1:
                return(LinkDevicePSU.CreateNew(usbDevice, channel));

            default:
                return(null);
            }
        }
Example #3
0
        internal static LinkDevicePSU CreateNew(USB.BaseUSBDevice usbDevice, byte channel)
        {
            LinkDevicePSU genericPSU = new LinkDevicePSU(usbDevice, channel);
            string        psuName    = genericPSU.GetInternalName();

            if (psuName == "AX1200i")
            {
                return(new LinkDevicePSUAX1200i(usbDevice, channel));
            }
            if (psuName == "AX1500i")
            {
                return(new LinkDevicePSUAX1500i(usbDevice, channel));
            }
            if (psuName.StartsWith("HX") && psuName != "HX1200i" && psuName != "HX1000i")
            {
                return(new LinkDevicePSUHXiNoRail(usbDevice, channel));
            }
            if (psuName.StartsWith("HX"))
            {
                return(new LinkDevicePSUHX(usbDevice, channel));
            }
            return(genericPSU);
        }
 internal LinkDevicePSUHX(USB.BaseUSBDevice usbDevice, byte channel) : base(usbDevice, channel)
 {
 }
 internal BaseLinkDevice(USB.BaseUSBDevice usbDevice, byte channel) : base(usbDevice)
 {
     this.usbDevice = usbDevice;
     this.channel = channel;
 }
 internal BaseLinkDevice(BaseLinkDevice linkDevice, byte channel)
     : base(linkDevice)
 {
     this.usbDevice = linkDevice.usbDevice;
     this.channel = channel;
 }
 internal BaseLinkDevice(USB.BaseUSBDevice usbDevice, byte channel) : base(usbDevice)
 {
     this.usbDevice = usbDevice;
     this.channel   = channel;
 }
 internal BaseLinkDevice(BaseLinkDevice linkDevice, byte channel)
     : base(linkDevice)
 {
     this.usbDevice = linkDevice.usbDevice;
     this.channel   = channel;
 }