Enhance DaliGatewayCache: add capabilities management for DALI devices
Signed-off-by: Tony <tonylu@tony-cloud.com>
This commit is contained in:
@@ -83,6 +83,11 @@ struct DaliGatewayRuntimeStatus {
|
||||
struct DaliGatewayAddressState {
|
||||
bool groupMaskKnown{false};
|
||||
uint16_t groupMask{0};
|
||||
// Capability data is populated by discovery adapters and persisted with the
|
||||
// rest of the address cache so bridge planners do not need a live bus scan
|
||||
// on every boot.
|
||||
std::optional<uint16_t> daliDeviceTypeMask;
|
||||
std::optional<uint8_t> dt8ColorTypeFeatures;
|
||||
std::array<std::optional<uint8_t>, 16> sceneLevels{};
|
||||
DaliGatewaySettingsSnapshot settings;
|
||||
DaliGatewayRuntimeStatus status;
|
||||
@@ -143,6 +148,9 @@ class DaliGatewayCache {
|
||||
|
||||
void markAddressPresence(uint8_t channel, uint8_t shortAddress, DaliGatewayPresence presence);
|
||||
bool setGroupMask(uint8_t channel, uint8_t shortAddress, std::optional<uint16_t> groupMask);
|
||||
bool setCapabilities(uint8_t channel, uint8_t shortAddress,
|
||||
std::optional<uint16_t> daliDeviceTypeMask,
|
||||
std::optional<uint8_t> dt8ColorTypeFeatures);
|
||||
bool setSceneLevel(uint8_t channel, uint8_t shortAddress, uint8_t scene,
|
||||
std::optional<uint8_t> level);
|
||||
bool setSettings(uint8_t channel, uint8_t shortAddress,
|
||||
|
||||
Reference in New Issue
Block a user