Commit Graph
77 Commits
Author SHA1 Message Date
Ken Sanislo fb0e4f3ad9 Tear down lost and closed client connections safely
When a connection dropped, the listener thread deleted all of that
server's controllers immediately, before anything else was notified, so
the GUI, ResourceManager, and plugins kept dereferencing freed
controllers. Clicking Disconnect had the same problem and also ran the
teardown inline on the GUI thread, where UpdateDeviceList's
DEVICE_LIST_UPDATED is a BlockingQueuedConnection back to that thread,
so the device pages were not torn down before the controllers were
freed and a later queued onDetectionEnded dereferenced them.

Neither path frees controllers inline now. NetworkClient moves them to
an orphaned list and a dedicated teardown thread frees them: plugins
are warned first, then the same DETECTION_STARTED, UpdateDeviceList,
DETECTION_COMPLETE sequence a rescan runs tears down the device pages
that still reference the controllers, and only then are they freed, so
a controller always outlives its page. Both the connection-loss path
and the disconnect button queue to that thread, so the blocking handler
runs on the GUI thread while the controllers are still alive, and
StopClient's join stays off the GUI and listener threads.
2026-07-29 23:36:02 -07:00
Dmitry K 74219e502a [next] Add function to retrieve ALL USB-attached COM ports 2026-07-07 21:00:36 -05:00
Adam Honse 86a6a130e7 Add network packet for getting list of serial ports 2026-07-07 17:13:59 -05:00
Adam Honse 387fed4f79 Add network request for requesting list of USB devices in local client mode 2026-07-07 01:35:35 -05:00
Adam Honse df0137c2b0 Add network request for requesting list of HID devices in local client mode 2026-07-07 01:35:35 -05:00
Adam Honse 4f1c623093 Use RGBControllerInterface for plugin API 2026-07-07 01:35:35 -05:00
Adam Honse 831a7cf5eb Implement network request to get list of I2C buses so that the Get Hardware IDs dialog works in local client mode 2026-07-07 01:35:35 -05:00
Adam Honse 2868f61766 Rework server initialization
* Only create server instance if server is actually needed
    * Pass initial server host and port through ResourceManager
    * Allow setting default server host and port in Server settings
2026-07-07 01:35:35 -05:00
Kasslim ea00807a06 Correct spelling Busses -> Buses
Commits merged by Adam Honse <calcprogrammer1@gmail.com>
2026-07-07 01:35:35 -05:00
Adam Honse cd1c9c705b Expose LogManager in ResourceManager so that plugins can use it 2026-07-07 01:35:34 -05:00
Adam Honse 92f397544b Rework list handling in ResourceManager by having NetworkClient own its own list rather than sharing ResourceManager's list 2026-07-07 01:35:34 -05:00
Adam Honse 30e35eb44c Split out detection system from ResourceManager into DetectionManager
* Split detection system out into its own class, DetectionManager
    * Clean up ResourceManger's many callbacks into just two, one for detection and one general purpose
2026-07-07 01:35:34 -05:00
Adam Honse b92a8996e9 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-07-07 01:35:34 -05:00
Adam Honse a86ab2955a Move plugin SDK integration from callback into plugin API and PluginManager 2026-07-07 01:35:34 -05:00
Adam Honse 2ce0beec82 Add a configurable settings option to delay detection after opening 2025-12-07 15:32:53 -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 676547b8b0 Pass name string into I2C DIMM detectors, store name in KingstonFuryDRAMController to avoid setting it in detector 2025-08-17 01:17:02 -05:00
Adam Honse c3b1b16d11 Clean up comment formatting in ResourceManager.h 2025-07-12 23:04:59 -05:00
Adam Honse d8b9159125 Rework handling of NetworkClient callbacks to route them through ResourceManager and move connection of saved clients to after autoconnection of local client in InitCoroutine 2025-07-12 22:49:14 -05:00
Adam Honse c750158286 Make the rescan action in ResourceManager send a rescan request to the client if the client is the primary target (local connection or only connected client when local detection disabled) 2025-07-04 04:24:37 -05:00
Dmitry Kychanov 34ff3aa99a Minor cleanup in detectors 2025-05-30 02:44:34 +04:00
Adam Honse 0d6ae64b24 Update hueplusplus dependency to 1.2.0 2025-02-14 23:16:53 -06:00
morg b3dfd3b4b0 Move ResourceManagerInterface to its own file. Refactor Plugin interface 2025-02-06 20:00:27 -06:00
Chris 6934bbf802 Added translations for LOG messages
* Added C Macro to allow QT lupdate parsing
* Added QTtrranslation wrapper around dialog message
* Updated all translation files
2025-02-04 06:04:28 +00:00
Dmitry K d1f90e134f [Review needed] Fix Rescan Crash on MacOS 2025-01-07 19:44:21 +00:00
Adam Honse 560ff5ab33 Clean up SPDAccessor, split out classes into their own files, add comments, update coding style 2024-12-21 22:21:41 +00:00
Milan Čermák ae94ce1252 Fix null pointer dereference in SPD 2024-12-10 14:37:42 +00:00
Milan Čermák b1d5e83adc Implement common DRAM SPD module with EE1004 and SPD5118 driver support to support detecting DRAM modules using SPD information. 2024-12-04 20:41:52 +00:00
Dmitry Kychanov b171906162 Fixed server 2024-10-05 02:47:02 +04:00
Dmitry K 2c952a54d2 Loading optimization (no GUI changes) 2024-09-26 22:20:48 +00:00
Adam Honse a7c400bc65 Update yet more file header comments to standardized new format 2024-05-03 21:56:32 -05:00
Dmitry K 51712f08b5 Removed include directives from ResourceManager.h to speed up build process 2023-07-12 14:51:47 +00:00
Dmitry K 0714920a9a Simplified detector blocks for HID 2023-07-12 14:49:27 +00:00
Adam Honse 92f0720639 Remove RGB controllers argument from standard detector 2023-01-26 20:36:02 -06:00
Adam Honse 29d34f7768 Implement the wrapper for Linux in ResourceManager, change IPU to I for HyperX Quadcast S, code cleanup 2023-01-26 23:56:36 +00:00
Adam Honse 7bf0e40fd8 Load sizes for hardware controllers registered using RegisterRGBController() before putting them in the general controllers list and updating the UI 2023-01-18 22:56:44 -06:00
Dmitry K b409b5f7cc Added support for unicode paths (filesystem::path approach) 2023-01-18 06:02:55 +00:00
Adam Honse 00e35e9e01 Add I2C PCI detector type for registering GPU detectors, update Gigabyte RGB Fusion GPU controller to use it 2022-05-22 18:23:46 -05:00
morg 5b4d55bb42 Add pre detection hooks to resource manager. Closes #2184 2022-02-11 18:54:30 +00:00
Adam Honse 938f67016c Update plugin API to version 2, add unregister functions for all ResourceManager callbacks 2021-12-29 22:50:00 -06:00
Adam Honse de4231f3ea Show dialog if any common I2C/SMBus initialization errors occur 2021-11-07 13:53:48 -06:00
Adam Honse d18f66f995 Implement dynamic detectors - run-once functions that can register detectors dynamically 2021-05-31 13:55:22 -05:00
k1-801 abfb6ea22d Tiny fixups (server conn info leak closed, log va leak closed, config dir optimized)
Commit amended for code style by Adam Honse <calcprogrammer1@gmail.com>
2021-05-24 22:41:12 -05:00
Adam Honse cb656ebdf7 Don't print Running standalone message when local server connection succeeds 2021-05-23 23:22:46 -05:00
morg f54ecd8b1b Add detection start and end callbacks 2021-05-17 08:14:00 -05:00
Adam Honse d88f9979a9 Rework network client callback pipeline - route callbacks from clients through ResourceManager so that device list callbacks get called. Fixes remote devices not showing up in plugins. 2021-05-14 23:29:34 -05:00
silas a51e2f8ac8 Make device list change warning callback
This will be helpful for keeping plugins from crashing

Commit amended to change callback function name for consistency by Adam Honse <calcprogrammer1@gmail.com>
2021-05-13 22:30:38 -05:00
morg 2a6b457324 Add UnregisterRGBController method to ResourceManager
Commit amended by Adam Honse <calcprogrammer1@gmail.com>
2021-04-20 09:21:24 -05:00
Adam Honse 276c7e66e9 Update the detector settings list before running the detectors, so that the list is populated even if a detector crashes 2021-04-09 18:28:37 -05:00
Adam Honse 69cb7a0d9e Use resource manager to register I2C interfaces and log them 2021-03-24 01:22:48 -05:00