From dc93d27befce04b79e04f0f897c5381858c9e1b2 Mon Sep 17 00:00:00 2001 From: jmartinez-silabs <67972863+jmartinez-silabs@users.noreply.github.com> Date: Mon, 18 Oct 2021 10:49:32 -0400 Subject: [PATCH] Add and enable missing/optional attributes for the Level control cluster (#10497) * Add missing attributes to the Lvl control cluster, enable lvl control optional attributes to examples already using level control avoid redefinition of ZCL_MAX_LEVEL_ATTRIBUTE_ID and ZCL_MIN_LEVEL_ATTRIBUTE_ID * Regen all * Add Yaml tests for TC_LVL 2.1 and 3.1 and regen * regen after rebase to fix conflicts * Fix test, reset level at 0 at the end of the test, and add more wait time for the transition * Speed up the dispatch timer * set dispatch timer to strict to try to fix darwin ci * rebase, fix zap repo commit hash conflict Missing regen after rebase --- .../all-clusters-common/all-clusters-app.zap | 152 +- .../bridge-app/bridge-common/bridge-app.zap | 197 +- .../chip-tool/templates/tests-commands.zapt | 2 +- .../lighting-common/lighting-app.zap | 152 +- .../thermostat-common/thermostat.zap | 197 +- examples/tv-app/tv-common/tv-app.zap | 197 +- .../tv-casting-common/tv-casting-app.zap | 212 +- .../suites/certification/Test_TC_LVL_2_1.yaml | 134 + .../suites/certification/Test_TC_LVL_3_1.yaml | 134 + .../zcl/data-model/silabs/general.xml | 7 +- .../data_model/controller-clusters.zap | 197 +- .../java/zap-generated/CHIPClusters-JNI.cpp | 510 ++ .../chip/devicecontroller/ChipClusters.java | 140 + .../python/chip/clusters/CHIPClusters.cpp | 199 + .../python/chip/clusters/CHIPClusters.py | 212 + .../CHIP/templates/clusters-tests.zapt | 2 +- .../CHIP/zap-generated/CHIPClustersObjc.h | 33 + .../CHIP/zap-generated/CHIPClustersObjc.mm | 140 + .../CHIP/zap-generated/CHIPTestClustersObjc.h | 6 + .../zap-generated/CHIPTestClustersObjc.mm | 42 + .../Framework/CHIPTests/CHIPClustersTests.m | 5490 ++++++++++------- src/system/SystemLayerImplSelect.cpp | 4 +- .../zap-generated/endpoint_config.h | 97 +- .../app-common/zap-generated/attribute-id.h | 5 + .../zap-generated/attributes/Accessors.cpp | 71 + .../zap-generated/attributes/Accessors.h | 25 + .../zap-generated/cluster-objects.h | 55 + .../app-common/zap-generated/ids/Attributes.h | 20 + .../zap-generated/endpoint_config.h | 30 +- .../zap-generated/cluster/Commands.h | 728 ++- .../chip-tool/zap-generated/test/Commands.h | 771 +++ .../zap-generated/CHIPClusters.cpp | 275 + .../zap-generated/CHIPClusters.h | 27 + .../zap-generated/tests/CHIPClustersTest.cpp | 103 + .../zap-generated/tests/CHIPClustersTest.h | 12 + .../zap-generated/endpoint_config.h | 33 +- .../zap-generated/endpoint_config.h | 90 +- .../tv-app/zap-generated/endpoint_config.h | 44 +- .../zap-generated/endpoint_config.h | 88 +- 39 files changed, 8360 insertions(+), 2473 deletions(-) create mode 100644 src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 000a5bbcd42b47..f788cd00658130 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 55, + "featureLevel": 62, "creator": "zap", "keyValuePairs": [ { @@ -7408,6 +7408,81 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "min level", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "max level", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFF", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "current frequency", + "code": 4, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "min frequency", + "code": 5, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "max frequency", + "code": 6, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "options", "code": 15, @@ -7423,6 +7498,81 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "on off transition time", + "code": 16, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "on level", + "code": 17, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFE", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "on transition time", + "code": 18, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "off transition time", + "code": 19, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "default move rate", + "code": 20, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "start up current level", "code": 16384, diff --git a/examples/bridge-app/bridge-common/bridge-app.zap b/examples/bridge-app/bridge-common/bridge-app.zap index 698081cc60a09f..671d2b692abd56 100644 --- a/examples/bridge-app/bridge-common/bridge-app.zap +++ b/examples/bridge-app/bridge-common/bridge-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 55, + "featureLevel": 62, "creator": "zap", "keyValuePairs": [ { @@ -3363,6 +3363,201 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "remaining time", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "min level", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "max level", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFF", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "current frequency", + "code": 4, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "min frequency", + "code": 5, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "max frequency", + "code": 6, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "options", + "code": 15, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "on off transition time", + "code": 16, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "on level", + "code": 17, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFE", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "on transition time", + "code": 18, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "off transition time", + "code": 19, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "default move rate", + "code": 20, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "start up current level", + "code": 16384, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, diff --git a/examples/chip-tool/templates/tests-commands.zapt b/examples/chip-tool/templates/tests-commands.zapt index e2633f587208c5..d6641b0a5a51b6 100644 --- a/examples/chip-tool/templates/tests-commands.zapt +++ b/examples/chip-tool/templates/tests-commands.zapt @@ -4,4 +4,4 @@ #include -{{>test_cluster tests="TV_TargetNavigatorCluster, TV_AudioOutputCluster, TV_ApplicationLauncherCluster, TV_KeypadInputCluster, TV_AccountLoginCluster, TV_WakeOnLanCluster, TV_ApplicationBasicCluster, TV_MediaPlaybackCluster, TV_TvChannelCluster, TV_LowPowerCluster, TV_MediaInputCluster, TestCluster, TestConstraints, TestDelayCommands, TestDescriptorCluster, TestSubscribe_OnOff, Test_TC_OO_1_1, Test_TC_OO_2_1, Test_TC_OO_2_2, Test_TC_DM_1_1, Test_TC_DM_3_1, Test_TC_WNCV_1_1, Test_TC_WNCV_2_1, Test_TC_WNCV_3_1, Test_TC_WNCV_3_2, Test_TC_WNCV_3_3, Test_TC_BI_1_1, Test_TC_FLW_1_1, Test_TC_TM_1_1, Test_TC_OCC_1_1, TestOperationalCredentialsCluster, Test_TC_LVL_1_1, Test_TC_CC_1_1, Test_TC_RH_1_1, Test_TC_MC_1_1, Test_TC_TSTAT_1_1, Test_TC_PCC_1_1, Test_TC_TSUIC_1_1, Test_TC_DIAGTH_1_1, Test_TC_TM_2_1, Test_TC_TSUIC_2_1, Test_TC_PCC_2_1, Test_TC_CC_3_1, Test_TC_CC_3_2, Test_TC_CC_3_3, Test_TC_CC_4_1, Test_TC_CC_4_2, Test_TC_CC_4_3, Test_TC_CC_4_4, Test_TC_CC_5_1, Test_TC_CC_5_2, Test_TC_CC_5_3, Test_TC_CC_6_1, Test_TC_CC_6_2, Test_TC_CC_6_3, Test_TC_CC_7_1, Test_TC_CC_7_2, Test_TC_CC_7_3, Test_TC_CC_7_4, Test_TC_CC_8_1"}} +{{>test_cluster tests="TV_TargetNavigatorCluster, TV_AudioOutputCluster, TV_ApplicationLauncherCluster, TV_KeypadInputCluster, TV_AccountLoginCluster, TV_WakeOnLanCluster, TV_ApplicationBasicCluster, TV_MediaPlaybackCluster, TV_TvChannelCluster, TV_LowPowerCluster, TV_MediaInputCluster, TestCluster, TestConstraints, TestDelayCommands, TestDescriptorCluster, TestSubscribe_OnOff, Test_TC_OO_1_1, Test_TC_OO_2_1, Test_TC_OO_2_2, Test_TC_DM_1_1, Test_TC_DM_3_1, Test_TC_WNCV_1_1, Test_TC_WNCV_2_1, Test_TC_WNCV_3_1, Test_TC_WNCV_3_2, Test_TC_WNCV_3_3, Test_TC_BI_1_1, Test_TC_FLW_1_1, Test_TC_TM_1_1, Test_TC_OCC_1_1, TestOperationalCredentialsCluster, Test_TC_LVL_1_1, Test_TC_LVL_2_1, Test_TC_LVL_3_1, Test_TC_CC_1_1, Test_TC_RH_1_1, Test_TC_MC_1_1, Test_TC_TSTAT_1_1, Test_TC_PCC_1_1, Test_TC_TSUIC_1_1, Test_TC_DIAGTH_1_1, Test_TC_TM_2_1, Test_TC_TSUIC_2_1, Test_TC_PCC_2_1, Test_TC_CC_3_1, Test_TC_CC_3_2, Test_TC_CC_3_3, Test_TC_CC_4_1, Test_TC_CC_4_2, Test_TC_CC_4_3, Test_TC_CC_4_4, Test_TC_CC_5_1, Test_TC_CC_5_2, Test_TC_CC_5_3, Test_TC_CC_6_1, Test_TC_CC_6_2, Test_TC_CC_6_3, Test_TC_CC_7_1, Test_TC_CC_7_2, Test_TC_CC_7_3, Test_TC_CC_7_4, Test_TC_CC_8_1"}} diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index 0b678fab055a49..a26a57b277fd07 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 55, + "featureLevel": 62, "creator": "zap", "keyValuePairs": [ { @@ -4424,6 +4424,81 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "min level", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "max level", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFF", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "current frequency", + "code": 4, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "min frequency", + "code": 5, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "max frequency", + "code": 6, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "options", "code": 15, @@ -4439,6 +4514,81 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "on off transition time", + "code": 16, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "on level", + "code": 17, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFE", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "on transition time", + "code": 18, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "off transition time", + "code": 19, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "default move rate", + "code": 20, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "start up current level", "code": 16384, diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index 81e5507f07b64f..8449960080cea7 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -1,5 +1,5 @@ { - "featureLevel": 55, + "featureLevel": 62, "creator": "zap", "keyValuePairs": [ { @@ -7059,6 +7059,201 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "remaining time", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "min level", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "max level", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFF", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "current frequency", + "code": 4, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "min frequency", + "code": 5, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "max frequency", + "code": 6, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "options", + "code": 15, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "on off transition time", + "code": 16, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "on level", + "code": 17, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFE", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "on transition time", + "code": 18, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "off transition time", + "code": 19, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "default move rate", + "code": 20, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "start up current level", + "code": 16384, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index dbb4d8ff36da2d..d90755eb936c33 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 55, + "featureLevel": 62, "creator": "zap", "keyValuePairs": [ { @@ -7755,6 +7755,201 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "remaining time", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "min level", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "max level", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFF", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "current frequency", + "code": 4, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "min frequency", + "code": 5, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "max frequency", + "code": 6, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "options", + "code": 15, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "on off transition time", + "code": 16, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "on level", + "code": 17, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFE", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "on transition time", + "code": 18, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "off transition time", + "code": 19, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "default move rate", + "code": 20, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "start up current level", + "code": 16384, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap index b28a12a465daf8..fed2eb7fcbb320 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 55, + "featureLevel": 62, "creator": "zap", "keyValuePairs": [ { @@ -7044,6 +7044,216 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "remaining time", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "min level", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "max level", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFF", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "current frequency", + "code": 4, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "min frequency", + "code": 5, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "max frequency", + "code": 6, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "options", + "code": 15, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "on off transition time", + "code": 16, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "on level", + "code": 17, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFE", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "on transition time", + "code": 18, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "off transition time", + "code": 19, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "default move rate", + "code": 20, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "start up current level", + "code": 16384, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, diff --git a/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml new file mode 100644 index 00000000000000..9ec033367b58ae --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml @@ -0,0 +1,134 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: Level Control [TC-LVL-2.1] MoveToLevel Verification with server as DUT + +config: + cluster: "Level Control" + endpoint: 1 + +tests: + - label: "reads current Level attribute from DUT" + command: "readAttribute" + attribute: "current Level" + response: + value: 0 + + - label: "sends a Move to level command" + command: "MoveToLevel" + arguments: + values: + - name: "level" + value: 64 + - name: "transitionTime" + value: 0 + - name: "optionMask" + value: 1 + - name: "optionOverride" + value: 1 + + - label: "Wait 10ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10 + + - label: "reads current Level attribute from DUT" + command: "readAttribute" + attribute: "current Level" + response: + value: 64 + + - label: "sends a Move to level command" + command: "MoveToLevel" + arguments: + values: + - name: "level" + value: 128 + - name: "transitionTime" + value: 1 + - name: "optionMask" + value: 1 + - name: "optionOverride" + value: 1 + + - label: "Wait 100ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 100 + + - label: "reads current Level attribute from DUT" + command: "readAttribute" + attribute: "current Level" + response: + value: 128 + + - label: "reads On Off Transition Time attribute from DUT" + command: "readAttribute" + attribute: "On Off Transition Time" + response: + value: 0 + + - label: "sends a Move to level command" + command: "MoveToLevel" + arguments: + values: + - name: "level" + value: 254 + - name: "transitionTime" + value: 65535 + - name: "optionMask" + value: 1 + - name: "optionOverride" + value: 1 + + - label: "Wait 1ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 1 + + - label: "reads current Level attribute from DUT" + command: "readAttribute" + attribute: "current Level" + response: + value: 254 + + - label: "Reset level to 0" + command: "MoveToLevel" + arguments: + values: + - name: "level" + value: 0 + - name: "transitionTime" + value: 0 + - name: "optionMask" + value: 1 + - name: "optionOverride" + value: 1 + + - label: "Wait 10ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10 diff --git a/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml new file mode 100644 index 00000000000000..c0f3ae95c095f8 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml @@ -0,0 +1,134 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: Level Control [TC-LVL-3.1] Move Verification (DUT as Server) + +config: + cluster: "Level Control" + endpoint: 1 + +tests: + - label: "reads current level attribute from DUT" + command: "readAttribute" + attribute: "current level" + response: + value: 0 + + - label: "reads max level attribute from DUT" + command: "readAttribute" + attribute: "max level" + response: + value: 255 + + - label: "sends a Move up command" + command: "Move" + arguments: + values: + - name: "moveMode" + value: 0 + - name: "rate" + value: 200 + - name: "optionMask" + value: 1 + - name: "optionOverride" + value: 1 + + - label: "Wait 2500ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 2500 + + - label: "reads current level attribute from DUT" + command: "readAttribute" + attribute: "current level" + response: + value: 255 + + - label: "reads min level attribute from DUT" + command: "readAttribute" + attribute: "min level" + response: + value: 0 + + - label: "sends a Move down command" + command: "Move" + arguments: + values: + - name: "moveMode" + value: 1 + - name: "rate" + value: 250 + - name: "optionMask" + value: 1 + - name: "optionOverride" + value: 1 + + - label: "Wait 2500ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 2500 + + - label: "reads current level attribute from DUT" + command: "readAttribute" + attribute: "current level" + response: + value: 0 + + - label: "Write default move rate attribute from DUT" + command: "writeAttribute" + attribute: "default move rate" + arguments: + value: 20 + response: + error: 0 + + - label: "reads default move rate attribute from DUT" + command: "readAttribute" + attribute: "default move rate" + response: + value: 20 + + - label: "sends a Move up command at default move rate" + command: "Move" + arguments: + values: + - name: "moveMode" + value: 1 + - name: "rate" + value: 255 + - name: "optionMask" + value: 1 + - name: "optionOverride" + value: 1 + + - label: "Wait 10ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10 + + - label: "reads current level attribute from DUT" + command: "readAttribute" + attribute: "current level" + response: + constraints: + notValue: 255 diff --git a/src/app/zap-templates/zcl/data-model/silabs/general.xml b/src/app/zap-templates/zcl/data-model/silabs/general.xml index bd32f4fe855c1d..db1ab863be7af1 100644 --- a/src/app/zap-templates/zcl/data-model/silabs/general.xml +++ b/src/app/zap-templates/zcl/data-model/silabs/general.xml @@ -440,7 +440,12 @@ limitations under the License. current level remaining time - + min level + max level + current frequency + min frequency + max frequency + on off transition time on level on transition time diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 123c57b64a5525..b7b671797b3e35 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -1,5 +1,5 @@ { - "featureLevel": 55, + "featureLevel": 62, "creator": "zap", "keyValuePairs": [ { @@ -922,6 +922,201 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "remaining time", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "min level", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "max level", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFF", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "current frequency", + "code": 4, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "min frequency", + "code": 5, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "max frequency", + "code": 6, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "options", + "code": 15, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "on off transition time", + "code": 16, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "on level", + "code": 17, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFE", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "on transition time", + "code": 18, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "off transition time", + "code": 19, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "default move rate", + "code": 20, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "start up current level", + "code": 16384, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, diff --git a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp index c9cf2e01b79fdd..1f67d5e1e1b752 100644 --- a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp @@ -17599,6 +17599,516 @@ JNI_METHOD(void, LevelControlCluster, reportCurrentLevelAttribute)(JNIEnv * env, onReport.release(); } +JNI_METHOD(void, LevelControlCluster, readRemainingTimeAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeRemainingTime(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn(err == CHIP_NO_ERROR, ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, LevelControlCluster, readMinLevelAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeMinLevel(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn(err == CHIP_NO_ERROR, ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, LevelControlCluster, readMaxLevelAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeMaxLevel(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn(err == CHIP_NO_ERROR, ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, LevelControlCluster, readCurrentFrequencyAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeCurrentFrequency(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn(err == CHIP_NO_ERROR, ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, LevelControlCluster, readMinFrequencyAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeMinFrequency(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn(err == CHIP_NO_ERROR, ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, LevelControlCluster, readMaxFrequencyAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeMaxFrequency(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn(err == CHIP_NO_ERROR, ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, LevelControlCluster, readOptionsAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeOptions(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn(err == CHIP_NO_ERROR, ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, LevelControlCluster, writeOptionsAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint value) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->WriteAttributeOptions(onSuccess->Cancel(), onFailure->Cancel(), static_cast(value)); + VerifyOrReturn(err == CHIP_NO_ERROR, ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, LevelControlCluster, readOnOffTransitionTimeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeOnOffTransitionTime(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn(err == CHIP_NO_ERROR, ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, LevelControlCluster, writeOnOffTransitionTimeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint value) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->WriteAttributeOnOffTransitionTime(onSuccess->Cancel(), onFailure->Cancel(), static_cast(value)); + VerifyOrReturn(err == CHIP_NO_ERROR, ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, LevelControlCluster, readOnLevelAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeOnLevel(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn(err == CHIP_NO_ERROR, ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, LevelControlCluster, writeOnLevelAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint value) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->WriteAttributeOnLevel(onSuccess->Cancel(), onFailure->Cancel(), static_cast(value)); + VerifyOrReturn(err == CHIP_NO_ERROR, ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, LevelControlCluster, readOnTransitionTimeAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeOnTransitionTime(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn(err == CHIP_NO_ERROR, ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, LevelControlCluster, writeOnTransitionTimeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint value) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->WriteAttributeOnTransitionTime(onSuccess->Cancel(), onFailure->Cancel(), static_cast(value)); + VerifyOrReturn(err == CHIP_NO_ERROR, ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, LevelControlCluster, readOffTransitionTimeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeOffTransitionTime(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn(err == CHIP_NO_ERROR, ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, LevelControlCluster, writeOffTransitionTimeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint value) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->WriteAttributeOffTransitionTime(onSuccess->Cancel(), onFailure->Cancel(), static_cast(value)); + VerifyOrReturn(err == CHIP_NO_ERROR, ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, LevelControlCluster, readDefaultMoveRateAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeDefaultMoveRate(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn(err == CHIP_NO_ERROR, ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, LevelControlCluster, writeDefaultMoveRateAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint value) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->WriteAttributeDefaultMoveRate(onSuccess->Cancel(), onFailure->Cancel(), static_cast(value)); + VerifyOrReturn(err == CHIP_NO_ERROR, ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, LevelControlCluster, readStartUpCurrentLevelAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeStartUpCurrentLevel(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn(err == CHIP_NO_ERROR, ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, LevelControlCluster, writeStartUpCurrentLevelAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint value) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->WriteAttributeStartUpCurrentLevel(onSuccess->Cancel(), onFailure->Cancel(), static_cast(value)); + VerifyOrReturn(err == CHIP_NO_ERROR, ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, LevelControlCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index bfefe434c77518..997e1d1f31f31a 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -3370,6 +3370,86 @@ public void reportCurrentLevelAttribute(IntegerAttributeCallback callback) { reportCurrentLevelAttribute(chipClusterPtr, callback); } + public void readRemainingTimeAttribute(IntegerAttributeCallback callback) { + readRemainingTimeAttribute(chipClusterPtr, callback); + } + + public void readMinLevelAttribute(IntegerAttributeCallback callback) { + readMinLevelAttribute(chipClusterPtr, callback); + } + + public void readMaxLevelAttribute(IntegerAttributeCallback callback) { + readMaxLevelAttribute(chipClusterPtr, callback); + } + + public void readCurrentFrequencyAttribute(IntegerAttributeCallback callback) { + readCurrentFrequencyAttribute(chipClusterPtr, callback); + } + + public void readMinFrequencyAttribute(IntegerAttributeCallback callback) { + readMinFrequencyAttribute(chipClusterPtr, callback); + } + + public void readMaxFrequencyAttribute(IntegerAttributeCallback callback) { + readMaxFrequencyAttribute(chipClusterPtr, callback); + } + + public void readOptionsAttribute(IntegerAttributeCallback callback) { + readOptionsAttribute(chipClusterPtr, callback); + } + + public void writeOptionsAttribute(DefaultClusterCallback callback, int value) { + writeOptionsAttribute(chipClusterPtr, callback, value); + } + + public void readOnOffTransitionTimeAttribute(IntegerAttributeCallback callback) { + readOnOffTransitionTimeAttribute(chipClusterPtr, callback); + } + + public void writeOnOffTransitionTimeAttribute(DefaultClusterCallback callback, int value) { + writeOnOffTransitionTimeAttribute(chipClusterPtr, callback, value); + } + + public void readOnLevelAttribute(IntegerAttributeCallback callback) { + readOnLevelAttribute(chipClusterPtr, callback); + } + + public void writeOnLevelAttribute(DefaultClusterCallback callback, int value) { + writeOnLevelAttribute(chipClusterPtr, callback, value); + } + + public void readOnTransitionTimeAttribute(IntegerAttributeCallback callback) { + readOnTransitionTimeAttribute(chipClusterPtr, callback); + } + + public void writeOnTransitionTimeAttribute(DefaultClusterCallback callback, int value) { + writeOnTransitionTimeAttribute(chipClusterPtr, callback, value); + } + + public void readOffTransitionTimeAttribute(IntegerAttributeCallback callback) { + readOffTransitionTimeAttribute(chipClusterPtr, callback); + } + + public void writeOffTransitionTimeAttribute(DefaultClusterCallback callback, int value) { + writeOffTransitionTimeAttribute(chipClusterPtr, callback, value); + } + + public void readDefaultMoveRateAttribute(IntegerAttributeCallback callback) { + readDefaultMoveRateAttribute(chipClusterPtr, callback); + } + + public void writeDefaultMoveRateAttribute(DefaultClusterCallback callback, int value) { + writeDefaultMoveRateAttribute(chipClusterPtr, callback, value); + } + + public void readStartUpCurrentLevelAttribute(IntegerAttributeCallback callback) { + readStartUpCurrentLevelAttribute(chipClusterPtr, callback); + } + + public void writeStartUpCurrentLevelAttribute(DefaultClusterCallback callback, int value) { + writeStartUpCurrentLevelAttribute(chipClusterPtr, callback, value); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -3383,6 +3463,66 @@ private native void subscribeCurrentLevelAttribute( private native void reportCurrentLevelAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void readRemainingTimeAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void readMinLevelAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void readMaxLevelAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void readCurrentFrequencyAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void readMinFrequencyAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void readMaxFrequencyAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void readOptionsAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void writeOptionsAttribute( + long chipClusterPtr, DefaultClusterCallback callback, int value); + + private native void readOnOffTransitionTimeAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void writeOnOffTransitionTimeAttribute( + long chipClusterPtr, DefaultClusterCallback callback, int value); + + private native void readOnLevelAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void writeOnLevelAttribute( + long chipClusterPtr, DefaultClusterCallback callback, int value); + + private native void readOnTransitionTimeAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void writeOnTransitionTimeAttribute( + long chipClusterPtr, DefaultClusterCallback callback, int value); + + private native void readOffTransitionTimeAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void writeOffTransitionTimeAttribute( + long chipClusterPtr, DefaultClusterCallback callback, int value); + + private native void readDefaultMoveRateAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void writeDefaultMoveRateAttribute( + long chipClusterPtr, DefaultClusterCallback callback, int value); + + private native void readStartUpCurrentLevelAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void writeStartUpCurrentLevelAttribute( + long chipClusterPtr, DefaultClusterCallback callback, int value); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); } diff --git a/src/controller/python/chip/clusters/CHIPClusters.cpp b/src/controller/python/chip/clusters/CHIPClusters.cpp index b67bae71f57b76..612e0693b6edef 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.cpp +++ b/src/controller/python/chip/clusters/CHIPClusters.cpp @@ -3331,6 +3331,205 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_CurrentLev .AsInteger(); } +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_RemainingTime(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeRemainingTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_MinLevel(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMinLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_MaxLevel(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMaxLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_CurrentFrequency(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeCurrentFrequency(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_MinFrequency(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMinFrequency(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_MaxFrequency(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeMaxFrequency(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_Options(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeOptions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_WriteAttribute_LevelControl_Options(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, chip::GroupId, + uint8_t value) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.WriteAttributeOptions(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); +} +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_OnOffTransitionTime(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeOnOffTransitionTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_WriteAttribute_LevelControl_OnOffTransitionTime(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, chip::GroupId, + uint16_t value) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.WriteAttributeOnOffTransitionTime(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) + .AsInteger(); +} +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_OnLevel(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeOnLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_WriteAttribute_LevelControl_OnLevel(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, chip::GroupId, + uint8_t value) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.WriteAttributeOnLevel(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); +} +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_OnTransitionTime(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeOnTransitionTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_WriteAttribute_LevelControl_OnTransitionTime(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, chip::GroupId, + uint16_t value) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.WriteAttributeOnTransitionTime(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) + .AsInteger(); +} +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_OffTransitionTime(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeOffTransitionTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_WriteAttribute_LevelControl_OffTransitionTime(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, chip::GroupId, + uint16_t value) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.WriteAttributeOffTransitionTime(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) + .AsInteger(); +} +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_DefaultMoveRate(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeDefaultMoveRate(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_WriteAttribute_LevelControl_DefaultMoveRate(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, chip::GroupId, + uint8_t value) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.WriteAttributeDefaultMoveRate(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) + .AsInteger(); +} +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_StartUpCurrentLevel(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeStartUpCurrentLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_WriteAttribute_LevelControl_StartUpCurrentLevel(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, chip::GroupId, + uint8_t value) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.WriteAttributeStartUpCurrentLevel(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) + .AsInteger(); +} chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 70b10822559c22..7a9a16932aea0d 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -1827,6 +1827,78 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x00000001: { + "attributeName": "RemainingTime", + "attributeId": 0x00000001, + "type": "int", + }, + 0x00000002: { + "attributeName": "MinLevel", + "attributeId": 0x00000002, + "type": "int", + }, + 0x00000003: { + "attributeName": "MaxLevel", + "attributeId": 0x00000003, + "type": "int", + }, + 0x00000004: { + "attributeName": "CurrentFrequency", + "attributeId": 0x00000004, + "type": "int", + }, + 0x00000005: { + "attributeName": "MinFrequency", + "attributeId": 0x00000005, + "type": "int", + }, + 0x00000006: { + "attributeName": "MaxFrequency", + "attributeId": 0x00000006, + "type": "int", + }, + 0x0000000F: { + "attributeName": "Options", + "attributeId": 0x0000000F, + "type": "int", + "writable": True, + }, + 0x00000010: { + "attributeName": "OnOffTransitionTime", + "attributeId": 0x00000010, + "type": "int", + "writable": True, + }, + 0x00000011: { + "attributeName": "OnLevel", + "attributeId": 0x00000011, + "type": "int", + "writable": True, + }, + 0x00000012: { + "attributeName": "OnTransitionTime", + "attributeId": 0x00000012, + "type": "int", + "writable": True, + }, + 0x00000013: { + "attributeName": "OffTransitionTime", + "attributeId": 0x00000013, + "type": "int", + "writable": True, + }, + 0x00000014: { + "attributeName": "DefaultMoveRate", + "attributeId": 0x00000014, + "type": "int", + "writable": True, + }, + 0x00004000: { + "attributeName": "StartUpCurrentLevel", + "attributeId": 0x00004000, + "type": "int", + "writable": True, + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -5446,6 +5518,66 @@ def ClusterLevelControl_ReadAttributeCurrentLevel(self, device: ctypes.c_void_p, def ClusterLevelControl_SubscribeAttributeCurrentLevel(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): return self._chipLib.chip_ime_SubscribeAttribute_LevelControl_CurrentLevel(device, ZCLendpoint, minInterval, maxInterval) + def ClusterLevelControl_ReadAttributeRemainingTime(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_LevelControl_RemainingTime(device, ZCLendpoint, ZCLgroupid) + + def ClusterLevelControl_ReadAttributeMinLevel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_LevelControl_MinLevel(device, ZCLendpoint, ZCLgroupid) + + def ClusterLevelControl_ReadAttributeMaxLevel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_LevelControl_MaxLevel(device, ZCLendpoint, ZCLgroupid) + + def ClusterLevelControl_ReadAttributeCurrentFrequency(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_LevelControl_CurrentFrequency(device, ZCLendpoint, ZCLgroupid) + + def ClusterLevelControl_ReadAttributeMinFrequency(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_LevelControl_MinFrequency(device, ZCLendpoint, ZCLgroupid) + + def ClusterLevelControl_ReadAttributeMaxFrequency(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_LevelControl_MaxFrequency(device, ZCLendpoint, ZCLgroupid) + + def ClusterLevelControl_ReadAttributeOptions(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_LevelControl_Options(device, ZCLendpoint, ZCLgroupid) + + def ClusterLevelControl_WriteAttributeOptions(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int): + return self._chipLib.chip_ime_WriteAttribute_LevelControl_Options(device, ZCLendpoint, ZCLgroupid, value) + + def ClusterLevelControl_ReadAttributeOnOffTransitionTime(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_LevelControl_OnOffTransitionTime(device, ZCLendpoint, ZCLgroupid) + + def ClusterLevelControl_WriteAttributeOnOffTransitionTime(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int): + return self._chipLib.chip_ime_WriteAttribute_LevelControl_OnOffTransitionTime(device, ZCLendpoint, ZCLgroupid, value) + + def ClusterLevelControl_ReadAttributeOnLevel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_LevelControl_OnLevel(device, ZCLendpoint, ZCLgroupid) + + def ClusterLevelControl_WriteAttributeOnLevel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int): + return self._chipLib.chip_ime_WriteAttribute_LevelControl_OnLevel(device, ZCLendpoint, ZCLgroupid, value) + + def ClusterLevelControl_ReadAttributeOnTransitionTime(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_LevelControl_OnTransitionTime(device, ZCLendpoint, ZCLgroupid) + + def ClusterLevelControl_WriteAttributeOnTransitionTime(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int): + return self._chipLib.chip_ime_WriteAttribute_LevelControl_OnTransitionTime(device, ZCLendpoint, ZCLgroupid, value) + + def ClusterLevelControl_ReadAttributeOffTransitionTime(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_LevelControl_OffTransitionTime(device, ZCLendpoint, ZCLgroupid) + + def ClusterLevelControl_WriteAttributeOffTransitionTime(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int): + return self._chipLib.chip_ime_WriteAttribute_LevelControl_OffTransitionTime(device, ZCLendpoint, ZCLgroupid, value) + + def ClusterLevelControl_ReadAttributeDefaultMoveRate(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_LevelControl_DefaultMoveRate(device, ZCLendpoint, ZCLgroupid) + + def ClusterLevelControl_WriteAttributeDefaultMoveRate(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int): + return self._chipLib.chip_ime_WriteAttribute_LevelControl_DefaultMoveRate(device, ZCLendpoint, ZCLgroupid, value) + + def ClusterLevelControl_ReadAttributeStartUpCurrentLevel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_LevelControl_StartUpCurrentLevel(device, ZCLendpoint, ZCLgroupid) + + def ClusterLevelControl_WriteAttributeStartUpCurrentLevel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int): + return self._chipLib.chip_ime_WriteAttribute_LevelControl_StartUpCurrentLevel(device, ZCLendpoint, ZCLgroupid, value) + def ClusterLevelControl_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): return self._chipLib.chip_ime_ReadAttribute_LevelControl_ClusterRevision(device, ZCLendpoint, ZCLgroupid) @@ -7494,6 +7626,86 @@ def InitLib(self, chipLib): self._chipLib.chip_ime_SubscribeAttribute_LevelControl_CurrentLevel.argtypes = [ ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] self._chipLib.chip_ime_SubscribeAttribute_LevelControl_CurrentLevel.restype = ctypes.c_uint32 + # Cluster LevelControl ReadAttribute RemainingTime + self._chipLib.chip_ime_ReadAttribute_LevelControl_RemainingTime.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_LevelControl_RemainingTime.restype = ctypes.c_uint32 + # Cluster LevelControl ReadAttribute MinLevel + self._chipLib.chip_ime_ReadAttribute_LevelControl_MinLevel.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_LevelControl_MinLevel.restype = ctypes.c_uint32 + # Cluster LevelControl ReadAttribute MaxLevel + self._chipLib.chip_ime_ReadAttribute_LevelControl_MaxLevel.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_LevelControl_MaxLevel.restype = ctypes.c_uint32 + # Cluster LevelControl ReadAttribute CurrentFrequency + self._chipLib.chip_ime_ReadAttribute_LevelControl_CurrentFrequency.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_LevelControl_CurrentFrequency.restype = ctypes.c_uint32 + # Cluster LevelControl ReadAttribute MinFrequency + self._chipLib.chip_ime_ReadAttribute_LevelControl_MinFrequency.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_LevelControl_MinFrequency.restype = ctypes.c_uint32 + # Cluster LevelControl ReadAttribute MaxFrequency + self._chipLib.chip_ime_ReadAttribute_LevelControl_MaxFrequency.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_LevelControl_MaxFrequency.restype = ctypes.c_uint32 + # Cluster LevelControl ReadAttribute Options + self._chipLib.chip_ime_ReadAttribute_LevelControl_Options.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_LevelControl_Options.restype = ctypes.c_uint32 + # Cluster LevelControl WriteAttribute Options + self._chipLib.chip_ime_WriteAttribute_LevelControl_Options.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8] + self._chipLib.chip_ime_WriteAttribute_LevelControl_Options.restype = ctypes.c_uint32 + # Cluster LevelControl ReadAttribute OnOffTransitionTime + self._chipLib.chip_ime_ReadAttribute_LevelControl_OnOffTransitionTime.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_LevelControl_OnOffTransitionTime.restype = ctypes.c_uint32 + # Cluster LevelControl WriteAttribute OnOffTransitionTime + self._chipLib.chip_ime_WriteAttribute_LevelControl_OnOffTransitionTime.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] + self._chipLib.chip_ime_WriteAttribute_LevelControl_OnOffTransitionTime.restype = ctypes.c_uint32 + # Cluster LevelControl ReadAttribute OnLevel + self._chipLib.chip_ime_ReadAttribute_LevelControl_OnLevel.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_LevelControl_OnLevel.restype = ctypes.c_uint32 + # Cluster LevelControl WriteAttribute OnLevel + self._chipLib.chip_ime_WriteAttribute_LevelControl_OnLevel.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8] + self._chipLib.chip_ime_WriteAttribute_LevelControl_OnLevel.restype = ctypes.c_uint32 + # Cluster LevelControl ReadAttribute OnTransitionTime + self._chipLib.chip_ime_ReadAttribute_LevelControl_OnTransitionTime.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_LevelControl_OnTransitionTime.restype = ctypes.c_uint32 + # Cluster LevelControl WriteAttribute OnTransitionTime + self._chipLib.chip_ime_WriteAttribute_LevelControl_OnTransitionTime.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] + self._chipLib.chip_ime_WriteAttribute_LevelControl_OnTransitionTime.restype = ctypes.c_uint32 + # Cluster LevelControl ReadAttribute OffTransitionTime + self._chipLib.chip_ime_ReadAttribute_LevelControl_OffTransitionTime.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_LevelControl_OffTransitionTime.restype = ctypes.c_uint32 + # Cluster LevelControl WriteAttribute OffTransitionTime + self._chipLib.chip_ime_WriteAttribute_LevelControl_OffTransitionTime.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] + self._chipLib.chip_ime_WriteAttribute_LevelControl_OffTransitionTime.restype = ctypes.c_uint32 + # Cluster LevelControl ReadAttribute DefaultMoveRate + self._chipLib.chip_ime_ReadAttribute_LevelControl_DefaultMoveRate.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_LevelControl_DefaultMoveRate.restype = ctypes.c_uint32 + # Cluster LevelControl WriteAttribute DefaultMoveRate + self._chipLib.chip_ime_WriteAttribute_LevelControl_DefaultMoveRate.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8] + self._chipLib.chip_ime_WriteAttribute_LevelControl_DefaultMoveRate.restype = ctypes.c_uint32 + # Cluster LevelControl ReadAttribute StartUpCurrentLevel + self._chipLib.chip_ime_ReadAttribute_LevelControl_StartUpCurrentLevel.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_LevelControl_StartUpCurrentLevel.restype = ctypes.c_uint32 + # Cluster LevelControl WriteAttribute StartUpCurrentLevel + self._chipLib.chip_ime_WriteAttribute_LevelControl_StartUpCurrentLevel.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8] + self._chipLib.chip_ime_WriteAttribute_LevelControl_StartUpCurrentLevel.restype = ctypes.c_uint32 # Cluster LevelControl ReadAttribute ClusterRevision self._chipLib.chip_ime_ReadAttribute_LevelControl_ClusterRevision.argtypes = [ ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] diff --git a/src/darwin/Framework/CHIP/templates/clusters-tests.zapt b/src/darwin/Framework/CHIP/templates/clusters-tests.zapt index 71f888d901b8c7..9c776cf2e8565f 100644 --- a/src/darwin/Framework/CHIP/templates/clusters-tests.zapt +++ b/src/darwin/Framework/CHIP/templates/clusters-tests.zapt @@ -166,7 +166,7 @@ CHIPDevice * GetConnectedDevice() [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -{{>test_cluster tests="TestCluster, TestConstraints, TestDelayCommands, TestDescriptorCluster, TestSubscribe_OnOff, Test_TC_OO_1_1, Test_TC_OO_2_1, Test_TC_OO_2_2, Test_TC_DM_1_1, Test_TC_DM_3_1, Test_TC_WNCV_1_1, Test_TC_WNCV_2_1, Test_TC_WNCV_3_1, Test_TC_WNCV_3_2, Test_TC_WNCV_3_3, Test_TC_BI_1_1, Test_TC_FLW_1_1, Test_TC_TM_1_1, Test_TC_OCC_1_1, TestOperationalCredentialsCluster, Test_TC_LVL_1_1, Test_TC_CC_1_1, Test_TC_RH_1_1, Test_TC_MC_1_1, Test_TC_TSTAT_1_1, Test_TC_PCC_1_1, Test_TC_TSUIC_1_1, Test_TC_DIAGTH_1_1, Test_TC_TM_2_1, Test_TC_TSUIC_2_1, Test_TC_PCC_2_1, Test_TC_CC_3_1, Test_TC_CC_3_2, Test_TC_CC_3_3, Test_TC_CC_4_1, Test_TC_CC_4_2, Test_TC_CC_4_3, Test_TC_CC_4_4, Test_TC_CC_5_1, Test_TC_CC_5_2, Test_TC_CC_5_3, Test_TC_CC_6_1, Test_TC_CC_6_2, Test_TC_CC_6_3, Test_TC_CC_7_1, Test_TC_CC_7_2, Test_TC_CC_7_3, Test_TC_CC_7_4, Test_TC_CC_8_1"}} +{{>test_cluster tests="TestCluster, TestConstraints, TestDelayCommands, TestDescriptorCluster, TestSubscribe_OnOff, Test_TC_OO_1_1, Test_TC_OO_2_1, Test_TC_OO_2_2, Test_TC_DM_1_1, Test_TC_DM_3_1, Test_TC_WNCV_1_1, Test_TC_WNCV_2_1, Test_TC_WNCV_3_1, Test_TC_WNCV_3_2, Test_TC_WNCV_3_3, Test_TC_BI_1_1, Test_TC_FLW_1_1, Test_TC_TM_1_1, Test_TC_OCC_1_1, TestOperationalCredentialsCluster, Test_TC_LVL_1_1, Test_TC_LVL_2_1, Test_TC_LVL_3_1, Test_TC_CC_1_1, Test_TC_RH_1_1, Test_TC_MC_1_1, Test_TC_TSTAT_1_1, Test_TC_PCC_1_1, Test_TC_TSUIC_1_1, Test_TC_DIAGTH_1_1, Test_TC_TM_2_1, Test_TC_TSUIC_2_1, Test_TC_PCC_2_1, Test_TC_CC_3_1, Test_TC_CC_3_2, Test_TC_CC_3_3, Test_TC_CC_4_1, Test_TC_CC_4_2, Test_TC_CC_4_3, Test_TC_CC_4_4, Test_TC_CC_5_1, Test_TC_CC_5_2, Test_TC_CC_5_3, Test_TC_CC_6_1, Test_TC_CC_6_2, Test_TC_CC_6_3, Test_TC_CC_7_1, Test_TC_CC_7_2, Test_TC_CC_7_3, Test_TC_CC_7_4, Test_TC_CC_8_1"}} {{#chip_client_clusters}} {{#unless (isStrEqual "Test Cluster" name)}} diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h index 15e87c2f3dcd73..14932a293e30df 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h @@ -895,6 +895,39 @@ NS_ASSUME_NONNULL_BEGIN responseHandler:(ResponseHandler)responseHandler; - (void)reportAttributeCurrentLevelWithResponseHandler:(ResponseHandler)responseHandler; +- (void)readAttributeRemainingTimeWithResponseHandler:(ResponseHandler)responseHandler; + +- (void)readAttributeMinLevelWithResponseHandler:(ResponseHandler)responseHandler; + +- (void)readAttributeMaxLevelWithResponseHandler:(ResponseHandler)responseHandler; + +- (void)readAttributeCurrentFrequencyWithResponseHandler:(ResponseHandler)responseHandler; + +- (void)readAttributeMinFrequencyWithResponseHandler:(ResponseHandler)responseHandler; + +- (void)readAttributeMaxFrequencyWithResponseHandler:(ResponseHandler)responseHandler; + +- (void)readAttributeOptionsWithResponseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeOptionsWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; + +- (void)readAttributeOnOffTransitionTimeWithResponseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeOnOffTransitionTimeWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +- (void)readAttributeOnLevelWithResponseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeOnLevelWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; + +- (void)readAttributeOnTransitionTimeWithResponseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeOnTransitionTimeWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +- (void)readAttributeOffTransitionTimeWithResponseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeOffTransitionTimeWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +- (void)readAttributeDefaultMoveRateWithResponseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeDefaultMoveRateWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; + +- (void)readAttributeStartUpCurrentLevelWithResponseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeStartUpCurrentLevelWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; + - (void)readAttributeClusterRevisionWithResponseHandler:(ResponseHandler)responseHandler; @end diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index f6ee4f7f679e4a..6b4da925e11d36 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -2573,6 +2573,146 @@ new CHIPInt8uAttributeCallbackBridge( true); } +- (void)readAttributeRemainingTimeWithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeRemainingTime(success, failure); + }); +} + +- (void)readAttributeMinLevelWithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeMinLevel(success, failure); + }); +} + +- (void)readAttributeMaxLevelWithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeMaxLevel(success, failure); + }); +} + +- (void)readAttributeCurrentFrequencyWithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeCurrentFrequency(success, failure); + }); +} + +- (void)readAttributeMinFrequencyWithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeMinFrequency(success, failure); + }); +} + +- (void)readAttributeMaxFrequencyWithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeMaxFrequency(success, failure); + }); +} + +- (void)readAttributeOptionsWithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeOptions(success, failure); + }); +} + +- (void)writeAttributeOptionsWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeOptions(success, failure, value); + }); +} + +- (void)readAttributeOnOffTransitionTimeWithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeOnOffTransitionTime(success, failure); + }); +} + +- (void)writeAttributeOnOffTransitionTimeWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeOnOffTransitionTime(success, failure, value); + }); +} + +- (void)readAttributeOnLevelWithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeOnLevel(success, failure); + }); +} + +- (void)writeAttributeOnLevelWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeOnLevel(success, failure, value); + }); +} + +- (void)readAttributeOnTransitionTimeWithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeOnTransitionTime(success, failure); + }); +} + +- (void)writeAttributeOnTransitionTimeWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeOnTransitionTime(success, failure, value); + }); +} + +- (void)readAttributeOffTransitionTimeWithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeOffTransitionTime(success, failure); + }); +} + +- (void)writeAttributeOffTransitionTimeWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeOffTransitionTime(success, failure, value); + }); +} + +- (void)readAttributeDefaultMoveRateWithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeDefaultMoveRate(success, failure); + }); +} + +- (void)writeAttributeDefaultMoveRateWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeDefaultMoveRate(success, failure, value); + }); +} + +- (void)readAttributeStartUpCurrentLevelWithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeStartUpCurrentLevel(success, failure); + }); +} + +- (void)writeAttributeStartUpCurrentLevelWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeStartUpCurrentLevel(success, failure, value); + }); +} + - (void)readAttributeClusterRevisionWithResponseHandler:(ResponseHandler)responseHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h index b43880ae693219..e67f783a6595be 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h @@ -392,6 +392,12 @@ NS_ASSUME_NONNULL_BEGIN @interface CHIPTestLevelControl : CHIPLevelControl - (void)writeAttributeCurrentLevelWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeRemainingTimeWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeMinLevelWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeMaxLevelWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeCurrentFrequencyWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeMinFrequencyWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeMaxFrequencyWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; - (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; @end diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm index c47fcc6a410026..f8aea9252332f2 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm @@ -1337,6 +1337,48 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc }); } +- (void)writeAttributeRemainingTimeWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeRemainingTime(success, failure, value); + }); +} + +- (void)writeAttributeMinLevelWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeMinLevel(success, failure, value); + }); +} + +- (void)writeAttributeMaxLevelWithValue:(uint8_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeMaxLevel(success, failure, value); + }); +} + +- (void)writeAttributeCurrentFrequencyWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeCurrentFrequency(success, failure, value); + }); +} + +- (void)writeAttributeMinFrequencyWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeMinFrequency(success, failure, value); + }); +} + +- (void)writeAttributeMaxFrequencyWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeMaxFrequency(success, failure, value); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler { new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index a5d9d7c0b890f6..2f52fde66b3dc8 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -4921,256 +4921,263 @@ - (void)testSendClusterTest_TC_LVL_1_1_000000_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_1_1_000000_WriteAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000000_ReadAttribute { - XCTestExpectation * expectation = - [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"reads current Level attribute from DUT"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint16_t clusterRevisionArgument = 4U; - [cluster - writeAttributeClusterRevisionWithValue:clusterRevisionArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeCurrentLevelWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"reads current Level attribute from DUT Error: %@", err); - XCTAssertEqual(err.code, 1); - [expectation fulfill]; - }]; + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterTest_TC_RH_1_1_000000_WriteAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000001_MoveToLevel { - XCTestExpectation * expectation = - [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"sends a Move to level command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestRelativeHumidityMeasurement * cluster = [[CHIPTestRelativeHumidityMeasurement alloc] initWithDevice:device - endpoint:1 - queue:queue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint16_t clusterRevisionArgument = 1U; - [cluster - writeAttributeClusterRevisionWithValue:clusterRevisionArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); + uint8_t levelArgument = 64; + uint16_t transitionTimeArgument = 0U; + uint8_t optionMaskArgument = 1; + uint8_t optionOverrideArgument = 1; + [cluster moveToLevel:levelArgument + transitionTime:transitionTimeArgument + optionMask:optionMaskArgument + optionOverride:optionOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"sends a Move to level command Error: %@", err); - XCTAssertEqual(err.code, 1); - [expectation fulfill]; - }]; + XCTAssertEqual(err.code, 0); + + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterTest_TC_MC_1_1_000000_WriteAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000002_WaitForMs { - XCTestExpectation * expectation = - [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait 10ms"]; - CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestRelativeHumidityMeasurement * cluster = [[CHIPTestRelativeHumidityMeasurement alloc] initWithDevice:device - endpoint:1 - queue:queue]; - XCTAssertNotNil(cluster); - - uint16_t clusterRevisionArgument = 1U; - [cluster - writeAttributeClusterRevisionWithValue:clusterRevisionArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - - XCTAssertEqual(err.code, 1); - [expectation fulfill]; - }]; - + WaitForMs(expectation, queue, 10); [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterTest_TC_TSTAT_1_1_000000_WriteAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000003_ReadAttribute { - XCTestExpectation * expectation = - [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"reads current Level attribute from DUT"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint16_t clusterRevisionArgument = 5U; - [cluster - writeAttributeClusterRevisionWithValue:clusterRevisionArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeCurrentLevelWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"reads current Level attribute from DUT Error: %@", err); - XCTAssertEqual(err.code, 1); - [expectation fulfill]; - }]; + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] unsignedCharValue], 64); + + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterTest_TC_PCC_1_1_000000_WriteAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000004_MoveToLevel { - XCTestExpectation * expectation = - [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"sends a Move to level command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:1 - queue:queue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint16_t clusterRevisionArgument = 3U; - [cluster - writeAttributeClusterRevisionWithValue:clusterRevisionArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); + uint8_t levelArgument = 128; + uint16_t transitionTimeArgument = 1U; + uint8_t optionMaskArgument = 1; + uint8_t optionOverrideArgument = 1; + [cluster moveToLevel:levelArgument + transitionTime:transitionTimeArgument + optionMask:optionMaskArgument + optionOverride:optionOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"sends a Move to level command Error: %@", err); - XCTAssertEqual(err.code, 1); - [expectation fulfill]; - }]; + XCTAssertEqual(err.code, 0); + + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterTest_TC_LVL_2_1_000005_WaitForMs +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait 100ms"]; -- (void)testSendClusterTest_TC_TSUIC_1_1_000000_WriteAttribute + dispatch_queue_t queue = dispatch_get_main_queue(); + WaitForMs(expectation, queue, 100); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_LVL_2_1_000006_ReadAttribute { - XCTestExpectation * expectation = - [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"reads current Level attribute from DUT"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint16_t clusterRevisionArgument = 2U; - [cluster - writeAttributeClusterRevisionWithValue:clusterRevisionArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeCurrentLevelWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"reads current Level attribute from DUT Error: %@", err); - XCTAssertEqual(err.code, 1); - [expectation fulfill]; - }]; + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] unsignedCharValue], 128); + + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterTest_TC_DIAGTH_1_1_000000_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000007_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the global attribute: ClusterRevision"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"reads On Off Transition Time attribute from DUT"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:queue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"read the global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeOnOffTransitionTimeWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"reads On Off Transition Time attribute from DUT Error: %@", err); XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 1); + XCTAssertEqual([values[@"value"] unsignedShortValue], 0); [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_DIAGTH_1_1_000001_WriteAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000008_MoveToLevel { - XCTestExpectation * expectation = - [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"sends a Move to level command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:queue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint16_t clusterRevisionArgument = 1U; - [cluster - writeAttributeClusterRevisionWithValue:clusterRevisionArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); + uint8_t levelArgument = 254; + uint16_t transitionTimeArgument = 65535U; + uint8_t optionMaskArgument = 1; + uint8_t optionOverrideArgument = 1; + [cluster moveToLevel:levelArgument + transitionTime:transitionTimeArgument + optionMask:optionMaskArgument + optionOverride:optionOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"sends a Move to level command Error: %@", err); - XCTAssertEqual(err.code, 1); - [expectation fulfill]; - }]; + XCTAssertEqual(err.code, 0); + + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_DIAGTH_1_1_000002_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000009_WaitForMs { - XCTestExpectation * expectation = [self expectationWithDescription:@"reads back global attribute: ClusterRevision"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait 1ms"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + WaitForMs(expectation, queue, 1); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_LVL_2_1_000010_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"reads current Level attribute from DUT"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:queue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"reads back global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeCurrentLevelWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"reads current Level attribute from DUT Error: %@", err); XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 1); + XCTAssertEqual([values[@"value"] unsignedCharValue], 254); [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterTest_TC_TM_2_1_000000_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000011_MoveToLevel { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: MeasuredValue"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Reset level to 0"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device - endpoint:1 - queue:queue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeMeasuredValueWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"read the mandatory attribute: MeasuredValue Error: %@", err); + uint8_t levelArgument = 0; + uint16_t transitionTimeArgument = 0U; + uint8_t optionMaskArgument = 1; + uint8_t optionOverrideArgument = 1; + [cluster moveToLevel:levelArgument + transitionTime:transitionTimeArgument + optionMask:optionMaskArgument + optionOverride:optionOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reset level to 0 Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterTest_TC_LVL_2_1_000012_WaitForMs +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait 10ms"]; -- (void)testSendClusterTest_TC_TSUIC_2_1_000000_ReadAttribute + dispatch_queue_t queue = dispatch_get_main_queue(); + WaitForMs(expectation, queue, 10); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterTest_TC_LVL_3_1_000000_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: TemperatureDisplayMode"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"reads current level attribute from DUT"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeTemperatureDisplayModeWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"read the mandatory attribute: TemperatureDisplayMode Error: %@", err); + [cluster readAttributeCurrentLevelWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"reads current level attribute from DUT Error: %@", err); XCTAssertEqual(err.code, 0); @@ -5181,313 +5188,359 @@ - (void)testSendClusterTest_TC_TSUIC_2_1_000000_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSUIC_2_1_000001_ReadAttribute +- (void)testSendClusterTest_TC_LVL_3_1_000001_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: TemperatureDisplayMode"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"reads max level attribute from DUT"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeTemperatureDisplayModeWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"read the mandatory attribute: TemperatureDisplayMode Error: %@", err); + [cluster readAttributeMaxLevelWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"reads max level attribute from DUT Error: %@", err); XCTAssertEqual(err.code, 0); + XCTAssertEqual([values[@"value"] unsignedCharValue], 255); + [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSUIC_2_1_000002_WriteAttribute +- (void)testSendClusterTest_TC_LVL_3_1_000002_Move { - XCTestExpectation * expectation = [self expectationWithDescription:@"write to the mandatory attribute: TemperatureDisplayMode"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"sends a Move up command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t temperatureDisplayModeArgument = 0; - [cluster writeAttributeTemperatureDisplayModeWithValue:temperatureDisplayModeArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"write to the mandatory attribute: TemperatureDisplayMode Error: %@", err); + uint8_t moveModeArgument = 0; + uint8_t rateArgument = 200; + uint8_t optionMaskArgument = 1; + uint8_t optionOverrideArgument = 1; + [cluster move:moveModeArgument + rate:rateArgument + optionMask:optionMaskArgument + optionOverride:optionOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"sends a Move up command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSUIC_2_1_000003_ReadAttribute +- (void)testSendClusterTest_TC_LVL_3_1_000003_WaitForMs { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: TemperatureDisplayMode"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait 2500ms"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + WaitForMs(expectation, queue, 2500); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_LVL_3_1_000004_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"reads current level attribute from DUT"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeTemperatureDisplayModeWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"read the mandatory attribute: TemperatureDisplayMode Error: %@", err); + [cluster readAttributeCurrentLevelWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"reads current level attribute from DUT Error: %@", err); XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + XCTAssertEqual([values[@"value"] unsignedCharValue], 255); [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSUIC_2_1_000004_ReadAttribute +- (void)testSendClusterTest_TC_LVL_3_1_000005_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: TemperatureDisplayMode"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"reads min level attribute from DUT"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeTemperatureDisplayModeWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"read the mandatory attribute: TemperatureDisplayMode Error: %@", err); + [cluster readAttributeMinLevelWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"reads min level attribute from DUT Error: %@", err); XCTAssertEqual(err.code, 0); + XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSUIC_2_1_000005_ReadAttribute +- (void)testSendClusterTest_TC_LVL_3_1_000006_Move { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: KeypadLockout"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"sends a Move down command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeKeypadLockoutWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"read the mandatory attribute: KeypadLockout Error: %@", err); + uint8_t moveModeArgument = 1; + uint8_t rateArgument = 250; + uint8_t optionMaskArgument = 1; + uint8_t optionOverrideArgument = 1; + [cluster move:moveModeArgument + rate:rateArgument + optionMask:optionMaskArgument + optionOverride:optionOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"sends a Move down command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + [expectation fulfill]; + }]; - [expectation fulfill]; - }]; + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_LVL_3_1_000007_WaitForMs +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait 2500ms"]; + dispatch_queue_t queue = dispatch_get_main_queue(); + WaitForMs(expectation, queue, 2500); [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSUIC_2_1_000006_ReadAttribute +- (void)testSendClusterTest_TC_LVL_3_1_000008_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: KeypadLockout"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"reads current level attribute from DUT"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeKeypadLockoutWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"read the mandatory attribute: KeypadLockout Error: %@", err); + [cluster readAttributeCurrentLevelWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"reads current level attribute from DUT Error: %@", err); XCTAssertEqual(err.code, 0); + XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSUIC_2_1_000007_WriteAttribute +- (void)testSendClusterTest_TC_LVL_3_1_000009_WriteAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"write to the mandatory attribute: KeypadLockout"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Write default move rate attribute from DUT"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t keypadLockoutArgument = 0; - [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"write to the mandatory attribute: KeypadLockout Error: %@", err); + uint8_t defaultMoveRateArgument = 20; + [cluster writeAttributeDefaultMoveRateWithValue:defaultMoveRateArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Write default move rate attribute from DUT Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSUIC_2_1_000008_ReadAttribute +- (void)testSendClusterTest_TC_LVL_3_1_000010_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: KeypadLockout"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"reads default move rate attribute from DUT"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeKeypadLockoutWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"read the mandatory attribute: KeypadLockout Error: %@", err); + [cluster readAttributeDefaultMoveRateWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"reads default move rate attribute from DUT Error: %@", err); XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + XCTAssertEqual([values[@"value"] unsignedCharValue], 20); [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSUIC_2_1_000009_ReadAttribute +- (void)testSendClusterTest_TC_LVL_3_1_000011_Move { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: KeypadLockout"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"sends a Move up command at default move rate"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeKeypadLockoutWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"read the mandatory attribute: KeypadLockout Error: %@", err); + uint8_t moveModeArgument = 1; + uint8_t rateArgument = 255; + uint8_t optionMaskArgument = 1; + uint8_t optionOverrideArgument = 1; + [cluster move:moveModeArgument + rate:rateArgument + optionMask:optionMaskArgument + optionOverride:optionOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"sends a Move up command at default move rate Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSUIC_2_1_000010_ReadAttribute +- (void)testSendClusterTest_TC_LVL_3_1_000012_WaitForMs { - XCTestExpectation * expectation = - [self expectationWithDescription:@"read the optional attribute: ScheduleProgrammingVisibility"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait 10ms"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + WaitForMs(expectation, queue, 10); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_LVL_3_1_000013_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"reads current level attribute from DUT"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeScheduleProgrammingVisibilityWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"read the optional attribute: ScheduleProgrammingVisibility Error: %@", err); + [cluster readAttributeCurrentLevelWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"reads current level attribute from DUT Error: %@", err); XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + XCTAssertNotEqual([values[@"value"] unsignedCharValue], 255); [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSUIC_2_1_000011_ReadAttribute + +- (void)testSendClusterTest_TC_CC_1_1_000000_WriteAttribute { XCTestExpectation * expectation = - [self expectationWithDescription:@"read the optional attribute: ScheduleProgrammingVisibility"]; + [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeScheduleProgrammingVisibilityWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"read the optional attribute: ScheduleProgrammingVisibility Error: %@", err); - - XCTAssertEqual(err.code, 0); + uint16_t clusterRevisionArgument = 4U; + [cluster + writeAttributeClusterRevisionWithValue:clusterRevisionArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - [expectation fulfill]; - }]; + XCTAssertEqual(err.code, 1); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSUIC_2_1_000012_WriteAttribute + +- (void)testSendClusterTest_TC_RH_1_1_000000_WriteAttribute { XCTestExpectation * expectation = - [self expectationWithDescription:@"write to the mandatory attribute: ScheduleProgrammingVisibility"]; + [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestRelativeHumidityMeasurement * cluster = [[CHIPTestRelativeHumidityMeasurement alloc] initWithDevice:device + endpoint:1 + queue:queue]; XCTAssertNotNil(cluster); - uint8_t scheduleProgrammingVisibilityArgument = 0; + uint16_t clusterRevisionArgument = 1U; [cluster - writeAttributeScheduleProgrammingVisibilityWithValue:scheduleProgrammingVisibilityArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"write to the mandatory attribute: ScheduleProgrammingVisibility Error: %@", - err); - - XCTAssertEqual(err.code, 0); + writeAttributeClusterRevisionWithValue:clusterRevisionArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - [expectation fulfill]; - }]; + XCTAssertEqual(err.code, 1); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSUIC_2_1_000013_ReadAttribute + +- (void)testSendClusterTest_TC_MC_1_1_000000_WriteAttribute { XCTestExpectation * expectation = - [self expectationWithDescription:@"read the optional attribute: ScheduleProgrammingVisibility"]; + [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestRelativeHumidityMeasurement * cluster = [[CHIPTestRelativeHumidityMeasurement alloc] initWithDevice:device + endpoint:1 + queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeScheduleProgrammingVisibilityWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"read the optional attribute: ScheduleProgrammingVisibility Error: %@", err); - - XCTAssertEqual(err.code, 0); - - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + uint16_t clusterRevisionArgument = 1U; + [cluster + writeAttributeClusterRevisionWithValue:clusterRevisionArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - [expectation fulfill]; - }]; + XCTAssertEqual(err.code, 1); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSUIC_2_1_000014_ReadAttribute + +- (void)testSendClusterTest_TC_TSTAT_1_1_000000_WriteAttribute { XCTestExpectation * expectation = - [self expectationWithDescription:@"read the optional attribute: ScheduleProgrammingVisibility"]; + [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeScheduleProgrammingVisibilityWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"read the optional attribute: ScheduleProgrammingVisibility Error: %@", err); - - XCTAssertEqual(err.code, 0); + uint16_t clusterRevisionArgument = 5U; + [cluster + writeAttributeClusterRevisionWithValue:clusterRevisionArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - [expectation fulfill]; - }]; + XCTAssertEqual(err.code, 1); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_PCC_2_1_000000_ReadAttribute +- (void)testSendClusterTest_TC_PCC_1_1_000000_WriteAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: MaxPressure"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -5496,113 +5549,127 @@ - (void)testSendClusterTest_TC_PCC_2_1_000000_ReadAttribute queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeMaxPressureWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"read the mandatory attribute: MaxPressure Error: %@", err); - - XCTAssertEqual(err.code, 0); + uint16_t clusterRevisionArgument = 3U; + [cluster + writeAttributeClusterRevisionWithValue:clusterRevisionArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - [expectation fulfill]; - }]; + XCTAssertEqual(err.code, 1); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_PCC_2_1_000001_ReadAttribute + +- (void)testSendClusterTest_TC_TSUIC_1_1_000000_WriteAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: EffectiveOperationMode"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:1 - queue:queue]; + CHIPTestThermostatUserInterfaceConfiguration * cluster = + [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeEffectiveOperationModeWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"read the mandatory attribute: EffectiveOperationMode Error: %@", err); - - XCTAssertEqual(err.code, 0); + uint16_t clusterRevisionArgument = 2U; + [cluster + writeAttributeClusterRevisionWithValue:clusterRevisionArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - [expectation fulfill]; - }]; + XCTAssertEqual(err.code, 1); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_PCC_2_1_000002_ReadAttribute + +- (void)testSendClusterTest_TC_DIAGTH_1_1_000000_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: EffectiveControlMode"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the global attribute: ClusterRevision"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:1 - queue:queue]; + CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeEffectiveControlModeWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"read the mandatory attribute: EffectiveControlMode Error: %@", err); + [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"read the global attribute: ClusterRevision Error: %@", err); XCTAssertEqual(err.code, 0); + XCTAssertEqual([values[@"value"] unsignedShortValue], 1); + [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_PCC_2_1_000003_ReadAttribute +- (void)testSendClusterTest_TC_DIAGTH_1_1_000001_WriteAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: Capacity"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:1 - queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeCapacityWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"read the mandatory attribute: Capacity Error: %@", err); + CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:queue]; + XCTAssertNotNil(cluster); - XCTAssertEqual(err.code, 0); + uint16_t clusterRevisionArgument = 1U; + [cluster + writeAttributeClusterRevisionWithValue:clusterRevisionArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - [expectation fulfill]; - }]; + XCTAssertEqual(err.code, 1); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_PCC_2_1_000004_ReadAttribute +- (void)testSendClusterTest_TC_DIAGTH_1_1_000002_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: MaxPressure"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"reads back global attribute: ClusterRevision"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:1 - queue:queue]; + CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeMaxPressureWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"read the mandatory attribute: MaxPressure Error: %@", err); + [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"reads back global attribute: ClusterRevision Error: %@", err); XCTAssertEqual(err.code, 0); + XCTAssertEqual([values[@"value"] unsignedShortValue], 1); + [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_PCC_2_1_000005_ReadAttribute + +- (void)testSendClusterTest_TC_TM_2_1_000000_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: EffectiveOperationMode"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: MeasuredValue"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:1 - queue:queue]; + CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeEffectiveOperationModeWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"read the mandatory attribute: EffectiveOperationMode Error: %@", err); + [cluster readAttributeMeasuredValueWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"read the mandatory attribute: MeasuredValue Error: %@", err); XCTAssertEqual(err.code, 0); @@ -5611,40 +5678,41 @@ - (void)testSendClusterTest_TC_PCC_2_1_000005_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_PCC_2_1_000006_ReadAttribute + +- (void)testSendClusterTest_TC_TSUIC_2_1_000000_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: EffectiveControlMode"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: TemperatureDisplayMode"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:1 - queue:queue]; + CHIPTestThermostatUserInterfaceConfiguration * cluster = + [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeEffectiveControlModeWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"read the mandatory attribute: EffectiveControlMode Error: %@", err); + [cluster readAttributeTemperatureDisplayModeWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"read the mandatory attribute: TemperatureDisplayMode Error: %@", err); XCTAssertEqual(err.code, 0); + XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_PCC_2_1_000007_ReadAttribute +- (void)testSendClusterTest_TC_TSUIC_2_1_000001_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: Capacity"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: TemperatureDisplayMode"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device - endpoint:1 - queue:queue]; + CHIPTestThermostatUserInterfaceConfiguration * cluster = + [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeCapacityWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"read the mandatory attribute: Capacity Error: %@", err); + [cluster readAttributeTemperatureDisplayModeWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"read the mandatory attribute: TemperatureDisplayMode Error: %@", err); XCTAssertEqual(err.code, 0); @@ -5653,363 +5721,324 @@ - (void)testSendClusterTest_TC_PCC_2_1_000007_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterTest_TC_CC_3_1_000000_On +- (void)testSendClusterTest_TC_TSUIC_2_1_000002_WriteAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Turn on light for color control tests"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"write to the mandatory attribute: TemperatureDisplayMode"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestThermostatUserInterfaceConfiguration * cluster = + [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn on light for color control tests Error: %@", err); + uint8_t temperatureDisplayModeArgument = 0; + [cluster writeAttributeTemperatureDisplayModeWithValue:temperatureDisplayModeArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"write to the mandatory attribute: TemperatureDisplayMode Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_3_1_000001_ReadAttribute +- (void)testSendClusterTest_TC_TSUIC_2_1_000003_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is true after on command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: TemperatureDisplayMode"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestThermostatUserInterfaceConfiguration * cluster = + [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Check on/off attribute value is true after on command Error: %@", err); + [cluster readAttributeTemperatureDisplayModeWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"read the mandatory attribute: TemperatureDisplayMode Error: %@", err); XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + XCTAssertEqual([values[@"value"] unsignedCharValue], 0); [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_3_1_000002_MoveToHue +- (void)testSendClusterTest_TC_TSUIC_2_1_000004_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Move to hue shortest distance command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: TemperatureDisplayMode"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestThermostatUserInterfaceConfiguration * cluster = + [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t hueArgument = 150; - uint8_t directionArgument = 0; - uint16_t transitionTimeArgument = 100U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster moveToHue:hueArgument - direction:directionArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Move to hue shortest distance command Error: %@", err); + [cluster readAttributeTemperatureDisplayModeWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"read the mandatory attribute: TemperatureDisplayMode Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_3_1_000003_MoveToHue +- (void)testSendClusterTest_TC_TSUIC_2_1_000005_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Move to hue longest distance command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: KeypadLockout"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestThermostatUserInterfaceConfiguration * cluster = + [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t hueArgument = 200; - uint8_t directionArgument = 1; - uint16_t transitionTimeArgument = 100U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster moveToHue:hueArgument - direction:directionArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Move to hue longest distance command Error: %@", err); + [cluster readAttributeKeypadLockoutWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"read the mandatory attribute: KeypadLockout Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_3_1_000004_MoveToHue +- (void)testSendClusterTest_TC_TSUIC_2_1_000006_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Move to hue up command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: KeypadLockout"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestThermostatUserInterfaceConfiguration * cluster = + [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t hueArgument = 250; - uint8_t directionArgument = 2; - uint16_t transitionTimeArgument = 100U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster moveToHue:hueArgument - direction:directionArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Move to hue up command Error: %@", err); + [cluster readAttributeKeypadLockoutWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"read the mandatory attribute: KeypadLockout Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_3_1_000005_MoveToHue +- (void)testSendClusterTest_TC_TSUIC_2_1_000007_WriteAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Move to hue down command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"write to the mandatory attribute: KeypadLockout"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestThermostatUserInterfaceConfiguration * cluster = + [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t hueArgument = 225; - uint8_t directionArgument = 3; - uint16_t transitionTimeArgument = 100U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster moveToHue:hueArgument - direction:directionArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Move to hue down command Error: %@", err); + uint8_t keypadLockoutArgument = 0; + [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"write to the mandatory attribute: KeypadLockout Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_3_1_000006_Off +- (void)testSendClusterTest_TC_TSUIC_2_1_000008_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Turn off light that we turned on"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: KeypadLockout"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestThermostatUserInterfaceConfiguration * cluster = + [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn off light that we turned on Error: %@", err); + [cluster readAttributeKeypadLockoutWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"read the mandatory attribute: KeypadLockout Error: %@", err); XCTAssertEqual(err.code, 0); + XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_3_1_000007_ReadAttribute +- (void)testSendClusterTest_TC_TSUIC_2_1_000009_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: KeypadLockout"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestThermostatUserInterfaceConfiguration * cluster = + [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Check on/off attribute value is false after off command Error: %@", err); + [cluster readAttributeKeypadLockoutWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"read the mandatory attribute: KeypadLockout Error: %@", err); XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); - [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterTest_TC_CC_3_2_000000_On +- (void)testSendClusterTest_TC_TSUIC_2_1_000010_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Turn on light for color control tests"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"read the optional attribute: ScheduleProgrammingVisibility"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); + CHIPTestThermostatUserInterfaceConfiguration * cluster = + [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn on light for color control tests Error: %@", err); + [cluster readAttributeScheduleProgrammingVisibilityWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"read the optional attribute: ScheduleProgrammingVisibility Error: %@", err); XCTAssertEqual(err.code, 0); + XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_3_2_000001_ReadAttribute +- (void)testSendClusterTest_TC_TSUIC_2_1_000011_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is true after on command"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"read the optional attribute: ScheduleProgrammingVisibility"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestThermostatUserInterfaceConfiguration * cluster = + [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Check on/off attribute value is true after on command Error: %@", err); + [cluster readAttributeScheduleProgrammingVisibilityWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"read the optional attribute: ScheduleProgrammingVisibility Error: %@", err); XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); - [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_3_2_000002_MoveHue +- (void)testSendClusterTest_TC_TSUIC_2_1_000012_WriteAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Move hue up command"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"write to the mandatory attribute: ScheduleProgrammingVisibility"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestThermostatUserInterfaceConfiguration * cluster = + [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t moveModeArgument = 1; - uint8_t rateArgument = 50; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster moveHue:moveModeArgument - rate:rateArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Move hue up command Error: %@", err); + uint8_t scheduleProgrammingVisibilityArgument = 0; + [cluster + writeAttributeScheduleProgrammingVisibilityWithValue:scheduleProgrammingVisibilityArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"write to the mandatory attribute: ScheduleProgrammingVisibility Error: %@", + err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_3_2_000003_MoveHue +- (void)testSendClusterTest_TC_TSUIC_2_1_000013_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Move hue stop command"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"read the optional attribute: ScheduleProgrammingVisibility"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestThermostatUserInterfaceConfiguration * cluster = + [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t moveModeArgument = 0; - uint8_t rateArgument = 50; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster moveHue:moveModeArgument - rate:rateArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Move hue stop command Error: %@", err); + [cluster readAttributeScheduleProgrammingVisibilityWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"read the optional attribute: ScheduleProgrammingVisibility Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_3_2_000004_MoveHue +- (void)testSendClusterTest_TC_TSUIC_2_1_000014_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Move hue down command"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"read the optional attribute: ScheduleProgrammingVisibility"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestThermostatUserInterfaceConfiguration * cluster = + [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t moveModeArgument = 3; - uint8_t rateArgument = 50; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster moveHue:moveModeArgument - rate:rateArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Move hue down command Error: %@", err); + [cluster readAttributeScheduleProgrammingVisibilityWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"read the optional attribute: ScheduleProgrammingVisibility Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_3_2_000005_MoveHue + +- (void)testSendClusterTest_TC_PCC_2_1_000000_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Move hue stop command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: MaxPressure"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; XCTAssertNotNil(cluster); - uint8_t moveModeArgument = 0; - uint8_t rateArgument = 50; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster moveHue:moveModeArgument - rate:rateArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Move hue stop command Error: %@", err); + [cluster readAttributeMaxPressureWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"read the mandatory attribute: MaxPressure Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_3_2_000006_Off +- (void)testSendClusterTest_TC_PCC_2_1_000001_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Turn off light that we turned on"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: EffectiveOperationMode"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn off light that we turned on Error: %@", err); + [cluster readAttributeEffectiveOperationModeWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"read the mandatory attribute: EffectiveOperationMode Error: %@", err); XCTAssertEqual(err.code, 0); @@ -6018,39 +6047,40 @@ - (void)testSendClusterTest_TC_CC_3_2_000006_Off [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_3_2_000007_ReadAttribute +- (void)testSendClusterTest_TC_PCC_2_1_000002_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: EffectiveControlMode"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Check on/off attribute value is false after off command Error: %@", err); + [cluster readAttributeEffectiveControlModeWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"read the mandatory attribute: EffectiveControlMode Error: %@", err); XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); - [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterTest_TC_CC_3_3_000000_On +- (void)testSendClusterTest_TC_PCC_2_1_000003_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Turn on light for color control tests"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: Capacity"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn on light for color control tests Error: %@", err); + [cluster readAttributeCapacityWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"read the mandatory attribute: Capacity Error: %@", err); XCTAssertEqual(err.code, 0); @@ -6059,96 +6089,82 @@ - (void)testSendClusterTest_TC_CC_3_3_000000_On [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_3_3_000001_ReadAttribute +- (void)testSendClusterTest_TC_PCC_2_1_000004_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is true after on command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: MaxPressure"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Check on/off attribute value is true after on command Error: %@", err); + [cluster readAttributeMaxPressureWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"read the mandatory attribute: MaxPressure Error: %@", err); XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); - [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_3_3_000002_StepHue +- (void)testSendClusterTest_TC_PCC_2_1_000005_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Step hue up command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: EffectiveOperationMode"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; XCTAssertNotNil(cluster); - uint8_t stepModeArgument = 1; - uint8_t stepSizeArgument = 5; - uint8_t transitionTimeArgument = 25; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster stepHue:stepModeArgument - stepSize:stepSizeArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Step hue up command Error: %@", err); + [cluster readAttributeEffectiveOperationModeWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"read the mandatory attribute: EffectiveOperationMode Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_3_3_000003_StepHue +- (void)testSendClusterTest_TC_PCC_2_1_000006_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Step hue down command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: EffectiveControlMode"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; XCTAssertNotNil(cluster); - uint8_t stepModeArgument = 3; - uint8_t stepSizeArgument = 5; - uint8_t transitionTimeArgument = 25; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster stepHue:stepModeArgument - stepSize:stepSizeArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Step hue down command Error: %@", err); + [cluster readAttributeEffectiveControlModeWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"read the mandatory attribute: EffectiveControlMode Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_3_3_000004_Off +- (void)testSendClusterTest_TC_PCC_2_1_000007_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Turn off light that we turned on"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: Capacity"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn off light that we turned on Error: %@", err); + [cluster readAttributeCapacityWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"read the mandatory attribute: Capacity Error: %@", err); XCTAssertEqual(err.code, 0); @@ -6157,96 +6173,164 @@ - (void)testSendClusterTest_TC_CC_3_3_000004_Off [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_3_3_000005_ReadAttribute + +- (void)testSendClusterTest_TC_CC_3_1_000000_On { - XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Turn on light for color control tests"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Check on/off attribute value is false after off command Error: %@", err); + [cluster on:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn on light for color control tests Error: %@", err); XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); - [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterTest_TC_CC_4_1_000000_On +- (void)testSendClusterTest_TC_CC_3_1_000001_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Turn on light for color control tests"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is true after on command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn on light for color control tests Error: %@", err); + [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Check on/off attribute value is true after on command Error: %@", err); XCTAssertEqual(err.code, 0); + XCTAssertEqual([values[@"value"] boolValue], 1); + [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_4_1_000001_ReadAttribute +- (void)testSendClusterTest_TC_CC_3_1_000002_MoveToHue { - XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is true after on command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Move to hue shortest distance command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Check on/off attribute value is true after on command Error: %@", err); + uint8_t hueArgument = 150; + uint8_t directionArgument = 0; + uint16_t transitionTimeArgument = 100U; + uint8_t optionsMaskArgument = 0; + uint8_t optionsOverrideArgument = 0; + [cluster moveToHue:hueArgument + direction:directionArgument + transitionTime:transitionTimeArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Move to hue shortest distance command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); + [expectation fulfill]; + }]; - [expectation fulfill]; - }]; + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_3_1_000003_MoveToHue +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Move to hue longest distance command"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + uint8_t hueArgument = 200; + uint8_t directionArgument = 1; + uint16_t transitionTimeArgument = 100U; + uint8_t optionsMaskArgument = 0; + uint8_t optionsOverrideArgument = 0; + [cluster moveToHue:hueArgument + direction:directionArgument + transitionTime:transitionTimeArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Move to hue longest distance command Error: %@", err); + + XCTAssertEqual(err.code, 0); + + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_4_1_000002_MoveToSaturation +- (void)testSendClusterTest_TC_CC_3_1_000004_MoveToHue { - XCTestExpectation * expectation = [self expectationWithDescription:@"Move to saturation command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Move to hue up command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t saturationArgument = 90; - uint16_t transitionTimeArgument = 10U; + uint8_t hueArgument = 250; + uint8_t directionArgument = 2; + uint16_t transitionTimeArgument = 100U; uint8_t optionsMaskArgument = 0; uint8_t optionsOverrideArgument = 0; - [cluster moveToSaturation:saturationArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Move to saturation command Error: %@", err); + [cluster moveToHue:hueArgument + direction:directionArgument + transitionTime:transitionTimeArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Move to hue up command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_4_1_000003_Off +- (void)testSendClusterTest_TC_CC_3_1_000005_MoveToHue +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Move to hue down command"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + uint8_t hueArgument = 225; + uint8_t directionArgument = 3; + uint16_t transitionTimeArgument = 100U; + uint8_t optionsMaskArgument = 0; + uint8_t optionsOverrideArgument = 0; + [cluster moveToHue:hueArgument + direction:directionArgument + transitionTime:transitionTimeArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Move to hue down command Error: %@", err); + + XCTAssertEqual(err.code, 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_3_1_000006_Off { XCTestExpectation * expectation = [self expectationWithDescription:@"Turn off light that we turned on"]; @@ -6265,7 +6349,7 @@ - (void)testSendClusterTest_TC_CC_4_1_000003_Off [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_4_1_000004_ReadAttribute +- (void)testSendClusterTest_TC_CC_3_1_000007_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"]; @@ -6287,7 +6371,7 @@ - (void)testSendClusterTest_TC_CC_4_1_000004_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_4_2_000000_On +- (void)testSendClusterTest_TC_CC_3_2_000000_On { XCTestExpectation * expectation = [self expectationWithDescription:@"Turn on light for color control tests"]; @@ -6306,7 +6390,7 @@ - (void)testSendClusterTest_TC_CC_4_2_000000_On [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_4_2_000001_ReadAttribute +- (void)testSendClusterTest_TC_CC_3_2_000001_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is true after on command"]; @@ -6327,9 +6411,9 @@ - (void)testSendClusterTest_TC_CC_4_2_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_4_2_000002_MoveSaturation +- (void)testSendClusterTest_TC_CC_3_2_000002_MoveHue { - XCTestExpectation * expectation = [self expectationWithDescription:@"Move saturation up command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Move hue up command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -6337,26 +6421,53 @@ - (void)testSendClusterTest_TC_CC_4_2_000002_MoveSaturation XCTAssertNotNil(cluster); uint8_t moveModeArgument = 1; - uint8_t rateArgument = 5; + uint8_t rateArgument = 50; uint8_t optionsMaskArgument = 0; uint8_t optionsOverrideArgument = 0; - [cluster moveSaturation:moveModeArgument - rate:rateArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Move saturation up command Error: %@", err); + [cluster moveHue:moveModeArgument + rate:rateArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Move hue up command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_4_2_000003_MoveSaturation +- (void)testSendClusterTest_TC_CC_3_2_000003_MoveHue { - XCTestExpectation * expectation = [self expectationWithDescription:@"Move saturation down command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Move hue stop command"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + uint8_t moveModeArgument = 0; + uint8_t rateArgument = 50; + uint8_t optionsMaskArgument = 0; + uint8_t optionsOverrideArgument = 0; + [cluster moveHue:moveModeArgument + rate:rateArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Move hue stop command Error: %@", err); + + XCTAssertEqual(err.code, 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_3_2_000004_MoveHue +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Move hue down command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -6364,24 +6475,51 @@ - (void)testSendClusterTest_TC_CC_4_2_000003_MoveSaturation XCTAssertNotNil(cluster); uint8_t moveModeArgument = 3; - uint8_t rateArgument = 5; + uint8_t rateArgument = 50; uint8_t optionsMaskArgument = 0; uint8_t optionsOverrideArgument = 0; - [cluster moveSaturation:moveModeArgument - rate:rateArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Move saturation down command Error: %@", err); + [cluster moveHue:moveModeArgument + rate:rateArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Move hue down command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_4_2_000004_Off +- (void)testSendClusterTest_TC_CC_3_2_000005_MoveHue +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Move hue stop command"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + uint8_t moveModeArgument = 0; + uint8_t rateArgument = 50; + uint8_t optionsMaskArgument = 0; + uint8_t optionsOverrideArgument = 0; + [cluster moveHue:moveModeArgument + rate:rateArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Move hue stop command Error: %@", err); + + XCTAssertEqual(err.code, 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_3_2_000006_Off { XCTestExpectation * expectation = [self expectationWithDescription:@"Turn off light that we turned on"]; @@ -6400,7 +6538,7 @@ - (void)testSendClusterTest_TC_CC_4_2_000004_Off [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_4_2_000005_ReadAttribute +- (void)testSendClusterTest_TC_CC_3_2_000007_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"]; @@ -6422,7 +6560,7 @@ - (void)testSendClusterTest_TC_CC_4_2_000005_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_4_3_000000_On +- (void)testSendClusterTest_TC_CC_3_3_000000_On { XCTestExpectation * expectation = [self expectationWithDescription:@"Turn on light for color control tests"]; @@ -6441,7 +6579,7 @@ - (void)testSendClusterTest_TC_CC_4_3_000000_On [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_4_3_000001_ReadAttribute +- (void)testSendClusterTest_TC_CC_3_3_000001_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is true after on command"]; @@ -6462,9 +6600,9 @@ - (void)testSendClusterTest_TC_CC_4_3_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_4_3_000002_StepSaturation +- (void)testSendClusterTest_TC_CC_3_3_000002_StepHue { - XCTestExpectation * expectation = [self expectationWithDescription:@"Step saturation up command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Step hue up command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -6472,28 +6610,28 @@ - (void)testSendClusterTest_TC_CC_4_3_000002_StepSaturation XCTAssertNotNil(cluster); uint8_t stepModeArgument = 1; - uint8_t stepSizeArgument = 15; - uint8_t transitionTimeArgument = 10; + uint8_t stepSizeArgument = 5; + uint8_t transitionTimeArgument = 25; uint8_t optionsMaskArgument = 0; uint8_t optionsOverrideArgument = 0; - [cluster stepSaturation:stepModeArgument - stepSize:stepSizeArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Step saturation up command Error: %@", err); + [cluster stepHue:stepModeArgument + stepSize:stepSizeArgument + transitionTime:transitionTimeArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Step hue up command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_4_3_000003_StepSaturation +- (void)testSendClusterTest_TC_CC_3_3_000003_StepHue { - XCTestExpectation * expectation = [self expectationWithDescription:@"Step saturation down command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Step hue down command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -6501,26 +6639,26 @@ - (void)testSendClusterTest_TC_CC_4_3_000003_StepSaturation XCTAssertNotNil(cluster); uint8_t stepModeArgument = 3; - uint8_t stepSizeArgument = 20; - uint8_t transitionTimeArgument = 10; + uint8_t stepSizeArgument = 5; + uint8_t transitionTimeArgument = 25; uint8_t optionsMaskArgument = 0; uint8_t optionsOverrideArgument = 0; - [cluster stepSaturation:stepModeArgument - stepSize:stepSizeArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Step saturation down command Error: %@", err); + [cluster stepHue:stepModeArgument + stepSize:stepSizeArgument + transitionTime:transitionTimeArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Step hue down command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_4_3_000004_Off +- (void)testSendClusterTest_TC_CC_3_3_000004_Off { XCTestExpectation * expectation = [self expectationWithDescription:@"Turn off light that we turned on"]; @@ -6539,7 +6677,7 @@ - (void)testSendClusterTest_TC_CC_4_3_000004_Off [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_4_3_000005_ReadAttribute +- (void)testSendClusterTest_TC_CC_3_3_000005_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"]; @@ -6561,7 +6699,7 @@ - (void)testSendClusterTest_TC_CC_4_3_000005_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_4_4_000000_On +- (void)testSendClusterTest_TC_CC_4_1_000000_On { XCTestExpectation * expectation = [self expectationWithDescription:@"Turn on light for color control tests"]; @@ -6580,7 +6718,7 @@ - (void)testSendClusterTest_TC_CC_4_4_000000_On [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_4_4_000001_ReadAttribute +- (void)testSendClusterTest_TC_CC_4_1_000001_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is true after on command"]; @@ -6601,36 +6739,34 @@ - (void)testSendClusterTest_TC_CC_4_4_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_4_4_000002_MoveToHueAndSaturation +- (void)testSendClusterTest_TC_CC_4_1_000002_MoveToSaturation { - XCTestExpectation * expectation = [self expectationWithDescription:@"Move To current hue and saturation command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Move to saturation command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t hueArgument = 40; - uint8_t saturationArgument = 160; + uint8_t saturationArgument = 90; uint16_t transitionTimeArgument = 10U; uint8_t optionsMaskArgument = 0; uint8_t optionsOverrideArgument = 0; - [cluster moveToHueAndSaturation:hueArgument - saturation:saturationArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Move To current hue and saturation command Error: %@", err); + [cluster moveToSaturation:saturationArgument + transitionTime:transitionTimeArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Move to saturation command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_4_4_000003_Off +- (void)testSendClusterTest_TC_CC_4_1_000003_Off { XCTestExpectation * expectation = [self expectationWithDescription:@"Turn off light that we turned on"]; @@ -6649,7 +6785,7 @@ - (void)testSendClusterTest_TC_CC_4_4_000003_Off [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_4_4_000004_ReadAttribute +- (void)testSendClusterTest_TC_CC_4_1_000004_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"]; @@ -6671,7 +6807,7 @@ - (void)testSendClusterTest_TC_CC_4_4_000004_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_5_1_000000_On +- (void)testSendClusterTest_TC_CC_4_2_000000_On { XCTestExpectation * expectation = [self expectationWithDescription:@"Turn on light for color control tests"]; @@ -6690,7 +6826,7 @@ - (void)testSendClusterTest_TC_CC_5_1_000000_On [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_5_1_000001_ReadAttribute +- (void)testSendClusterTest_TC_CC_4_2_000001_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is true after on command"]; @@ -6711,36 +6847,61 @@ - (void)testSendClusterTest_TC_CC_5_1_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_5_1_000002_MoveToColor +- (void)testSendClusterTest_TC_CC_4_2_000002_MoveSaturation { - XCTestExpectation * expectation = [self expectationWithDescription:@"Move to Color command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Move saturation up command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint16_t colorXArgument = 200U; - uint16_t colorYArgument = 300U; - uint16_t transitionTimeArgument = 20U; + uint8_t moveModeArgument = 1; + uint8_t rateArgument = 5; uint8_t optionsMaskArgument = 0; uint8_t optionsOverrideArgument = 0; - [cluster moveToColor:colorXArgument - colorY:colorYArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Move to Color command Error: %@", err); + [cluster moveSaturation:moveModeArgument + rate:rateArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Move saturation up command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_5_1_000003_Off +- (void)testSendClusterTest_TC_CC_4_2_000003_MoveSaturation +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Move saturation down command"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + uint8_t moveModeArgument = 3; + uint8_t rateArgument = 5; + uint8_t optionsMaskArgument = 0; + uint8_t optionsOverrideArgument = 0; + [cluster moveSaturation:moveModeArgument + rate:rateArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Move saturation down command Error: %@", err); + + XCTAssertEqual(err.code, 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_4_2_000004_Off { XCTestExpectation * expectation = [self expectationWithDescription:@"Turn off light that we turned on"]; @@ -6759,7 +6920,7 @@ - (void)testSendClusterTest_TC_CC_5_1_000003_Off [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_5_1_000004_ReadAttribute +- (void)testSendClusterTest_TC_CC_4_2_000005_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"]; @@ -6781,7 +6942,7 @@ - (void)testSendClusterTest_TC_CC_5_1_000004_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_5_2_000000_On +- (void)testSendClusterTest_TC_CC_4_3_000000_On { XCTestExpectation * expectation = [self expectationWithDescription:@"Turn on light for color control tests"]; @@ -6800,7 +6961,7 @@ - (void)testSendClusterTest_TC_CC_5_2_000000_On [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_5_2_000001_ReadAttribute +- (void)testSendClusterTest_TC_CC_4_3_000001_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is true after on command"]; @@ -6821,57 +6982,65 @@ - (void)testSendClusterTest_TC_CC_5_2_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_5_2_000002_MoveColor +- (void)testSendClusterTest_TC_CC_4_3_000002_StepSaturation { - XCTestExpectation * expectation = [self expectationWithDescription:@"Move Color command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Step saturation up command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - int16_t rateXArgument = 15; - int16_t rateYArgument = 20; + uint8_t stepModeArgument = 1; + uint8_t stepSizeArgument = 15; + uint8_t transitionTimeArgument = 10; uint8_t optionsMaskArgument = 0; uint8_t optionsOverrideArgument = 0; - [cluster moveColor:rateXArgument - rateY:rateYArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Move Color command Error: %@", err); + [cluster stepSaturation:stepModeArgument + stepSize:stepSizeArgument + transitionTime:transitionTimeArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Step saturation up command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_5_2_000003_StopMoveStep +- (void)testSendClusterTest_TC_CC_4_3_000003_StepSaturation { - XCTestExpectation * expectation = [self expectationWithDescription:@"Stop Move Step command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Step saturation down command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); + uint8_t stepModeArgument = 3; + uint8_t stepSizeArgument = 20; + uint8_t transitionTimeArgument = 10; uint8_t optionsMaskArgument = 0; uint8_t optionsOverrideArgument = 0; - [cluster stopMoveStep:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Stop Move Step command Error: %@", err); + [cluster stepSaturation:stepModeArgument + stepSize:stepSizeArgument + transitionTime:transitionTimeArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Step saturation down command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_5_2_000004_Off +- (void)testSendClusterTest_TC_CC_4_3_000004_Off { XCTestExpectation * expectation = [self expectationWithDescription:@"Turn off light that we turned on"]; @@ -6890,7 +7059,7 @@ - (void)testSendClusterTest_TC_CC_5_2_000004_Off [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_5_2_000005_ReadAttribute +- (void)testSendClusterTest_TC_CC_4_3_000005_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"]; @@ -6912,7 +7081,7 @@ - (void)testSendClusterTest_TC_CC_5_2_000005_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_5_3_000000_On +- (void)testSendClusterTest_TC_CC_4_4_000000_On { XCTestExpectation * expectation = [self expectationWithDescription:@"Turn on light for color control tests"]; @@ -6931,7 +7100,7 @@ - (void)testSendClusterTest_TC_CC_5_3_000000_On [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_5_3_000001_ReadAttribute +- (void)testSendClusterTest_TC_CC_4_4_000001_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is true after on command"]; @@ -6952,36 +7121,36 @@ - (void)testSendClusterTest_TC_CC_5_3_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_5_3_000002_StepColor +- (void)testSendClusterTest_TC_CC_4_4_000002_MoveToHueAndSaturation { - XCTestExpectation * expectation = [self expectationWithDescription:@"Step Color command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Move To current hue and saturation command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - int16_t stepXArgument = 15; - int16_t stepYArgument = 20; - uint16_t transitionTimeArgument = 50U; + uint8_t hueArgument = 40; + uint8_t saturationArgument = 160; + uint16_t transitionTimeArgument = 10U; uint8_t optionsMaskArgument = 0; uint8_t optionsOverrideArgument = 0; - [cluster stepColor:stepXArgument - stepY:stepYArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Step Color command Error: %@", err); + [cluster moveToHueAndSaturation:hueArgument + saturation:saturationArgument + transitionTime:transitionTimeArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Move To current hue and saturation command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_5_3_000003_Off +- (void)testSendClusterTest_TC_CC_4_4_000003_Off { XCTestExpectation * expectation = [self expectationWithDescription:@"Turn off light that we turned on"]; @@ -7000,7 +7169,7 @@ - (void)testSendClusterTest_TC_CC_5_3_000003_Off [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_5_3_000004_ReadAttribute +- (void)testSendClusterTest_TC_CC_4_4_000004_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"]; @@ -7022,7 +7191,7 @@ - (void)testSendClusterTest_TC_CC_5_3_000004_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_6_1_000000_On +- (void)testSendClusterTest_TC_CC_5_1_000000_On { XCTestExpectation * expectation = [self expectationWithDescription:@"Turn on light for color control tests"]; @@ -7041,7 +7210,7 @@ - (void)testSendClusterTest_TC_CC_6_1_000000_On [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_6_1_000001_ReadAttribute +- (void)testSendClusterTest_TC_CC_5_1_000001_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is true after on command"]; @@ -7062,34 +7231,36 @@ - (void)testSendClusterTest_TC_CC_6_1_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_6_1_000002_MoveToColorTemperature +- (void)testSendClusterTest_TC_CC_5_1_000002_MoveToColor { - XCTestExpectation * expectation = [self expectationWithDescription:@"Move To Color Temperature command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Move to Color command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint16_t colorTemperatureArgument = 100U; - uint16_t transitionTimeArgument = 10U; + uint16_t colorXArgument = 200U; + uint16_t colorYArgument = 300U; + uint16_t transitionTimeArgument = 20U; uint8_t optionsMaskArgument = 0; uint8_t optionsOverrideArgument = 0; - [cluster moveToColorTemperature:colorTemperatureArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Move To Color Temperature command Error: %@", err); + [cluster moveToColor:colorXArgument + colorY:colorYArgument + transitionTime:transitionTimeArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Move to Color command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_6_1_000003_Off +- (void)testSendClusterTest_TC_CC_5_1_000003_Off { XCTestExpectation * expectation = [self expectationWithDescription:@"Turn off light that we turned on"]; @@ -7108,7 +7279,7 @@ - (void)testSendClusterTest_TC_CC_6_1_000003_Off [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_6_1_000004_ReadAttribute +- (void)testSendClusterTest_TC_CC_5_1_000004_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"]; @@ -7130,7 +7301,7 @@ - (void)testSendClusterTest_TC_CC_6_1_000004_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_6_2_000000_On +- (void)testSendClusterTest_TC_CC_5_2_000000_On { XCTestExpectation * expectation = [self expectationWithDescription:@"Turn on light for color control tests"]; @@ -7149,7 +7320,7 @@ - (void)testSendClusterTest_TC_CC_6_2_000000_On [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_6_2_000001_ReadAttribute +- (void)testSendClusterTest_TC_CC_5_2_000001_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is true after on command"]; @@ -7170,100 +7341,57 @@ - (void)testSendClusterTest_TC_CC_6_2_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_6_2_000002_MoveColorTemperature -{ - XCTestExpectation * expectation = [self expectationWithDescription:@"Move up color temperature command"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - uint8_t moveModeArgument = 1; - uint16_t rateArgument = 10U; - uint16_t colorTemperatureMinimumArgument = 1U; - uint16_t colorTemperatureMaximumArgument = 255U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster moveColorTemperature:moveModeArgument - rate:rateArgument - colorTemperatureMinimum:colorTemperatureMinimumArgument - colorTemperatureMaximum:colorTemperatureMaximumArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Move up color temperature command Error: %@", err); - - XCTAssertEqual(err.code, 0); - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_CC_6_2_000003_MoveColorTemperature +- (void)testSendClusterTest_TC_CC_5_2_000002_MoveColor { - XCTestExpectation * expectation = [self expectationWithDescription:@"Stop Color Temperature command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Move Color command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t moveModeArgument = 0; - uint16_t rateArgument = 10U; - uint16_t colorTemperatureMinimumArgument = 1U; - uint16_t colorTemperatureMaximumArgument = 255U; + int16_t rateXArgument = 15; + int16_t rateYArgument = 20; uint8_t optionsMaskArgument = 0; uint8_t optionsOverrideArgument = 0; - [cluster moveColorTemperature:moveModeArgument - rate:rateArgument - colorTemperatureMinimum:colorTemperatureMinimumArgument - colorTemperatureMaximum:colorTemperatureMaximumArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Stop Color Temperature command Error: %@", err); + [cluster moveColor:rateXArgument + rateY:rateYArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Move Color command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_6_2_000004_MoveColorTemperature +- (void)testSendClusterTest_TC_CC_5_2_000003_StopMoveStep { - XCTestExpectation * expectation = [self expectationWithDescription:@"Move down color temperature command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Stop Move Step command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t moveModeArgument = 3; - uint16_t rateArgument = 20U; - uint16_t colorTemperatureMinimumArgument = 1U; - uint16_t colorTemperatureMaximumArgument = 255U; uint8_t optionsMaskArgument = 0; uint8_t optionsOverrideArgument = 0; - [cluster moveColorTemperature:moveModeArgument - rate:rateArgument - colorTemperatureMinimum:colorTemperatureMinimumArgument - colorTemperatureMaximum:colorTemperatureMaximumArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Move down color temperature command Error: %@", err); + [cluster stopMoveStep:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Stop Move Step command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_6_2_000005_Off +- (void)testSendClusterTest_TC_CC_5_2_000004_Off { XCTestExpectation * expectation = [self expectationWithDescription:@"Turn off light that we turned on"]; @@ -7282,7 +7410,7 @@ - (void)testSendClusterTest_TC_CC_6_2_000005_Off [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_6_2_000006_ReadAttribute +- (void)testSendClusterTest_TC_CC_5_2_000005_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"]; @@ -7304,7 +7432,7 @@ - (void)testSendClusterTest_TC_CC_6_2_000006_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_6_3_000000_On +- (void)testSendClusterTest_TC_CC_5_3_000000_On { XCTestExpectation * expectation = [self expectationWithDescription:@"Turn on light for color control tests"]; @@ -7323,7 +7451,7 @@ - (void)testSendClusterTest_TC_CC_6_3_000000_On [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_6_3_000001_ReadAttribute +- (void)testSendClusterTest_TC_CC_5_3_000001_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is true after on command"]; @@ -7344,73 +7472,36 @@ - (void)testSendClusterTest_TC_CC_6_3_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_6_3_000002_StepColorTemperature -{ - XCTestExpectation * expectation = [self expectationWithDescription:@"Step up color temperature command"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - uint8_t stepModeArgument = 1; - uint16_t stepSizeArgument = 5U; - uint16_t transitionTimeArgument = 50U; - uint16_t colorTemperatureMinimumArgument = 5U; - uint16_t colorTemperatureMaximumArgument = 100U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster stepColorTemperature:stepModeArgument - stepSize:stepSizeArgument - transitionTime:transitionTimeArgument - colorTemperatureMinimum:colorTemperatureMinimumArgument - colorTemperatureMaximum:colorTemperatureMaximumArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Step up color temperature command Error: %@", err); - - XCTAssertEqual(err.code, 0); - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_CC_6_3_000003_StepColorTemperature +- (void)testSendClusterTest_TC_CC_5_3_000002_StepColor { - XCTestExpectation * expectation = [self expectationWithDescription:@"Step down color temperature command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Step Color command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t stepModeArgument = 3; - uint16_t stepSizeArgument = 5U; + int16_t stepXArgument = 15; + int16_t stepYArgument = 20; uint16_t transitionTimeArgument = 50U; - uint16_t colorTemperatureMinimumArgument = 5U; - uint16_t colorTemperatureMaximumArgument = 100U; uint8_t optionsMaskArgument = 0; uint8_t optionsOverrideArgument = 0; - [cluster stepColorTemperature:stepModeArgument - stepSize:stepSizeArgument - transitionTime:transitionTimeArgument - colorTemperatureMinimum:colorTemperatureMinimumArgument - colorTemperatureMaximum:colorTemperatureMaximumArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Step down color temperature command Error: %@", err); + [cluster stepColor:stepXArgument + stepY:stepYArgument + transitionTime:transitionTimeArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Step Color command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_6_3_000004_Off +- (void)testSendClusterTest_TC_CC_5_3_000003_Off { XCTestExpectation * expectation = [self expectationWithDescription:@"Turn off light that we turned on"]; @@ -7429,7 +7520,7 @@ - (void)testSendClusterTest_TC_CC_6_3_000004_Off [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_6_3_000005_ReadAttribute +- (void)testSendClusterTest_TC_CC_5_3_000004_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"]; @@ -7451,7 +7542,7 @@ - (void)testSendClusterTest_TC_CC_6_3_000005_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_7_1_000000_On +- (void)testSendClusterTest_TC_CC_6_1_000000_On { XCTestExpectation * expectation = [self expectationWithDescription:@"Turn on light for color control tests"]; @@ -7470,7 +7561,7 @@ - (void)testSendClusterTest_TC_CC_7_1_000000_On [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_7_1_000001_ReadAttribute +- (void)testSendClusterTest_TC_CC_6_1_000001_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is true after on command"]; @@ -7491,58 +7582,34 @@ - (void)testSendClusterTest_TC_CC_7_1_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_7_1_000002_EnhancedMoveToHue +- (void)testSendClusterTest_TC_CC_6_1_000002_MoveToColorTemperature { - XCTestExpectation * expectation = [self expectationWithDescription:@"Enhanced Move To Hue command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Move To Color Temperature command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint16_t enhancedHueArgument = 1025U; - uint8_t directionArgument = 0; - uint16_t transitionTimeArgument = 1U; + uint16_t colorTemperatureArgument = 100U; + uint16_t transitionTimeArgument = 10U; uint8_t optionsMaskArgument = 0; uint8_t optionsOverrideArgument = 0; - [cluster enhancedMoveToHue:enhancedHueArgument - direction:directionArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Enhanced Move To Hue command Error: %@", err); - - XCTAssertEqual(err.code, 0); - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_CC_7_1_000003_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"Check Remaining time attribute value matched the value sent by the last command"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeRemainingTimeWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Check Remaining time attribute value matched the value sent by the last command Error: %@", err); - - XCTAssertEqual(err.code, 0); + [cluster moveToColorTemperature:colorTemperatureArgument + transitionTime:transitionTimeArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Move To Color Temperature command Error: %@", err); - XCTAssertEqual([values[@"value"] unsignedShortValue], 1); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_7_1_000004_Off +- (void)testSendClusterTest_TC_CC_6_1_000003_Off { XCTestExpectation * expectation = [self expectationWithDescription:@"Turn off light that we turned on"]; @@ -7561,7 +7628,7 @@ - (void)testSendClusterTest_TC_CC_7_1_000004_Off [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_7_1_000005_ReadAttribute +- (void)testSendClusterTest_TC_CC_6_1_000004_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"]; @@ -7583,7 +7650,7 @@ - (void)testSendClusterTest_TC_CC_7_1_000005_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_7_2_000000_On +- (void)testSendClusterTest_TC_CC_6_2_000000_On { XCTestExpectation * expectation = [self expectationWithDescription:@"Turn on light for color control tests"]; @@ -7602,7 +7669,7 @@ - (void)testSendClusterTest_TC_CC_7_2_000000_On [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_7_2_000001_ReadAttribute +- (void)testSendClusterTest_TC_CC_6_2_000001_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is true after on command"]; @@ -7623,36 +7690,40 @@ - (void)testSendClusterTest_TC_CC_7_2_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_7_2_000002_EnhancedMoveHue +- (void)testSendClusterTest_TC_CC_6_2_000002_MoveColorTemperature { - XCTestExpectation * expectation = [self expectationWithDescription:@"Enhanced Move Hue Down command "]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Move up color temperature command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t moveModeArgument = 3; - uint16_t rateArgument = 5U; + uint8_t moveModeArgument = 1; + uint16_t rateArgument = 10U; + uint16_t colorTemperatureMinimumArgument = 1U; + uint16_t colorTemperatureMaximumArgument = 255U; uint8_t optionsMaskArgument = 0; uint8_t optionsOverrideArgument = 0; - [cluster enhancedMoveHue:moveModeArgument - rate:rateArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Enhanced Move Hue Down command Error: %@", err); + [cluster moveColorTemperature:moveModeArgument + rate:rateArgument + colorTemperatureMinimum:colorTemperatureMinimumArgument + colorTemperatureMaximum:colorTemperatureMaximumArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Move up color temperature command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_7_2_000003_EnhancedMoveHue +- (void)testSendClusterTest_TC_CC_6_2_000003_MoveColorTemperature { - XCTestExpectation * expectation = [self expectationWithDescription:@"Enhanced Move Hue Stop command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Stop Color Temperature command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -7660,78 +7731,59 @@ - (void)testSendClusterTest_TC_CC_7_2_000003_EnhancedMoveHue XCTAssertNotNil(cluster); uint8_t moveModeArgument = 0; - uint16_t rateArgument = 0U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster enhancedMoveHue:moveModeArgument - rate:rateArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Enhanced Move Hue Stop command Error: %@", err); - - XCTAssertEqual(err.code, 0); - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_CC_7_2_000004_EnhancedMoveHue -{ - XCTestExpectation * expectation = [self expectationWithDescription:@"Enhanced Move Hue Up command"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - uint8_t moveModeArgument = 1; - uint16_t rateArgument = 50U; + uint16_t rateArgument = 10U; + uint16_t colorTemperatureMinimumArgument = 1U; + uint16_t colorTemperatureMaximumArgument = 255U; uint8_t optionsMaskArgument = 0; uint8_t optionsOverrideArgument = 0; - [cluster enhancedMoveHue:moveModeArgument - rate:rateArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Enhanced Move Hue Up command Error: %@", err); + [cluster moveColorTemperature:moveModeArgument + rate:rateArgument + colorTemperatureMinimum:colorTemperatureMinimumArgument + colorTemperatureMaximum:colorTemperatureMaximumArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Stop Color Temperature command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_7_2_000005_EnhancedMoveHue +- (void)testSendClusterTest_TC_CC_6_2_000004_MoveColorTemperature { - XCTestExpectation * expectation = [self expectationWithDescription:@"Enhanced Move Hue Stop command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Move down color temperature command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t moveModeArgument = 0; - uint16_t rateArgument = 0U; + uint8_t moveModeArgument = 3; + uint16_t rateArgument = 20U; + uint16_t colorTemperatureMinimumArgument = 1U; + uint16_t colorTemperatureMaximumArgument = 255U; uint8_t optionsMaskArgument = 0; uint8_t optionsOverrideArgument = 0; - [cluster enhancedMoveHue:moveModeArgument - rate:rateArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Enhanced Move Hue Stop command Error: %@", err); + [cluster moveColorTemperature:moveModeArgument + rate:rateArgument + colorTemperatureMinimum:colorTemperatureMinimumArgument + colorTemperatureMaximum:colorTemperatureMaximumArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Move down color temperature command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_7_2_000006_Off +- (void)testSendClusterTest_TC_CC_6_2_000005_Off { XCTestExpectation * expectation = [self expectationWithDescription:@"Turn off light that we turned on"]; @@ -7750,7 +7802,7 @@ - (void)testSendClusterTest_TC_CC_7_2_000006_Off [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_7_2_000007_ReadAttribute +- (void)testSendClusterTest_TC_CC_6_2_000006_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"]; @@ -7772,7 +7824,7 @@ - (void)testSendClusterTest_TC_CC_7_2_000007_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_7_3_000000_On +- (void)testSendClusterTest_TC_CC_6_3_000000_On { XCTestExpectation * expectation = [self expectationWithDescription:@"Turn on light for color control tests"]; @@ -7791,7 +7843,7 @@ - (void)testSendClusterTest_TC_CC_7_3_000000_On [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_7_3_000001_ReadAttribute +- (void)testSendClusterTest_TC_CC_6_3_000001_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is true after on command"]; @@ -7812,65 +7864,73 @@ - (void)testSendClusterTest_TC_CC_7_3_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_7_3_000002_EnhancedStepHue +- (void)testSendClusterTest_TC_CC_6_3_000002_StepColorTemperature { - XCTestExpectation * expectation = [self expectationWithDescription:@"Enhanced Step Hue Up command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Step up color temperature command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t stepModeArgument = 0; - uint16_t stepSizeArgument = 50U; - uint16_t transitionTimeArgument = 1U; + uint8_t stepModeArgument = 1; + uint16_t stepSizeArgument = 5U; + uint16_t transitionTimeArgument = 50U; + uint16_t colorTemperatureMinimumArgument = 5U; + uint16_t colorTemperatureMaximumArgument = 100U; uint8_t optionsMaskArgument = 0; uint8_t optionsOverrideArgument = 0; - [cluster enhancedStepHue:stepModeArgument - stepSize:stepSizeArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Enhanced Step Hue Up command Error: %@", err); + [cluster stepColorTemperature:stepModeArgument + stepSize:stepSizeArgument + transitionTime:transitionTimeArgument + colorTemperatureMinimum:colorTemperatureMinimumArgument + colorTemperatureMaximum:colorTemperatureMaximumArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Step up color temperature command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_7_3_000003_EnhancedStepHue +- (void)testSendClusterTest_TC_CC_6_3_000003_StepColorTemperature { - XCTestExpectation * expectation = [self expectationWithDescription:@"Enhanced Step Hue Down command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Step down color temperature command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t stepModeArgument = 1; - uint16_t stepSizeArgument = 75U; - uint16_t transitionTimeArgument = 1U; + uint8_t stepModeArgument = 3; + uint16_t stepSizeArgument = 5U; + uint16_t transitionTimeArgument = 50U; + uint16_t colorTemperatureMinimumArgument = 5U; + uint16_t colorTemperatureMaximumArgument = 100U; uint8_t optionsMaskArgument = 0; uint8_t optionsOverrideArgument = 0; - [cluster enhancedStepHue:stepModeArgument - stepSize:stepSizeArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Enhanced Step Hue Down command Error: %@", err); + [cluster stepColorTemperature:stepModeArgument + stepSize:stepSizeArgument + transitionTime:transitionTimeArgument + colorTemperatureMinimum:colorTemperatureMinimumArgument + colorTemperatureMaximum:colorTemperatureMaximumArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Step down color temperature command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_7_3_000004_Off +- (void)testSendClusterTest_TC_CC_6_3_000004_Off { XCTestExpectation * expectation = [self expectationWithDescription:@"Turn off light that we turned on"]; @@ -7889,7 +7949,7 @@ - (void)testSendClusterTest_TC_CC_7_3_000004_Off [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_7_3_000005_ReadAttribute +- (void)testSendClusterTest_TC_CC_6_3_000005_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"]; @@ -7911,7 +7971,7 @@ - (void)testSendClusterTest_TC_CC_7_3_000005_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_7_4_000000_On +- (void)testSendClusterTest_TC_CC_7_1_000000_On { XCTestExpectation * expectation = [self expectationWithDescription:@"Turn on light for color control tests"]; @@ -7930,7 +7990,7 @@ - (void)testSendClusterTest_TC_CC_7_4_000000_On [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_7_4_000001_ReadAttribute +- (void)testSendClusterTest_TC_CC_7_1_000001_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is true after on command"]; @@ -7951,470 +8011,1311 @@ - (void)testSendClusterTest_TC_CC_7_4_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_7_4_000002_EnhancedMoveToHueAndSaturation +- (void)testSendClusterTest_TC_CC_7_1_000002_EnhancedMoveToHue { - XCTestExpectation * expectation = [self expectationWithDescription:@"Enhanced move to hue and saturation command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Enhanced Move To Hue command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint16_t enhancedHueArgument = 1200U; - uint8_t saturationArgument = 90; - uint16_t transitionTimeArgument = 10U; + uint16_t enhancedHueArgument = 1025U; + uint8_t directionArgument = 0; + uint16_t transitionTimeArgument = 1U; uint8_t optionsMaskArgument = 0; uint8_t optionsOverrideArgument = 0; - [cluster enhancedMoveToHueAndSaturation:enhancedHueArgument - saturation:saturationArgument - transitionTime:transitionTimeArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Enhanced move to hue and saturation command Error: %@", err); + [cluster enhancedMoveToHue:enhancedHueArgument + direction:directionArgument + transitionTime:transitionTimeArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Enhanced Move To Hue command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_7_4_000003_Off +- (void)testSendClusterTest_TC_CC_7_1_000003_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Turn off light that we turned on"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"Check Remaining time attribute value matched the value sent by the last command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn off light that we turned on Error: %@", err); + [cluster readAttributeRemainingTimeWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Check Remaining time attribute value matched the value sent by the last command Error: %@", err); XCTAssertEqual(err.code, 0); + XCTAssertEqual([values[@"value"] unsignedShortValue], 1); + [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_7_4_000004_ReadAttribute +- (void)testSendClusterTest_TC_CC_7_1_000004_Off { - XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Turn off light that we turned on"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Check on/off attribute value is false after off command Error: %@", err); + [cluster off:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn off light that we turned on Error: %@", err); XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 0); - [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterTest_TC_CC_8_1_000000_On +- (void)testSendClusterTest_TC_CC_7_1_000005_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Turn on light for color control tests"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster on:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn on light for color control tests Error: %@", err); + [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Check on/off attribute value is false after off command Error: %@", err); XCTAssertEqual(err.code, 0); + XCTAssertEqual([values[@"value"] boolValue], 0); + [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_8_1_000001_ReadAttribute + +- (void)testSendClusterTest_TC_CC_7_2_000000_On { - XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is true after on command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Turn on light for color control tests"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Check on/off attribute value is true after on command Error: %@", err); + [cluster on:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn on light for color control tests Error: %@", err); XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] boolValue], 1); - [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_8_1_000002_ColorLoopSet -{ - XCTestExpectation * expectation = [self expectationWithDescription:@"Color Loop Set Command - Set all Attributs"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - uint8_t updateFlagsArgument = 14; - uint8_t actionArgument = 0; - uint8_t directionArgument = 1; - uint16_t timeArgument = 100U; - uint16_t startHueArgument = 500U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster colorLoopSet:updateFlagsArgument - action:actionArgument - direction:directionArgument - time:timeArgument - startHue:startHueArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Color Loop Set Command - Set all Attributs Error: %@", err); - - XCTAssertEqual(err.code, 0); - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_CC_8_1_000003_ReadAttribute +- (void)testSendClusterTest_TC_CC_7_2_000001_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Check ColorLoopDirection Value"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is true after on command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeColorLoopDirectionWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Check ColorLoopDirection Value Error: %@", err); + [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Check on/off attribute value is true after on command Error: %@", err); XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 1); + XCTAssertEqual([values[@"value"] boolValue], 1); [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_8_1_000004_ReadAttribute +- (void)testSendClusterTest_TC_CC_7_2_000002_EnhancedMoveHue { - XCTestExpectation * expectation = [self expectationWithDescription:@"Check ColorLoopTime Value"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Enhanced Move Hue Down command "]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeColorLoopTimeWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Check ColorLoopTime Value Error: %@", err); - - XCTAssertEqual(err.code, 0); + uint8_t moveModeArgument = 3; + uint16_t rateArgument = 5U; + uint8_t optionsMaskArgument = 0; + uint8_t optionsOverrideArgument = 0; + [cluster enhancedMoveHue:moveModeArgument + rate:rateArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Enhanced Move Hue Down command Error: %@", err); - XCTAssertEqual([values[@"value"] unsignedShortValue], 100); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_8_1_000005_ReadAttribute +- (void)testSendClusterTest_TC_CC_7_2_000003_EnhancedMoveHue { - XCTestExpectation * expectation = [self expectationWithDescription:@"Check ColorLoopStartEnhancedHue Value"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Enhanced Move Hue Stop command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeColorLoopStartEnhancedHueWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Check ColorLoopStartEnhancedHue Value Error: %@", err); - - XCTAssertEqual(err.code, 0); + uint8_t moveModeArgument = 0; + uint16_t rateArgument = 0U; + uint8_t optionsMaskArgument = 0; + uint8_t optionsOverrideArgument = 0; + [cluster enhancedMoveHue:moveModeArgument + rate:rateArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Enhanced Move Hue Stop command Error: %@", err); - XCTAssertEqual([values[@"value"] unsignedShortValue], 500); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_8_1_000006_ReadAttribute +- (void)testSendClusterTest_TC_CC_7_2_000004_EnhancedMoveHue { - XCTestExpectation * expectation = [self expectationWithDescription:@"Check ColorLoopActive Value"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Enhanced Move Hue Up command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeColorLoopActiveWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Check ColorLoopActive Value Error: %@", err); - - XCTAssertEqual(err.code, 0); + uint8_t moveModeArgument = 1; + uint16_t rateArgument = 50U; + uint8_t optionsMaskArgument = 0; + uint8_t optionsOverrideArgument = 0; + [cluster enhancedMoveHue:moveModeArgument + rate:rateArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Enhanced Move Hue Up command Error: %@", err); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_8_1_000007_ColorLoopSet +- (void)testSendClusterTest_TC_CC_7_2_000005_EnhancedMoveHue { - XCTestExpectation * expectation = [self expectationWithDescription:@"Color Loop Set Command - Start Color Loop"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Enhanced Move Hue Stop command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t updateFlagsArgument = 1; - uint8_t actionArgument = 1; - uint8_t directionArgument = 0; - uint16_t timeArgument = 0U; - uint16_t startHueArgument = 0U; + uint8_t moveModeArgument = 0; + uint16_t rateArgument = 0U; uint8_t optionsMaskArgument = 0; uint8_t optionsOverrideArgument = 0; - [cluster colorLoopSet:updateFlagsArgument - action:actionArgument - direction:directionArgument - time:timeArgument - startHue:startHueArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Color Loop Set Command - Start Color Loop Error: %@", err); + [cluster enhancedMoveHue:moveModeArgument + rate:rateArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Enhanced Move Hue Stop command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_8_1_000008_ReadAttribute +- (void)testSendClusterTest_TC_CC_7_2_000006_Off { - XCTestExpectation * expectation = [self expectationWithDescription:@"Check ColorLoopActive Value"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Turn off light that we turned on"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeColorLoopActiveWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Check ColorLoopActive Value Error: %@", err); + [cluster off:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn off light that we turned on Error: %@", err); XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 1); - [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_8_1_000009_ColorLoopSet +- (void)testSendClusterTest_TC_CC_7_2_000007_ReadAttribute { - XCTestExpectation * expectation = - [self expectationWithDescription:@"Color Loop Set Command - Set direction and time while running"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t updateFlagsArgument = 6; - uint8_t actionArgument = 0; - uint8_t directionArgument = 0; - uint16_t timeArgument = 3500U; - uint16_t startHueArgument = 0U; - uint8_t optionsMaskArgument = 0; - uint8_t optionsOverrideArgument = 0; - [cluster colorLoopSet:updateFlagsArgument - action:actionArgument - direction:directionArgument - time:timeArgument - startHue:startHueArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Color Loop Set Command - Set direction and time while running Error: %@", err); + [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Check on/off attribute value is false after off command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + XCTAssertEqual([values[@"value"] boolValue], 0); + + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_8_1_000010_ReadAttribute + +- (void)testSendClusterTest_TC_CC_7_3_000000_On { - XCTestExpectation * expectation = [self expectationWithDescription:@"Check ColorLoopDirection Value"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Turn on light for color control tests"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeColorLoopDirectionWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Check ColorLoopDirection Value Error: %@", err); + [cluster on:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn on light for color control tests Error: %@", err); XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 0); - [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_8_1_000011_ReadAttribute +- (void)testSendClusterTest_TC_CC_7_3_000001_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Check ColorLoopTime Value"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is true after on command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeColorLoopTimeWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Check ColorLoopTime Value Error: %@", err); + [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Check on/off attribute value is true after on command Error: %@", err); XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedShortValue], 3500); + XCTAssertEqual([values[@"value"] boolValue], 1); [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_8_1_000012_ColorLoopSet +- (void)testSendClusterTest_TC_CC_7_3_000002_EnhancedStepHue { - XCTestExpectation * expectation = [self expectationWithDescription:@"Color Loop Set Command - Set direction while running"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Enhanced Step Hue Up command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t updateFlagsArgument = 2; - uint8_t actionArgument = 0; - uint8_t directionArgument = 1; - uint16_t timeArgument = 0U; - uint16_t startHueArgument = 0U; + uint8_t stepModeArgument = 0; + uint16_t stepSizeArgument = 50U; + uint16_t transitionTimeArgument = 1U; uint8_t optionsMaskArgument = 0; uint8_t optionsOverrideArgument = 0; - [cluster colorLoopSet:updateFlagsArgument - action:actionArgument - direction:directionArgument - time:timeArgument - startHue:startHueArgument - optionsMask:optionsMaskArgument - optionsOverride:optionsOverrideArgument - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Color Loop Set Command - Set direction while running Error: %@", err); + [cluster enhancedStepHue:stepModeArgument + stepSize:stepSizeArgument + transitionTime:transitionTimeArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Enhanced Step Hue Up command Error: %@", err); - XCTAssertEqual(err.code, 0); + XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_8_1_000013_ReadAttribute +- (void)testSendClusterTest_TC_CC_7_3_000003_EnhancedStepHue { - XCTestExpectation * expectation = [self expectationWithDescription:@"Check ColorLoopDirection Value"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Enhanced Step Hue Down command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeColorLoopDirectionWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Check ColorLoopDirection Value Error: %@", err); + uint8_t stepModeArgument = 1; + uint16_t stepSizeArgument = 75U; + uint16_t transitionTimeArgument = 1U; + uint8_t optionsMaskArgument = 0; + uint8_t optionsOverrideArgument = 0; + [cluster enhancedStepHue:stepModeArgument + stepSize:stepSizeArgument + transitionTime:transitionTimeArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Enhanced Step Hue Down command Error: %@", err); + + XCTAssertEqual(err.code, 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_7_3_000004_Off +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Turn off light that we turned on"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster off:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn off light that we turned on Error: %@", err); XCTAssertEqual(err.code, 0); - XCTAssertEqual([values[@"value"] unsignedCharValue], 1); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_7_3_000005_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Check on/off attribute value is false after off command Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] boolValue], 0); [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_8_1_000014_Off + +- (void)testSendClusterTest_TC_CC_7_4_000000_On +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Turn on light for color control tests"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster on:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn on light for color control tests Error: %@", err); + + XCTAssertEqual(err.code, 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_7_4_000001_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is true after on command"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Check on/off attribute value is true after on command Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] boolValue], 1); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_7_4_000002_EnhancedMoveToHueAndSaturation +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Enhanced move to hue and saturation command"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + uint16_t enhancedHueArgument = 1200U; + uint8_t saturationArgument = 90; + uint16_t transitionTimeArgument = 10U; + uint8_t optionsMaskArgument = 0; + uint8_t optionsOverrideArgument = 0; + [cluster enhancedMoveToHueAndSaturation:enhancedHueArgument + saturation:saturationArgument + transitionTime:transitionTimeArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Enhanced move to hue and saturation command Error: %@", err); + + XCTAssertEqual(err.code, 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_7_4_000003_Off +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Turn off light that we turned on"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster off:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn off light that we turned on Error: %@", err); + + XCTAssertEqual(err.code, 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_7_4_000004_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Check on/off attribute value is false after off command Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] boolValue], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterTest_TC_CC_8_1_000000_On +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Turn on light for color control tests"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster on:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn on light for color control tests Error: %@", err); + + XCTAssertEqual(err.code, 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_8_1_000001_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is true after on command"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Check on/off attribute value is true after on command Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] boolValue], 1); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_8_1_000002_ColorLoopSet +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Color Loop Set Command - Set all Attributs"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + uint8_t updateFlagsArgument = 14; + uint8_t actionArgument = 0; + uint8_t directionArgument = 1; + uint16_t timeArgument = 100U; + uint16_t startHueArgument = 500U; + uint8_t optionsMaskArgument = 0; + uint8_t optionsOverrideArgument = 0; + [cluster colorLoopSet:updateFlagsArgument + action:actionArgument + direction:directionArgument + time:timeArgument + startHue:startHueArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Color Loop Set Command - Set all Attributs Error: %@", err); + + XCTAssertEqual(err.code, 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_8_1_000003_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Check ColorLoopDirection Value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeColorLoopDirectionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Check ColorLoopDirection Value Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] unsignedCharValue], 1); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_8_1_000004_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Check ColorLoopTime Value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeColorLoopTimeWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Check ColorLoopTime Value Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] unsignedShortValue], 100); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_8_1_000005_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Check ColorLoopStartEnhancedHue Value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeColorLoopStartEnhancedHueWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Check ColorLoopStartEnhancedHue Value Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] unsignedShortValue], 500); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_8_1_000006_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Check ColorLoopActive Value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeColorLoopActiveWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Check ColorLoopActive Value Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_8_1_000007_ColorLoopSet +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Color Loop Set Command - Start Color Loop"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + uint8_t updateFlagsArgument = 1; + uint8_t actionArgument = 1; + uint8_t directionArgument = 0; + uint16_t timeArgument = 0U; + uint16_t startHueArgument = 0U; + uint8_t optionsMaskArgument = 0; + uint8_t optionsOverrideArgument = 0; + [cluster colorLoopSet:updateFlagsArgument + action:actionArgument + direction:directionArgument + time:timeArgument + startHue:startHueArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Color Loop Set Command - Start Color Loop Error: %@", err); + + XCTAssertEqual(err.code, 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_8_1_000008_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Check ColorLoopActive Value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeColorLoopActiveWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Check ColorLoopActive Value Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] unsignedCharValue], 1); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_8_1_000009_ColorLoopSet +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Color Loop Set Command - Set direction and time while running"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + uint8_t updateFlagsArgument = 6; + uint8_t actionArgument = 0; + uint8_t directionArgument = 0; + uint16_t timeArgument = 3500U; + uint16_t startHueArgument = 0U; + uint8_t optionsMaskArgument = 0; + uint8_t optionsOverrideArgument = 0; + [cluster colorLoopSet:updateFlagsArgument + action:actionArgument + direction:directionArgument + time:timeArgument + startHue:startHueArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Color Loop Set Command - Set direction and time while running Error: %@", err); + + XCTAssertEqual(err.code, 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_8_1_000010_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Check ColorLoopDirection Value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeColorLoopDirectionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Check ColorLoopDirection Value Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_8_1_000011_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Check ColorLoopTime Value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeColorLoopTimeWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Check ColorLoopTime Value Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] unsignedShortValue], 3500); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_8_1_000012_ColorLoopSet +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Color Loop Set Command - Set direction while running"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + uint8_t updateFlagsArgument = 2; + uint8_t actionArgument = 0; + uint8_t directionArgument = 1; + uint16_t timeArgument = 0U; + uint16_t startHueArgument = 0U; + uint8_t optionsMaskArgument = 0; + uint8_t optionsOverrideArgument = 0; + [cluster colorLoopSet:updateFlagsArgument + action:actionArgument + direction:directionArgument + time:timeArgument + startHue:startHueArgument + optionsMask:optionsMaskArgument + optionsOverride:optionsOverrideArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Color Loop Set Command - Set direction while running Error: %@", err); + + XCTAssertEqual(err.code, 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_8_1_000013_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Check ColorLoopDirection Value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeColorLoopDirectionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Check ColorLoopDirection Value Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] unsignedCharValue], 1); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_8_1_000014_Off +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Turn off light that we turned on"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster off:^(NSError * err, NSDictionary * values) { + NSLog(@"Turn off light that we turned on Error: %@", err); + + XCTAssertEqual(err.code, 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_CC_8_1_000015_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Check on/off attribute value is false after off command Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] boolValue], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterAccountLoginReadAttributeClusterRevisionWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"AccountLoginReadAttributeClusterRevisionWithResponseHandler"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPAccountLogin * cluster = [[CHIPAccountLogin alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"AccountLogin ClusterRevision Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterAdministratorCommissioningReadAttributeClusterRevisionWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"AdministratorCommissioningReadAttributeClusterRevisionWithResponseHandler"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPAdministratorCommissioning * cluster = [[CHIPAdministratorCommissioning alloc] initWithDevice:device + endpoint:0 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"AdministratorCommissioning ClusterRevision Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterApplicationBasicReadAttributeVendorNameWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"ApplicationBasicReadAttributeVendorNameWithResponseHandler"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPApplicationBasic * cluster = [[CHIPApplicationBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeVendorNameWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ApplicationBasic VendorName Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterApplicationBasicReadAttributeVendorIdWithResponseHandler +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"ApplicationBasicReadAttributeVendorIdWithResponseHandler"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPApplicationBasic * cluster = [[CHIPApplicationBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeVendorIdWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ApplicationBasic VendorId Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterApplicationBasicReadAttributeApplicationNameWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"ApplicationBasicReadAttributeApplicationNameWithResponseHandler"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPApplicationBasic * cluster = [[CHIPApplicationBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeApplicationNameWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ApplicationBasic ApplicationName Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterApplicationBasicReadAttributeProductIdWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"ApplicationBasicReadAttributeProductIdWithResponseHandler"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPApplicationBasic * cluster = [[CHIPApplicationBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeProductIdWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ApplicationBasic ProductId Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterApplicationBasicReadAttributeApplicationIdWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"ApplicationBasicReadAttributeApplicationIdWithResponseHandler"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPApplicationBasic * cluster = [[CHIPApplicationBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeApplicationIdWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ApplicationBasic ApplicationId Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterApplicationBasicReadAttributeCatalogVendorIdWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"ApplicationBasicReadAttributeCatalogVendorIdWithResponseHandler"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPApplicationBasic * cluster = [[CHIPApplicationBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeCatalogVendorIdWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ApplicationBasic CatalogVendorId Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterApplicationBasicReadAttributeApplicationStatusWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"ApplicationBasicReadAttributeApplicationStatusWithResponseHandler"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPApplicationBasic * cluster = [[CHIPApplicationBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeApplicationStatusWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ApplicationBasic ApplicationStatus Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterApplicationBasicReadAttributeClusterRevisionWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"ApplicationBasicReadAttributeClusterRevisionWithResponseHandler"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPApplicationBasic * cluster = [[CHIPApplicationBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ApplicationBasic ClusterRevision Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterApplicationLauncherReadAttributeApplicationLauncherListWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"ApplicationLauncherReadAttributeApplicationLauncherListWithResponseHandler"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPApplicationLauncher * cluster = [[CHIPApplicationLauncher alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeApplicationLauncherListWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ApplicationLauncher ApplicationLauncherList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterApplicationLauncherReadAttributeCatalogVendorIdWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"ApplicationLauncherReadAttributeCatalogVendorIdWithResponseHandler"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPApplicationLauncher * cluster = [[CHIPApplicationLauncher alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeCatalogVendorIdWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ApplicationLauncher CatalogVendorId Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterApplicationLauncherReadAttributeApplicationIdWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"ApplicationLauncherReadAttributeApplicationIdWithResponseHandler"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPApplicationLauncher * cluster = [[CHIPApplicationLauncher alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeApplicationIdWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ApplicationLauncher ApplicationId Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterApplicationLauncherReadAttributeClusterRevisionWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"ApplicationLauncherReadAttributeClusterRevisionWithResponseHandler"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPApplicationLauncher * cluster = [[CHIPApplicationLauncher alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ApplicationLauncher ClusterRevision Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterAudioOutputReadAttributeAudioOutputListWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"AudioOutputReadAttributeAudioOutputListWithResponseHandler"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPAudioOutput * cluster = [[CHIPAudioOutput alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeAudioOutputListWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"AudioOutput AudioOutputList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterAudioOutputReadAttributeCurrentAudioOutputWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"AudioOutputReadAttributeCurrentAudioOutputWithResponseHandler"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPAudioOutput * cluster = [[CHIPAudioOutput alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeCurrentAudioOutputWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"AudioOutput CurrentAudioOutput Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterAudioOutputReadAttributeClusterRevisionWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"AudioOutputReadAttributeClusterRevisionWithResponseHandler"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPAudioOutput * cluster = [[CHIPAudioOutput alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"AudioOutput ClusterRevision Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterBarrierControlReadAttributeBarrierMovingStateWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"BarrierControlReadAttributeBarrierMovingStateWithResponseHandler"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPBarrierControl * cluster = [[CHIPBarrierControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeBarrierMovingStateWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BarrierControl BarrierMovingState Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterBarrierControlReadAttributeBarrierSafetyStatusWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"Turn off light that we turned on"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"BarrierControlReadAttributeBarrierSafetyStatusWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPBarrierControl * cluster = [[CHIPBarrierControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster off:^(NSError * err, NSDictionary * values) { - NSLog(@"Turn off light that we turned on Error: %@", err); - + [cluster readAttributeBarrierSafetyStatusWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BarrierControl BarrierSafetyStatus Error: %@", err); XCTAssertEqual(err.code, 0); - [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_CC_8_1_000015_ReadAttribute + +- (void)testSendClusterBarrierControlReadAttributeBarrierCapabilitiesWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"Check on/off attribute value is false after off command"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"BarrierControlReadAttributeBarrierCapabilitiesWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPBarrierControl * cluster = [[CHIPBarrierControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeOnOffWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Check on/off attribute value is false after off command Error: %@", err); - + [cluster readAttributeBarrierCapabilitiesWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BarrierControl BarrierCapabilities Error: %@", err); XCTAssertEqual(err.code, 0); - - XCTAssertEqual([values[@"value"] boolValue], 0); - [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterAccountLoginReadAttributeClusterRevisionWithResponseHandler +- (void)testSendClusterBarrierControlReadAttributeBarrierPositionWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"AccountLoginReadAttributeClusterRevisionWithResponseHandler"]; + [self expectationWithDescription:@"BarrierControlReadAttributeBarrierPositionWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPAccountLogin * cluster = [[CHIPAccountLogin alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPBarrierControl * cluster = [[CHIPBarrierControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"AccountLogin ClusterRevision Error: %@", err); + [cluster readAttributeBarrierPositionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BarrierControl BarrierPosition Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -8422,20 +9323,18 @@ - (void)testSendClusterAccountLoginReadAttributeClusterRevisionWithResponseHandl [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterAdministratorCommissioningReadAttributeClusterRevisionWithResponseHandler +- (void)testSendClusterBarrierControlReadAttributeClusterRevisionWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"AdministratorCommissioningReadAttributeClusterRevisionWithResponseHandler"]; + [self expectationWithDescription:@"BarrierControlReadAttributeClusterRevisionWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPAdministratorCommissioning * cluster = [[CHIPAdministratorCommissioning alloc] initWithDevice:device - endpoint:0 - queue:queue]; + CHIPBarrierControl * cluster = [[CHIPBarrierControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"AdministratorCommissioning ClusterRevision Error: %@", err); + NSLog(@"BarrierControl ClusterRevision Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -8443,18 +9342,18 @@ - (void)testSendClusterAdministratorCommissioningReadAttributeClusterRevisionWit [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterApplicationBasicReadAttributeVendorNameWithResponseHandler +- (void)testSendClusterBinaryInputBasicReadAttributeOutOfServiceWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ApplicationBasicReadAttributeVendorNameWithResponseHandler"]; + [self expectationWithDescription:@"BinaryInputBasicReadAttributeOutOfServiceWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPApplicationBasic * cluster = [[CHIPApplicationBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPBinaryInputBasic * cluster = [[CHIPBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeVendorNameWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ApplicationBasic VendorName Error: %@", err); + [cluster readAttributeOutOfServiceWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BinaryInputBasic OutOfService Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -8462,36 +9361,37 @@ - (void)testSendClusterApplicationBasicReadAttributeVendorNameWithResponseHandle [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterApplicationBasicReadAttributeVendorIdWithResponseHandler +- (void)testSendClusterBinaryInputBasicWriteAttributeOutOfServiceWithValue { - XCTestExpectation * expectation = [self expectationWithDescription:@"ApplicationBasicReadAttributeVendorIdWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"BinaryInputBasicWriteAttributeOutOfServiceWithValue"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPApplicationBasic * cluster = [[CHIPApplicationBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPBinaryInputBasic * cluster = [[CHIPBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeVendorIdWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ApplicationBasic VendorId Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + bool value = 0x00; + [cluster writeAttributeOutOfServiceWithValue:value + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BinaryInputBasic OutOfService Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterApplicationBasicReadAttributeApplicationNameWithResponseHandler +- (void)testSendClusterBinaryInputBasicReadAttributePresentValueWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ApplicationBasicReadAttributeApplicationNameWithResponseHandler"]; + [self expectationWithDescription:@"BinaryInputBasicReadAttributePresentValueWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPApplicationBasic * cluster = [[CHIPApplicationBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPBinaryInputBasic * cluster = [[CHIPBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeApplicationNameWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ApplicationBasic ApplicationName Error: %@", err); + [cluster readAttributePresentValueWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BinaryInputBasic PresentValue Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -8499,37 +9399,37 @@ - (void)testSendClusterApplicationBasicReadAttributeApplicationNameWithResponseH [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterApplicationBasicReadAttributeProductIdWithResponseHandler +- (void)testSendClusterBinaryInputBasicWriteAttributePresentValueWithValue { - XCTestExpectation * expectation = - [self expectationWithDescription:@"ApplicationBasicReadAttributeProductIdWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"BinaryInputBasicWriteAttributePresentValueWithValue"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPApplicationBasic * cluster = [[CHIPApplicationBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPBinaryInputBasic * cluster = [[CHIPBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeProductIdWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ApplicationBasic ProductId Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + bool value = 0; + [cluster writeAttributePresentValueWithValue:value + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BinaryInputBasic PresentValue Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterApplicationBasicReadAttributeApplicationIdWithResponseHandler +- (void)testSendClusterBinaryInputBasicReadAttributeStatusFlagsWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ApplicationBasicReadAttributeApplicationIdWithResponseHandler"]; + [self expectationWithDescription:@"BinaryInputBasicReadAttributeStatusFlagsWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPApplicationBasic * cluster = [[CHIPApplicationBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPBinaryInputBasic * cluster = [[CHIPBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeApplicationIdWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ApplicationBasic ApplicationId Error: %@", err); + [cluster readAttributeStatusFlagsWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BinaryInputBasic StatusFlags Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -8537,18 +9437,18 @@ - (void)testSendClusterApplicationBasicReadAttributeApplicationIdWithResponseHan [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterApplicationBasicReadAttributeCatalogVendorIdWithResponseHandler +- (void)testSendClusterBinaryInputBasicReadAttributeClusterRevisionWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ApplicationBasicReadAttributeCatalogVendorIdWithResponseHandler"]; + [self expectationWithDescription:@"BinaryInputBasicReadAttributeClusterRevisionWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPApplicationBasic * cluster = [[CHIPApplicationBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPBinaryInputBasic * cluster = [[CHIPBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeCatalogVendorIdWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ApplicationBasic CatalogVendorId Error: %@", err); + [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BinaryInputBasic ClusterRevision Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -8556,18 +9456,17 @@ - (void)testSendClusterApplicationBasicReadAttributeCatalogVendorIdWithResponseH [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterApplicationBasicReadAttributeApplicationStatusWithResponseHandler +- (void)testSendClusterBindingReadAttributeClusterRevisionWithResponseHandler { - XCTestExpectation * expectation = - [self expectationWithDescription:@"ApplicationBasicReadAttributeApplicationStatusWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"BindingReadAttributeClusterRevisionWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPApplicationBasic * cluster = [[CHIPApplicationBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPBinding * cluster = [[CHIPBinding alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeApplicationStatusWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ApplicationBasic ApplicationStatus Error: %@", err); + [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Binding ClusterRevision Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -8575,18 +9474,18 @@ - (void)testSendClusterApplicationBasicReadAttributeApplicationStatusWithRespons [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterApplicationBasicReadAttributeClusterRevisionWithResponseHandler +- (void)testSendClusterBridgedDeviceBasicReadAttributeVendorNameWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ApplicationBasicReadAttributeClusterRevisionWithResponseHandler"]; + [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeVendorNameWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPApplicationBasic * cluster = [[CHIPApplicationBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ApplicationBasic ClusterRevision Error: %@", err); + [cluster readAttributeVendorNameWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedDeviceBasic VendorName Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -8594,18 +9493,18 @@ - (void)testSendClusterApplicationBasicReadAttributeClusterRevisionWithResponseH [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterApplicationLauncherReadAttributeApplicationLauncherListWithResponseHandler +- (void)testSendClusterBridgedDeviceBasicReadAttributeVendorIDWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ApplicationLauncherReadAttributeApplicationLauncherListWithResponseHandler"]; + [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeVendorIDWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPApplicationLauncher * cluster = [[CHIPApplicationLauncher alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeApplicationLauncherListWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ApplicationLauncher ApplicationLauncherList Error: %@", err); + [cluster readAttributeVendorIDWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedDeviceBasic VendorID Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -8613,18 +9512,18 @@ - (void)testSendClusterApplicationLauncherReadAttributeApplicationLauncherListWi [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterApplicationLauncherReadAttributeCatalogVendorIdWithResponseHandler +- (void)testSendClusterBridgedDeviceBasicReadAttributeProductNameWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ApplicationLauncherReadAttributeCatalogVendorIdWithResponseHandler"]; + [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeProductNameWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPApplicationLauncher * cluster = [[CHIPApplicationLauncher alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeCatalogVendorIdWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ApplicationLauncher CatalogVendorId Error: %@", err); + [cluster readAttributeProductNameWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedDeviceBasic ProductName Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -8632,18 +9531,18 @@ - (void)testSendClusterApplicationLauncherReadAttributeCatalogVendorIdWithRespon [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterApplicationLauncherReadAttributeApplicationIdWithResponseHandler +- (void)testSendClusterBridgedDeviceBasicReadAttributeUserLabelWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ApplicationLauncherReadAttributeApplicationIdWithResponseHandler"]; + [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeUserLabelWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPApplicationLauncher * cluster = [[CHIPApplicationLauncher alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeApplicationIdWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ApplicationLauncher ApplicationId Error: %@", err); + [cluster readAttributeUserLabelWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedDeviceBasic UserLabel Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -8651,37 +9550,37 @@ - (void)testSendClusterApplicationLauncherReadAttributeApplicationIdWithResponse [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterApplicationLauncherReadAttributeClusterRevisionWithResponseHandler +- (void)testSendClusterBridgedDeviceBasicWriteAttributeUserLabelWithValue { - XCTestExpectation * expectation = - [self expectationWithDescription:@"ApplicationLauncherReadAttributeClusterRevisionWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"BridgedDeviceBasicWriteAttributeUserLabelWithValue"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPApplicationLauncher * cluster = [[CHIPApplicationLauncher alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ApplicationLauncher ClusterRevision Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + NSString * value = @"Test"; + [cluster writeAttributeUserLabelWithValue:value + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedDeviceBasic UserLabel Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterAudioOutputReadAttributeAudioOutputListWithResponseHandler +- (void)testSendClusterBridgedDeviceBasicReadAttributeHardwareVersionWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"AudioOutputReadAttributeAudioOutputListWithResponseHandler"]; + [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeHardwareVersionWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPAudioOutput * cluster = [[CHIPAudioOutput alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeAudioOutputListWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"AudioOutput AudioOutputList Error: %@", err); + [cluster readAttributeHardwareVersionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedDeviceBasic HardwareVersion Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -8689,18 +9588,18 @@ - (void)testSendClusterAudioOutputReadAttributeAudioOutputListWithResponseHandle [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterAudioOutputReadAttributeCurrentAudioOutputWithResponseHandler +- (void)testSendClusterBridgedDeviceBasicReadAttributeHardwareVersionStringWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"AudioOutputReadAttributeCurrentAudioOutputWithResponseHandler"]; + [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeHardwareVersionStringWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPAudioOutput * cluster = [[CHIPAudioOutput alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeCurrentAudioOutputWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"AudioOutput CurrentAudioOutput Error: %@", err); + [cluster readAttributeHardwareVersionStringWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedDeviceBasic HardwareVersionString Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -8708,18 +9607,18 @@ - (void)testSendClusterAudioOutputReadAttributeCurrentAudioOutputWithResponseHan [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterAudioOutputReadAttributeClusterRevisionWithResponseHandler +- (void)testSendClusterBridgedDeviceBasicReadAttributeSoftwareVersionWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"AudioOutputReadAttributeClusterRevisionWithResponseHandler"]; + [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeSoftwareVersionWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPAudioOutput * cluster = [[CHIPAudioOutput alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"AudioOutput ClusterRevision Error: %@", err); + [cluster readAttributeSoftwareVersionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedDeviceBasic SoftwareVersion Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -8727,18 +9626,18 @@ - (void)testSendClusterAudioOutputReadAttributeClusterRevisionWithResponseHandle [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterBarrierControlReadAttributeBarrierMovingStateWithResponseHandler +- (void)testSendClusterBridgedDeviceBasicReadAttributeSoftwareVersionStringWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"BarrierControlReadAttributeBarrierMovingStateWithResponseHandler"]; + [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeSoftwareVersionStringWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBarrierControl * cluster = [[CHIPBarrierControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeBarrierMovingStateWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"BarrierControl BarrierMovingState Error: %@", err); + [cluster readAttributeSoftwareVersionStringWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedDeviceBasic SoftwareVersionString Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -8746,18 +9645,18 @@ - (void)testSendClusterBarrierControlReadAttributeBarrierMovingStateWithResponse [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterBarrierControlReadAttributeBarrierSafetyStatusWithResponseHandler +- (void)testSendClusterBridgedDeviceBasicReadAttributeManufacturingDateWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"BarrierControlReadAttributeBarrierSafetyStatusWithResponseHandler"]; + [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeManufacturingDateWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBarrierControl * cluster = [[CHIPBarrierControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeBarrierSafetyStatusWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"BarrierControl BarrierSafetyStatus Error: %@", err); + [cluster readAttributeManufacturingDateWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedDeviceBasic ManufacturingDate Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -8765,18 +9664,18 @@ - (void)testSendClusterBarrierControlReadAttributeBarrierSafetyStatusWithRespons [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterBarrierControlReadAttributeBarrierCapabilitiesWithResponseHandler +- (void)testSendClusterBridgedDeviceBasicReadAttributePartNumberWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"BarrierControlReadAttributeBarrierCapabilitiesWithResponseHandler"]; + [self expectationWithDescription:@"BridgedDeviceBasicReadAttributePartNumberWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBarrierControl * cluster = [[CHIPBarrierControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeBarrierCapabilitiesWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"BarrierControl BarrierCapabilities Error: %@", err); + [cluster readAttributePartNumberWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedDeviceBasic PartNumber Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -8784,18 +9683,18 @@ - (void)testSendClusterBarrierControlReadAttributeBarrierCapabilitiesWithRespons [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterBarrierControlReadAttributeBarrierPositionWithResponseHandler +- (void)testSendClusterBridgedDeviceBasicReadAttributeProductURLWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"BarrierControlReadAttributeBarrierPositionWithResponseHandler"]; + [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeProductURLWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBarrierControl * cluster = [[CHIPBarrierControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeBarrierPositionWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"BarrierControl BarrierPosition Error: %@", err); + [cluster readAttributeProductURLWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedDeviceBasic ProductURL Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -8803,18 +9702,18 @@ - (void)testSendClusterBarrierControlReadAttributeBarrierPositionWithResponseHan [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterBarrierControlReadAttributeClusterRevisionWithResponseHandler +- (void)testSendClusterBridgedDeviceBasicReadAttributeProductLabelWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"BarrierControlReadAttributeClusterRevisionWithResponseHandler"]; + [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeProductLabelWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBarrierControl * cluster = [[CHIPBarrierControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"BarrierControl ClusterRevision Error: %@", err); + [cluster readAttributeProductLabelWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedDeviceBasic ProductLabel Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -8822,18 +9721,18 @@ - (void)testSendClusterBarrierControlReadAttributeClusterRevisionWithResponseHan [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterBinaryInputBasicReadAttributeOutOfServiceWithResponseHandler +- (void)testSendClusterBridgedDeviceBasicReadAttributeSerialNumberWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"BinaryInputBasicReadAttributeOutOfServiceWithResponseHandler"]; + [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeSerialNumberWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBinaryInputBasic * cluster = [[CHIPBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeOutOfServiceWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"BinaryInputBasic OutOfService Error: %@", err); + [cluster readAttributeSerialNumberWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedDeviceBasic SerialNumber Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -8841,37 +9740,37 @@ - (void)testSendClusterBinaryInputBasicReadAttributeOutOfServiceWithResponseHand [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterBinaryInputBasicWriteAttributeOutOfServiceWithValue +- (void)testSendClusterBridgedDeviceBasicReadAttributeReachableWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"BinaryInputBasicWriteAttributeOutOfServiceWithValue"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeReachableWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBinaryInputBasic * cluster = [[CHIPBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - bool value = 0x00; - [cluster writeAttributeOutOfServiceWithValue:value - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"BinaryInputBasic OutOfService Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [cluster readAttributeReachableWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedDeviceBasic Reachable Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterBinaryInputBasicReadAttributePresentValueWithResponseHandler + +- (void)testSendClusterBridgedDeviceBasicReadAttributeClusterRevisionWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"BinaryInputBasicReadAttributePresentValueWithResponseHandler"]; + [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeClusterRevisionWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBinaryInputBasic * cluster = [[CHIPBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributePresentValueWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"BinaryInputBasic PresentValue Error: %@", err); + [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedDeviceBasic ClusterRevision Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -8879,37 +9778,36 @@ - (void)testSendClusterBinaryInputBasicReadAttributePresentValueWithResponseHand [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterBinaryInputBasicWriteAttributePresentValueWithValue +- (void)testSendClusterColorControlReadAttributeCurrentHueWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"BinaryInputBasicWriteAttributePresentValueWithValue"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeCurrentHueWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBinaryInputBasic * cluster = [[CHIPBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - bool value = 0; - [cluster writeAttributePresentValueWithValue:value - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"BinaryInputBasic PresentValue Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [cluster readAttributeCurrentHueWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl CurrentHue Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterBinaryInputBasicReadAttributeStatusFlagsWithResponseHandler + +- (void)testSendClusterColorControlReadAttributeCurrentSaturationWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"BinaryInputBasicReadAttributeStatusFlagsWithResponseHandler"]; + [self expectationWithDescription:@"ColorControlReadAttributeCurrentSaturationWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBinaryInputBasic * cluster = [[CHIPBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeStatusFlagsWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"BinaryInputBasic StatusFlags Error: %@", err); + [cluster readAttributeCurrentSaturationWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl CurrentSaturation Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -8917,18 +9815,18 @@ - (void)testSendClusterBinaryInputBasicReadAttributeStatusFlagsWithResponseHandl [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterBinaryInputBasicReadAttributeClusterRevisionWithResponseHandler +- (void)testSendClusterColorControlReadAttributeRemainingTimeWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"BinaryInputBasicReadAttributeClusterRevisionWithResponseHandler"]; + [self expectationWithDescription:@"ColorControlReadAttributeRemainingTimeWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBinaryInputBasic * cluster = [[CHIPBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"BinaryInputBasic ClusterRevision Error: %@", err); + [cluster readAttributeRemainingTimeWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl RemainingTime Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -8936,17 +9834,17 @@ - (void)testSendClusterBinaryInputBasicReadAttributeClusterRevisionWithResponseH [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterBindingReadAttributeClusterRevisionWithResponseHandler +- (void)testSendClusterColorControlReadAttributeCurrentXWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"BindingReadAttributeClusterRevisionWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeCurrentXWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBinding * cluster = [[CHIPBinding alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Binding ClusterRevision Error: %@", err); + [cluster readAttributeCurrentXWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl CurrentX Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -8954,18 +9852,17 @@ - (void)testSendClusterBindingReadAttributeClusterRevisionWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterBridgedDeviceBasicReadAttributeVendorNameWithResponseHandler +- (void)testSendClusterColorControlReadAttributeCurrentYWithResponseHandler { - XCTestExpectation * expectation = - [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeVendorNameWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeCurrentYWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeVendorNameWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"BridgedDeviceBasic VendorName Error: %@", err); + [cluster readAttributeCurrentYWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl CurrentY Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -8973,18 +9870,18 @@ - (void)testSendClusterBridgedDeviceBasicReadAttributeVendorNameWithResponseHand [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterBridgedDeviceBasicReadAttributeVendorIDWithResponseHandler +- (void)testSendClusterColorControlReadAttributeDriftCompensationWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeVendorIDWithResponseHandler"]; + [self expectationWithDescription:@"ColorControlReadAttributeDriftCompensationWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeVendorIDWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"BridgedDeviceBasic VendorID Error: %@", err); + [cluster readAttributeDriftCompensationWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl DriftCompensation Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -8992,18 +9889,18 @@ - (void)testSendClusterBridgedDeviceBasicReadAttributeVendorIDWithResponseHandle [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterBridgedDeviceBasicReadAttributeProductNameWithResponseHandler +- (void)testSendClusterColorControlReadAttributeCompensationTextWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeProductNameWithResponseHandler"]; + [self expectationWithDescription:@"ColorControlReadAttributeCompensationTextWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeProductNameWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"BridgedDeviceBasic ProductName Error: %@", err); + [cluster readAttributeCompensationTextWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl CompensationText Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9011,18 +9908,18 @@ - (void)testSendClusterBridgedDeviceBasicReadAttributeProductNameWithResponseHan [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterBridgedDeviceBasicReadAttributeUserLabelWithResponseHandler +- (void)testSendClusterColorControlReadAttributeColorTemperatureWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeUserLabelWithResponseHandler"]; + [self expectationWithDescription:@"ColorControlReadAttributeColorTemperatureWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeUserLabelWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"BridgedDeviceBasic UserLabel Error: %@", err); + [cluster readAttributeColorTemperatureWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl ColorTemperature Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9030,37 +9927,36 @@ - (void)testSendClusterBridgedDeviceBasicReadAttributeUserLabelWithResponseHandl [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterBridgedDeviceBasicWriteAttributeUserLabelWithValue +- (void)testSendClusterColorControlReadAttributeColorModeWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"BridgedDeviceBasicWriteAttributeUserLabelWithValue"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeColorModeWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - NSString * value = @"Test"; - [cluster writeAttributeUserLabelWithValue:value - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"BridgedDeviceBasic UserLabel Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [cluster readAttributeColorModeWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl ColorMode Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterBridgedDeviceBasicReadAttributeHardwareVersionWithResponseHandler + +- (void)testSendClusterColorControlReadAttributeColorControlOptionsWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeHardwareVersionWithResponseHandler"]; + [self expectationWithDescription:@"ColorControlReadAttributeColorControlOptionsWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeHardwareVersionWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"BridgedDeviceBasic HardwareVersion Error: %@", err); + [cluster readAttributeColorControlOptionsWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl ColorControlOptions Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9068,18 +9964,37 @@ - (void)testSendClusterBridgedDeviceBasicReadAttributeHardwareVersionWithRespons [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterBridgedDeviceBasicReadAttributeHardwareVersionStringWithResponseHandler +- (void)testSendClusterColorControlWriteAttributeColorControlOptionsWithValue +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeColorControlOptionsWithValue"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + uint8_t value = 0x00; + [cluster writeAttributeColorControlOptionsWithValue:value + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl ColorControlOptions Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterColorControlReadAttributeNumberOfPrimariesWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeHardwareVersionStringWithResponseHandler"]; + [self expectationWithDescription:@"ColorControlReadAttributeNumberOfPrimariesWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeHardwareVersionStringWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"BridgedDeviceBasic HardwareVersionString Error: %@", err); + [cluster readAttributeNumberOfPrimariesWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl NumberOfPrimaries Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9087,18 +10002,17 @@ - (void)testSendClusterBridgedDeviceBasicReadAttributeHardwareVersionStringWithR [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterBridgedDeviceBasicReadAttributeSoftwareVersionWithResponseHandler +- (void)testSendClusterColorControlReadAttributePrimary1XWithResponseHandler { - XCTestExpectation * expectation = - [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeSoftwareVersionWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary1XWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeSoftwareVersionWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"BridgedDeviceBasic SoftwareVersion Error: %@", err); + [cluster readAttributePrimary1XWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl Primary1X Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9106,18 +10020,17 @@ - (void)testSendClusterBridgedDeviceBasicReadAttributeSoftwareVersionWithRespons [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterBridgedDeviceBasicReadAttributeSoftwareVersionStringWithResponseHandler +- (void)testSendClusterColorControlReadAttributePrimary1YWithResponseHandler { - XCTestExpectation * expectation = - [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeSoftwareVersionStringWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary1YWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeSoftwareVersionStringWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"BridgedDeviceBasic SoftwareVersionString Error: %@", err); + [cluster readAttributePrimary1YWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl Primary1Y Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9125,18 +10038,18 @@ - (void)testSendClusterBridgedDeviceBasicReadAttributeSoftwareVersionStringWithR [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterBridgedDeviceBasicReadAttributeManufacturingDateWithResponseHandler +- (void)testSendClusterColorControlReadAttributePrimary1IntensityWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeManufacturingDateWithResponseHandler"]; + [self expectationWithDescription:@"ColorControlReadAttributePrimary1IntensityWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeManufacturingDateWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"BridgedDeviceBasic ManufacturingDate Error: %@", err); + [cluster readAttributePrimary1IntensityWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl Primary1Intensity Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9144,18 +10057,17 @@ - (void)testSendClusterBridgedDeviceBasicReadAttributeManufacturingDateWithRespo [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterBridgedDeviceBasicReadAttributePartNumberWithResponseHandler +- (void)testSendClusterColorControlReadAttributePrimary2XWithResponseHandler { - XCTestExpectation * expectation = - [self expectationWithDescription:@"BridgedDeviceBasicReadAttributePartNumberWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary2XWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributePartNumberWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"BridgedDeviceBasic PartNumber Error: %@", err); + [cluster readAttributePrimary2XWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl Primary2X Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9163,18 +10075,17 @@ - (void)testSendClusterBridgedDeviceBasicReadAttributePartNumberWithResponseHand [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterBridgedDeviceBasicReadAttributeProductURLWithResponseHandler +- (void)testSendClusterColorControlReadAttributePrimary2YWithResponseHandler { - XCTestExpectation * expectation = - [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeProductURLWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary2YWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeProductURLWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"BridgedDeviceBasic ProductURL Error: %@", err); + [cluster readAttributePrimary2YWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl Primary2Y Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9182,18 +10093,18 @@ - (void)testSendClusterBridgedDeviceBasicReadAttributeProductURLWithResponseHand [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterBridgedDeviceBasicReadAttributeProductLabelWithResponseHandler +- (void)testSendClusterColorControlReadAttributePrimary2IntensityWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeProductLabelWithResponseHandler"]; + [self expectationWithDescription:@"ColorControlReadAttributePrimary2IntensityWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeProductLabelWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"BridgedDeviceBasic ProductLabel Error: %@", err); + [cluster readAttributePrimary2IntensityWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl Primary2Intensity Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9201,18 +10112,17 @@ - (void)testSendClusterBridgedDeviceBasicReadAttributeProductLabelWithResponseHa [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterBridgedDeviceBasicReadAttributeSerialNumberWithResponseHandler +- (void)testSendClusterColorControlReadAttributePrimary3XWithResponseHandler { - XCTestExpectation * expectation = - [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeSerialNumberWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary3XWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeSerialNumberWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"BridgedDeviceBasic SerialNumber Error: %@", err); + [cluster readAttributePrimary3XWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl Primary3X Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9220,18 +10130,17 @@ - (void)testSendClusterBridgedDeviceBasicReadAttributeSerialNumberWithResponseHa [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterBridgedDeviceBasicReadAttributeReachableWithResponseHandler +- (void)testSendClusterColorControlReadAttributePrimary3YWithResponseHandler { - XCTestExpectation * expectation = - [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeReachableWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary3YWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeReachableWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"BridgedDeviceBasic Reachable Error: %@", err); + [cluster readAttributePrimary3YWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl Primary3Y Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9239,18 +10148,18 @@ - (void)testSendClusterBridgedDeviceBasicReadAttributeReachableWithResponseHandl [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterBridgedDeviceBasicReadAttributeClusterRevisionWithResponseHandler +- (void)testSendClusterColorControlReadAttributePrimary3IntensityWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeClusterRevisionWithResponseHandler"]; + [self expectationWithDescription:@"ColorControlReadAttributePrimary3IntensityWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"BridgedDeviceBasic ClusterRevision Error: %@", err); + [cluster readAttributePrimary3IntensityWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl Primary3Intensity Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9258,17 +10167,17 @@ - (void)testSendClusterBridgedDeviceBasicReadAttributeClusterRevisionWithRespons [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeCurrentHueWithResponseHandler +- (void)testSendClusterColorControlReadAttributePrimary4XWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeCurrentHueWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary4XWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeCurrentHueWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl CurrentHue Error: %@", err); + [cluster readAttributePrimary4XWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl Primary4X Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9276,18 +10185,17 @@ - (void)testSendClusterColorControlReadAttributeCurrentHueWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeCurrentSaturationWithResponseHandler +- (void)testSendClusterColorControlReadAttributePrimary4YWithResponseHandler { - XCTestExpectation * expectation = - [self expectationWithDescription:@"ColorControlReadAttributeCurrentSaturationWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary4YWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeCurrentSaturationWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl CurrentSaturation Error: %@", err); + [cluster readAttributePrimary4YWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl Primary4Y Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9295,18 +10203,18 @@ - (void)testSendClusterColorControlReadAttributeCurrentSaturationWithResponseHan [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeRemainingTimeWithResponseHandler +- (void)testSendClusterColorControlReadAttributePrimary4IntensityWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ColorControlReadAttributeRemainingTimeWithResponseHandler"]; + [self expectationWithDescription:@"ColorControlReadAttributePrimary4IntensityWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeRemainingTimeWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl RemainingTime Error: %@", err); + [cluster readAttributePrimary4IntensityWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl Primary4Intensity Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9314,17 +10222,17 @@ - (void)testSendClusterColorControlReadAttributeRemainingTimeWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeCurrentXWithResponseHandler +- (void)testSendClusterColorControlReadAttributePrimary5XWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeCurrentXWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary5XWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeCurrentXWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl CurrentX Error: %@", err); + [cluster readAttributePrimary5XWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl Primary5X Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9332,17 +10240,17 @@ - (void)testSendClusterColorControlReadAttributeCurrentXWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeCurrentYWithResponseHandler +- (void)testSendClusterColorControlReadAttributePrimary5YWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeCurrentYWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary5YWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeCurrentYWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl CurrentY Error: %@", err); + [cluster readAttributePrimary5YWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl Primary5Y Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9350,18 +10258,18 @@ - (void)testSendClusterColorControlReadAttributeCurrentYWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeDriftCompensationWithResponseHandler +- (void)testSendClusterColorControlReadAttributePrimary5IntensityWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ColorControlReadAttributeDriftCompensationWithResponseHandler"]; + [self expectationWithDescription:@"ColorControlReadAttributePrimary5IntensityWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeDriftCompensationWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl DriftCompensation Error: %@", err); + [cluster readAttributePrimary5IntensityWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl Primary5Intensity Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9369,18 +10277,17 @@ - (void)testSendClusterColorControlReadAttributeDriftCompensationWithResponseHan [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeCompensationTextWithResponseHandler +- (void)testSendClusterColorControlReadAttributePrimary6XWithResponseHandler { - XCTestExpectation * expectation = - [self expectationWithDescription:@"ColorControlReadAttributeCompensationTextWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary6XWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeCompensationTextWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl CompensationText Error: %@", err); + [cluster readAttributePrimary6XWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl Primary6X Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9388,18 +10295,17 @@ - (void)testSendClusterColorControlReadAttributeCompensationTextWithResponseHand [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeColorTemperatureWithResponseHandler +- (void)testSendClusterColorControlReadAttributePrimary6YWithResponseHandler { - XCTestExpectation * expectation = - [self expectationWithDescription:@"ColorControlReadAttributeColorTemperatureWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary6YWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeColorTemperatureWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl ColorTemperature Error: %@", err); + [cluster readAttributePrimary6YWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl Primary6Y Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9407,17 +10313,18 @@ - (void)testSendClusterColorControlReadAttributeColorTemperatureWithResponseHand [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeColorModeWithResponseHandler +- (void)testSendClusterColorControlReadAttributePrimary6IntensityWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeColorModeWithResponseHandler"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"ColorControlReadAttributePrimary6IntensityWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeColorModeWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl ColorMode Error: %@", err); + [cluster readAttributePrimary6IntensityWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl Primary6Intensity Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9425,18 +10332,17 @@ - (void)testSendClusterColorControlReadAttributeColorModeWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeColorControlOptionsWithResponseHandler +- (void)testSendClusterColorControlReadAttributeWhitePointXWithResponseHandler { - XCTestExpectation * expectation = - [self expectationWithDescription:@"ColorControlReadAttributeColorControlOptionsWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeWhitePointXWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeColorControlOptionsWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl ColorControlOptions Error: %@", err); + [cluster readAttributeWhitePointXWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl WhitePointX Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9444,37 +10350,36 @@ - (void)testSendClusterColorControlReadAttributeColorControlOptionsWithResponseH [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlWriteAttributeColorControlOptionsWithValue +- (void)testSendClusterColorControlWriteAttributeWhitePointXWithValue { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeColorControlOptionsWithValue"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeWhitePointXWithValue"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t value = 0x00; - [cluster writeAttributeColorControlOptionsWithValue:value - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl ColorControlOptions Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + uint16_t value = 0x0000; + [cluster writeAttributeWhitePointXWithValue:value + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl WhitePointX Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeNumberOfPrimariesWithResponseHandler +- (void)testSendClusterColorControlReadAttributeWhitePointYWithResponseHandler { - XCTestExpectation * expectation = - [self expectationWithDescription:@"ColorControlReadAttributeNumberOfPrimariesWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeWhitePointYWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeNumberOfPrimariesWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl NumberOfPrimaries Error: %@", err); + [cluster readAttributeWhitePointYWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl WhitePointY Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9482,35 +10387,36 @@ - (void)testSendClusterColorControlReadAttributeNumberOfPrimariesWithResponseHan [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributePrimary1XWithResponseHandler +- (void)testSendClusterColorControlWriteAttributeWhitePointYWithValue { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary1XWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeWhitePointYWithValue"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributePrimary1XWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl Primary1X Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + uint16_t value = 0x0000; + [cluster writeAttributeWhitePointYWithValue:value + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl WhitePointY Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterColorControlReadAttributePrimary1YWithResponseHandler +- (void)testSendClusterColorControlReadAttributeColorPointRXWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary1YWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeColorPointRXWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributePrimary1YWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl Primary1Y Error: %@", err); + [cluster readAttributeColorPointRXWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl ColorPointRX Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9518,36 +10424,36 @@ - (void)testSendClusterColorControlReadAttributePrimary1YWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributePrimary1IntensityWithResponseHandler +- (void)testSendClusterColorControlWriteAttributeColorPointRXWithValue { - XCTestExpectation * expectation = - [self expectationWithDescription:@"ColorControlReadAttributePrimary1IntensityWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeColorPointRXWithValue"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributePrimary1IntensityWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl Primary1Intensity Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + uint16_t value = 0x0000; + [cluster writeAttributeColorPointRXWithValue:value + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl ColorPointRX Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterColorControlReadAttributePrimary2XWithResponseHandler +- (void)testSendClusterColorControlReadAttributeColorPointRYWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary2XWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeColorPointRYWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributePrimary2XWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl Primary2X Error: %@", err); + [cluster readAttributeColorPointRYWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl ColorPointRY Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9555,36 +10461,37 @@ - (void)testSendClusterColorControlReadAttributePrimary2XWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributePrimary2YWithResponseHandler +- (void)testSendClusterColorControlWriteAttributeColorPointRYWithValue { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary2YWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeColorPointRYWithValue"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributePrimary2YWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl Primary2Y Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + uint16_t value = 0x0000; + [cluster writeAttributeColorPointRYWithValue:value + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl ColorPointRY Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterColorControlReadAttributePrimary2IntensityWithResponseHandler +- (void)testSendClusterColorControlReadAttributeColorPointRIntensityWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ColorControlReadAttributePrimary2IntensityWithResponseHandler"]; + [self expectationWithDescription:@"ColorControlReadAttributeColorPointRIntensityWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributePrimary2IntensityWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl Primary2Intensity Error: %@", err); + [cluster readAttributeColorPointRIntensityWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl ColorPointRIntensity Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9592,35 +10499,36 @@ - (void)testSendClusterColorControlReadAttributePrimary2IntensityWithResponseHan [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributePrimary3XWithResponseHandler +- (void)testSendClusterColorControlWriteAttributeColorPointRIntensityWithValue { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary3XWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeColorPointRIntensityWithValue"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributePrimary3XWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl Primary3X Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + uint8_t value = 0x00; + [cluster writeAttributeColorPointRIntensityWithValue:value + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl ColorPointRIntensity Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterColorControlReadAttributePrimary3YWithResponseHandler +- (void)testSendClusterColorControlReadAttributeColorPointGXWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary3YWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeColorPointGXWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributePrimary3YWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl Primary3Y Error: %@", err); + [cluster readAttributeColorPointGXWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl ColorPointGX Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9628,36 +10536,36 @@ - (void)testSendClusterColorControlReadAttributePrimary3YWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributePrimary3IntensityWithResponseHandler +- (void)testSendClusterColorControlWriteAttributeColorPointGXWithValue { - XCTestExpectation * expectation = - [self expectationWithDescription:@"ColorControlReadAttributePrimary3IntensityWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeColorPointGXWithValue"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributePrimary3IntensityWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl Primary3Intensity Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + uint16_t value = 0x0000; + [cluster writeAttributeColorPointGXWithValue:value + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl ColorPointGX Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterColorControlReadAttributePrimary4XWithResponseHandler +- (void)testSendClusterColorControlReadAttributeColorPointGYWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary4XWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeColorPointGYWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributePrimary4XWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl Primary4X Error: %@", err); + [cluster readAttributeColorPointGYWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl ColorPointGY Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9665,36 +10573,37 @@ - (void)testSendClusterColorControlReadAttributePrimary4XWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributePrimary4YWithResponseHandler +- (void)testSendClusterColorControlWriteAttributeColorPointGYWithValue { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary4YWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeColorPointGYWithValue"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributePrimary4YWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl Primary4Y Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + uint16_t value = 0x0000; + [cluster writeAttributeColorPointGYWithValue:value + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl ColorPointGY Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterColorControlReadAttributePrimary4IntensityWithResponseHandler +- (void)testSendClusterColorControlReadAttributeColorPointGIntensityWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ColorControlReadAttributePrimary4IntensityWithResponseHandler"]; + [self expectationWithDescription:@"ColorControlReadAttributeColorPointGIntensityWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributePrimary4IntensityWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl Primary4Intensity Error: %@", err); + [cluster readAttributeColorPointGIntensityWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl ColorPointGIntensity Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9702,35 +10611,36 @@ - (void)testSendClusterColorControlReadAttributePrimary4IntensityWithResponseHan [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributePrimary5XWithResponseHandler +- (void)testSendClusterColorControlWriteAttributeColorPointGIntensityWithValue { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary5XWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeColorPointGIntensityWithValue"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributePrimary5XWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl Primary5X Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + uint8_t value = 0x00; + [cluster writeAttributeColorPointGIntensityWithValue:value + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl ColorPointGIntensity Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterColorControlReadAttributePrimary5YWithResponseHandler +- (void)testSendClusterColorControlReadAttributeColorPointBXWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary5YWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeColorPointBXWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributePrimary5YWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl Primary5Y Error: %@", err); + [cluster readAttributeColorPointBXWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl ColorPointBX Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9738,36 +10648,36 @@ - (void)testSendClusterColorControlReadAttributePrimary5YWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributePrimary5IntensityWithResponseHandler +- (void)testSendClusterColorControlWriteAttributeColorPointBXWithValue { - XCTestExpectation * expectation = - [self expectationWithDescription:@"ColorControlReadAttributePrimary5IntensityWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeColorPointBXWithValue"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributePrimary5IntensityWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl Primary5Intensity Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + uint16_t value = 0x0000; + [cluster writeAttributeColorPointBXWithValue:value + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl ColorPointBX Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterColorControlReadAttributePrimary6XWithResponseHandler +- (void)testSendClusterColorControlReadAttributeColorPointBYWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary6XWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeColorPointBYWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributePrimary6XWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl Primary6X Error: %@", err); + [cluster readAttributeColorPointBYWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl ColorPointBY Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9775,36 +10685,37 @@ - (void)testSendClusterColorControlReadAttributePrimary6XWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributePrimary6YWithResponseHandler +- (void)testSendClusterColorControlWriteAttributeColorPointBYWithValue { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributePrimary6YWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeColorPointBYWithValue"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributePrimary6YWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl Primary6Y Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + uint16_t value = 0x0000; + [cluster writeAttributeColorPointBYWithValue:value + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl ColorPointBY Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterColorControlReadAttributePrimary6IntensityWithResponseHandler +- (void)testSendClusterColorControlReadAttributeColorPointBIntensityWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ColorControlReadAttributePrimary6IntensityWithResponseHandler"]; + [self expectationWithDescription:@"ColorControlReadAttributeColorPointBIntensityWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributePrimary6IntensityWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl Primary6Intensity Error: %@", err); + [cluster readAttributeColorPointBIntensityWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl ColorPointBIntensity Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9812,54 +10723,56 @@ - (void)testSendClusterColorControlReadAttributePrimary6IntensityWithResponseHan [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeWhitePointXWithResponseHandler +- (void)testSendClusterColorControlWriteAttributeColorPointBIntensityWithValue { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeWhitePointXWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeColorPointBIntensityWithValue"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeWhitePointXWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl WhitePointX Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + uint8_t value = 0x00; + [cluster writeAttributeColorPointBIntensityWithValue:value + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl ColorPointBIntensity Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterColorControlWriteAttributeWhitePointXWithValue +- (void)testSendClusterColorControlReadAttributeEnhancedCurrentHueWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeWhitePointXWithValue"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"ColorControlReadAttributeEnhancedCurrentHueWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint16_t value = 0x0000; - [cluster writeAttributeWhitePointXWithValue:value - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl WhitePointX Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [cluster readAttributeEnhancedCurrentHueWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl EnhancedCurrentHue Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeWhitePointYWithResponseHandler + +- (void)testSendClusterColorControlReadAttributeEnhancedColorModeWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeWhitePointYWithResponseHandler"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"ColorControlReadAttributeEnhancedColorModeWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeWhitePointYWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl WhitePointY Error: %@", err); + [cluster readAttributeEnhancedColorModeWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl EnhancedColorMode Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9867,36 +10780,37 @@ - (void)testSendClusterColorControlReadAttributeWhitePointYWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlWriteAttributeWhitePointYWithValue +- (void)testSendClusterColorControlReadAttributeColorLoopActiveWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeWhitePointYWithValue"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"ColorControlReadAttributeColorLoopActiveWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint16_t value = 0x0000; - [cluster writeAttributeWhitePointYWithValue:value - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl WhitePointY Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [cluster readAttributeColorLoopActiveWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl ColorLoopActive Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeColorPointRXWithResponseHandler + +- (void)testSendClusterColorControlReadAttributeColorLoopDirectionWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeColorPointRXWithResponseHandler"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"ColorControlReadAttributeColorLoopDirectionWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeColorPointRXWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl ColorPointRX Error: %@", err); + [cluster readAttributeColorLoopDirectionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl ColorLoopDirection Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9904,36 +10818,37 @@ - (void)testSendClusterColorControlReadAttributeColorPointRXWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlWriteAttributeColorPointRXWithValue +- (void)testSendClusterColorControlReadAttributeColorLoopTimeWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeColorPointRXWithValue"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"ColorControlReadAttributeColorLoopTimeWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint16_t value = 0x0000; - [cluster writeAttributeColorPointRXWithValue:value - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl ColorPointRX Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [cluster readAttributeColorLoopTimeWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl ColorLoopTime Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeColorPointRYWithResponseHandler + +- (void)testSendClusterColorControlReadAttributeColorLoopStartEnhancedHueWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeColorPointRYWithResponseHandler"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"ColorControlReadAttributeColorLoopStartEnhancedHueWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeColorPointRYWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl ColorPointRY Error: %@", err); + [cluster readAttributeColorLoopStartEnhancedHueWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl ColorLoopStartEnhancedHue Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9941,37 +10856,37 @@ - (void)testSendClusterColorControlReadAttributeColorPointRYWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlWriteAttributeColorPointRYWithValue +- (void)testSendClusterColorControlReadAttributeColorLoopStoredEnhancedHueWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeColorPointRYWithValue"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"ColorControlReadAttributeColorLoopStoredEnhancedHueWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint16_t value = 0x0000; - [cluster writeAttributeColorPointRYWithValue:value - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl ColorPointRY Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [cluster readAttributeColorLoopStoredEnhancedHueWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl ColorLoopStoredEnhancedHue Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeColorPointRIntensityWithResponseHandler + +- (void)testSendClusterColorControlReadAttributeColorCapabilitiesWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ColorControlReadAttributeColorPointRIntensityWithResponseHandler"]; + [self expectationWithDescription:@"ColorControlReadAttributeColorCapabilitiesWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - - [cluster readAttributeColorPointRIntensityWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl ColorPointRIntensity Error: %@", err); + + [cluster readAttributeColorCapabilitiesWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl ColorCapabilities Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -9979,36 +10894,37 @@ - (void)testSendClusterColorControlReadAttributeColorPointRIntensityWithResponse [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlWriteAttributeColorPointRIntensityWithValue +- (void)testSendClusterColorControlReadAttributeColorTempPhysicalMinWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeColorPointRIntensityWithValue"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"ColorControlReadAttributeColorTempPhysicalMinWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint8_t value = 0x00; - [cluster writeAttributeColorPointRIntensityWithValue:value - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl ColorPointRIntensity Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [cluster readAttributeColorTempPhysicalMinWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl ColorTempPhysicalMin Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeColorPointGXWithResponseHandler + +- (void)testSendClusterColorControlReadAttributeColorTempPhysicalMaxWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeColorPointGXWithResponseHandler"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"ColorControlReadAttributeColorTempPhysicalMaxWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeColorPointGXWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl ColorPointGX Error: %@", err); + [cluster readAttributeColorTempPhysicalMaxWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl ColorTempPhysicalMax Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10016,36 +10932,37 @@ - (void)testSendClusterColorControlReadAttributeColorPointGXWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlWriteAttributeColorPointGXWithValue +- (void)testSendClusterColorControlReadAttributeCoupleColorTempToLevelMinMiredsWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeColorPointGXWithValue"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"ColorControlReadAttributeCoupleColorTempToLevelMinMiredsWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint16_t value = 0x0000; - [cluster writeAttributeColorPointGXWithValue:value - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl ColorPointGX Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [cluster readAttributeCoupleColorTempToLevelMinMiredsWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl CoupleColorTempToLevelMinMireds Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeColorPointGYWithResponseHandler + +- (void)testSendClusterColorControlReadAttributeStartUpColorTemperatureMiredsWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeColorPointGYWithResponseHandler"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"ColorControlReadAttributeStartUpColorTemperatureMiredsWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeColorPointGYWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl ColorPointGY Error: %@", err); + [cluster readAttributeStartUpColorTemperatureMiredsWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl StartUpColorTemperatureMireds Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10053,9 +10970,10 @@ - (void)testSendClusterColorControlReadAttributeColorPointGYWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlWriteAttributeColorPointGYWithValue +- (void)testSendClusterColorControlWriteAttributeStartUpColorTemperatureMiredsWithValue { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeColorPointGYWithValue"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"ColorControlWriteAttributeStartUpColorTemperatureMiredsWithValue"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -10063,27 +10981,27 @@ - (void)testSendClusterColorControlWriteAttributeColorPointGYWithValue XCTAssertNotNil(cluster); uint16_t value = 0x0000; - [cluster writeAttributeColorPointGYWithValue:value - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl ColorPointGY Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [cluster writeAttributeStartUpColorTemperatureMiredsWithValue:value + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl StartUpColorTemperatureMireds Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeColorPointGIntensityWithResponseHandler +- (void)testSendClusterColorControlReadAttributeClusterRevisionWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ColorControlReadAttributeColorPointGIntensityWithResponseHandler"]; + [self expectationWithDescription:@"ColorControlReadAttributeClusterRevisionWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeColorPointGIntensityWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl ColorPointGIntensity Error: %@", err); + [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ColorControl ClusterRevision Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10091,36 +11009,18 @@ - (void)testSendClusterColorControlReadAttributeColorPointGIntensityWithResponse [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlWriteAttributeColorPointGIntensityWithValue -{ - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeColorPointGIntensityWithValue"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - uint8_t value = 0x00; - [cluster writeAttributeColorPointGIntensityWithValue:value - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl ColorPointGIntensity Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterColorControlReadAttributeColorPointBXWithResponseHandler +- (void)testSendClusterContentLauncherReadAttributeAcceptsHeaderListWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeColorPointBXWithResponseHandler"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"ContentLauncherReadAttributeAcceptsHeaderListWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPContentLauncher * cluster = [[CHIPContentLauncher alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeColorPointBXWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl ColorPointBX Error: %@", err); + [cluster readAttributeAcceptsHeaderListWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ContentLauncher AcceptsHeaderList Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10128,36 +11028,37 @@ - (void)testSendClusterColorControlReadAttributeColorPointBXWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlWriteAttributeColorPointBXWithValue +- (void)testSendClusterContentLauncherReadAttributeSupportedStreamingTypesWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeColorPointBXWithValue"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"ContentLauncherReadAttributeSupportedStreamingTypesWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPContentLauncher * cluster = [[CHIPContentLauncher alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint16_t value = 0x0000; - [cluster writeAttributeColorPointBXWithValue:value - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl ColorPointBX Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [cluster readAttributeSupportedStreamingTypesWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ContentLauncher SupportedStreamingTypes Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeColorPointBYWithResponseHandler + +- (void)testSendClusterContentLauncherReadAttributeClusterRevisionWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlReadAttributeColorPointBYWithResponseHandler"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"ContentLauncherReadAttributeClusterRevisionWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPContentLauncher * cluster = [[CHIPContentLauncher alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeColorPointBYWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl ColorPointBY Error: %@", err); + [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ContentLauncher ClusterRevision Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10165,37 +11066,35 @@ - (void)testSendClusterColorControlReadAttributeColorPointBYWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlWriteAttributeColorPointBYWithValue +- (void)testSendClusterDescriptorReadAttributeDeviceListWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeColorPointBYWithValue"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"DescriptorReadAttributeDeviceListWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPDescriptor * cluster = [[CHIPDescriptor alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); - uint16_t value = 0x0000; - [cluster writeAttributeColorPointBYWithValue:value - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl ColorPointBY Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [cluster readAttributeDeviceListWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Descriptor DeviceList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeColorPointBIntensityWithResponseHandler + +- (void)testSendClusterDescriptorReadAttributeServerListWithResponseHandler { - XCTestExpectation * expectation = - [self expectationWithDescription:@"ColorControlReadAttributeColorPointBIntensityWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"DescriptorReadAttributeServerListWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPDescriptor * cluster = [[CHIPDescriptor alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeColorPointBIntensityWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl ColorPointBIntensity Error: %@", err); + [cluster readAttributeServerListWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Descriptor ServerList Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10203,37 +11102,35 @@ - (void)testSendClusterColorControlReadAttributeColorPointBIntensityWithResponse [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlWriteAttributeColorPointBIntensityWithValue +- (void)testSendClusterDescriptorReadAttributeClientListWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"ColorControlWriteAttributeColorPointBIntensityWithValue"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"DescriptorReadAttributeClientListWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPDescriptor * cluster = [[CHIPDescriptor alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); - uint8_t value = 0x00; - [cluster writeAttributeColorPointBIntensityWithValue:value - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl ColorPointBIntensity Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [cluster readAttributeClientListWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Descriptor ClientList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeEnhancedCurrentHueWithResponseHandler + +- (void)testSendClusterDescriptorReadAttributePartsListWithResponseHandler { - XCTestExpectation * expectation = - [self expectationWithDescription:@"ColorControlReadAttributeEnhancedCurrentHueWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"DescriptorReadAttributePartsListWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPDescriptor * cluster = [[CHIPDescriptor alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeEnhancedCurrentHueWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl EnhancedCurrentHue Error: %@", err); + [cluster readAttributePartsListWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Descriptor PartsList Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10241,18 +11138,18 @@ - (void)testSendClusterColorControlReadAttributeEnhancedCurrentHueWithResponseHa [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeEnhancedColorModeWithResponseHandler +- (void)testSendClusterDescriptorReadAttributeClusterRevisionWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ColorControlReadAttributeEnhancedColorModeWithResponseHandler"]; + [self expectationWithDescription:@"DescriptorReadAttributeClusterRevisionWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPDescriptor * cluster = [[CHIPDescriptor alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeEnhancedColorModeWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl EnhancedColorMode Error: %@", err); + [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Descriptor ClusterRevision Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10260,18 +11157,17 @@ - (void)testSendClusterColorControlReadAttributeEnhancedColorModeWithResponseHan [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeColorLoopActiveWithResponseHandler +- (void)testSendClusterDoorLockReadAttributeLockStateWithResponseHandler { - XCTestExpectation * expectation = - [self expectationWithDescription:@"ColorControlReadAttributeColorLoopActiveWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"DoorLockReadAttributeLockStateWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPDoorLock * cluster = [[CHIPDoorLock alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeColorLoopActiveWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl ColorLoopActive Error: %@", err); + [cluster readAttributeLockStateWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"DoorLock LockState Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10279,18 +11175,17 @@ - (void)testSendClusterColorControlReadAttributeColorLoopActiveWithResponseHandl [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeColorLoopDirectionWithResponseHandler +- (void)testSendClusterDoorLockReadAttributeLockTypeWithResponseHandler { - XCTestExpectation * expectation = - [self expectationWithDescription:@"ColorControlReadAttributeColorLoopDirectionWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"DoorLockReadAttributeLockTypeWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPDoorLock * cluster = [[CHIPDoorLock alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeColorLoopDirectionWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl ColorLoopDirection Error: %@", err); + [cluster readAttributeLockTypeWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"DoorLock LockType Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10298,18 +11193,17 @@ - (void)testSendClusterColorControlReadAttributeColorLoopDirectionWithResponseHa [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeColorLoopTimeWithResponseHandler +- (void)testSendClusterDoorLockReadAttributeActuatorEnabledWithResponseHandler { - XCTestExpectation * expectation = - [self expectationWithDescription:@"ColorControlReadAttributeColorLoopTimeWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"DoorLockReadAttributeActuatorEnabledWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPDoorLock * cluster = [[CHIPDoorLock alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeColorLoopTimeWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl ColorLoopTime Error: %@", err); + [cluster readAttributeActuatorEnabledWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"DoorLock ActuatorEnabled Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10317,18 +11211,17 @@ - (void)testSendClusterColorControlReadAttributeColorLoopTimeWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeColorLoopStartEnhancedHueWithResponseHandler +- (void)testSendClusterDoorLockReadAttributeClusterRevisionWithResponseHandler { - XCTestExpectation * expectation = - [self expectationWithDescription:@"ColorControlReadAttributeColorLoopStartEnhancedHueWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"DoorLockReadAttributeClusterRevisionWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPDoorLock * cluster = [[CHIPDoorLock alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - - [cluster readAttributeColorLoopStartEnhancedHueWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl ColorLoopStartEnhancedHue Error: %@", err); + + [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"DoorLock ClusterRevision Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10336,18 +11229,18 @@ - (void)testSendClusterColorControlReadAttributeColorLoopStartEnhancedHueWithRes [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeColorLoopStoredEnhancedHueWithResponseHandler +- (void)testSendClusterElectricalMeasurementReadAttributeMeasurementTypeWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ColorControlReadAttributeColorLoopStoredEnhancedHueWithResponseHandler"]; + [self expectationWithDescription:@"ElectricalMeasurementReadAttributeMeasurementTypeWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeColorLoopStoredEnhancedHueWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl ColorLoopStoredEnhancedHue Error: %@", err); + [cluster readAttributeMeasurementTypeWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ElectricalMeasurement MeasurementType Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10355,18 +11248,18 @@ - (void)testSendClusterColorControlReadAttributeColorLoopStoredEnhancedHueWithRe [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeColorCapabilitiesWithResponseHandler +- (void)testSendClusterElectricalMeasurementReadAttributeTotalActivePowerWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ColorControlReadAttributeColorCapabilitiesWithResponseHandler"]; + [self expectationWithDescription:@"ElectricalMeasurementReadAttributeTotalActivePowerWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeColorCapabilitiesWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl ColorCapabilities Error: %@", err); + [cluster readAttributeTotalActivePowerWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ElectricalMeasurement TotalActivePower Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10374,18 +11267,18 @@ - (void)testSendClusterColorControlReadAttributeColorCapabilitiesWithResponseHan [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeColorTempPhysicalMinWithResponseHandler +- (void)testSendClusterElectricalMeasurementReadAttributeRmsVoltageWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ColorControlReadAttributeColorTempPhysicalMinWithResponseHandler"]; + [self expectationWithDescription:@"ElectricalMeasurementReadAttributeRmsVoltageWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeColorTempPhysicalMinWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl ColorTempPhysicalMin Error: %@", err); + [cluster readAttributeRmsVoltageWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ElectricalMeasurement RmsVoltage Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10393,18 +11286,18 @@ - (void)testSendClusterColorControlReadAttributeColorTempPhysicalMinWithResponse [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeColorTempPhysicalMaxWithResponseHandler +- (void)testSendClusterElectricalMeasurementReadAttributeRmsVoltageMinWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ColorControlReadAttributeColorTempPhysicalMaxWithResponseHandler"]; + [self expectationWithDescription:@"ElectricalMeasurementReadAttributeRmsVoltageMinWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeColorTempPhysicalMaxWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl ColorTempPhysicalMax Error: %@", err); + [cluster readAttributeRmsVoltageMinWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ElectricalMeasurement RmsVoltageMin Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10412,18 +11305,18 @@ - (void)testSendClusterColorControlReadAttributeColorTempPhysicalMaxWithResponse [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeCoupleColorTempToLevelMinMiredsWithResponseHandler +- (void)testSendClusterElectricalMeasurementReadAttributeRmsVoltageMaxWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ColorControlReadAttributeCoupleColorTempToLevelMinMiredsWithResponseHandler"]; + [self expectationWithDescription:@"ElectricalMeasurementReadAttributeRmsVoltageMaxWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeCoupleColorTempToLevelMinMiredsWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl CoupleColorTempToLevelMinMireds Error: %@", err); + [cluster readAttributeRmsVoltageMaxWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ElectricalMeasurement RmsVoltageMax Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10431,18 +11324,18 @@ - (void)testSendClusterColorControlReadAttributeCoupleColorTempToLevelMinMiredsW [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeStartUpColorTemperatureMiredsWithResponseHandler +- (void)testSendClusterElectricalMeasurementReadAttributeRmsCurrentWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ColorControlReadAttributeStartUpColorTemperatureMiredsWithResponseHandler"]; + [self expectationWithDescription:@"ElectricalMeasurementReadAttributeRmsCurrentWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeStartUpColorTemperatureMiredsWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl StartUpColorTemperatureMireds Error: %@", err); + [cluster readAttributeRmsCurrentWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ElectricalMeasurement RmsCurrent Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10450,38 +11343,37 @@ - (void)testSendClusterColorControlReadAttributeStartUpColorTemperatureMiredsWit [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlWriteAttributeStartUpColorTemperatureMiredsWithValue +- (void)testSendClusterElectricalMeasurementReadAttributeRmsCurrentMinWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ColorControlWriteAttributeStartUpColorTemperatureMiredsWithValue"]; + [self expectationWithDescription:@"ElectricalMeasurementReadAttributeRmsCurrentMinWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint16_t value = 0x0000; - [cluster writeAttributeStartUpColorTemperatureMiredsWithValue:value - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl StartUpColorTemperatureMireds Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [cluster readAttributeRmsCurrentMinWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ElectricalMeasurement RmsCurrentMin Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeClusterRevisionWithResponseHandler + +- (void)testSendClusterElectricalMeasurementReadAttributeRmsCurrentMaxWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ColorControlReadAttributeClusterRevisionWithResponseHandler"]; + [self expectationWithDescription:@"ElectricalMeasurementReadAttributeRmsCurrentMaxWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ColorControl ClusterRevision Error: %@", err); + [cluster readAttributeRmsCurrentMaxWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ElectricalMeasurement RmsCurrentMax Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10489,18 +11381,18 @@ - (void)testSendClusterColorControlReadAttributeClusterRevisionWithResponseHandl [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterContentLauncherReadAttributeAcceptsHeaderListWithResponseHandler +- (void)testSendClusterElectricalMeasurementReadAttributeActivePowerWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ContentLauncherReadAttributeAcceptsHeaderListWithResponseHandler"]; + [self expectationWithDescription:@"ElectricalMeasurementReadAttributeActivePowerWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPContentLauncher * cluster = [[CHIPContentLauncher alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeAcceptsHeaderListWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ContentLauncher AcceptsHeaderList Error: %@", err); + [cluster readAttributeActivePowerWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ElectricalMeasurement ActivePower Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10508,18 +11400,18 @@ - (void)testSendClusterContentLauncherReadAttributeAcceptsHeaderListWithResponse [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterContentLauncherReadAttributeSupportedStreamingTypesWithResponseHandler +- (void)testSendClusterElectricalMeasurementReadAttributeActivePowerMinWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ContentLauncherReadAttributeSupportedStreamingTypesWithResponseHandler"]; + [self expectationWithDescription:@"ElectricalMeasurementReadAttributeActivePowerMinWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPContentLauncher * cluster = [[CHIPContentLauncher alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeSupportedStreamingTypesWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ContentLauncher SupportedStreamingTypes Error: %@", err); + [cluster readAttributeActivePowerMinWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ElectricalMeasurement ActivePowerMin Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10527,18 +11419,18 @@ - (void)testSendClusterContentLauncherReadAttributeSupportedStreamingTypesWithRe [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterContentLauncherReadAttributeClusterRevisionWithResponseHandler +- (void)testSendClusterElectricalMeasurementReadAttributeActivePowerMaxWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ContentLauncherReadAttributeClusterRevisionWithResponseHandler"]; + [self expectationWithDescription:@"ElectricalMeasurementReadAttributeActivePowerMaxWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPContentLauncher * cluster = [[CHIPContentLauncher alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ContentLauncher ClusterRevision Error: %@", err); + [cluster readAttributeActivePowerMaxWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ElectricalMeasurement ActivePowerMax Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10546,17 +11438,18 @@ - (void)testSendClusterContentLauncherReadAttributeClusterRevisionWithResponseHa [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterDescriptorReadAttributeDeviceListWithResponseHandler +- (void)testSendClusterElectricalMeasurementReadAttributeClusterRevisionWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"DescriptorReadAttributeDeviceListWithResponseHandler"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"ElectricalMeasurementReadAttributeClusterRevisionWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPDescriptor * cluster = [[CHIPDescriptor alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeDeviceListWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Descriptor DeviceList Error: %@", err); + [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"ElectricalMeasurement ClusterRevision Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10564,17 +11457,20 @@ - (void)testSendClusterDescriptorReadAttributeDeviceListWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterDescriptorReadAttributeServerListWithResponseHandler +- (void)testSendClusterEthernetNetworkDiagnosticsReadAttributePHYRateWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"DescriptorReadAttributeServerListWithResponseHandler"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"EthernetNetworkDiagnosticsReadAttributePHYRateWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPDescriptor * cluster = [[CHIPDescriptor alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPEthernetNetworkDiagnostics * cluster = [[CHIPEthernetNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeServerListWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Descriptor ServerList Error: %@", err); + [cluster readAttributePHYRateWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"EthernetNetworkDiagnostics PHYRate Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10582,17 +11478,20 @@ - (void)testSendClusterDescriptorReadAttributeServerListWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterDescriptorReadAttributeClientListWithResponseHandler +- (void)testSendClusterEthernetNetworkDiagnosticsReadAttributeFullDuplexWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"DescriptorReadAttributeClientListWithResponseHandler"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"EthernetNetworkDiagnosticsReadAttributeFullDuplexWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPDescriptor * cluster = [[CHIPDescriptor alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPEthernetNetworkDiagnostics * cluster = [[CHIPEthernetNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClientListWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Descriptor ClientList Error: %@", err); + [cluster readAttributeFullDuplexWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"EthernetNetworkDiagnostics FullDuplex Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10600,17 +11499,20 @@ - (void)testSendClusterDescriptorReadAttributeClientListWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterDescriptorReadAttributePartsListWithResponseHandler +- (void)testSendClusterEthernetNetworkDiagnosticsReadAttributePacketRxCountWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"DescriptorReadAttributePartsListWithResponseHandler"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"EthernetNetworkDiagnosticsReadAttributePacketRxCountWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPDescriptor * cluster = [[CHIPDescriptor alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPEthernetNetworkDiagnostics * cluster = [[CHIPEthernetNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributePartsListWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Descriptor PartsList Error: %@", err); + [cluster readAttributePacketRxCountWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"EthernetNetworkDiagnostics PacketRxCount Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10618,18 +11520,20 @@ - (void)testSendClusterDescriptorReadAttributePartsListWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterDescriptorReadAttributeClusterRevisionWithResponseHandler +- (void)testSendClusterEthernetNetworkDiagnosticsReadAttributePacketTxCountWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"DescriptorReadAttributeClusterRevisionWithResponseHandler"]; + [self expectationWithDescription:@"EthernetNetworkDiagnosticsReadAttributePacketTxCountWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPDescriptor * cluster = [[CHIPDescriptor alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPEthernetNetworkDiagnostics * cluster = [[CHIPEthernetNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Descriptor ClusterRevision Error: %@", err); + [cluster readAttributePacketTxCountWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"EthernetNetworkDiagnostics PacketTxCount Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10637,17 +11541,20 @@ - (void)testSendClusterDescriptorReadAttributeClusterRevisionWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterDoorLockReadAttributeLockStateWithResponseHandler +- (void)testSendClusterEthernetNetworkDiagnosticsReadAttributeTxErrCountWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"DoorLockReadAttributeLockStateWithResponseHandler"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"EthernetNetworkDiagnosticsReadAttributeTxErrCountWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPDoorLock * cluster = [[CHIPDoorLock alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPEthernetNetworkDiagnostics * cluster = [[CHIPEthernetNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeLockStateWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"DoorLock LockState Error: %@", err); + [cluster readAttributeTxErrCountWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"EthernetNetworkDiagnostics TxErrCount Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10655,17 +11562,20 @@ - (void)testSendClusterDoorLockReadAttributeLockStateWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterDoorLockReadAttributeLockTypeWithResponseHandler +- (void)testSendClusterEthernetNetworkDiagnosticsReadAttributeCollisionCountWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"DoorLockReadAttributeLockTypeWithResponseHandler"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"EthernetNetworkDiagnosticsReadAttributeCollisionCountWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPDoorLock * cluster = [[CHIPDoorLock alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPEthernetNetworkDiagnostics * cluster = [[CHIPEthernetNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeLockTypeWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"DoorLock LockType Error: %@", err); + [cluster readAttributeCollisionCountWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"EthernetNetworkDiagnostics CollisionCount Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10673,17 +11583,20 @@ - (void)testSendClusterDoorLockReadAttributeLockTypeWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterDoorLockReadAttributeActuatorEnabledWithResponseHandler +- (void)testSendClusterEthernetNetworkDiagnosticsReadAttributeOverrunCountWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"DoorLockReadAttributeActuatorEnabledWithResponseHandler"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"EthernetNetworkDiagnosticsReadAttributeOverrunCountWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPDoorLock * cluster = [[CHIPDoorLock alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPEthernetNetworkDiagnostics * cluster = [[CHIPEthernetNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeActuatorEnabledWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"DoorLock ActuatorEnabled Error: %@", err); + [cluster readAttributeOverrunCountWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"EthernetNetworkDiagnostics OverrunCount Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10691,17 +11604,20 @@ - (void)testSendClusterDoorLockReadAttributeActuatorEnabledWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterDoorLockReadAttributeClusterRevisionWithResponseHandler +- (void)testSendClusterEthernetNetworkDiagnosticsReadAttributeCarrierDetectWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"DoorLockReadAttributeClusterRevisionWithResponseHandler"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"EthernetNetworkDiagnosticsReadAttributeCarrierDetectWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPDoorLock * cluster = [[CHIPDoorLock alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPEthernetNetworkDiagnostics * cluster = [[CHIPEthernetNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"DoorLock ClusterRevision Error: %@", err); + [cluster readAttributeCarrierDetectWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"EthernetNetworkDiagnostics CarrierDetect Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10709,18 +11625,20 @@ - (void)testSendClusterDoorLockReadAttributeClusterRevisionWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterElectricalMeasurementReadAttributeMeasurementTypeWithResponseHandler +- (void)testSendClusterEthernetNetworkDiagnosticsReadAttributeTimeSinceResetWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ElectricalMeasurementReadAttributeMeasurementTypeWithResponseHandler"]; + [self expectationWithDescription:@"EthernetNetworkDiagnosticsReadAttributeTimeSinceResetWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPEthernetNetworkDiagnostics * cluster = [[CHIPEthernetNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeMeasurementTypeWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ElectricalMeasurement MeasurementType Error: %@", err); + [cluster readAttributeTimeSinceResetWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"EthernetNetworkDiagnostics TimeSinceReset Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10728,18 +11646,20 @@ - (void)testSendClusterElectricalMeasurementReadAttributeMeasurementTypeWithResp [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterElectricalMeasurementReadAttributeTotalActivePowerWithResponseHandler +- (void)testSendClusterEthernetNetworkDiagnosticsReadAttributeClusterRevisionWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ElectricalMeasurementReadAttributeTotalActivePowerWithResponseHandler"]; + [self expectationWithDescription:@"EthernetNetworkDiagnosticsReadAttributeClusterRevisionWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPEthernetNetworkDiagnostics * cluster = [[CHIPEthernetNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeTotalActivePowerWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ElectricalMeasurement TotalActivePower Error: %@", err); + [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"EthernetNetworkDiagnostics ClusterRevision Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10747,18 +11667,17 @@ - (void)testSendClusterElectricalMeasurementReadAttributeTotalActivePowerWithRes [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterElectricalMeasurementReadAttributeRmsVoltageWithResponseHandler +- (void)testSendClusterFixedLabelReadAttributeLabelListWithResponseHandler { - XCTestExpectation * expectation = - [self expectationWithDescription:@"ElectricalMeasurementReadAttributeRmsVoltageWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"FixedLabelReadAttributeLabelListWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPFixedLabel * cluster = [[CHIPFixedLabel alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeRmsVoltageWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ElectricalMeasurement RmsVoltage Error: %@", err); + [cluster readAttributeLabelListWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"FixedLabel LabelList Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10766,18 +11685,18 @@ - (void)testSendClusterElectricalMeasurementReadAttributeRmsVoltageWithResponseH [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterElectricalMeasurementReadAttributeRmsVoltageMinWithResponseHandler +- (void)testSendClusterFixedLabelReadAttributeClusterRevisionWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ElectricalMeasurementReadAttributeRmsVoltageMinWithResponseHandler"]; + [self expectationWithDescription:@"FixedLabelReadAttributeClusterRevisionWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPFixedLabel * cluster = [[CHIPFixedLabel alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeRmsVoltageMinWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ElectricalMeasurement RmsVoltageMin Error: %@", err); + [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"FixedLabel ClusterRevision Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10785,18 +11704,18 @@ - (void)testSendClusterElectricalMeasurementReadAttributeRmsVoltageMinWithRespon [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterElectricalMeasurementReadAttributeRmsVoltageMaxWithResponseHandler +- (void)testSendClusterFlowMeasurementReadAttributeMeasuredValueWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ElectricalMeasurementReadAttributeRmsVoltageMaxWithResponseHandler"]; + [self expectationWithDescription:@"FlowMeasurementReadAttributeMeasuredValueWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPFlowMeasurement * cluster = [[CHIPFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeRmsVoltageMaxWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ElectricalMeasurement RmsVoltageMax Error: %@", err); + [cluster readAttributeMeasuredValueWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"FlowMeasurement MeasuredValue Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10804,18 +11723,18 @@ - (void)testSendClusterElectricalMeasurementReadAttributeRmsVoltageMaxWithRespon [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterElectricalMeasurementReadAttributeRmsCurrentWithResponseHandler +- (void)testSendClusterFlowMeasurementReadAttributeMinMeasuredValueWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ElectricalMeasurementReadAttributeRmsCurrentWithResponseHandler"]; + [self expectationWithDescription:@"FlowMeasurementReadAttributeMinMeasuredValueWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPFlowMeasurement * cluster = [[CHIPFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeRmsCurrentWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ElectricalMeasurement RmsCurrent Error: %@", err); + [cluster readAttributeMinMeasuredValueWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"FlowMeasurement MinMeasuredValue Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10823,18 +11742,18 @@ - (void)testSendClusterElectricalMeasurementReadAttributeRmsCurrentWithResponseH [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterElectricalMeasurementReadAttributeRmsCurrentMinWithResponseHandler +- (void)testSendClusterFlowMeasurementReadAttributeMaxMeasuredValueWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ElectricalMeasurementReadAttributeRmsCurrentMinWithResponseHandler"]; + [self expectationWithDescription:@"FlowMeasurementReadAttributeMaxMeasuredValueWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPFlowMeasurement * cluster = [[CHIPFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeRmsCurrentMinWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ElectricalMeasurement RmsCurrentMin Error: %@", err); + [cluster readAttributeMaxMeasuredValueWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"FlowMeasurement MaxMeasuredValue Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10842,18 +11761,18 @@ - (void)testSendClusterElectricalMeasurementReadAttributeRmsCurrentMinWithRespon [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterElectricalMeasurementReadAttributeRmsCurrentMaxWithResponseHandler +- (void)testSendClusterFlowMeasurementReadAttributeClusterRevisionWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ElectricalMeasurementReadAttributeRmsCurrentMaxWithResponseHandler"]; + [self expectationWithDescription:@"FlowMeasurementReadAttributeClusterRevisionWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPFlowMeasurement * cluster = [[CHIPFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeRmsCurrentMaxWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ElectricalMeasurement RmsCurrentMax Error: %@", err); + [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"FlowMeasurement ClusterRevision Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10861,18 +11780,18 @@ - (void)testSendClusterElectricalMeasurementReadAttributeRmsCurrentMaxWithRespon [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterElectricalMeasurementReadAttributeActivePowerWithResponseHandler +- (void)testSendClusterGeneralCommissioningReadAttributeBreadcrumbWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ElectricalMeasurementReadAttributeActivePowerWithResponseHandler"]; + [self expectationWithDescription:@"GeneralCommissioningReadAttributeBreadcrumbWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPGeneralCommissioning * cluster = [[CHIPGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeActivePowerWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ElectricalMeasurement ActivePower Error: %@", err); + [cluster readAttributeBreadcrumbWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"GeneralCommissioning Breadcrumb Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10880,37 +11799,37 @@ - (void)testSendClusterElectricalMeasurementReadAttributeActivePowerWithResponse [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterElectricalMeasurementReadAttributeActivePowerMinWithResponseHandler +- (void)testSendClusterGeneralCommissioningWriteAttributeBreadcrumbWithValue { - XCTestExpectation * expectation = - [self expectationWithDescription:@"ElectricalMeasurementReadAttributeActivePowerMinWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"GeneralCommissioningWriteAttributeBreadcrumbWithValue"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPGeneralCommissioning * cluster = [[CHIPGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeActivePowerMinWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ElectricalMeasurement ActivePowerMin Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + uint64_t value = 0x0000000000000000; + [cluster writeAttributeBreadcrumbWithValue:value + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"GeneralCommissioning Breadcrumb Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterElectricalMeasurementReadAttributeActivePowerMaxWithResponseHandler +- (void)testSendClusterGeneralCommissioningReadAttributeBasicCommissioningInfoListWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ElectricalMeasurementReadAttributeActivePowerMaxWithResponseHandler"]; + [self expectationWithDescription:@"GeneralCommissioningReadAttributeBasicCommissioningInfoListWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPGeneralCommissioning * cluster = [[CHIPGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeActivePowerMaxWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ElectricalMeasurement ActivePowerMax Error: %@", err); + [cluster readAttributeBasicCommissioningInfoListWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"GeneralCommissioning BasicCommissioningInfoList Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10918,18 +11837,18 @@ - (void)testSendClusterElectricalMeasurementReadAttributeActivePowerMaxWithRespo [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterElectricalMeasurementReadAttributeClusterRevisionWithResponseHandler +- (void)testSendClusterGeneralCommissioningReadAttributeClusterRevisionWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"ElectricalMeasurementReadAttributeClusterRevisionWithResponseHandler"]; + [self expectationWithDescription:@"GeneralCommissioningReadAttributeClusterRevisionWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPGeneralCommissioning * cluster = [[CHIPGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"ElectricalMeasurement ClusterRevision Error: %@", err); + NSLog(@"GeneralCommissioning ClusterRevision Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10937,20 +11856,18 @@ - (void)testSendClusterElectricalMeasurementReadAttributeClusterRevisionWithResp [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterEthernetNetworkDiagnosticsReadAttributePHYRateWithResponseHandler +- (void)testSendClusterGeneralDiagnosticsReadAttributeNetworkInterfacesWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"EthernetNetworkDiagnosticsReadAttributePHYRateWithResponseHandler"]; + [self expectationWithDescription:@"GeneralDiagnosticsReadAttributeNetworkInterfacesWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPEthernetNetworkDiagnostics * cluster = [[CHIPEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:queue]; + CHIPGeneralDiagnostics * cluster = [[CHIPGeneralDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributePHYRateWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"EthernetNetworkDiagnostics PHYRate Error: %@", err); + [cluster readAttributeNetworkInterfacesWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"GeneralDiagnostics NetworkInterfaces Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10958,20 +11875,18 @@ - (void)testSendClusterEthernetNetworkDiagnosticsReadAttributePHYRateWithRespons [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterEthernetNetworkDiagnosticsReadAttributeFullDuplexWithResponseHandler +- (void)testSendClusterGeneralDiagnosticsReadAttributeRebootCountWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"EthernetNetworkDiagnosticsReadAttributeFullDuplexWithResponseHandler"]; + [self expectationWithDescription:@"GeneralDiagnosticsReadAttributeRebootCountWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPEthernetNetworkDiagnostics * cluster = [[CHIPEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:queue]; + CHIPGeneralDiagnostics * cluster = [[CHIPGeneralDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeFullDuplexWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"EthernetNetworkDiagnostics FullDuplex Error: %@", err); + [cluster readAttributeRebootCountWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"GeneralDiagnostics RebootCount Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -10979,20 +11894,17 @@ - (void)testSendClusterEthernetNetworkDiagnosticsReadAttributeFullDuplexWithResp [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterEthernetNetworkDiagnosticsReadAttributePacketRxCountWithResponseHandler +- (void)testSendClusterGeneralDiagnosticsReadAttributeUpTimeWithResponseHandler { - XCTestExpectation * expectation = - [self expectationWithDescription:@"EthernetNetworkDiagnosticsReadAttributePacketRxCountWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"GeneralDiagnosticsReadAttributeUpTimeWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPEthernetNetworkDiagnostics * cluster = [[CHIPEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:queue]; + CHIPGeneralDiagnostics * cluster = [[CHIPGeneralDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributePacketRxCountWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"EthernetNetworkDiagnostics PacketRxCount Error: %@", err); + [cluster readAttributeUpTimeWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"GeneralDiagnostics UpTime Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -11000,20 +11912,18 @@ - (void)testSendClusterEthernetNetworkDiagnosticsReadAttributePacketRxCountWithR [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterEthernetNetworkDiagnosticsReadAttributePacketTxCountWithResponseHandler +- (void)testSendClusterGeneralDiagnosticsReadAttributeTotalOperationalHoursWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"EthernetNetworkDiagnosticsReadAttributePacketTxCountWithResponseHandler"]; + [self expectationWithDescription:@"GeneralDiagnosticsReadAttributeTotalOperationalHoursWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPEthernetNetworkDiagnostics * cluster = [[CHIPEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:queue]; + CHIPGeneralDiagnostics * cluster = [[CHIPGeneralDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributePacketTxCountWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"EthernetNetworkDiagnostics PacketTxCount Error: %@", err); + [cluster readAttributeTotalOperationalHoursWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"GeneralDiagnostics TotalOperationalHours Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -11021,20 +11931,18 @@ - (void)testSendClusterEthernetNetworkDiagnosticsReadAttributePacketTxCountWithR [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterEthernetNetworkDiagnosticsReadAttributeTxErrCountWithResponseHandler +- (void)testSendClusterGeneralDiagnosticsReadAttributeBootReasonsWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"EthernetNetworkDiagnosticsReadAttributeTxErrCountWithResponseHandler"]; + [self expectationWithDescription:@"GeneralDiagnosticsReadAttributeBootReasonsWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPEthernetNetworkDiagnostics * cluster = [[CHIPEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:queue]; + CHIPGeneralDiagnostics * cluster = [[CHIPGeneralDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeTxErrCountWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"EthernetNetworkDiagnostics TxErrCount Error: %@", err); + [cluster readAttributeBootReasonsWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"GeneralDiagnostics BootReasons Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -11042,20 +11950,18 @@ - (void)testSendClusterEthernetNetworkDiagnosticsReadAttributeTxErrCountWithResp [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterEthernetNetworkDiagnosticsReadAttributeCollisionCountWithResponseHandler +- (void)testSendClusterGeneralDiagnosticsReadAttributeClusterRevisionWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"EthernetNetworkDiagnosticsReadAttributeCollisionCountWithResponseHandler"]; + [self expectationWithDescription:@"GeneralDiagnosticsReadAttributeClusterRevisionWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPEthernetNetworkDiagnostics * cluster = [[CHIPEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:queue]; + CHIPGeneralDiagnostics * cluster = [[CHIPGeneralDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeCollisionCountWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"EthernetNetworkDiagnostics CollisionCount Error: %@", err); + [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"GeneralDiagnostics ClusterRevision Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -11063,20 +11969,17 @@ - (void)testSendClusterEthernetNetworkDiagnosticsReadAttributeCollisionCountWith [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterEthernetNetworkDiagnosticsReadAttributeOverrunCountWithResponseHandler +- (void)testSendClusterGroupKeyManagementReadAttributeGroupsWithResponseHandler { - XCTestExpectation * expectation = - [self expectationWithDescription:@"EthernetNetworkDiagnosticsReadAttributeOverrunCountWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"GroupKeyManagementReadAttributeGroupsWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPEthernetNetworkDiagnostics * cluster = [[CHIPEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:queue]; + CHIPGroupKeyManagement * cluster = [[CHIPGroupKeyManagement alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeOverrunCountWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"EthernetNetworkDiagnostics OverrunCount Error: %@", err); + [cluster readAttributeGroupsWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"GroupKeyManagement Groups Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -11084,20 +11987,18 @@ - (void)testSendClusterEthernetNetworkDiagnosticsReadAttributeOverrunCountWithRe [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterEthernetNetworkDiagnosticsReadAttributeCarrierDetectWithResponseHandler +- (void)testSendClusterGroupKeyManagementReadAttributeGroupKeysWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"EthernetNetworkDiagnosticsReadAttributeCarrierDetectWithResponseHandler"]; + [self expectationWithDescription:@"GroupKeyManagementReadAttributeGroupKeysWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPEthernetNetworkDiagnostics * cluster = [[CHIPEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:queue]; + CHIPGroupKeyManagement * cluster = [[CHIPGroupKeyManagement alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeCarrierDetectWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"EthernetNetworkDiagnostics CarrierDetect Error: %@", err); + [cluster readAttributeGroupKeysWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"GroupKeyManagement GroupKeys Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -11105,20 +12006,18 @@ - (void)testSendClusterEthernetNetworkDiagnosticsReadAttributeCarrierDetectWithR [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterEthernetNetworkDiagnosticsReadAttributeTimeSinceResetWithResponseHandler +- (void)testSendClusterGroupKeyManagementReadAttributeClusterRevisionWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"EthernetNetworkDiagnosticsReadAttributeTimeSinceResetWithResponseHandler"]; + [self expectationWithDescription:@"GroupKeyManagementReadAttributeClusterRevisionWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPEthernetNetworkDiagnostics * cluster = [[CHIPEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:queue]; + CHIPGroupKeyManagement * cluster = [[CHIPGroupKeyManagement alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeTimeSinceResetWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"EthernetNetworkDiagnostics TimeSinceReset Error: %@", err); + [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"GroupKeyManagement ClusterRevision Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -11126,20 +12025,17 @@ - (void)testSendClusterEthernetNetworkDiagnosticsReadAttributeTimeSinceResetWith [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterEthernetNetworkDiagnosticsReadAttributeClusterRevisionWithResponseHandler +- (void)testSendClusterGroupsReadAttributeNameSupportWithResponseHandler { - XCTestExpectation * expectation = - [self expectationWithDescription:@"EthernetNetworkDiagnosticsReadAttributeClusterRevisionWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"GroupsReadAttributeNameSupportWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPEthernetNetworkDiagnostics * cluster = [[CHIPEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:queue]; + CHIPGroups * cluster = [[CHIPGroups alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"EthernetNetworkDiagnostics ClusterRevision Error: %@", err); + [cluster readAttributeNameSupportWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Groups NameSupport Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -11147,17 +12043,17 @@ - (void)testSendClusterEthernetNetworkDiagnosticsReadAttributeClusterRevisionWit [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterFixedLabelReadAttributeLabelListWithResponseHandler +- (void)testSendClusterGroupsReadAttributeClusterRevisionWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"FixedLabelReadAttributeLabelListWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"GroupsReadAttributeClusterRevisionWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPFixedLabel * cluster = [[CHIPFixedLabel alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPGroups * cluster = [[CHIPGroups alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeLabelListWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"FixedLabel LabelList Error: %@", err); + [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Groups ClusterRevision Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -11165,18 +12061,17 @@ - (void)testSendClusterFixedLabelReadAttributeLabelListWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterFixedLabelReadAttributeClusterRevisionWithResponseHandler +- (void)testSendClusterIdentifyReadAttributeIdentifyTimeWithResponseHandler { - XCTestExpectation * expectation = - [self expectationWithDescription:@"FixedLabelReadAttributeClusterRevisionWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"IdentifyReadAttributeIdentifyTimeWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPFixedLabel * cluster = [[CHIPFixedLabel alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPIdentify * cluster = [[CHIPIdentify alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"FixedLabel ClusterRevision Error: %@", err); + [cluster readAttributeIdentifyTimeWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Identify IdentifyTime Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -11184,37 +12079,36 @@ - (void)testSendClusterFixedLabelReadAttributeClusterRevisionWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterFlowMeasurementReadAttributeMeasuredValueWithResponseHandler +- (void)testSendClusterIdentifyWriteAttributeIdentifyTimeWithValue { - XCTestExpectation * expectation = - [self expectationWithDescription:@"FlowMeasurementReadAttributeMeasuredValueWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"IdentifyWriteAttributeIdentifyTimeWithValue"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPFlowMeasurement * cluster = [[CHIPFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPIdentify * cluster = [[CHIPIdentify alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeMeasuredValueWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"FlowMeasurement MeasuredValue Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + uint16_t value = 0x00; + [cluster writeAttributeIdentifyTimeWithValue:value + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Identify IdentifyTime Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterFlowMeasurementReadAttributeMinMeasuredValueWithResponseHandler +- (void)testSendClusterIdentifyReadAttributeIdentifyTypeWithResponseHandler { - XCTestExpectation * expectation = - [self expectationWithDescription:@"FlowMeasurementReadAttributeMinMeasuredValueWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"IdentifyReadAttributeIdentifyTypeWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPFlowMeasurement * cluster = [[CHIPFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPIdentify * cluster = [[CHIPIdentify alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeMinMeasuredValueWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"FlowMeasurement MinMeasuredValue Error: %@", err); + [cluster readAttributeIdentifyTypeWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Identify IdentifyType Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -11222,18 +12116,17 @@ - (void)testSendClusterFlowMeasurementReadAttributeMinMeasuredValueWithResponseH [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterFlowMeasurementReadAttributeMaxMeasuredValueWithResponseHandler +- (void)testSendClusterIdentifyReadAttributeClusterRevisionWithResponseHandler { - XCTestExpectation * expectation = - [self expectationWithDescription:@"FlowMeasurementReadAttributeMaxMeasuredValueWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"IdentifyReadAttributeClusterRevisionWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPFlowMeasurement * cluster = [[CHIPFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPIdentify * cluster = [[CHIPIdentify alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeMaxMeasuredValueWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"FlowMeasurement MaxMeasuredValue Error: %@", err); + [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Identify ClusterRevision Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -11241,18 +12134,18 @@ - (void)testSendClusterFlowMeasurementReadAttributeMaxMeasuredValueWithResponseH [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterFlowMeasurementReadAttributeClusterRevisionWithResponseHandler +- (void)testSendClusterKeypadInputReadAttributeClusterRevisionWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"FlowMeasurementReadAttributeClusterRevisionWithResponseHandler"]; + [self expectationWithDescription:@"KeypadInputReadAttributeClusterRevisionWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPFlowMeasurement * cluster = [[CHIPFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPKeypadInput * cluster = [[CHIPKeypadInput alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"FlowMeasurement ClusterRevision Error: %@", err); + NSLog(@"KeypadInput ClusterRevision Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -11260,18 +12153,17 @@ - (void)testSendClusterFlowMeasurementReadAttributeClusterRevisionWithResponseHa [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterGeneralCommissioningReadAttributeBreadcrumbWithResponseHandler +- (void)testSendClusterLevelControlReadAttributeCurrentLevelWithResponseHandler { - XCTestExpectation * expectation = - [self expectationWithDescription:@"GeneralCommissioningReadAttributeBreadcrumbWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"LevelControlReadAttributeCurrentLevelWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPGeneralCommissioning * cluster = [[CHIPGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeBreadcrumbWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"GeneralCommissioning Breadcrumb Error: %@", err); + [cluster readAttributeCurrentLevelWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"LevelControl CurrentLevel Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -11279,37 +12171,36 @@ - (void)testSendClusterGeneralCommissioningReadAttributeBreadcrumbWithResponseHa [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterGeneralCommissioningWriteAttributeBreadcrumbWithValue +- (void)testSendClusterLevelControlReadAttributeRemainingTimeWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"GeneralCommissioningWriteAttributeBreadcrumbWithValue"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"LevelControlReadAttributeRemainingTimeWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPGeneralCommissioning * cluster = [[CHIPGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint64_t value = 0x0000000000000000; - [cluster writeAttributeBreadcrumbWithValue:value - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"GeneralCommissioning Breadcrumb Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [cluster readAttributeRemainingTimeWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"LevelControl RemainingTime Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterGeneralCommissioningReadAttributeBasicCommissioningInfoListWithResponseHandler + +- (void)testSendClusterLevelControlReadAttributeMinLevelWithResponseHandler { - XCTestExpectation * expectation = - [self expectationWithDescription:@"GeneralCommissioningReadAttributeBasicCommissioningInfoListWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"LevelControlReadAttributeMinLevelWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPGeneralCommissioning * cluster = [[CHIPGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeBasicCommissioningInfoListWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"GeneralCommissioning BasicCommissioningInfoList Error: %@", err); + [cluster readAttributeMinLevelWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"LevelControl MinLevel Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -11317,18 +12208,17 @@ - (void)testSendClusterGeneralCommissioningReadAttributeBasicCommissioningInfoLi [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterGeneralCommissioningReadAttributeClusterRevisionWithResponseHandler +- (void)testSendClusterLevelControlReadAttributeMaxLevelWithResponseHandler { - XCTestExpectation * expectation = - [self expectationWithDescription:@"GeneralCommissioningReadAttributeClusterRevisionWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"LevelControlReadAttributeMaxLevelWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPGeneralCommissioning * cluster = [[CHIPGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"GeneralCommissioning ClusterRevision Error: %@", err); + [cluster readAttributeMaxLevelWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"LevelControl MaxLevel Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -11336,18 +12226,18 @@ - (void)testSendClusterGeneralCommissioningReadAttributeClusterRevisionWithRespo [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterGeneralDiagnosticsReadAttributeNetworkInterfacesWithResponseHandler +- (void)testSendClusterLevelControlReadAttributeCurrentFrequencyWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"GeneralDiagnosticsReadAttributeNetworkInterfacesWithResponseHandler"]; + [self expectationWithDescription:@"LevelControlReadAttributeCurrentFrequencyWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPGeneralDiagnostics * cluster = [[CHIPGeneralDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeNetworkInterfacesWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"GeneralDiagnostics NetworkInterfaces Error: %@", err); + [cluster readAttributeCurrentFrequencyWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"LevelControl CurrentFrequency Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -11355,18 +12245,17 @@ - (void)testSendClusterGeneralDiagnosticsReadAttributeNetworkInterfacesWithRespo [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterGeneralDiagnosticsReadAttributeRebootCountWithResponseHandler +- (void)testSendClusterLevelControlReadAttributeMinFrequencyWithResponseHandler { - XCTestExpectation * expectation = - [self expectationWithDescription:@"GeneralDiagnosticsReadAttributeRebootCountWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"LevelControlReadAttributeMinFrequencyWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPGeneralDiagnostics * cluster = [[CHIPGeneralDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeRebootCountWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"GeneralDiagnostics RebootCount Error: %@", err); + [cluster readAttributeMinFrequencyWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"LevelControl MinFrequency Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -11374,17 +12263,17 @@ - (void)testSendClusterGeneralDiagnosticsReadAttributeRebootCountWithResponseHan [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterGeneralDiagnosticsReadAttributeUpTimeWithResponseHandler +- (void)testSendClusterLevelControlReadAttributeMaxFrequencyWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"GeneralDiagnosticsReadAttributeUpTimeWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"LevelControlReadAttributeMaxFrequencyWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPGeneralDiagnostics * cluster = [[CHIPGeneralDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeUpTimeWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"GeneralDiagnostics UpTime Error: %@", err); + [cluster readAttributeMaxFrequencyWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"LevelControl MaxFrequency Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -11392,18 +12281,17 @@ - (void)testSendClusterGeneralDiagnosticsReadAttributeUpTimeWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterGeneralDiagnosticsReadAttributeTotalOperationalHoursWithResponseHandler +- (void)testSendClusterLevelControlReadAttributeOptionsWithResponseHandler { - XCTestExpectation * expectation = - [self expectationWithDescription:@"GeneralDiagnosticsReadAttributeTotalOperationalHoursWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"LevelControlReadAttributeOptionsWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPGeneralDiagnostics * cluster = [[CHIPGeneralDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeTotalOperationalHoursWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"GeneralDiagnostics TotalOperationalHours Error: %@", err); + [cluster readAttributeOptionsWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"LevelControl Options Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -11411,37 +12299,37 @@ - (void)testSendClusterGeneralDiagnosticsReadAttributeTotalOperationalHoursWithR [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterGeneralDiagnosticsReadAttributeBootReasonsWithResponseHandler +- (void)testSendClusterLevelControlWriteAttributeOptionsWithValue { - XCTestExpectation * expectation = - [self expectationWithDescription:@"GeneralDiagnosticsReadAttributeBootReasonsWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"LevelControlWriteAttributeOptionsWithValue"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPGeneralDiagnostics * cluster = [[CHIPGeneralDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeBootReasonsWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"GeneralDiagnostics BootReasons Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + uint8_t value = 0x00; + [cluster writeAttributeOptionsWithValue:value + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"LevelControl Options Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterGeneralDiagnosticsReadAttributeClusterRevisionWithResponseHandler +- (void)testSendClusterLevelControlReadAttributeOnOffTransitionTimeWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"GeneralDiagnosticsReadAttributeClusterRevisionWithResponseHandler"]; + [self expectationWithDescription:@"LevelControlReadAttributeOnOffTransitionTimeWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPGeneralDiagnostics * cluster = [[CHIPGeneralDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"GeneralDiagnostics ClusterRevision Error: %@", err); + [cluster readAttributeOnOffTransitionTimeWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"LevelControl OnOffTransitionTime Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -11449,36 +12337,36 @@ - (void)testSendClusterGeneralDiagnosticsReadAttributeClusterRevisionWithRespons [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterGroupKeyManagementReadAttributeGroupsWithResponseHandler +- (void)testSendClusterLevelControlWriteAttributeOnOffTransitionTimeWithValue { - XCTestExpectation * expectation = [self expectationWithDescription:@"GroupKeyManagementReadAttributeGroupsWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"LevelControlWriteAttributeOnOffTransitionTimeWithValue"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPGroupKeyManagement * cluster = [[CHIPGroupKeyManagement alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeGroupsWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"GroupKeyManagement Groups Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + uint16_t value = 0x0000; + [cluster writeAttributeOnOffTransitionTimeWithValue:value + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"LevelControl OnOffTransitionTime Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterGroupKeyManagementReadAttributeGroupKeysWithResponseHandler +- (void)testSendClusterLevelControlReadAttributeOnLevelWithResponseHandler { - XCTestExpectation * expectation = - [self expectationWithDescription:@"GroupKeyManagementReadAttributeGroupKeysWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"LevelControlReadAttributeOnLevelWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPGroupKeyManagement * cluster = [[CHIPGroupKeyManagement alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeGroupKeysWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"GroupKeyManagement GroupKeys Error: %@", err); + [cluster readAttributeOnLevelWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"LevelControl OnLevel Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -11486,36 +12374,37 @@ - (void)testSendClusterGroupKeyManagementReadAttributeGroupKeysWithResponseHandl [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterGroupKeyManagementReadAttributeClusterRevisionWithResponseHandler +- (void)testSendClusterLevelControlWriteAttributeOnLevelWithValue { - XCTestExpectation * expectation = - [self expectationWithDescription:@"GroupKeyManagementReadAttributeClusterRevisionWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"LevelControlWriteAttributeOnLevelWithValue"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPGroupKeyManagement * cluster = [[CHIPGroupKeyManagement alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"GroupKeyManagement ClusterRevision Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + uint8_t value = 0x00; + [cluster writeAttributeOnLevelWithValue:value + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"LevelControl OnLevel Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterGroupsReadAttributeNameSupportWithResponseHandler +- (void)testSendClusterLevelControlReadAttributeOnTransitionTimeWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"GroupsReadAttributeNameSupportWithResponseHandler"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"LevelControlReadAttributeOnTransitionTimeWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPGroups * cluster = [[CHIPGroups alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeNameSupportWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Groups NameSupport Error: %@", err); + [cluster readAttributeOnTransitionTimeWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"LevelControl OnTransitionTime Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -11523,35 +12412,37 @@ - (void)testSendClusterGroupsReadAttributeNameSupportWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterGroupsReadAttributeClusterRevisionWithResponseHandler +- (void)testSendClusterLevelControlWriteAttributeOnTransitionTimeWithValue { - XCTestExpectation * expectation = [self expectationWithDescription:@"GroupsReadAttributeClusterRevisionWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"LevelControlWriteAttributeOnTransitionTimeWithValue"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPGroups * cluster = [[CHIPGroups alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Groups ClusterRevision Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + uint16_t value = 0x0000; + [cluster writeAttributeOnTransitionTimeWithValue:value + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"LevelControl OnTransitionTime Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterIdentifyReadAttributeIdentifyTimeWithResponseHandler +- (void)testSendClusterLevelControlReadAttributeOffTransitionTimeWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"IdentifyReadAttributeIdentifyTimeWithResponseHandler"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"LevelControlReadAttributeOffTransitionTimeWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPIdentify * cluster = [[CHIPIdentify alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeIdentifyTimeWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Identify IdentifyTime Error: %@", err); + [cluster readAttributeOffTransitionTimeWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"LevelControl OffTransitionTime Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -11559,36 +12450,37 @@ - (void)testSendClusterIdentifyReadAttributeIdentifyTimeWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterIdentifyWriteAttributeIdentifyTimeWithValue +- (void)testSendClusterLevelControlWriteAttributeOffTransitionTimeWithValue { - XCTestExpectation * expectation = [self expectationWithDescription:@"IdentifyWriteAttributeIdentifyTimeWithValue"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"LevelControlWriteAttributeOffTransitionTimeWithValue"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPIdentify * cluster = [[CHIPIdentify alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - uint16_t value = 0x00; - [cluster writeAttributeIdentifyTimeWithValue:value - responseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Identify IdentifyTime Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + uint16_t value = 0x0000; + [cluster writeAttributeOffTransitionTimeWithValue:value + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"LevelControl OffTransitionTime Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterIdentifyReadAttributeIdentifyTypeWithResponseHandler +- (void)testSendClusterLevelControlReadAttributeDefaultMoveRateWithResponseHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"IdentifyReadAttributeIdentifyTypeWithResponseHandler"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"LevelControlReadAttributeDefaultMoveRateWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPIdentify * cluster = [[CHIPIdentify alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeIdentifyTypeWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Identify IdentifyType Error: %@", err); + [cluster readAttributeDefaultMoveRateWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"LevelControl DefaultMoveRate Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -11596,36 +12488,37 @@ - (void)testSendClusterIdentifyReadAttributeIdentifyTypeWithResponseHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterIdentifyReadAttributeClusterRevisionWithResponseHandler +- (void)testSendClusterLevelControlWriteAttributeDefaultMoveRateWithValue { - XCTestExpectation * expectation = [self expectationWithDescription:@"IdentifyReadAttributeClusterRevisionWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"LevelControlWriteAttributeDefaultMoveRateWithValue"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPIdentify * cluster = [[CHIPIdentify alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"Identify ClusterRevision Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + uint8_t value = 0x00; + [cluster writeAttributeDefaultMoveRateWithValue:value + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"LevelControl DefaultMoveRate Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterKeypadInputReadAttributeClusterRevisionWithResponseHandler +- (void)testSendClusterLevelControlReadAttributeStartUpCurrentLevelWithResponseHandler { XCTestExpectation * expectation = - [self expectationWithDescription:@"KeypadInputReadAttributeClusterRevisionWithResponseHandler"]; + [self expectationWithDescription:@"LevelControlReadAttributeStartUpCurrentLevelWithResponseHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPKeypadInput * cluster = [[CHIPKeypadInput alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"KeypadInput ClusterRevision Error: %@", err); + [cluster readAttributeStartUpCurrentLevelWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"LevelControl StartUpCurrentLevel Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -11633,24 +12526,25 @@ - (void)testSendClusterKeypadInputReadAttributeClusterRevisionWithResponseHandle [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterLevelControlReadAttributeCurrentLevelWithResponseHandler +- (void)testSendClusterLevelControlWriteAttributeStartUpCurrentLevelWithValue { - XCTestExpectation * expectation = [self expectationWithDescription:@"LevelControlReadAttributeCurrentLevelWithResponseHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"LevelControlWriteAttributeStartUpCurrentLevelWithValue"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeCurrentLevelWithResponseHandler:^(NSError * err, NSDictionary * values) { - NSLog(@"LevelControl CurrentLevel Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + uint8_t value = 0x01; + [cluster writeAttributeStartUpCurrentLevelWithValue:value + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"LevelControl StartUpCurrentLevel Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - - (void)testSendClusterLevelControlReadAttributeClusterRevisionWithResponseHandler { XCTestExpectation * expectation = diff --git a/src/system/SystemLayerImplSelect.cpp b/src/system/SystemLayerImplSelect.cpp index c94f158d007c8b..b69f16d1a2537f 100644 --- a/src/system/SystemLayerImplSelect.cpp +++ b/src/system/SystemLayerImplSelect.cpp @@ -130,14 +130,14 @@ CHIP_ERROR LayerImplSelect::StartTimer(uint32_t delayMilliseconds, TimerComplete if (dispatchQueue) { (void) mTimerList.Add(timer); - dispatch_source_t timerSource = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, dispatchQueue); + dispatch_source_t timerSource = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, DISPATCH_TIMER_STRICT, dispatchQueue); if (timerSource == nullptr) { chipDie(); } timer->mTimerSource = timerSource; - dispatch_source_set_timer(timerSource, dispatch_walltime(NULL, delayMilliseconds * NSEC_PER_MSEC), 0, 100 * NSEC_PER_MSEC); + dispatch_source_set_timer(timerSource, dispatch_walltime(NULL, delayMilliseconds * NSEC_PER_MSEC), 0, 2 * NSEC_PER_MSEC); dispatch_source_set_event_handler(timerSource, ^{ dispatch_source_cancel(timerSource); dispatch_release(timerSource); diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index 047b7b3e87ee05..37a2cde20c00dc 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -2203,7 +2203,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 441 +#define GENERATED_ATTRIBUTE_COUNT 451 #define GENERATED_ATTRIBUTES \ { \ \ @@ -2432,9 +2432,20 @@ /* Endpoint: 1, Cluster: Level Control (server) */ \ { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* options */ \ - { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ + { 0x0011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0xFE) }, /* on level */ \ + { 0x0012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* on transition time */ \ + { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ + { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ + { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { 0x0051, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* out of service */ \ @@ -2960,138 +2971,138 @@ }, /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ { 0x0008, \ ZAP_ATTRIBUTE_INDEX(169), \ - 5, \ - 7, \ + 15, \ + 23, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x000F, ZAP_ATTRIBUTE_INDEX(174), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x000F, ZAP_ATTRIBUTE_INDEX(184), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(178), 5, 1018, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(188), 5, 1018, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x002F, ZAP_ATTRIBUTE_INDEX(183), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002F, ZAP_ATTRIBUTE_INDEX(193), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Power Source (server) */ \ { \ - 0x0039, ZAP_ATTRIBUTE_INDEX(194), 15, 865, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0039, ZAP_ATTRIBUTE_INDEX(204), 15, 865, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ { \ - 0x003B, ZAP_ATTRIBUTE_INDEX(209), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003B, ZAP_ATTRIBUTE_INDEX(219), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(212), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(222), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ { 0x0101, \ - ZAP_ATTRIBUTE_INDEX(214), \ + ZAP_ATTRIBUTE_INDEX(224), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayDoorLockServer }, /* Endpoint: 1, Cluster: Door Lock (server) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(218), 19, 31, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0102, ZAP_ATTRIBUTE_INDEX(228), 19, 31, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (server) */ \ { \ - 0x0103, ZAP_ATTRIBUTE_INDEX(237), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0103, ZAP_ATTRIBUTE_INDEX(247), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Barrier Control (server) */ \ { \ 0x0200, \ - ZAP_ATTRIBUTE_INDEX(242), \ + ZAP_ATTRIBUTE_INDEX(252), \ 8, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayPumpConfigurationAndControlServer \ }, /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ { \ - 0x0201, ZAP_ATTRIBUTE_INDEX(250), 18, 33, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0201, ZAP_ATTRIBUTE_INDEX(260), 18, 33, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Thermostat (server) */ \ { \ - 0x0204, ZAP_ATTRIBUTE_INDEX(268), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0204, ZAP_ATTRIBUTE_INDEX(278), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ { 0x0300, \ - ZAP_ATTRIBUTE_INDEX(272), \ + ZAP_ATTRIBUTE_INDEX(282), \ 53, \ 341, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(325), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0402, ZAP_ATTRIBUTE_INDEX(335), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ { \ - 0x0403, ZAP_ATTRIBUTE_INDEX(329), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0403, ZAP_ATTRIBUTE_INDEX(339), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ { \ - 0x0404, ZAP_ATTRIBUTE_INDEX(333), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0404, ZAP_ATTRIBUTE_INDEX(343), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(337), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0405, ZAP_ATTRIBUTE_INDEX(347), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(341), \ + ZAP_ATTRIBUTE_INDEX(351), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOccupancySensingServer }, /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ { 0x0500, \ - ZAP_ATTRIBUTE_INDEX(345), \ + ZAP_ATTRIBUTE_INDEX(355), \ 6, \ 16, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION) | \ ZAP_CLUSTER_MASK(MESSAGE_SENT_FUNCTION), \ chipFuncArrayIasZoneServer }, /* Endpoint: 1, Cluster: IAS Zone (server) */ \ { \ - 0x0503, ZAP_ATTRIBUTE_INDEX(351), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0503, ZAP_ATTRIBUTE_INDEX(361), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(353), 4, 322, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0504, ZAP_ATTRIBUTE_INDEX(363), 4, 322, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: TV Channel (server) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(357), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0505, ZAP_ATTRIBUTE_INDEX(367), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(359), 9, 59, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(369), 9, 59, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (server) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(368), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0507, ZAP_ATTRIBUTE_INDEX(378), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Input (server) */ \ { \ - 0x0508, ZAP_ATTRIBUTE_INDEX(371), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0508, ZAP_ATTRIBUTE_INDEX(381), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Low Power (server) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(372), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0509, ZAP_ATTRIBUTE_INDEX(382), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(373), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(383), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (server) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(376), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(386), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (server) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(379), 4, 258, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050C, ZAP_ATTRIBUTE_INDEX(389), 4, 258, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(383), 8, 108, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(393), 8, 108, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (server) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(391), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(401), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Account Login (server) */ \ { \ - 0x050F, ZAP_ATTRIBUTE_INDEX(392), 25, 2607, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050F, ZAP_ATTRIBUTE_INDEX(402), 25, 2607, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (server) */ \ { \ - 0x0B04, ZAP_ATTRIBUTE_INDEX(417), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0B04, ZAP_ATTRIBUTE_INDEX(427), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ { \ - 0xF000, ZAP_ATTRIBUTE_INDEX(429), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0xF000, ZAP_ATTRIBUTE_INDEX(439), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binding (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(430), \ + ZAP_ATTRIBUTE_INDEX(440), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(437), \ + ZAP_ATTRIBUTE_INDEX(447), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -3103,7 +3114,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 18, 4391 }, { ZAP_CLUSTER_INDEX(18), 40, 7469 }, { ZAP_CLUSTER_INDEX(58), 2, 18 }, \ + { ZAP_CLUSTER_INDEX(0), 18, 4391 }, { ZAP_CLUSTER_INDEX(18), 40, 7485 }, { ZAP_CLUSTER_INDEX(58), 2, 18 }, \ } // Largest attribute size is needed for various buffers @@ -3113,7 +3124,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (1517) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (11878) +#define ATTRIBUTE_MAX_SIZE (11894) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) diff --git a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h index 8f5ceb2a435647..830bc12b77dcd2 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h @@ -161,6 +161,11 @@ // Server attributes #define ZCL_CURRENT_LEVEL_ATTRIBUTE_ID (0x0000) #define ZCL_LEVEL_CONTROL_REMAINING_TIME_ATTRIBUTE_ID (0x0001) +#define ZCL_MINIMUM_LEVEL_ATTRIBUTE_ID (0x0002) +#define ZCL_MAXIMUM_LEVEL_ATTRIBUTE_ID (0x0003) +#define ZCL_CURRENT_FREQUENCY_ATTRIBUTE_ID (0x0004) +#define ZCL_MIN_FREQUENCY_ATTRIBUTE_ID (0x0005) +#define ZCL_MAX_FREQUENCY_ATTRIBUTE_ID (0x0006) #define ZCL_OPTIONS_ATTRIBUTE_ID (0x000F) #define ZCL_ON_OFF_TRANSITION_TIME_ATTRIBUTE_ID (0x0010) #define ZCL_ON_LEVEL_ATTRIBUTE_ID (0x0011) diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index 3c9664350fd359..a51e5fc0115536 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -1306,6 +1306,77 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t remainingTime) } // namespace RemainingTime +namespace MinLevel { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * minLevel) +{ + return emberAfReadServerAttribute(endpoint, LevelControl::Id, MinLevel::Id, (uint8_t *) minLevel, sizeof(*minLevel)); +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t minLevel) +{ + return emberAfWriteServerAttribute(endpoint, LevelControl::Id, MinLevel::Id, (uint8_t *) &minLevel, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace MinLevel + +namespace MaxLevel { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * maxLevel) +{ + return emberAfReadServerAttribute(endpoint, LevelControl::Id, MaxLevel::Id, (uint8_t *) maxLevel, sizeof(*maxLevel)); +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t maxLevel) +{ + return emberAfWriteServerAttribute(endpoint, LevelControl::Id, MaxLevel::Id, (uint8_t *) &maxLevel, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace MaxLevel + +namespace CurrentFrequency { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * currentFrequency) +{ + return emberAfReadServerAttribute(endpoint, LevelControl::Id, CurrentFrequency::Id, (uint8_t *) currentFrequency, + sizeof(*currentFrequency)); +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t currentFrequency) +{ + return emberAfWriteServerAttribute(endpoint, LevelControl::Id, CurrentFrequency::Id, (uint8_t *) ¤tFrequency, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace CurrentFrequency + +namespace MinFrequency { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * minFrequency) +{ + return emberAfReadServerAttribute(endpoint, LevelControl::Id, MinFrequency::Id, (uint8_t *) minFrequency, + sizeof(*minFrequency)); +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t minFrequency) +{ + return emberAfWriteServerAttribute(endpoint, LevelControl::Id, MinFrequency::Id, (uint8_t *) &minFrequency, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace MinFrequency + +namespace MaxFrequency { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * maxFrequency) +{ + return emberAfReadServerAttribute(endpoint, LevelControl::Id, MaxFrequency::Id, (uint8_t *) maxFrequency, + sizeof(*maxFrequency)); +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t maxFrequency) +{ + return emberAfWriteServerAttribute(endpoint, LevelControl::Id, MaxFrequency::Id, (uint8_t *) &maxFrequency, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace MaxFrequency + namespace Options { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * options) diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index 1534ac0997c0fa..1700383fd3d954 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -491,6 +491,31 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * remainingTime); // int16 EmberAfStatus Set(chip::EndpointId endpoint, uint16_t remainingTime); } // namespace RemainingTime +namespace MinLevel { +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * minLevel); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t minLevel); +} // namespace MinLevel + +namespace MaxLevel { +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * maxLevel); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t maxLevel); +} // namespace MaxLevel + +namespace CurrentFrequency { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * currentFrequency); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t currentFrequency); +} // namespace CurrentFrequency + +namespace MinFrequency { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * minFrequency); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t minFrequency); +} // namespace MinFrequency + +namespace MaxFrequency { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * maxFrequency); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t maxFrequency); +} // namespace MaxFrequency + namespace Options { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * options); // bitmap8 EmberAfStatus Set(chip::EndpointId endpoint, uint8_t options); diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 05e6613b92900b..f23cb0a5468fc6 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -2729,6 +2729,61 @@ struct TypeInfo static constexpr AttributeId GetAttributeId() { return Attributes::RemainingTime::Id; } }; } // namespace RemainingTime +namespace MinLevel { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + ; + + static constexpr ClusterId GetClusterId() { return LevelControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinLevel::Id; } +}; +} // namespace MinLevel +namespace MaxLevel { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + ; + + static constexpr ClusterId GetClusterId() { return LevelControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxLevel::Id; } +}; +} // namespace MaxLevel +namespace CurrentFrequency { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + ; + + static constexpr ClusterId GetClusterId() { return LevelControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentFrequency::Id; } +}; +} // namespace CurrentFrequency +namespace MinFrequency { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + ; + + static constexpr ClusterId GetClusterId() { return LevelControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinFrequency::Id; } +}; +} // namespace MinFrequency +namespace MaxFrequency { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + ; + + static constexpr ClusterId GetClusterId() { return LevelControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxFrequency::Id; } +}; +} // namespace MaxFrequency namespace Options { struct TypeInfo { diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index 184fc35721ea9f..5ea6f40e9fd5cd 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -464,6 +464,26 @@ namespace RemainingTime { static constexpr AttributeId Id = 0x00000001; } // namespace RemainingTime +namespace MinLevel { +static constexpr AttributeId Id = 0x00000002; +} // namespace MinLevel + +namespace MaxLevel { +static constexpr AttributeId Id = 0x00000003; +} // namespace MaxLevel + +namespace CurrentFrequency { +static constexpr AttributeId Id = 0x00000004; +} // namespace CurrentFrequency + +namespace MinFrequency { +static constexpr AttributeId Id = 0x00000005; +} // namespace MinFrequency + +namespace MaxFrequency { +static constexpr AttributeId Id = 0x00000006; +} // namespace MaxFrequency + namespace Options { static constexpr AttributeId Id = 0x0000000F; } // namespace Options diff --git a/zzz_generated/bridge-app/zap-generated/endpoint_config.h b/zzz_generated/bridge-app/zap-generated/endpoint_config.h index 831d4e94e85864..e405946e9a3069 100644 --- a/zzz_generated/bridge-app/zap-generated/endpoint_config.h +++ b/zzz_generated/bridge-app/zap-generated/endpoint_config.h @@ -933,7 +933,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 131 +#define GENERATED_ATTRIBUTE_COUNT 144 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1093,8 +1093,22 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ + { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ + { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* options */ \ + { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ + { 0x0011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0xFE) }, /* on level */ \ + { 0x0012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* on transition time */ \ + { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ + { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ + { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Fixed Label (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(3364) }, /* label list */ \ @@ -1197,12 +1211,12 @@ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { 0x0008, \ ZAP_ATTRIBUTE_INDEX(127), \ - 2, \ - 3, \ + 15, \ + 23, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(129), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(142), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ } @@ -1211,7 +1225,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 12, 3433 }, { ZAP_CLUSTER_INDEX(12), 3, 262 }, \ + { ZAP_CLUSTER_INDEX(0), 12, 3433 }, { ZAP_CLUSTER_INDEX(12), 3, 282 }, \ } // Largest attribute size is needed for various buffers @@ -1221,7 +1235,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (245) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (3695) +#define ATTRIBUTE_MAX_SIZE (3715) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 782c718cad6cc6..0d43a93c1123d2 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -11321,6 +11321,19 @@ class ReadKeypadInputClusterRevision : public ModelCommand |------------------------------------------------------------------------------| | Attributes: | | | * CurrentLevel | 0x0000 | +| * RemainingTime | 0x0001 | +| * MinLevel | 0x0002 | +| * MaxLevel | 0x0003 | +| * CurrentFrequency | 0x0004 | +| * MinFrequency | 0x0005 | +| * MaxFrequency | 0x0006 | +| * Options | 0x000F | +| * OnOffTransitionTime | 0x0010 | +| * OnLevel | 0x0011 | +| * OnTransitionTime | 0x0012 | +| * OffTransitionTime | 0x0013 | +| * DefaultMoveRate | 0x0014 | +| * StartUpCurrentLevel | 0x4000 | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -11705,6 +11718,679 @@ class ReportLevelControlCurrentLevel : public ModelCommand uint16_t mMaxInterval; }; +/* + * Attribute RemainingTime + */ +class ReadLevelControlRemainingTime : public ModelCommand +{ +public: + ReadLevelControlRemainingTime() : ModelCommand("read") + { + AddArgument("attr-name", "remaining-time"); + ModelCommand::AddArguments(); + } + + ~ReadLevelControlRemainingTime() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0008) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeRemainingTime(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt16uAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +/* + * Attribute MinLevel + */ +class ReadLevelControlMinLevel : public ModelCommand +{ +public: + ReadLevelControlMinLevel() : ModelCommand("read") + { + AddArgument("attr-name", "min-level"); + ModelCommand::AddArguments(); + } + + ~ReadLevelControlMinLevel() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0008) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeMinLevel(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt8uAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +/* + * Attribute MaxLevel + */ +class ReadLevelControlMaxLevel : public ModelCommand +{ +public: + ReadLevelControlMaxLevel() : ModelCommand("read") + { + AddArgument("attr-name", "max-level"); + ModelCommand::AddArguments(); + } + + ~ReadLevelControlMaxLevel() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0008) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeMaxLevel(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt8uAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +/* + * Attribute CurrentFrequency + */ +class ReadLevelControlCurrentFrequency : public ModelCommand +{ +public: + ReadLevelControlCurrentFrequency() : ModelCommand("read") + { + AddArgument("attr-name", "current-frequency"); + ModelCommand::AddArguments(); + } + + ~ReadLevelControlCurrentFrequency() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0008) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeCurrentFrequency(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt16uAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +/* + * Attribute MinFrequency + */ +class ReadLevelControlMinFrequency : public ModelCommand +{ +public: + ReadLevelControlMinFrequency() : ModelCommand("read") + { + AddArgument("attr-name", "min-frequency"); + ModelCommand::AddArguments(); + } + + ~ReadLevelControlMinFrequency() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0008) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeMinFrequency(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt16uAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +/* + * Attribute MaxFrequency + */ +class ReadLevelControlMaxFrequency : public ModelCommand +{ +public: + ReadLevelControlMaxFrequency() : ModelCommand("read") + { + AddArgument("attr-name", "max-frequency"); + ModelCommand::AddArguments(); + } + + ~ReadLevelControlMaxFrequency() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0008) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeMaxFrequency(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt16uAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +/* + * Attribute Options + */ +class ReadLevelControlOptions : public ModelCommand +{ +public: + ReadLevelControlOptions() : ModelCommand("read") + { + AddArgument("attr-name", "options"); + ModelCommand::AddArguments(); + } + + ~ReadLevelControlOptions() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0008) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeOptions(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt8uAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +class WriteLevelControlOptions : public ModelCommand +{ +public: + WriteLevelControlOptions() : ModelCommand("write") + { + AddArgument("attr-name", "options"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + ModelCommand::AddArguments(); + } + + ~WriteLevelControlOptions() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0008) command (0x01) on endpoint %" PRIu8, endpointId); + + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, endpointId); + return cluster.WriteAttributeOptions(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mValue); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + uint8_t mValue; +}; + +/* + * Attribute OnOffTransitionTime + */ +class ReadLevelControlOnOffTransitionTime : public ModelCommand +{ +public: + ReadLevelControlOnOffTransitionTime() : ModelCommand("read") + { + AddArgument("attr-name", "on-off-transition-time"); + ModelCommand::AddArguments(); + } + + ~ReadLevelControlOnOffTransitionTime() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0008) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeOnOffTransitionTime(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt16uAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +class WriteLevelControlOnOffTransitionTime : public ModelCommand +{ +public: + WriteLevelControlOnOffTransitionTime() : ModelCommand("write") + { + AddArgument("attr-name", "on-off-transition-time"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + ModelCommand::AddArguments(); + } + + ~WriteLevelControlOnOffTransitionTime() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0008) command (0x01) on endpoint %" PRIu8, endpointId); + + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, endpointId); + return cluster.WriteAttributeOnOffTransitionTime(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mValue); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + uint16_t mValue; +}; + +/* + * Attribute OnLevel + */ +class ReadLevelControlOnLevel : public ModelCommand +{ +public: + ReadLevelControlOnLevel() : ModelCommand("read") + { + AddArgument("attr-name", "on-level"); + ModelCommand::AddArguments(); + } + + ~ReadLevelControlOnLevel() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0008) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeOnLevel(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt8uAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +class WriteLevelControlOnLevel : public ModelCommand +{ +public: + WriteLevelControlOnLevel() : ModelCommand("write") + { + AddArgument("attr-name", "on-level"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + ModelCommand::AddArguments(); + } + + ~WriteLevelControlOnLevel() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0008) command (0x01) on endpoint %" PRIu8, endpointId); + + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, endpointId); + return cluster.WriteAttributeOnLevel(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mValue); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + uint8_t mValue; +}; + +/* + * Attribute OnTransitionTime + */ +class ReadLevelControlOnTransitionTime : public ModelCommand +{ +public: + ReadLevelControlOnTransitionTime() : ModelCommand("read") + { + AddArgument("attr-name", "on-transition-time"); + ModelCommand::AddArguments(); + } + + ~ReadLevelControlOnTransitionTime() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0008) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeOnTransitionTime(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt16uAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +class WriteLevelControlOnTransitionTime : public ModelCommand +{ +public: + WriteLevelControlOnTransitionTime() : ModelCommand("write") + { + AddArgument("attr-name", "on-transition-time"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + ModelCommand::AddArguments(); + } + + ~WriteLevelControlOnTransitionTime() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0008) command (0x01) on endpoint %" PRIu8, endpointId); + + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, endpointId); + return cluster.WriteAttributeOnTransitionTime(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mValue); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + uint16_t mValue; +}; + +/* + * Attribute OffTransitionTime + */ +class ReadLevelControlOffTransitionTime : public ModelCommand +{ +public: + ReadLevelControlOffTransitionTime() : ModelCommand("read") + { + AddArgument("attr-name", "off-transition-time"); + ModelCommand::AddArguments(); + } + + ~ReadLevelControlOffTransitionTime() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0008) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeOffTransitionTime(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt16uAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +class WriteLevelControlOffTransitionTime : public ModelCommand +{ +public: + WriteLevelControlOffTransitionTime() : ModelCommand("write") + { + AddArgument("attr-name", "off-transition-time"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + ModelCommand::AddArguments(); + } + + ~WriteLevelControlOffTransitionTime() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0008) command (0x01) on endpoint %" PRIu8, endpointId); + + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, endpointId); + return cluster.WriteAttributeOffTransitionTime(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mValue); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + uint16_t mValue; +}; + +/* + * Attribute DefaultMoveRate + */ +class ReadLevelControlDefaultMoveRate : public ModelCommand +{ +public: + ReadLevelControlDefaultMoveRate() : ModelCommand("read") + { + AddArgument("attr-name", "default-move-rate"); + ModelCommand::AddArguments(); + } + + ~ReadLevelControlDefaultMoveRate() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0008) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeDefaultMoveRate(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt8uAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +class WriteLevelControlDefaultMoveRate : public ModelCommand +{ +public: + WriteLevelControlDefaultMoveRate() : ModelCommand("write") + { + AddArgument("attr-name", "default-move-rate"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + ModelCommand::AddArguments(); + } + + ~WriteLevelControlDefaultMoveRate() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0008) command (0x01) on endpoint %" PRIu8, endpointId); + + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, endpointId); + return cluster.WriteAttributeDefaultMoveRate(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mValue); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + uint8_t mValue; +}; + +/* + * Attribute StartUpCurrentLevel + */ +class ReadLevelControlStartUpCurrentLevel : public ModelCommand +{ +public: + ReadLevelControlStartUpCurrentLevel() : ModelCommand("read") + { + AddArgument("attr-name", "start-up-current-level"); + ModelCommand::AddArguments(); + } + + ~ReadLevelControlStartUpCurrentLevel() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0008) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeStartUpCurrentLevel(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt8uAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +class WriteLevelControlStartUpCurrentLevel : public ModelCommand +{ +public: + WriteLevelControlStartUpCurrentLevel() : ModelCommand("write") + { + AddArgument("attr-name", "start-up-current-level"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + ModelCommand::AddArguments(); + } + + ~WriteLevelControlStartUpCurrentLevel() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0008) command (0x01) on endpoint %" PRIu8, endpointId); + + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, endpointId); + return cluster.WriteAttributeStartUpCurrentLevel(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mValue); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + uint8_t mValue; +}; + /* * Attribute ClusterRevision */ @@ -25374,17 +26060,37 @@ void registerClusterLevelControl(Commands & commands) const char * clusterName = "LevelControl"; commands_list clusterCommands = { - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // }; commands.Register(clusterName, clusterCommands); diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 950de8eb694acf..1fff18610c49f8 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -9794,6 +9794,775 @@ class Test_TC_LVL_1_1 : public TestCommand void OnSuccessResponse_0(uint16_t clusterRevision) { ThrowSuccessResponse(); } }; +class Test_TC_LVL_2_1 : public TestCommand +{ +public: + Test_TC_LVL_2_1() : TestCommand("Test_TC_LVL_2_1"), mTestIndex(0) {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_2_1\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : reads current Level attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : sends a Move to level command\n"); + err = TestSendsAMoveToLevelCommand_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Wait 10ms\n"); + err = TestWait10ms_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : reads current Level attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : sends a Move to level command\n"); + err = TestSendsAMoveToLevelCommand_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 100ms\n"); + err = TestWait100ms_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : reads current Level attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : reads On Off Transition Time attribute from DUT\n"); + err = TestReadsOnOffTransitionTimeAttributeFromDut_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : sends a Move to level command\n"); + err = TestSendsAMoveToLevelCommand_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 1ms\n"); + err = TestWait1ms_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : reads current Level attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Reset level to 0\n"); + err = TestResetLevelTo0_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 10ms\n"); + err = TestWait10ms_12(); + break; + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 13; + + chip::Callback::Callback mOnFailureCallback_0{ OnFailureCallback_0, this }; + chip::Callback::Callback mOnSuccessCallback_0{ OnSuccessCallback_0, this }; + chip::Callback::Callback mOnFailureCallback_1{ OnFailureCallback_1, this }; + chip::Callback::Callback mOnSuccessCallback_1{ OnSuccessCallback_1, this }; + chip::Callback::Callback mOnFailureCallback_3{ OnFailureCallback_3, this }; + chip::Callback::Callback mOnSuccessCallback_3{ OnSuccessCallback_3, this }; + chip::Callback::Callback mOnFailureCallback_4{ OnFailureCallback_4, this }; + chip::Callback::Callback mOnSuccessCallback_4{ OnSuccessCallback_4, this }; + chip::Callback::Callback mOnFailureCallback_6{ OnFailureCallback_6, this }; + chip::Callback::Callback mOnSuccessCallback_6{ OnSuccessCallback_6, this }; + chip::Callback::Callback mOnFailureCallback_7{ OnFailureCallback_7, this }; + chip::Callback::Callback mOnSuccessCallback_7{ OnSuccessCallback_7, + this }; + chip::Callback::Callback mOnFailureCallback_8{ OnFailureCallback_8, this }; + chip::Callback::Callback mOnSuccessCallback_8{ OnSuccessCallback_8, this }; + chip::Callback::Callback mOnFailureCallback_10{ OnFailureCallback_10, this }; + chip::Callback::Callback mOnSuccessCallback_10{ OnSuccessCallback_10, this }; + chip::Callback::Callback mOnFailureCallback_11{ OnFailureCallback_11, this }; + chip::Callback::Callback mOnSuccessCallback_11{ OnSuccessCallback_11, this }; + + static void OnFailureCallback_0(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_0(status); + } + + static void OnSuccessCallback_0(void * context, uint8_t currentLevel) + { + (static_cast(context))->OnSuccessResponse_0(currentLevel); + } + + static void OnFailureCallback_1(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_1(status); + } + + static void OnSuccessCallback_1(void * context) { (static_cast(context))->OnSuccessResponse_1(); } + + static void OnFailureCallback_3(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_3(status); + } + + static void OnSuccessCallback_3(void * context, uint8_t currentLevel) + { + (static_cast(context))->OnSuccessResponse_3(currentLevel); + } + + static void OnFailureCallback_4(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_4(status); + } + + static void OnSuccessCallback_4(void * context) { (static_cast(context))->OnSuccessResponse_4(); } + + static void OnFailureCallback_6(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_6(status); + } + + static void OnSuccessCallback_6(void * context, uint8_t currentLevel) + { + (static_cast(context))->OnSuccessResponse_6(currentLevel); + } + + static void OnFailureCallback_7(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_7(status); + } + + static void OnSuccessCallback_7(void * context, uint16_t onOffTransitionTime) + { + (static_cast(context))->OnSuccessResponse_7(onOffTransitionTime); + } + + static void OnFailureCallback_8(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_8(status); + } + + static void OnSuccessCallback_8(void * context) { (static_cast(context))->OnSuccessResponse_8(); } + + static void OnFailureCallback_10(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_10(status); + } + + static void OnSuccessCallback_10(void * context, uint8_t currentLevel) + { + (static_cast(context))->OnSuccessResponse_10(currentLevel); + } + + static void OnFailureCallback_11(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_11(status); + } + + static void OnSuccessCallback_11(void * context) { (static_cast(context))->OnSuccessResponse_11(); } + + // + // Tests methods + // + + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_0() + { + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeCurrentLevel(mOnSuccessCallback_0.Cancel(), mOnFailureCallback_0.Cancel()); + } + + void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_0(uint8_t currentLevel) + { + VerifyOrReturn(CheckValue("currentLevel", currentLevel, 0)); + NextTest(); + } + + CHIP_ERROR TestSendsAMoveToLevelCommand_1() + { + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevice, 1); + + uint8_t levelArgument = 64; + uint16_t transitionTimeArgument = 0U; + uint8_t optionMaskArgument = 1; + uint8_t optionOverrideArgument = 1; + + return cluster.MoveToLevel(mOnSuccessCallback_1.Cancel(), mOnFailureCallback_1.Cancel(), levelArgument, + transitionTimeArgument, optionMaskArgument, optionOverrideArgument); + } + + void OnFailureResponse_1(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_1() { NextTest(); } + + CHIP_ERROR TestWait10ms_2() { return WaitForMs(10); } + + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_3() + { + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeCurrentLevel(mOnSuccessCallback_3.Cancel(), mOnFailureCallback_3.Cancel()); + } + + void OnFailureResponse_3(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_3(uint8_t currentLevel) + { + VerifyOrReturn(CheckValue("currentLevel", currentLevel, 64)); + NextTest(); + } + + CHIP_ERROR TestSendsAMoveToLevelCommand_4() + { + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevice, 1); + + uint8_t levelArgument = 128; + uint16_t transitionTimeArgument = 1U; + uint8_t optionMaskArgument = 1; + uint8_t optionOverrideArgument = 1; + + return cluster.MoveToLevel(mOnSuccessCallback_4.Cancel(), mOnFailureCallback_4.Cancel(), levelArgument, + transitionTimeArgument, optionMaskArgument, optionOverrideArgument); + } + + void OnFailureResponse_4(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_4() { NextTest(); } + + CHIP_ERROR TestWait100ms_5() { return WaitForMs(100); } + + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_6() + { + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeCurrentLevel(mOnSuccessCallback_6.Cancel(), mOnFailureCallback_6.Cancel()); + } + + void OnFailureResponse_6(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_6(uint8_t currentLevel) + { + VerifyOrReturn(CheckValue("currentLevel", currentLevel, 128)); + NextTest(); + } + + CHIP_ERROR TestReadsOnOffTransitionTimeAttributeFromDut_7() + { + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeOnOffTransitionTime(mOnSuccessCallback_7.Cancel(), mOnFailureCallback_7.Cancel()); + } + + void OnFailureResponse_7(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_7(uint16_t onOffTransitionTime) + { + VerifyOrReturn(CheckValue("onOffTransitionTime", onOffTransitionTime, 0U)); + NextTest(); + } + + CHIP_ERROR TestSendsAMoveToLevelCommand_8() + { + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevice, 1); + + uint8_t levelArgument = 254; + uint16_t transitionTimeArgument = 65535U; + uint8_t optionMaskArgument = 1; + uint8_t optionOverrideArgument = 1; + + return cluster.MoveToLevel(mOnSuccessCallback_8.Cancel(), mOnFailureCallback_8.Cancel(), levelArgument, + transitionTimeArgument, optionMaskArgument, optionOverrideArgument); + } + + void OnFailureResponse_8(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_8() { NextTest(); } + + CHIP_ERROR TestWait1ms_9() { return WaitForMs(1); } + + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_10() + { + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeCurrentLevel(mOnSuccessCallback_10.Cancel(), mOnFailureCallback_10.Cancel()); + } + + void OnFailureResponse_10(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_10(uint8_t currentLevel) + { + VerifyOrReturn(CheckValue("currentLevel", currentLevel, 254)); + NextTest(); + } + + CHIP_ERROR TestResetLevelTo0_11() + { + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevice, 1); + + uint8_t levelArgument = 0; + uint16_t transitionTimeArgument = 0U; + uint8_t optionMaskArgument = 1; + uint8_t optionOverrideArgument = 1; + + return cluster.MoveToLevel(mOnSuccessCallback_11.Cancel(), mOnFailureCallback_11.Cancel(), levelArgument, + transitionTimeArgument, optionMaskArgument, optionOverrideArgument); + } + + void OnFailureResponse_11(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_11() { NextTest(); } + + CHIP_ERROR TestWait10ms_12() { return WaitForMs(10); } +}; + +class Test_TC_LVL_3_1 : public TestCommand +{ +public: + Test_TC_LVL_3_1() : TestCommand("Test_TC_LVL_3_1"), mTestIndex(0) {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_3_1\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_3_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : reads current level attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : reads max level attribute from DUT\n"); + err = TestReadsMaxLevelAttributeFromDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : sends a Move up command\n"); + err = TestSendsAMoveUpCommand_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Wait 2500ms\n"); + err = TestWait2500ms_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : reads current level attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : reads min level attribute from DUT\n"); + err = TestReadsMinLevelAttributeFromDut_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : sends a Move down command\n"); + err = TestSendsAMoveDownCommand_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 2500ms\n"); + err = TestWait2500ms_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : reads current level attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Write default move rate attribute from DUT\n"); + err = TestWriteDefaultMoveRateAttributeFromDut_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : reads default move rate attribute from DUT\n"); + err = TestReadsDefaultMoveRateAttributeFromDut_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : sends a Move up command at default move rate\n"); + err = TestSendsAMoveUpCommandAtDefaultMoveRate_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 10ms\n"); + err = TestWait10ms_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : reads current level attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_13(); + break; + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 14; + + chip::Callback::Callback mOnFailureCallback_0{ OnFailureCallback_0, this }; + chip::Callback::Callback mOnSuccessCallback_0{ OnSuccessCallback_0, this }; + chip::Callback::Callback mOnFailureCallback_1{ OnFailureCallback_1, this }; + chip::Callback::Callback mOnSuccessCallback_1{ OnSuccessCallback_1, this }; + chip::Callback::Callback mOnFailureCallback_2{ OnFailureCallback_2, this }; + chip::Callback::Callback mOnSuccessCallback_2{ OnSuccessCallback_2, this }; + chip::Callback::Callback mOnFailureCallback_4{ OnFailureCallback_4, this }; + chip::Callback::Callback mOnSuccessCallback_4{ OnSuccessCallback_4, this }; + chip::Callback::Callback mOnFailureCallback_5{ OnFailureCallback_5, this }; + chip::Callback::Callback mOnSuccessCallback_5{ OnSuccessCallback_5, this }; + chip::Callback::Callback mOnFailureCallback_6{ OnFailureCallback_6, this }; + chip::Callback::Callback mOnSuccessCallback_6{ OnSuccessCallback_6, this }; + chip::Callback::Callback mOnFailureCallback_8{ OnFailureCallback_8, this }; + chip::Callback::Callback mOnSuccessCallback_8{ OnSuccessCallback_8, this }; + chip::Callback::Callback mOnFailureCallback_9{ OnFailureCallback_9, this }; + chip::Callback::Callback mOnSuccessCallback_9{ OnSuccessCallback_9, this }; + chip::Callback::Callback mOnFailureCallback_10{ OnFailureCallback_10, this }; + chip::Callback::Callback mOnSuccessCallback_10{ OnSuccessCallback_10, this }; + chip::Callback::Callback mOnFailureCallback_11{ OnFailureCallback_11, this }; + chip::Callback::Callback mOnSuccessCallback_11{ OnSuccessCallback_11, this }; + chip::Callback::Callback mOnFailureCallback_13{ OnFailureCallback_13, this }; + chip::Callback::Callback mOnSuccessCallback_13{ OnSuccessCallback_13, this }; + + static void OnFailureCallback_0(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_0(status); + } + + static void OnSuccessCallback_0(void * context, uint8_t currentLevel) + { + (static_cast(context))->OnSuccessResponse_0(currentLevel); + } + + static void OnFailureCallback_1(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_1(status); + } + + static void OnSuccessCallback_1(void * context, uint8_t maxLevel) + { + (static_cast(context))->OnSuccessResponse_1(maxLevel); + } + + static void OnFailureCallback_2(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_2(status); + } + + static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } + + static void OnFailureCallback_4(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_4(status); + } + + static void OnSuccessCallback_4(void * context, uint8_t currentLevel) + { + (static_cast(context))->OnSuccessResponse_4(currentLevel); + } + + static void OnFailureCallback_5(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_5(status); + } + + static void OnSuccessCallback_5(void * context, uint8_t minLevel) + { + (static_cast(context))->OnSuccessResponse_5(minLevel); + } + + static void OnFailureCallback_6(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_6(status); + } + + static void OnSuccessCallback_6(void * context) { (static_cast(context))->OnSuccessResponse_6(); } + + static void OnFailureCallback_8(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_8(status); + } + + static void OnSuccessCallback_8(void * context, uint8_t currentLevel) + { + (static_cast(context))->OnSuccessResponse_8(currentLevel); + } + + static void OnFailureCallback_9(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_9(status); + } + + static void OnSuccessCallback_9(void * context, uint8_t defaultMoveRate) + { + (static_cast(context))->OnSuccessResponse_9(defaultMoveRate); + } + + static void OnFailureCallback_10(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_10(status); + } + + static void OnSuccessCallback_10(void * context, uint8_t defaultMoveRate) + { + (static_cast(context))->OnSuccessResponse_10(defaultMoveRate); + } + + static void OnFailureCallback_11(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_11(status); + } + + static void OnSuccessCallback_11(void * context) { (static_cast(context))->OnSuccessResponse_11(); } + + static void OnFailureCallback_13(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_13(status); + } + + static void OnSuccessCallback_13(void * context, uint8_t currentLevel) + { + (static_cast(context))->OnSuccessResponse_13(currentLevel); + } + + // + // Tests methods + // + + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_0() + { + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeCurrentLevel(mOnSuccessCallback_0.Cancel(), mOnFailureCallback_0.Cancel()); + } + + void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_0(uint8_t currentLevel) + { + VerifyOrReturn(CheckValue("currentLevel", currentLevel, 0)); + NextTest(); + } + + CHIP_ERROR TestReadsMaxLevelAttributeFromDut_1() + { + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeMaxLevel(mOnSuccessCallback_1.Cancel(), mOnFailureCallback_1.Cancel()); + } + + void OnFailureResponse_1(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_1(uint8_t maxLevel) + { + VerifyOrReturn(CheckValue("maxLevel", maxLevel, 255)); + NextTest(); + } + + CHIP_ERROR TestSendsAMoveUpCommand_2() + { + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevice, 1); + + uint8_t moveModeArgument = 0; + uint8_t rateArgument = 200; + uint8_t optionMaskArgument = 1; + uint8_t optionOverrideArgument = 1; + + return cluster.Move(mOnSuccessCallback_2.Cancel(), mOnFailureCallback_2.Cancel(), moveModeArgument, rateArgument, + optionMaskArgument, optionOverrideArgument); + } + + void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_2() { NextTest(); } + + CHIP_ERROR TestWait2500ms_3() { return WaitForMs(2500); } + + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_4() + { + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeCurrentLevel(mOnSuccessCallback_4.Cancel(), mOnFailureCallback_4.Cancel()); + } + + void OnFailureResponse_4(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_4(uint8_t currentLevel) + { + VerifyOrReturn(CheckValue("currentLevel", currentLevel, 255)); + NextTest(); + } + + CHIP_ERROR TestReadsMinLevelAttributeFromDut_5() + { + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeMinLevel(mOnSuccessCallback_5.Cancel(), mOnFailureCallback_5.Cancel()); + } + + void OnFailureResponse_5(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_5(uint8_t minLevel) + { + VerifyOrReturn(CheckValue("minLevel", minLevel, 0)); + NextTest(); + } + + CHIP_ERROR TestSendsAMoveDownCommand_6() + { + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevice, 1); + + uint8_t moveModeArgument = 1; + uint8_t rateArgument = 250; + uint8_t optionMaskArgument = 1; + uint8_t optionOverrideArgument = 1; + + return cluster.Move(mOnSuccessCallback_6.Cancel(), mOnFailureCallback_6.Cancel(), moveModeArgument, rateArgument, + optionMaskArgument, optionOverrideArgument); + } + + void OnFailureResponse_6(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_6() { NextTest(); } + + CHIP_ERROR TestWait2500ms_7() { return WaitForMs(2500); } + + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_8() + { + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeCurrentLevel(mOnSuccessCallback_8.Cancel(), mOnFailureCallback_8.Cancel()); + } + + void OnFailureResponse_8(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_8(uint8_t currentLevel) + { + VerifyOrReturn(CheckValue("currentLevel", currentLevel, 0)); + NextTest(); + } + + CHIP_ERROR TestWriteDefaultMoveRateAttributeFromDut_9() + { + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevice, 1); + + uint8_t defaultMoveRateArgument = 20; + + return cluster.WriteAttributeDefaultMoveRate(mOnSuccessCallback_9.Cancel(), mOnFailureCallback_9.Cancel(), + defaultMoveRateArgument); + } + + void OnFailureResponse_9(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_9(uint8_t defaultMoveRate) { NextTest(); } + + CHIP_ERROR TestReadsDefaultMoveRateAttributeFromDut_10() + { + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeDefaultMoveRate(mOnSuccessCallback_10.Cancel(), mOnFailureCallback_10.Cancel()); + } + + void OnFailureResponse_10(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_10(uint8_t defaultMoveRate) + { + VerifyOrReturn(CheckValue("defaultMoveRate", defaultMoveRate, 20)); + NextTest(); + } + + CHIP_ERROR TestSendsAMoveUpCommandAtDefaultMoveRate_11() + { + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevice, 1); + + uint8_t moveModeArgument = 1; + uint8_t rateArgument = 255; + uint8_t optionMaskArgument = 1; + uint8_t optionOverrideArgument = 1; + + return cluster.Move(mOnSuccessCallback_11.Cancel(), mOnFailureCallback_11.Cancel(), moveModeArgument, rateArgument, + optionMaskArgument, optionOverrideArgument); + } + + void OnFailureResponse_11(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_11() { NextTest(); } + + CHIP_ERROR TestWait10ms_12() { return WaitForMs(10); } + + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_13() + { + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeCurrentLevel(mOnSuccessCallback_13.Cancel(), mOnFailureCallback_13.Cancel()); + } + + void OnFailureResponse_13(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_13(uint8_t currentLevel) + { + VerifyOrReturn(CheckConstraintNotValue("currentLevel", currentLevel, 255)); + NextTest(); + } +}; + class Test_TC_CC_1_1 : public TestCommand { public: @@ -15848,6 +16617,8 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp index 028d8dbd2ffefa..95f16c13f13b5f 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp @@ -6728,6 +6728,281 @@ CHIP_ERROR LevelControlCluster::ReportAttributeCurrentLevel(Callback::Cancelable BasicAttributeFilter); } +CHIP_ERROR LevelControlCluster::ReadAttributeRemainingTime(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = 0x00000001; + attributePath.mFlags.Set(app::AttributePathParams::Flags::kFieldIdValid); + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + +CHIP_ERROR LevelControlCluster::ReadAttributeMinLevel(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = 0x00000002; + attributePath.mFlags.Set(app::AttributePathParams::Flags::kFieldIdValid); + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + +CHIP_ERROR LevelControlCluster::ReadAttributeMaxLevel(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = 0x00000003; + attributePath.mFlags.Set(app::AttributePathParams::Flags::kFieldIdValid); + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + +CHIP_ERROR LevelControlCluster::ReadAttributeCurrentFrequency(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = 0x00000004; + attributePath.mFlags.Set(app::AttributePathParams::Flags::kFieldIdValid); + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + +CHIP_ERROR LevelControlCluster::ReadAttributeMinFrequency(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = 0x00000005; + attributePath.mFlags.Set(app::AttributePathParams::Flags::kFieldIdValid); + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + +CHIP_ERROR LevelControlCluster::ReadAttributeMaxFrequency(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = 0x00000006; + attributePath.mFlags.Set(app::AttributePathParams::Flags::kFieldIdValid); + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + +CHIP_ERROR LevelControlCluster::ReadAttributeOptions(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = 0x0000000F; + attributePath.mFlags.Set(app::AttributePathParams::Flags::kFieldIdValid); + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + +CHIP_ERROR LevelControlCluster::WriteAttributeOptions(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = 0x0000000F; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload(attributePath, value)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR LevelControlCluster::ReadAttributeOnOffTransitionTime(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = 0x00000010; + attributePath.mFlags.Set(app::AttributePathParams::Flags::kFieldIdValid); + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + +CHIP_ERROR LevelControlCluster::WriteAttributeOnOffTransitionTime(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = 0x00000010; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload(attributePath, value)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR LevelControlCluster::ReadAttributeOnLevel(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = 0x00000011; + attributePath.mFlags.Set(app::AttributePathParams::Flags::kFieldIdValid); + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + +CHIP_ERROR LevelControlCluster::WriteAttributeOnLevel(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = 0x00000011; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload(attributePath, value)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR LevelControlCluster::ReadAttributeOnTransitionTime(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = 0x00000012; + attributePath.mFlags.Set(app::AttributePathParams::Flags::kFieldIdValid); + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + +CHIP_ERROR LevelControlCluster::WriteAttributeOnTransitionTime(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = 0x00000012; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload(attributePath, value)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR LevelControlCluster::ReadAttributeOffTransitionTime(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = 0x00000013; + attributePath.mFlags.Set(app::AttributePathParams::Flags::kFieldIdValid); + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + +CHIP_ERROR LevelControlCluster::WriteAttributeOffTransitionTime(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t value) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = 0x00000013; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload(attributePath, value)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR LevelControlCluster::ReadAttributeDefaultMoveRate(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = 0x00000014; + attributePath.mFlags.Set(app::AttributePathParams::Flags::kFieldIdValid); + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + +CHIP_ERROR LevelControlCluster::WriteAttributeDefaultMoveRate(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = 0x00000014; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload(attributePath, value)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR LevelControlCluster::ReadAttributeStartUpCurrentLevel(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = 0x00004000; + attributePath.mFlags.Set(app::AttributePathParams::Flags::kFieldIdValid); + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + +CHIP_ERROR LevelControlCluster::WriteAttributeStartUpCurrentLevel(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = 0x00004000; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload(attributePath, value)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + CHIP_ERROR LevelControlCluster::ReadAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h index 178dc959c78ae9..7e79848467bcd3 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h @@ -739,7 +739,34 @@ class DLL_EXPORT LevelControlCluster : public ClusterBase // Cluster Attributes CHIP_ERROR ReadAttributeCurrentLevel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeRemainingTime(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeMinLevel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeMaxLevel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeCurrentFrequency(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeMinFrequency(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeMaxFrequency(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeOptions(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeOnOffTransitionTime(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeOnLevel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeOnTransitionTime(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeOffTransitionTime(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeDefaultMoveRate(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeStartUpCurrentLevel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); CHIP_ERROR ReadAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR WriteAttributeOptions(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeOnOffTransitionTime(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeOnLevel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeOnTransitionTime(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeOffTransitionTime(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeDefaultMoveRate(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeStartUpCurrentLevel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); CHIP_ERROR SubscribeAttributeCurrentLevel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t minInterval, uint16_t maxInterval); CHIP_ERROR ReportAttributeCurrentLevel(Callback::Cancelable * onReportCallback); diff --git a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.cpp b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.cpp index 39ffcb0316e966..88c9a86581dd8b 100644 --- a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.cpp +++ b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.cpp @@ -2477,6 +2477,109 @@ CHIP_ERROR LevelControlClusterTest::WriteAttributeCurrentLevel(Callback::Cancela return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); } +CHIP_ERROR LevelControlClusterTest::WriteAttributeRemainingTime(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t remainingTime) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = LevelControl::Attributes::RemainingTime::Id; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload(attributePath, remainingTime)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR LevelControlClusterTest::WriteAttributeMinLevel(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t minLevel) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = LevelControl::Attributes::MinLevel::Id; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload(attributePath, minLevel)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR LevelControlClusterTest::WriteAttributeMaxLevel(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t maxLevel) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = LevelControl::Attributes::MaxLevel::Id; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload(attributePath, maxLevel)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR LevelControlClusterTest::WriteAttributeCurrentFrequency(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t currentFrequency) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = LevelControl::Attributes::CurrentFrequency::Id; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload(attributePath, currentFrequency)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR LevelControlClusterTest::WriteAttributeMinFrequency(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t minFrequency) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = LevelControl::Attributes::MinFrequency::Id; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload(attributePath, minFrequency)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR LevelControlClusterTest::WriteAttributeMaxFrequency(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t maxFrequency) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = LevelControl::Attributes::MaxFrequency::Id; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload(attributePath, maxFrequency)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + CHIP_ERROR LevelControlClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t clusterRevision) diff --git a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h index ea1238c5f13268..567f6d1a3340ad 100644 --- a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h +++ b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h @@ -507,6 +507,18 @@ class DLL_EXPORT LevelControlClusterTest : public LevelControlCluster CHIP_ERROR WriteAttributeCurrentLevel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t value); + CHIP_ERROR WriteAttributeRemainingTime(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeMinLevel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeMaxLevel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR WriteAttributeCurrentFrequency(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeMinFrequency(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); + CHIP_ERROR WriteAttributeMaxFrequency(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t value); }; diff --git a/zzz_generated/lighting-app/zap-generated/endpoint_config.h b/zzz_generated/lighting-app/zap-generated/endpoint_config.h index c0ec91ae5ddf51..0f211601dcd8da 100644 --- a/zzz_generated/lighting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lighting-app/zap-generated/endpoint_config.h @@ -963,7 +963,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 173 +#define GENERATED_ATTRIBUTE_COUNT 183 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1140,9 +1140,20 @@ /* Endpoint: 1, Cluster: Level Control (server) */ \ { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* options */ \ - { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ + { 0x0011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0xFE) }, /* on level */ \ + { 0x0012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* on transition time */ \ + { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ + { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ + { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Color Control (server) */ \ { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current hue */ \ @@ -1286,27 +1297,27 @@ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { 0x0008, \ ZAP_ATTRIBUTE_INDEX(138), \ - 5, \ - 7, \ + 15, \ + 23, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { 0x0300, \ - ZAP_ATTRIBUTE_INDEX(143), \ + ZAP_ATTRIBUTE_INDEX(153), \ 22, \ 36, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(165), \ + ZAP_ATTRIBUTE_INDEX(175), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOccupancySensingServer }, /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ { \ - 0x0006, ZAP_ATTRIBUTE_INDEX(169), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0006, ZAP_ATTRIBUTE_INDEX(179), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 2, Cluster: On/Off (client) */ \ { \ - 0x0007, ZAP_ATTRIBUTE_INDEX(170), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0007, ZAP_ATTRIBUTE_INDEX(180), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: On/off Switch Configuration (server) */ \ } @@ -1315,7 +1326,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 12, 3840 }, { ZAP_CLUSTER_INDEX(12), 4, 57 }, { ZAP_CLUSTER_INDEX(16), 2, 6 }, \ + { ZAP_CLUSTER_INDEX(0), 12, 3840 }, { ZAP_CLUSTER_INDEX(12), 4, 73 }, { ZAP_CLUSTER_INDEX(16), 2, 6 }, \ } // Largest attribute size is needed for various buffers @@ -1325,7 +1336,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (652) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (3903) +#define ATTRIBUTE_MAX_SIZE (3919) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) diff --git a/zzz_generated/thermostat/zap-generated/endpoint_config.h b/zzz_generated/thermostat/zap-generated/endpoint_config.h index 8697f543cec66c..ed1fb3fff0d6c9 100644 --- a/zzz_generated/thermostat/zap-generated/endpoint_config.h +++ b/zzz_generated/thermostat/zap-generated/endpoint_config.h @@ -1943,7 +1943,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 365 +#define GENERATED_ATTRIBUTE_COUNT 378 #define GENERATED_ATTRIBUTES \ { \ \ @@ -2152,8 +2152,22 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ + { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ + { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* options */ \ + { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ + { 0x0011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0xFE) }, /* on level */ \ + { 0x0012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* on transition time */ \ + { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ + { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ + { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { 0x0051, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* out of service */ \ @@ -2585,115 +2599,115 @@ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { 0x0008, \ ZAP_ATTRIBUTE_INDEX(158), \ - 2, \ - 3, \ + 15, \ + 23, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x000F, ZAP_ATTRIBUTE_INDEX(160), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x000F, ZAP_ATTRIBUTE_INDEX(173), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(164), 5, 1018, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(177), 5, 1018, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x0039, ZAP_ATTRIBUTE_INDEX(169), 15, 865, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0039, ZAP_ATTRIBUTE_INDEX(182), 15, 865, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ { \ - 0x003B, ZAP_ATTRIBUTE_INDEX(184), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003B, ZAP_ATTRIBUTE_INDEX(197), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(187), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(200), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ { 0x0101, \ - ZAP_ATTRIBUTE_INDEX(189), \ + ZAP_ATTRIBUTE_INDEX(202), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayDoorLockServer }, /* Endpoint: 1, Cluster: Door Lock (server) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(193), 19, 31, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0102, ZAP_ATTRIBUTE_INDEX(206), 19, 31, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (server) */ \ { \ - 0x0103, ZAP_ATTRIBUTE_INDEX(212), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0103, ZAP_ATTRIBUTE_INDEX(225), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Barrier Control (server) */ \ { \ - 0x0201, ZAP_ATTRIBUTE_INDEX(217), 18, 33, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0201, ZAP_ATTRIBUTE_INDEX(230), 18, 33, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Thermostat (server) */ \ { 0x0300, \ - ZAP_ATTRIBUTE_INDEX(235), \ + ZAP_ATTRIBUTE_INDEX(248), \ 51, \ 337, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(286), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0402, ZAP_ATTRIBUTE_INDEX(299), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ { \ - 0x0403, ZAP_ATTRIBUTE_INDEX(290), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0403, ZAP_ATTRIBUTE_INDEX(303), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ { \ - 0x0404, ZAP_ATTRIBUTE_INDEX(294), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0404, ZAP_ATTRIBUTE_INDEX(307), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(298), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0405, ZAP_ATTRIBUTE_INDEX(311), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ { 0x0500, \ - ZAP_ATTRIBUTE_INDEX(302), \ + ZAP_ATTRIBUTE_INDEX(315), \ 6, \ 16, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION) | \ ZAP_CLUSTER_MASK(MESSAGE_SENT_FUNCTION), \ chipFuncArrayIasZoneServer }, /* Endpoint: 1, Cluster: IAS Zone (server) */ \ { \ - 0x0503, ZAP_ATTRIBUTE_INDEX(308), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0503, ZAP_ATTRIBUTE_INDEX(321), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(310), 4, 322, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0504, ZAP_ATTRIBUTE_INDEX(323), 4, 322, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: TV Channel (server) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(314), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0505, ZAP_ATTRIBUTE_INDEX(327), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(316), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(329), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (server) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(317), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0507, ZAP_ATTRIBUTE_INDEX(330), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Input (server) */ \ { \ - 0x0508, ZAP_ATTRIBUTE_INDEX(319), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0508, ZAP_ATTRIBUTE_INDEX(332), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Low Power (server) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(320), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0509, ZAP_ATTRIBUTE_INDEX(333), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(321), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(334), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (server) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(324), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(337), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (server) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(326), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050C, ZAP_ATTRIBUTE_INDEX(339), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(328), 8, 108, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(341), 8, 108, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (server) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(336), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(349), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Account Login (server) */ \ { \ - 0x050F, ZAP_ATTRIBUTE_INDEX(337), 21, 1582, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050F, ZAP_ATTRIBUTE_INDEX(350), 21, 1582, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (server) */ \ { \ - 0xF000, ZAP_ATTRIBUTE_INDEX(358), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0xF000, ZAP_ATTRIBUTE_INDEX(371), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binding (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(359), \ + ZAP_ATTRIBUTE_INDEX(372), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(361), \ + ZAP_ATTRIBUTE_INDEX(374), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2705,7 +2719,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 16, 4362 }, { ZAP_CLUSTER_INDEX(16), 34, 6231 }, { ZAP_CLUSTER_INDEX(50), 2, 8 }, \ + { ZAP_CLUSTER_INDEX(0), 16, 4362 }, { ZAP_CLUSTER_INDEX(16), 34, 6251 }, { ZAP_CLUSTER_INDEX(50), 2, 8 }, \ } // Largest attribute size is needed for various buffers @@ -2715,7 +2729,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (1517) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (10601) +#define ATTRIBUTE_MAX_SIZE (10621) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) diff --git a/zzz_generated/tv-app/zap-generated/endpoint_config.h b/zzz_generated/tv-app/zap-generated/endpoint_config.h index 6a70ce697431a7..1ff27659da7123 100644 --- a/zzz_generated/tv-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-app/zap-generated/endpoint_config.h @@ -1573,7 +1573,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 212 +#define GENERATED_ATTRIBUTE_COUNT 225 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1809,8 +1809,22 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ + { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ + { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* options */ \ + { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ + { 0x0011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0xFE) }, /* on level */ \ + { 0x0012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* on transition time */ \ + { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ + { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ + { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Audio Output (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(5900) }, /* audio output list */ \ @@ -2019,33 +2033,33 @@ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { 0x0008, \ ZAP_ATTRIBUTE_INDEX(167), \ - 2, \ - 3, \ + 15, \ + 23, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 2, Cluster: Level Control (server) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(169), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(182), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Audio Output (server) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(172), 9, 59, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(185), 9, 59, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Media Playback (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(181), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(194), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Content Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(184), 8, 108, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(197), 8, 108, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Application Basic (server) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(192), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(205), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Account Login (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(193), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(206), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Content Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(196), 8, 108, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(209), 8, 108, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Application Basic (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(204), 8, 108, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(217), 8, 108, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 5, Cluster: Application Basic (server) */ \ } @@ -2054,7 +2068,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 19, 4367 }, { ZAP_CLUSTER_INDEX(19), 9, 1645 }, { ZAP_CLUSTER_INDEX(28), 3, 263 }, \ + { ZAP_CLUSTER_INDEX(0), 19, 4367 }, { ZAP_CLUSTER_INDEX(19), 9, 1645 }, { ZAP_CLUSTER_INDEX(28), 3, 283 }, \ { ZAP_CLUSTER_INDEX(31), 4, 679 }, { ZAP_CLUSTER_INDEX(35), 2, 618 }, { ZAP_CLUSTER_INDEX(37), 1, 108 }, \ } @@ -2065,7 +2079,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (651) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (7680) +#define ATTRIBUTE_MAX_SIZE (7700) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (6) diff --git a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h index 39d6be8a34e108..5313e5b4bdfa3e 100644 --- a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h @@ -1895,7 +1895,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 355 +#define GENERATED_ATTRIBUTE_COUNT 368 #define GENERATED_ATTRIBUTES \ { \ \ @@ -2103,8 +2103,22 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ + { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ + { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* options */ \ + { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ + { 0x0011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0xFE) }, /* on level */ \ + { 0x0012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* on transition time */ \ + { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ + { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ + { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { 0x0051, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* out of service */ \ @@ -2525,112 +2539,112 @@ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { 0x0008, \ ZAP_ATTRIBUTE_INDEX(157), \ - 2, \ - 3, \ + 15, \ + 23, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x000F, ZAP_ATTRIBUTE_INDEX(159), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x000F, ZAP_ATTRIBUTE_INDEX(172), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(163), 5, 1018, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(176), 5, 1018, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x0039, ZAP_ATTRIBUTE_INDEX(168), 15, 865, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0039, ZAP_ATTRIBUTE_INDEX(181), 15, 865, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ { \ - 0x003B, ZAP_ATTRIBUTE_INDEX(183), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003B, ZAP_ATTRIBUTE_INDEX(196), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(186), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(199), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ { 0x0101, \ - ZAP_ATTRIBUTE_INDEX(188), \ + ZAP_ATTRIBUTE_INDEX(201), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayDoorLockServer }, /* Endpoint: 1, Cluster: Door Lock (server) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(192), 19, 31, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0102, ZAP_ATTRIBUTE_INDEX(205), 19, 31, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (server) */ \ { \ - 0x0103, ZAP_ATTRIBUTE_INDEX(211), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0103, ZAP_ATTRIBUTE_INDEX(224), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Barrier Control (server) */ \ { \ - 0x0201, ZAP_ATTRIBUTE_INDEX(216), 10, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0201, ZAP_ATTRIBUTE_INDEX(229), 10, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Thermostat (server) */ \ { 0x0300, \ - ZAP_ATTRIBUTE_INDEX(226), \ + ZAP_ATTRIBUTE_INDEX(239), \ 51, \ 337, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(277), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0402, ZAP_ATTRIBUTE_INDEX(290), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ { \ - 0x0403, ZAP_ATTRIBUTE_INDEX(281), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0403, ZAP_ATTRIBUTE_INDEX(294), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ { \ - 0x0404, ZAP_ATTRIBUTE_INDEX(285), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0404, ZAP_ATTRIBUTE_INDEX(298), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(289), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0405, ZAP_ATTRIBUTE_INDEX(302), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ { 0x0500, \ - ZAP_ATTRIBUTE_INDEX(293), \ + ZAP_ATTRIBUTE_INDEX(306), \ 6, \ 16, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION) | \ ZAP_CLUSTER_MASK(MESSAGE_SENT_FUNCTION), \ chipFuncArrayIasZoneServer }, /* Endpoint: 1, Cluster: IAS Zone (server) */ \ { \ - 0x0503, ZAP_ATTRIBUTE_INDEX(299), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0503, ZAP_ATTRIBUTE_INDEX(312), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(301), 4, 322, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0504, ZAP_ATTRIBUTE_INDEX(314), 4, 322, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: TV Channel (server) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(305), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0505, ZAP_ATTRIBUTE_INDEX(318), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(307), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(320), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (server) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(308), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0507, ZAP_ATTRIBUTE_INDEX(321), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Input (server) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(310), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0509, ZAP_ATTRIBUTE_INDEX(323), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(311), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(324), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (server) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(314), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(327), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (server) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(316), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050C, ZAP_ATTRIBUTE_INDEX(329), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(318), 8, 108, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(331), 8, 108, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (server) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(326), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(339), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Account Login (server) */ \ { \ - 0x050F, ZAP_ATTRIBUTE_INDEX(327), 21, 1582, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050F, ZAP_ATTRIBUTE_INDEX(340), 21, 1582, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (server) */ \ { \ - 0xF000, ZAP_ATTRIBUTE_INDEX(348), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0xF000, ZAP_ATTRIBUTE_INDEX(361), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binding (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(349), \ + ZAP_ATTRIBUTE_INDEX(362), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(351), \ + ZAP_ATTRIBUTE_INDEX(364), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2642,7 +2656,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 16, 3962 }, { ZAP_CLUSTER_INDEX(16), 33, 6213 }, { ZAP_CLUSTER_INDEX(49), 2, 8 }, \ + { ZAP_CLUSTER_INDEX(0), 16, 3962 }, { ZAP_CLUSTER_INDEX(16), 33, 6233 }, { ZAP_CLUSTER_INDEX(49), 2, 8 }, \ } // Largest attribute size is needed for various buffers @@ -2652,7 +2666,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (1517) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (10183) +#define ATTRIBUTE_MAX_SIZE (10203) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3)