mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-04-05 06:34:25 -04:00
* SDK Protocol
* Server sends its name to client
* ProfileManager
* Rename existing profile commands
* Add Upload Profile, Download Profile, and Get Active Profile commands
* SettingsManager
* Add Get, Set, and Save Settings commands
* Add zone::active_mode, zone::mode fields for zone-specific modes
* Add NET_PACKET_ID_RGBCONTROLLER_UPDATEZONEMODE packet for updating zone modes
* Add segment::matrix_map to segment packet
* Add NET_PACKET_ID_RGBCONTROLLER_SIGNALUPDATE packet for passing SignalUpdate signal from server to clients
* NetworkServer
* Formatting cleanup
* Use per-controller threads for handling NetworkServer controller-specific packets to avoid delays from controller mutexes
* NetworkClient
* Formatting cleanup
* RGBController
* Clean up and modularize descriptor functions
49 lines
1.9 KiB
C++
49 lines
1.9 KiB
C++
/*---------------------------------------------------------*\
|
|
| RGBController_Network.h |
|
|
| |
|
|
| RGBController implementation that represents a remote |
|
|
| RGBController instance from a connected OpenRGB server |
|
|
| |
|
|
| Adam Honse (CalcProgrammer1) 11 Apr 2020 |
|
|
| |
|
|
| This file is part of the OpenRGB project |
|
|
| SPDX-License-Identifier: GPL-2.0-or-later |
|
|
\*---------------------------------------------------------*/
|
|
|
|
#pragma once
|
|
|
|
#include "RGBController.h"
|
|
#include "NetworkClient.h"
|
|
|
|
class RGBController_Network : public RGBController
|
|
{
|
|
public:
|
|
RGBController_Network(NetworkClient * client_ptr, unsigned int dev_idx_val);
|
|
|
|
void ClearSegments(int zone);
|
|
void AddSegment(int zone, segment new_segment);
|
|
void ResizeZone(int zone, int new_size);
|
|
|
|
void DeviceUpdateLEDs();
|
|
void DeviceUpdateZoneLEDs(int zone);
|
|
void DeviceUpdateSingleLED(int led);
|
|
|
|
void SetCustomMode();
|
|
void DeviceUpdateMode();
|
|
void DeviceUpdateZoneMode(int zone);
|
|
void DeviceSaveMode();
|
|
|
|
void UpdateLEDs();
|
|
void UpdateMode();
|
|
|
|
private:
|
|
NetworkClient * client;
|
|
unsigned int dev_idx;
|
|
|
|
unsigned char * CreateUpdateLEDsPacket(unsigned int protocol_version);
|
|
unsigned char * CreateUpdateModePacket(int mode_idx, unsigned int* size, unsigned int protocol_version);
|
|
unsigned char * CreateUpdateSingleLEDPacket(int led);
|
|
unsigned char * CreateUpdateZoneLEDsPacket(int zone);
|
|
unsigned char * CreateUpdateZoneModePacket(int zone_idx, int mode_idx, unsigned int* size, unsigned int protocol_version);
|
|
};
|