feat(gateway): implement serial communication handling in DaliDomainService and GatewayController

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
Tony
2026-05-01 01:59:32 +08:00
parent ae4669e1b3
commit 2c1aa28d4f
6 changed files with 172 additions and 20 deletions
@@ -334,6 +334,12 @@ bool GatewayRuntime::hasPendingQueryCommand(const std::vector<uint8_t>& command)
});
}
bool GatewayRuntime::hasActiveQueryCommand(uint8_t gateway_id) const {
LockGuard guard(command_lock_);
return current_command_.has_value() && isQueryCommand(*current_command_) &&
current_command_->size() > 2 && (*current_command_)[2] == gateway_id;
}
GatewayRuntime::CommandDropReason GatewayRuntime::lastEnqueueDropReason() const {
LockGuard guard(command_lock_);
return last_enqueue_drop_reason_;