feat(gateway): implement GatewayController and enhance GatewayRuntime

- Added GatewayController class to manage gateway operations, including command handling, scene and group management, and BLE state management.
- Introduced methods for scene and group storage, including loading, saving, and deleting scenes/groups.
- Enhanced GatewayRuntime with BLE management capabilities, including methods to check and set BLE state, and to generate BLE gateway names.
- Implemented utility functions for string normalization and CSV parsing.
- Added notification sinks for various events in the GatewayController.

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
Tony
2026-04-29 23:02:40 +08:00
parent f4756ce816
commit 4433fe97c7
13 changed files with 1967 additions and 12 deletions
@@ -99,10 +99,13 @@ class GatewayRuntime {
void setCommandAddressResolver(std::function<uint8_t(uint8_t gw, uint8_t raw_addr)> resolver);
GatewayDeviceInfo deviceInfo() const;
bool bleEnabled() const;
bool setBleEnabled(bool enabled);
std::string gatewayName(uint8_t gateway_id) const;
bool setGatewayName(uint8_t gateway_id, std::string_view name);
std::string gatewaySerialHex(uint8_t gateway_id) const;
std::string bleMacHex() const;
std::string bleGatewayName(uint8_t gateway_id, std::string_view gateway_name) const;
std::string defaultBleGatewayName() const;
private: