public StockingCtrl(ICompressionCtrl compressionCtrl, IVibrator vibratorCtrl, ILED ledCtrlGreen, ILED ledCtrlRed) { _compressionCtrl = compressionCtrl; _vibratorCtrl = vibratorCtrl; _LEDCtrlGreen = ledCtrlGreen; _LEDCtrlRed = ledCtrlRed; }
public StubCompressionCtrl(RedLED red, GreenLED Green) { RedLed = red; GreenLed = Green; }
static void PrintSensorsAndSubDevices(IDevice device, string prefix) { if (!device.Valid || !device.Present) { return; } device.Refresh(true); if (device is ISensor) { if (device is ILED) { ILED led = (ILED)device; IControllableSensor controllableLED = (IControllableSensor)device; /*{ * IFixedColorController _ledController = (IFixedColorController)ControllerRegistry.Get("LED.CorsairLink.SingleColor").New(); * _ledController.Value = new Color(255, 1, 1); * controllableLED.Controller = _ledController; * }*/ IController ledController = controllableLED.Controller; Console.Out.WriteLine(prefix + "- " + led.Name + " = " + led.Value + " " + led.Unit.GetPostfix()); if (ledController != null) { Console.Out.WriteLine(prefix + "\t" + ((ledController == null) ? "N/A" : ledController.Name)); } if (ledController is IFixedColorController) { Console.Out.WriteLine(prefix + "\t\t" + ((IFixedColorController)ledController).Value.ToString()); } } else if (device is IFan && device is IControllableSensor) { IFan fan = (IFan)device; IControllableSensor controllableFan = (IControllableSensor)device; /*if (fan.GetParent().Name.Contains("Commander Mini")) * { * IFixedNumberController _fanController = (IFixedNumberController)ControllerRegistry.Get("CorsairLink.FanFixedPercentController").New(); * _fanController.Value = 40; * controllableFan.Controller = _fanController; * }*/ IController fanController = controllableFan.Controller; Console.Out.WriteLine(prefix + "- " + fan.Name + " = " + fan.Value + " " + fan.Unit.GetPostfix()); if (fanController != null) { Console.Out.WriteLine(prefix + "\t" + ((fanController == null) ? "N/A" : fanController.Name)); } if (fanController is ICurveNumberController) { Console.Out.WriteLine(prefix + "\t\t" + ((ICurveNumberController)fanController).Value.ToString().Replace("}, {", "}\r\n" + prefix + "\t\t{")); } } else { ISensor sensor = (ISensor)device; Console.Out.WriteLine(prefix + "- " + sensor.Name + " = " + sensor.Value + " " + sensor.Unit.GetPostfix()); } } else { Console.Out.WriteLine(prefix + "+ " + device.Name); foreach (BaseDevice subDevice in device.GetSubDevices()) { PrintSensorsAndSubDevices(subDevice, prefix + "\t"); } } }