feat: enhance gateway channel management with serial command handling and gateway ID updates

Signed-off-by: Tony <tonylu@tony-cloud.com>
This commit is contained in:
Tony
2026-06-11 21:04:20 +08:00
parent 6ffca719d9
commit dceede8602
8 changed files with 298 additions and 14 deletions
@@ -139,6 +139,7 @@ class GatewayController {
bool hasGateway(uint8_t gateway_id) const;
std::vector<uint8_t> gatewayIds() const;
std::optional<uint8_t> gatewayIdForChannelNumber(uint8_t channel_number) const;
std::string gatewayName(uint8_t gateway_id) const;
void refreshRuntimeGatewayNames();
void publishPayload(uint8_t gateway_id, const std::vector<uint8_t>& payload);
@@ -181,6 +182,11 @@ class GatewayController {
bool executeGroup(uint8_t gateway_id, uint8_t group_id);
void handleGatewayNameCommand(uint8_t gateway_id, const std::vector<uint8_t>& command);
void handleGatewaySerialCommand(uint8_t channel_number, const std::vector<uint8_t>& command);
void publishGatewaySerialReport();
void publishGatewaySerialResponse(uint8_t status, uint8_t op,
const std::vector<uint8_t>& data);
bool gatewaySerialMatches(const std::vector<uint8_t>& command) const;
void handleGatewayIdentityCommand(uint8_t gateway_id, uint8_t op);
void handleAllocationCommand(uint8_t gateway_id, const std::vector<uint8_t>& command);
void handleInternalSceneCommand(uint8_t gateway_id, const std::vector<uint8_t>& command);