mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-01-22 05:57:53 -05:00
SDK v6: Use unique IDs for identifying RGBControllers in SDK protocol
This commit is contained in:
@@ -69,7 +69,7 @@ public:
|
||||
void StartClient();
|
||||
void StopClient();
|
||||
|
||||
void SendRequest_ControllerData(unsigned int dev_idx);
|
||||
void SendRequest_ControllerData(unsigned int dev_id);
|
||||
void SendRequest_RescanDevices();
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
@@ -132,8 +132,9 @@ private:
|
||||
bool controller_data_received;
|
||||
bool controller_data_requested;
|
||||
bool protocol_initialized;
|
||||
unsigned int protocol_version;
|
||||
bool change_in_progress;
|
||||
unsigned int requested_controllers;
|
||||
unsigned int requested_controller_index;
|
||||
std::mutex send_in_progress;
|
||||
|
||||
NetPacketHeader response_header;
|
||||
@@ -157,9 +158,8 @@ private:
|
||||
bool server_connected;
|
||||
bool server_initialized;
|
||||
bool server_reinitialize;
|
||||
unsigned int server_controller_count;
|
||||
bool server_controller_count_requested;
|
||||
bool server_controller_count_received;
|
||||
bool server_controller_ids_requested;
|
||||
bool server_controller_ids_received;
|
||||
unsigned int server_protocol_version;
|
||||
bool server_protocol_version_received;
|
||||
|
||||
@@ -183,6 +183,7 @@ private:
|
||||
\*-----------------------------------------------------*/
|
||||
std::mutex ControllerListMutex;
|
||||
std::vector<RGBController *> server_controllers;
|
||||
std::vector<unsigned int> server_controller_ids;
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Detection variables |
|
||||
@@ -204,18 +205,20 @@ private:
|
||||
/*-----------------------------------------------------*\
|
||||
| Private Client functions |
|
||||
\*-----------------------------------------------------*/
|
||||
void ProcessReply_ControllerCount(unsigned int data_size, char * data);
|
||||
void ProcessReply_ControllerData(unsigned int data_size, char * data, unsigned int dev_idx);
|
||||
void ProcessReply_ControllerData(unsigned int data_size, char * data, unsigned int dev_id);
|
||||
void ProcessReply_ControllerIDs(unsigned int data_size, char * data_ptr);
|
||||
void ProcessReply_ProtocolVersion(unsigned int data_size, char * data);
|
||||
void ProcessRequest_DetectionProgressChanged(unsigned int data_size, char * data);
|
||||
void ProcessRequest_DeviceListChanged();
|
||||
void ProcessRequest_RGBController_SignalUpdate(unsigned int data_size, char * data, unsigned int dev_idx);
|
||||
void ProcessRequest_RGBController_SignalUpdate(unsigned int data_size, char * data, unsigned int dev_id);
|
||||
void ProcessRequest_ServerString(unsigned int data_size, char * data);
|
||||
|
||||
void SendData_ClientString();
|
||||
void SendRequest_ControllerCount();
|
||||
void SendRequest_ControllerIDs();
|
||||
void SendRequest_ProtocolVersion();
|
||||
|
||||
void UpdateDeviceList(RGBController* new_controller);
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Private ProfileManager functions |
|
||||
\*-----------------------------------------------------*/
|
||||
@@ -224,5 +227,6 @@ private:
|
||||
/*-----------------------------------------------------*\
|
||||
| Private helper functions |
|
||||
\*-----------------------------------------------------*/
|
||||
RGBController * controller_from_id(unsigned int id);
|
||||
int recv_select(SOCKET s, char *buf, int len, int flags);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user