Enhance DALI device type discovery and query handling

- Introduce DaliDeviceTypeDiscovery struct for managing device type queries.
- Implement discoverDeviceTypes method in DaliBase for improved device type detection.
- Update DaliComm to handle query responses more robustly, including handling multiple device replies.
- Add setDetectedDeviceTypes method in DaliDevice to manage detected device types and capabilities.
This commit is contained in:
Tony
2026-04-25 12:59:16 +08:00
parent bbcfcd11f6
commit 32e7329b3e
7 changed files with 225 additions and 14 deletions
+1 -1
View File
@@ -101,7 +101,7 @@ Query-style operations return `data` when available and may include decoded flag
## Notes
- Optional query support: provide a `transact` callback that returns the gateway reply; otherwise, query methods return `std::nullopt`.
- Query support works with either a `read` callback or a `transact` callback. When `read` is available, queries return as soon as the reply bytes arrive instead of waiting behind a fixed pre-read delay.
- `Dali` facade in `include/dali.hpp` mirrors `lib/dali/dali.dart` and wires `base`, `decode`, `dt1`, `dt8`, and `addr` together.
- The `t`, `d`, and `g` parameters in Dart are not required here; timing/gateway selection is driven by your callbacks.
- `DaliCloudBridge` now uses the shared bridge engine internally, so MQTT downlinks can target either raw DALI frames or registered bridge models.