Commit Graph

102 Commits

Author SHA1 Message Date
Adam Honse
c11090a4cf Add another thread in NetworkClient for handling ProfileManager requests outside of the main listener thread, to avoid deadlocking the waiting receivers 2026-05-20 08:13:17 -05:00
Adam Honse
f870dcdc3a NetworkServer cleanup and internal API standardization 2026-05-14 17:26:12 -05:00
Adam Honse
1faa2b1d31 Implement network request to get list of I2C buses so that the Get Hardware IDs dialog works in local client mode 2026-05-14 17:26:12 -05:00
Adam Honse
32f0f1a9a2 Log manager SDK protocol 2026-05-14 17:26:12 -05:00
Adam Honse
072d27d9dd Settings Rework
* Add JSON string configuration field to RGBController to store device-specific configurations
    * This JSON string holds both configuration and schema
    * Add settings schema tracking to SettingsManager
    * Implement dynamic settings widget that generates a settings UI based on a JSON schema
    * Implement SettingsManager callback for notifying of settings changes and settings schema updates
    * Always enable Entire Device zone option and use it to enable Edit Device
    * Rename SaveSizes to SaveConfiguration in ProfileManager and Sizes.json to Configuration.json
    * Add zone flag for indicating that a zone's geometry may change, informing profile manager to ignore this check
    * Remove Theme setting and Theme Manager, as this didn't work on most setups anyways and Qt6 has proper Windows dark theming
2026-05-14 17:25:35 -05:00
Adam Honse
7a9aab5a37 Close SDK connection if magic value is not correctly received 2026-05-07 17:24:46 -05:00
Adam Honse
24ea50df71 Implement size verification on RGBController set description functions 2026-05-07 17:24:46 -05:00
Adam Honse
75df39252b Clean up zone initialization dialog 2026-05-07 17:24:46 -05:00
Adam Honse
385f123816 Require local client permission for DeleteProfile, SaveProfile, UploadProfile, SetSettings, and SaveSettings operations, some general cleanup 2026-05-07 17:24:46 -05:00
Adam Honse
5e2cc42290 Add ACK to network packets processed by NetworkServer 2026-05-07 17:24:46 -05:00
Adam Honse
56bd7580ba Zone and Segment type updates
* Add zone flags to indicate if fields are manually configurable and if they have been manually configured
  * Add flags field to segment type
  * Add segment flags for group start and group member
  * Add color mode support flags to zone (RGB, RBG, GRB, GBR, BRG, BGR)
  * Add color mode enum to zone
  * Update zone and segment description functions to support new fields
  * Rename the effects-only configurable size flag
  * Remove zone type and matrix map configuration from E1.31 manual configuration, use zone editor instead
  * Rework DeviceResizeZone to DeviceConfigureZone
  * Rework most ARGB controllers to allow zone customizations
  * Rework DRGBController to define devices in DRGBDevices list (similar to RazerDevices)
  * Rework NollieController to define devices in NollieDevices list (similar to RazerDevices)
2026-05-07 17:24:46 -05:00
Adam Honse
cc00690dd4 RGBController API changes and segment configuration updates
* Make the Get/Set RGBControler descriptor functions static
  * Add functions for getting the matrix_map_type for zone and segment matrix maps
  * Rename zone resize dialog to zone editor dialog
  * Add additional segment types
  * Add option to import segments configuration from JSON file in zone editor dialog
  * Update device view to be able to display matrix segment types
  * Add matrix map editor dialog for creating/editing segment matrix maps
  * Add option to export segments configuration to JSON file in zone editor dialog
2026-05-07 17:24:46 -05:00
Adam Honse
0144a6a150 [next] Active profile tracking 2026-05-07 17:24:45 -05:00
Adam Honse
6ec8b80e65 Apply profiles server-side rather than client-side, signal active profile update, forward loaded profile to local client for plugins 2026-05-07 17:24:45 -05:00
Adam Honse
70f79e97b4 Move RGBController base destructor functionality into RGBController::Shutdown() so that update thread can be stopped before deleting the controller. Shutdown() must be called in every RGBController implementation before deleting the controller. Also some fixes to the NetworkServer to avoid deadlocking and disconnect issues 2026-05-07 17:24:45 -05:00
Adam Honse
7b7f0aa0fe [next] SDK v6: Implement client and server flags to indicate capabilities and... 2026-05-07 17:24:45 -05:00
Adam Honse
f24b56b64f Update NetworkClient to use log manager and use common name constant in server logs 2026-05-07 17:24:45 -05:00
Adam Honse
4e70949aec Use std::string.assign when setting strings in the SDK protocol and description handlers so that string size limit is enforced, then strip out null terminators 2026-05-07 17:24:45 -05:00
Adam Honse
45950047cb SDK v6: Use unique IDs for identifying RGBControllers in SDK protocol 2026-05-07 17:24:45 -05:00
Adam Honse
f6f317d487 Detection progress SDK integration, NetworkClient callback rework 2026-05-07 17:24:45 -05:00
Adam Honse
58582202cf SDK Version 6 Updates
* 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
2026-05-07 17:24:44 -05:00
Adam Honse
57cde755c1 Rework Profiles to use JSON format
* Update OpenRGB Plugin Interface to include functions for loading/saving profile JSON data into OpenRGB profiles
    * Update ProfileManager to handle auto-load profiles (Exit, Open, Resume, Suspend) and move their settings to ProfileManager section
    * Update ProfileManager to store profiles in "profiles" folder in .json format
    * Update ProfileManager to store size profile in sizes.json
    * Update ProfileManager to perform device UpdateMode/UpdateColors when loading profile
    * Code cleanup of ProfileManager and profile-related code
2026-05-07 17:24:44 -05:00
Adam Honse
d763f7ecc7 Move plugin SDK integration from callback into plugin API and PluginManager 2026-05-07 17:24:44 -05:00
Adam Honse
d09c66900d Set TCP_QUICKACK on Linux to improve responsiveness when using client/service configuration 2026-01-06 00:23:52 -06:00
Egor Vorontsov
56b75aaffc Set SO_REUSEADDR on network sockets. 2025-12-16 06:24:30 +03:00
Adam Honse
a6b890a48d Use ResourceManager::RescanDevices() to initiate a rescan in places where ResourceManager::DetectDevices() was still being used 2025-11-14 20:31:10 -06:00
Adam Honse
c71cc4f18a Change SPDX license identifier from GPL 2.0 only to GPL 2.0 or later, as the original LICENSE file includes an or later clause at the end so the file headers were incorrect 2025-09-28 00:47:08 -05:00
Adam Honse
df73d0263a Add send_in_progress locks around send groups in NetworkServer.cpp 2025-07-04 23:37:23 -05:00
Adam Honse
0cfe5ae0bb Add SDK command to rescan devices 2025-07-04 04:24:37 -05:00
Adam Honse
85625a37b2 SDK cleanup, update SDK documentation 2025-02-06 20:00:27 -06:00
Adam Honse
1967ec9526 Save sizes file when server processes segment changes 2025-02-06 20:00:27 -06:00
Adam Honse
012cb5e62d Fix segment creation and modification over the network protocol 2025-02-06 20:00:27 -06:00
Adam Honse
ff2188ba45 Update SDK Documentation, fix plugin protocol version type in NetworkServer 2025-01-10 11:59:53 -06:00
morg
59e303c882 Add missing tags in logs 2025-01-10 08:53:31 +01:00
Adam Honse
471f9d3e2e Add server option to disable the size check called legacy workaround, which can be enabled to allow some old SDK apps that didn't properly implement the size to still be used 2025-01-08 20:44:20 -06:00
Adam Honse
39c968ff2a Fix some warnings in NetworkServer.cpp 2024-11-26 01:55:35 -06:00
Adam Honse
c1149da754 Fix possible loss of data warnings in NetworkServer.cpp 2024-08-17 00:24:18 -05:00
Adam Honse
fdd04a1511 Allow data size of zero for data length checks if protocol version is 4 or lower, this is to fix backwards compatibility with a bug in older versions OpenRGB.NET that has since been fixed. 2024-07-28 18:05:47 -05:00
Adam Honse
e7240ecca0 Improve logging in NetworkServer.cpp and close listener if any packet with an invalid size is received 2024-07-27 16:38:41 -05:00
Adam Honse
64a0d2c061 Add some size checks on the server to ensure received data matches the size from the packet header 2024-07-26 00:19:19 -05:00
Adam Honse
a7c400bc65 Update yet more file header comments to standardized new format 2024-05-03 21:56:32 -05:00
Adam Honse
89983dcdd1 Process received magic using a loop in client and server 2024-03-25 19:56:33 -05:00
Adam Honse
cf4fd16b09 Define SDK magic string value as a shared constant in NetworkProtocol.cpp, use InitNetPacketHeader function to set up packets 2024-03-25 19:45:06 -05:00
Adam Honse
9215ae0514 Clean up comment formatting in NetworkServer.cpp 2024-03-25 17:50:37 -05:00
Adam Honse
d7ed55b264 Use size when parsing received buffers into strings in NetworkServer 2023-10-01 22:43:32 -05:00
Jack
e15b299684 SDK Plugins Fix 2023-01-25 20:28:50 +00:00
Jack
4baf19f13a SDK plugin control 2023-01-25 17:50:28 +00:00
B Horn
a54f03e199 Fixing MacOS / Clang builds 2022-07-18 02:32:28 +00:00
B Horn
640eb7905c SDK Listening Options 2022-07-17 20:30:15 +00:00
Chris
f3eac499d4 Allow for server side controller resizing
* Save sizes profile on the server
* Update RGBController_Network size on the client
2022-07-04 20:16:39 +00:00