Enhance DALI interface: add gateway parameter to scene and color methods for improved command handling

This commit is contained in:
Tony
2026-05-02 21:32:39 +08:00
parent 9f9628db39
commit 16907857c0
6 changed files with 199 additions and 37 deletions
+3 -3
View File
@@ -131,9 +131,9 @@ class DaliBase {
std::optional<int> getGroup(int a);
bool setGroup(int a, int value);
std::optional<int> getScene(int a, int b);
bool setScene(int a, int b);
std::map<int, int> getScenes(int a);
std::optional<int> getScene(int a, int b, int gateway = -1);
bool setScene(int a, int b, int gateway = -1);
std::map<int, int> getScenes(int a, int gateway = -1);
std::optional<int> getStatus(int a);
std::optional<bool> getControlGearPresent(int a);
+4
View File
@@ -49,8 +49,12 @@ class DaliDecode {
static std::string hex(int v);
static std::string bin(int v);
static std::string yn(bool b);
static std::string ynUpper(bool b);
static std::string whoLabel(int addr, bool even);
static std::string deviceTypeName(int v);
static std::string lightSourceName(int v);
static std::string booleanQueryLabel(int c);
static std::string fadeTimeLabel(int code);
static std::string fadeRateLabel(int code);
DecodedRecord withRaw(const DecodedRecord& r) const;
};
+4 -3
View File
@@ -180,15 +180,16 @@ class DaliDT8 {
std::optional<int> getPrimaryYRaw(int a, int n);
std::optional<int> getPrimaryTy(int a, int n);
std::optional<SceneColorReport> getSceneColorReport(int a, int sense);
std::vector<double> getSceneColor(int a, int sense);
std::optional<SceneColorReport> getSceneColorReport(int a, int sense, int gateway = -1);
std::vector<double> getSceneColor(int a, int sense, int gateway = -1);
// Store / config
bool storePrimaryTy(int a, int n, int ty);
bool storePrimaryXY(int a, int n, double x, double y);
bool storeSceneSnapshot(int address, int scene, int brightness,
Dt8SceneStoreColorMode colorMode = Dt8SceneStoreColorMode::disabled,
int colorTemperature = 0, int red = 0, int green = 0, int blue = 0);
int colorTemperature = 0, int red = 0, int green = 0, int blue = 0,
int gateway = -1);
bool storePowerOnLevelSnapshot(int address, int level);
bool storeSystemFailureLevelSnapshot(int address, int level);
std::optional<Dt8LevelColorReport> getPowerOnLevelColorReport(int a);