/// <summary> /// Initializes a new instance of the <see cref="NodeMCUWS2812USBUpdateQueue"/> class. /// If this constructor is used UDP updates are disabled. /// </summary> /// <param name="updateTrigger">The update trigger used by this queue.</param> /// <param name="hostname">The hostname to connect to.</param> public NodeMCUWS2812USBUpdateQueue(IDeviceUpdateTrigger updateTrigger, string hostname) : base(updateTrigger) { this._hostname = hostname; _sendDataAction = SendHttp; }
/// <summary> /// Initializes a new instance of the <see cref="UpdateQueue{TIdentifier,TData}"/> class. /// </summary> /// <param name="updateTrigger">The <see cref="IDeviceUpdateTrigger"/> causing this queue to update.</param> protected UpdateQueue(IDeviceUpdateTrigger updateTrigger) { this._updateTrigger = updateTrigger; _updateTrigger.Starting += OnStartup; _updateTrigger.Update += OnUpdate; }
/// <summary> /// Initializes a new instance of the <see cref="AsusUpdateQueue"/> class. /// </summary> /// <param name="updateTrigger">The update trigger used by this queue.</param> public OpenRGBUpdateQueue(IDeviceUpdateTrigger updateTrigger, int deviceid, OpenRGBClient client, int ledcount) : base(updateTrigger) { this._deviceid = deviceid; this._openRGB = client; this._ledcount = ledcount; }
/// <summary> /// Initializes a new instance of the <see cref="CoolerMasterUpdateQueue"/> class. /// </summary> /// <param name="updateTrigger">The update trigger used by this queue.</param> /// <param name="deviceIndex">The <see cref="CoolerMasterDevicesIndexes"/> of the device this queue performs updates for.</param> public CoolerMasterUpdateQueue(IDeviceUpdateTrigger updateTrigger, CoolerMasterDevicesIndexes deviceIndex) : base(updateTrigger) { this._deviceIndex = deviceIndex; _deviceMatrix = new _CoolerMasterColorMatrix(); _deviceMatrix.KeyColor = new _CoolerMasterKeyColor[_CoolerMasterColorMatrix.ROWS, _CoolerMasterColorMatrix.COLUMNS]; }
public PowerPlayUpdateQueue(IDeviceUpdateTrigger updateTrigger, PowerPlayController?powerPlayController) : base(updateTrigger) { if (powerPlayController != null) { _powerPlayController = powerPlayController; } }
/// <summary> /// Initializes a new instance of the <see cref="LogitechZoneUpdateQueue"/> class. /// </summary> /// <param name="updateTrigger">The update trigger used by this queue.</param> /// <param name="deviceType">The tpye of the device this queue is updating.</param> public LogitechZoneUpdateQueue(IDeviceUpdateTrigger updateTrigger, RGBDeviceType deviceType) : base(updateTrigger) { if (!DEVICE_TYPE_MAPPING.TryGetValue(deviceType, out _deviceType)) { throw new ArgumentException($"Invalid type '{deviceType.ToString()}'", nameof(deviceType)); } }
/// <inheritdoc /> public IEnumerable <IRGBDevice> CreateDevices(IDeviceUpdateTrigger updateTrigger) { BitwizardWS2812USBUpdateQueue queue = new BitwizardWS2812USBUpdateQueue(updateTrigger, SerialConnection); string name = Name ?? $"Bitwizard WS2812 USB ({Port})"; BitwizardWS2812USBDevice device = new BitwizardWS2812USBDevice(new BitwizardWS2812USBDeviceInfo(name), queue); device.Initialize(StripLength); yield return(device); }
public OpenRGBUpdateQueue(IDeviceUpdateTrigger updateTrigger, int deviceid, OpenRGBClient client, OpenRGBDevice device) : base(updateTrigger) { _deviceid = deviceid; _openRGB = client; _device = device; _colors = Enumerable.Range(0, _device.Colors.Length) .Select(_ => new OpenRGBColor()) .ToArray(); }
/// <summary> /// Initializes a new instance of the <see cref="NodeMCUWS2812USBUpdateQueue"/> class. /// If this constructor is used UDP updates are enabled. /// </summary> /// <param name="updateTrigger">The update trigger used by this queue.</param> /// <param name="hostname">The hostname to connect to.</param> /// <param name="udpPort">The port used by the UDP-connection.</param> public NodeMCUWS2812USBUpdateQueue(IDeviceUpdateTrigger updateTrigger, string hostname, int udpPort) : base(updateTrigger) { this._hostname = hostname; _udpClient = new UdpClient(); EnableUdp(udpPort); _sendDataAction = SendUdp; }
/// <summary> /// Initializes the device. /// </summary> public void Initialize(IDeviceUpdateTrigger updateTrigger) { InitializeLayout(); if (Size == Size.Invalid) { Rectangle ledRectangle = new Rectangle(this.Select(x => x.LedRectangle)); Size = ledRectangle.Size + new Size(ledRectangle.Location.X, ledRectangle.Location.Y); } UpdateQueue = new CoolerMasterUpdateQueue(updateTrigger, DeviceInfo.DeviceIndex); }
/// <summary> /// Initializes the device. /// </summary> public void Initialize(IDeviceUpdateTrigger updateTrigger) { InitializeLayout(); if (Size == Size.Invalid) { Rectangle ledRectangle = new Rectangle(this.Select(x => x.LedRectangle)); Size = ledRectangle.Size + new Size(ledRectangle.Location.X, ledRectangle.Location.Y); } UpdateQueue = new AsusUpdateQueue(updateTrigger); UpdateQueue.Initialize(GetUpdateColorAction(), DeviceInfo.Handle, LedMapping.Count); }
/// <inheritdoc /> public IEnumerable <IRGBDevice> CreateDevices(IDeviceUpdateTrigger updateTrigger) { ArduinoWS2812USBUpdateQueue queue = new ArduinoWS2812USBUpdateQueue(updateTrigger, SerialConnection); IEnumerable <(int channel, int ledCount)> channels = queue.GetChannels(); int counter = 0; foreach ((int channel, int ledCount) in channels) { string name = string.Format(Name ?? $"Arduino WS2812 USB ({Port}) [{{0}}]", ++counter); ArduinoWS2812USBDevice device = new ArduinoWS2812USBDevice(new ArduinoWS2812USBDeviceInfo(name), queue, channel); device.Initialize(ledCount); yield return(device); } }
/// <summary> /// Initializes the device. /// </summary> public void Initialize(IDeviceUpdateTrigger updateTrigger) { InitializeLayout(); if (Size == Size.Invalid) { Rectangle ledRectangle = new Rectangle(this.Select(x => x.LedRectangle)); Size = ledRectangle.Size + new Size(ledRectangle.Location.X, ledRectangle.Location.Y); } if (DeviceInfo.ColorCapabilities == NovationColorCapabilities.LimitedRG) { UpdateQueue = new LimitedColorUpdateQueue(updateTrigger, DeviceInfo.DeviceId); } }
/// <summary> /// Initializes the device. /// </summary> public void Initialize(IDeviceUpdateTrigger updateTrigger) { InitializeLayout(); if (Size == Size.Invalid) { Rectangle ledRectangle = new Rectangle(this.Select(x => x.LedRectangle)); Size = ledRectangle.Size + new Size(ledRectangle.Location.X, ledRectangle.Location.Y); } UpdateQueue = DeviceInfo.ColorCapabilities switch { NovationColorCapabilities.LimitedRG => new LimitedColorUpdateQueue(updateTrigger, DeviceInfo.DeviceId), NovationColorCapabilities.RGB => new RGBColorUpdateQueue(updateTrigger, DeviceInfo.DeviceId), _ => throw new ArgumentOutOfRangeException() }; }
public AdalightUpdateQueue(IDeviceUpdateTrigger updateTrigger, int port, int ledCount) : base(updateTrigger) { _strip = new Adalight(port, ledCount); _refreshTimer = new Timer(5000); _refreshTimer.Elapsed += _refreshTimer_Elapsed; _refreshTimer.AutoReset = true; _reconnectTimer = new Timer(5000); _reconnectTimer.Elapsed += _reconnectTimer_Elapsed; _reconnectTimer.AutoReset = true; _reconnectTimer.Start(); _fixLastFrameTimer = new Timer(100); _fixLastFrameTimer.Elapsed += _fixLastFrameTimer_Elapsed; _fixLastFrameTimer.AutoReset = false; _fixLastFrameTimer.Start(); }
void ISoIPRGBDevice.Initialize(IDeviceUpdateTrigger updateTrigger) { int count = 0; foreach (LedId id in _leds) { InitializeLed(id, new Rectangle((count++) * 10, 0, 10, 10)); } //TODO DarthAffe 10.06.2018: Allow to load a layout. if (Size == Size.Invalid) { Rectangle ledRectangle = new Rectangle(this.Select(x => x.LedRectangle)); Size = ledRectangle.Size + new Size(ledRectangle.Location.X, ledRectangle.Location.Y); } _tcpServer.Start(DeviceInfo.Port); _updateQueue = new SoIPServerUpdateQueue(updateTrigger, _tcpServer); }
/// <inheritdoc /> public IEnumerable <IRGBDevice> CreateDevices(IDeviceUpdateTrigger updateTrigger) { NodeMCUWS2812USBUpdateQueue queue = UpdateMode switch { NodeMCUUpdateMode.Http => new NodeMCUWS2812USBUpdateQueue(updateTrigger, Hostname), NodeMCUUpdateMode.Udp => new NodeMCUWS2812USBUpdateQueue(updateTrigger, Hostname, Port), _ => throw new ArgumentOutOfRangeException() }; IEnumerable <(int channel, int ledCount)> channels = queue.GetChannels(); int counter = 0; foreach ((int channel, int ledCount) in channels) { string name = string.Format(Name ?? $"NodeMCU WS2812 WIFI ({Hostname}) [{{0}}]", ++counter); NodeMCUWS2812USBDevice device = new NodeMCUWS2812USBDevice(new NodeMCUWS2812USBDeviceInfo(name), queue, channel); device.Initialize(ledCount); yield return(device); } } #endregion }
/// <summary> /// Initializes a new instance of the <see cref="CoolerMasterUpdateQueue"/> class. /// </summary> /// <param name="updateTrigger">The update trigger used by this queue.</param> /// <param name="deviceIndex">The <see cref="CoolerMasterDevicesIndexes"/> of the device this queue performs updates for.</param> public CoolerMasterUpdateQueue(IDeviceUpdateTrigger updateTrigger, CoolerMasterDevicesIndexes deviceIndex) : base(updateTrigger) { this._deviceIndex = deviceIndex; }
/// <summary> /// Initializes a new instance of the <see cref="LimitedColorUpdateQueue"/> class. /// </summary> /// <param name="updateTrigger">The update trigger used by this queue.</param> /// <param name="deviceId">The device-id of the device this queue is performing updates for.</param> public LimitedColorUpdateQueue(IDeviceUpdateTrigger updateTrigger, int deviceId) : base(updateTrigger, deviceId) { }
/// <inheritdoc /> /// <summary> /// Initializes a new instance of the <see cref="T:RGB.NET.Devices.SoIP.Server.SoIPServerUpdateQueue" /> class. /// </summary> /// <param name="updateTrigger">The update trigger used by this queue.</param> /// <param name="tcpServer">The hostname of the device this queue is performing updates for.</param> public SoIPServerUpdateQueue(IDeviceUpdateTrigger updateTrigger, SimpleTcpServer tcpServer) : base(updateTrigger) { this._tcpServer = tcpServer; }
/// <inheritdoc /> protected override RazerUpdateQueue CreateUpdateQueue(IDeviceUpdateTrigger updateTrigger) => new RazerMousepadUpdateQueue(updateTrigger, DeviceInfo.DeviceId);
/// <summary> /// Initializes a new instance of the <see cref="WootingUpdateQueue"/> class. /// </summary> /// <param name="updateTrigger">The update trigger used by this queue.</param> public WootingUpdateQueue(IDeviceUpdateTrigger updateTrigger) : base(updateTrigger) { }
public MsiusbDeviceUpdateQueue(IDeviceUpdateTrigger updateTrigger, int deviceID) : base(updateTrigger) { this._deviceID = deviceID; }
/// <summary> /// Initializes a new instance of the <see cref="ArduinoWS2812USBUpdateQueue"/> class. /// </summary> /// <param name="updateTrigger">The update trigger used by this queue.</param> /// <param name="portName">The name of the serial-port to connect to.</param> /// <param name="baudRate">The baud-rate used by the serial-connection.</param> public ArduinoWS2812USBUpdateQueue(IDeviceUpdateTrigger updateTrigger, ISerialConnection serialConnection) : base(updateTrigger, serialConnection) { }
/// <summary> /// Initializes a new instance of the <see cref="RazerChromaLinkUpdateQueue" /> class. /// </summary> /// <param name="updateTrigger">The update trigger used to update this queue.</param> /// <param name="deviceId">The id of the device updated by this queue.</param> public RazerChromaLinkUpdateQueue(IDeviceUpdateTrigger updateTrigger, Guid deviceId) : base(updateTrigger, deviceId) { }
/// <inheritdoc /> /// <summary> /// Initializes a new instance of the <see cref="T:RGB.NET.Devices.WS281X.Bitwizard.BitwizardWS2812USBUpdateQueue" /> class. /// </summary> /// <param name="updateTrigger">The update trigger used by this queue.</param> /// <param name="portName">The name of the serial-port to connect to.</param> /// <param name="baudRate">The baud-rate used by the serial-connection.</param> public BitwizardWS2812USBUpdateQueue(IDeviceUpdateTrigger updateTrigger, ISerialConnection serialConnection) : base(updateTrigger, serialConnection) { }
/// <inheritdoc /> protected override RazerUpdateQueue CreateUpdateQueue(IDeviceUpdateTrigger updateTrigger) => new RazerChromaLinkUpdateQueue(updateTrigger, DeviceInfo.DeviceId);
public YeeLightUpdateQueue(IDeviceUpdateTrigger updateTrigger, Device light, bool placeHolder = false) : base(updateTrigger) { _light = light; _placeHolder = placeHolder; }
/// <summary> /// Initializes a new instance of the <see cref="RazerHeadsetUpdateQueue" /> class. /// </summary> /// <param name="updateTrigger">The update trigger used to update this queue.</param> /// <param name="deviceId">The id of the device updated by this queue.</param> public RazerHeadsetUpdateQueue(IDeviceUpdateTrigger updateTrigger, Guid deviceId) : base(updateTrigger, deviceId) { }
/// <inheritdoc /> /// <summary> /// Initializes a new instance of the <see cref="T:RGB.NET.Devices.WS281X.Bitwizard.BitwizardWS2812USBUpdateQueue" /> class. /// </summary> /// <param name="updateTrigger">The update trigger used by this queue.</param> /// <param name="portName">The name of the serial-port to connect to.</param> /// <param name="baudRate">The baud-rate used by the serial-connection.</param> public BitwizardWS2812USBUpdateQueue(IDeviceUpdateTrigger updateTrigger, string portName, int baudRate = 115200) : base(updateTrigger, portName, baudRate) { }