SDK protocol versioning implemented. Protocol updated to version 1 which adds vendor string to controller request.

This commit is contained in:
Adam Honse 2020-12-01 20:59:19 -06:00
parent b0de49a107
commit 72da8f362c
11 changed files with 343 additions and 99 deletions

View file

@ -28,6 +28,7 @@ public:
bool GetConnected();
const char * GetIP();
unsigned short GetPort();
unsigned int GetProtocolVersion();
bool GetOnline();
void RegisterClientInfoChangeCallback(NetClientCallback new_callback, void * new_callback_arg);
@ -46,12 +47,15 @@ public:
void ProcessReply_ControllerCount(unsigned int data_size, char * data);
void ProcessReply_ControllerData(unsigned int data_size, char * data, unsigned int dev_idx);
void ProcessReply_ProtocolVersion(unsigned int data_size, char * data);
void ProcessRequest_DeviceListChanged();
void SendData_ClientString();
void SendRequest_ControllerCount();
void SendRequest_ControllerData(unsigned int dev_idx);
void SendRequest_ProtocolVersion();
void SendRequest_RGBController_ResizeZone(unsigned int dev_idx, int zone, int new_size);
@ -83,6 +87,8 @@ private:
bool server_initialized;
unsigned int server_controller_count;
bool server_controller_count_received;
unsigned int server_protocol_version;
bool server_protocol_version_received;
bool change_in_progress;
std::thread * ConnectionThread;